Resource management methods, devices, computer equipment, and storage media in the resource domain

By defining policy configuration tables and resource configuration tables in the resource domain, the resource usage of computing nodes can be managed in a more refined manner, solving the problem of low operation and maintenance efficiency and achieving more accurate resource management and improved virtual machine creation success rate.

CN115756835BActive Publication Date: 2026-11-10INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211388756.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-08
Publication Date
2026-11-10
Estimated Expiration
2042-11-08

AI Technical Summary

Technical Problem

In existing technologies, operations and maintenance personnel can only judge whether resources are sufficient based on the overall remaining resources in the resource domain, resulting in low operation and maintenance efficiency and an inability to accurately identify the available resources of computing nodes, leading to virtual machine creation failures.

Method used

By defining the strategy configuration table and resource configuration table, including standard resource specifications and threshold levels, available resources and total resources, resource management strategies are determined based on this information, enabling refined management of resource usage of computing nodes in the resource domain.

Benefits of technology

It improves operational efficiency, avoids virtual machine creation failures due to insufficient available resources on compute nodes, ensures that resource management strategies are in line with actual conditions, and provides early warnings of insufficient resources and notifications for expansion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756835B_ABST
    Figure CN115756835B_ABST
Patent Text Reader

Abstract

This application relates to a resource management method, apparatus, computer device, and storage medium for a resource domain. The method includes: determining a policy configuration table, which includes standard resource specifications and corresponding threshold watermarks for each standard resource specification; and determining a resource configuration table, which includes the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity available to each computing node in the resource domain under the standard resource specifications. Therefore, based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold watermarks, a resource management strategy for the resource domain is determined. This method can improve operational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a resource management method, apparatus, computer equipment, and storage medium for a resource domain. Background Technology

[0002] With the development of cloud computing, more and more applications are using virtual machines provided by IaaS to deploy applications. As the scale of applications increases, the scale of infrastructure clouds also increases, and the scale of compute nodes in a resource domain also increases. Among them, compute nodes are used to create and manage virtual machines. All virtual machines in the cloud platform run on compute nodes, and the configuration and scale of compute nodes determine the computing resource capacity that the cloud platform can provide.

[0003] Currently, operations and maintenance personnel can only determine whether the resources in a resource domain are sufficient based on the overall remaining resources in the resource domain.

[0004] However, the current operation and maintenance (O&M) methods suffer from low efficiency. For example, a resource domain currently has 10 compute nodes, each with 1u2g of remaining available resources, resulting in a total of 10u20g of remaining available resources for the entire resource domain. When a user needs 2u4g of resources to create a virtual machine, although the total available resources in the resource domain are sufficient, each compute node cannot actually provide 2u4g of available resources, causing the user's virtual machine creation to fail. The problem can only be identified after the failure, further reducing O&M efficiency. Summary of the Invention

[0005] Therefore, it is necessary to provide a resource management method, device, computer equipment, and storage medium for resource domains that can improve operational efficiency in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a resource management method for a resource domain. The method includes:

[0007] Determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level for each standard resource specification;

[0008] A resource configuration table is determined, which includes the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity of each computing node in the resource domain under the standard resource specification.

[0009] Based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold water level, determine the resource management strategy for the resource domain.

[0010] Secondly, this application also provides a resource management device for a resource domain. The device includes:

[0011] The first determining module is used to determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification.

[0012] The second determining module is used to determine a resource configuration table, which includes the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply.

[0013] The third determining module is used to determine the resource management strategy for a resource domain based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold water level.

[0014] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of any of the methods described above.

[0015] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0016] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of any of the methods described above.

[0017] The resource management method, apparatus, computer equipment, and storage medium for the aforementioned resource domain determine a strategy configuration table, which includes each standard resource specification and its corresponding threshold watermark. A resource configuration table is also determined, comprising the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply. Therefore, based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold watermark, the resource management strategy for the resource domain is determined. Since the available resource quantity corresponding to each standard resource specification is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply, the available resource quantity corresponding to each standard resource specification in this application is determined based on the actual situation of each computing node. For example, if each computing node has 1u2g of remaining available resources, then the available resource quantity corresponding to the standard specification 2u4g is 0. In other words, this application determines the available resource quantity corresponding to each standard resource specification, which is a more refined and accurate approach compared to traditional technologies that only determine the remaining available resources of the entire resource domain. Furthermore, for each standard resource specification, this application can determine a resource management strategy based on the available resource quantity corresponding to that standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold level. Since the available resource quantity corresponding to the standard resource specification is accurate, the resource management strategy determined by this application conforms to the actual situation of each computing node in the resource domain. This avoids the situation in traditional technologies where virtual machine creation fails due to insufficient available resources on computing nodes, requiring maintenance personnel to conduct reverse investigations, thereby improving operational efficiency. Attached Figure Description

[0018] Figure 1 This is a diagram illustrating the application environment of the resource management method for the resource domain in the embodiments of this application.

[0019] Figure 2 This is a flowchart illustrating the resource management method for a resource domain in an embodiment of this application.

[0020] Figure 3 This is a flowchart illustrating a resource management strategy for determining a resource domain in an embodiment of this application.

[0021] Figure 4 This is a schematic diagram of a process for determining a resource configuration table in an embodiment of this application;

[0022] Figure 5 This is a schematic diagram illustrating a process for determining the number of available virtual machines in an embodiment of this application;

[0023] Figure 6 This is a schematic diagram illustrating another process for determining the number of available virtual machines in an embodiment of this application;

[0024] Figure 7 This is an overall schematic diagram of the resource management method for the resource domain in the embodiments of this application;

[0025] Figure 8 This is a structural block diagram of the resource management device in the resource domain in the embodiments of this application;

[0026] Figure 9 This is a diagram showing the internal structure of a computer device in an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0028] Figure 1 This diagram illustrates the application environment of the resource management method for a resource domain in this application. The resource management method for a resource domain provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart TVs, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0029] Figure 2 This is a flowchart illustrating a resource management method for a resource domain in an embodiment of this application. This method can be applied to... Figure 1 In one embodiment of the server shown, such as Figure 2 As shown, it includes the following steps:

[0030] S201, Determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level.

[0031] In this embodiment, the server first determines a policy configuration table, which includes each standard resource specification and its corresponding threshold level. It is understood that the resource status of each computing node in the resource domain can be represented by resource specifications. A resource specification may include at least one sub-resource specification, and typically, there are multiple sub-resource specifications. For example, sub-resource specifications may include memory specifications and central processing unit (CPU) specifications. Memory specifications are usually measured in gigabytes (g), for example, 2g represents 2GB of memory; CPU specifications are usually measured in microbytes (u), for example, 2u represents a dual-core CPU.

[0032] Each standard resource specification can be understood as the various possibilities of resource specifications required when creating and managing virtual machines. Each standard resource specification can include standard memory specifications and standard CPU specifications. For example, each standard resource specification includes 1u1g, 1u2g, 1u3g, 1u4g, 2u1g, etc.

[0033] The threshold water level corresponding to each standard resource specification is used to measure the health status of the resource domain under each standard specification. The threshold water level corresponding to each standard resource specification can be the ratio of the available resources corresponding to each standard resource specification to the total resources of the resource domain, or it can be the ratio of the used resources corresponding to each standard resource specification to the total resources of the resource domain. If each standard resource specification includes multiple sub-standard resource specifications, such as standard memory specifications and standard CPU specifications, the threshold water level corresponding to the standard memory specification and the threshold water level corresponding to the standard CPU specification can be calculated separately. Of course, the standard memory specification and the standard CPU specification can also be treated as a whole and set with a corresponding threshold water level. This embodiment does not impose specific restrictions on the calculation method of the threshold water level.

[0034] Optionally, the server can receive the first threshold water level of each standard resource specification sent by the terminal, and use the first threshold water level of each standard resource specification as the threshold water level corresponding to each standard resource specification. For example, if the user specifies the first threshold water level of standard resource specification 1u1g as 80%, then the threshold water level corresponding to standard resource specification 1u1g in the policy configuration table is 80%. Optionally, the server can also receive the first threshold water level of each standard resource specification and the super-resolution ratio of each standard resource specification sent by the terminal, and determine the threshold water level corresponding to each standard resource specification based on the first threshold water level of each standard resource specification and the super-resolution ratio of each standard resource specification. The over-allocation ratio for each standard resource specification represents the over-allocation percentage of that specification. Since most users don't utilize virtual resources at full capacity, cloud computing typically configures over-allocation ratios to improve resource utilization. For example, without over-allocation, 96GB of memory can only create 6 virtual machines requiring 16GB each; with an over-allocation ratio of 1.5, 9 virtual machines requiring 16GB each can be created; and with an over-allocation ratio of 2, 12 virtual machines requiring 16GB each can be created. Therefore, the threshold level for each standard resource specification changes with its over-allocation ratio. For instance, if a user specifies a first threshold level of 70% for standard resource specification 1u1g, with over-allocation ratios for memory and CPU both at 1.2, then the threshold level for standard resource specification 1u1g in the policy configuration table would be 84%.

[0035] Specifically, the server determines the policy configuration table as shown in Table 1 below. Of course, the policy configuration table can also be implemented in other ways, as long as the policy configuration table includes the mapping relationship between each standard resource specification and the corresponding threshold water level.

[0036] Table 1 Strategy Configuration Table

[0037]

[0038] S202, determine the resource configuration table. The resource configuration table includes the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity of each computing node in the resource domain under the standard resource specification.

[0039] In this embodiment, the server also needs to determine a resource configuration table, which includes the available resource quantity and the total resource quantity of each standard resource specification.

[0040] This example illustrates a resource domain comprising 10 compute nodes. The server can use the OpenStack API to read the resource status of these 10 compute nodes in real time. For instance, the server can read the total and used resources of each of the 10 compute nodes through the OpenStack API, thereby determining the available resources for each standard resource specification and the total resources of the resource domain. Specifically, the available resources for each standard resource specification represent the resource domain's supply capacity for that standard resource specification across all compute nodes. Assuming each of the 10 compute nodes has an available resource quantity of 1u1g, then for standard resource specification 1u1g, each compute node can supply 1u1g of resources; therefore, the available resources for standard resource specification 1u1g are 10u10g. For standard resource specification 2u1g, each compute node cannot supply 2u1g of resources; therefore, the available resources for standard resource specification 2u1g are 0. The principle is the same for other standard resource specifications, and will not be elaborated further here. In other words, the available resource quantity corresponding to each standard resource specification is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply.

[0041] The total resource quantity of the resource domain can be determined by summing the total resource quantities of these 10 compute nodes. For example, if the total resource quantity of each compute node is 20u20g, then the total resource quantity of the resource domain is 200u200g.

[0042] Specifically, the server determines the resource configuration table as shown in Table 2 below. Of course, the resource configuration table can also be implemented in other ways, as long as the resource configuration table includes the total resource quantity of the resource domain and the mapping relationship between each standard resource specification and the available resource quantity corresponding to each standard resource specification.

[0043] Table 2 Resource Allocation Table

[0044]

[0045] S203. Based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold water level, determine the resource management strategy for the resource domain.

[0046] In this embodiment, the server can determine the resource management strategy for a resource domain based on the available resources corresponding to each standard resource specification, the total resources of the resource domain, and the corresponding threshold waterline. The resource management strategy for a resource domain includes expanding the resource domain, not processing the resource domain, and allocating resources to the resource domain. One possible implementation is that the server can set up a scheduled task to update the available resources corresponding to each standard resource specification through the OpenStack interface at preset intervals, and compare a first ratio of the available resources corresponding to each standard resource specification to the total resources of the resource domain with the threshold waterline corresponding to each standard resource specification. If the first ratio is lower than the threshold waterline corresponding to each standard resource specification, the server notifies the corresponding operations and maintenance personnel to expand the resource domain. For example, the threshold waterline for a standard resource specification of 1u1g is 50%. The server updates the resource configuration table every hour. In the resource configuration table, the available resource quantity corresponding to 1u1g is 10u20g, and the total resource quantity of the resource domain is 40u50g. The server can calculate the capacity of each sub-resource specification, such as memory and CPU, separately. If any first ratio is lower than the threshold waterline corresponding to the standard resource specification, the server notifies the corresponding operations and maintenance personnel to expand the resource domain. Specifically, the first ratio of the available resource quantity of 10u corresponding to the standard CPU specification of 1u to the total resource quantity of 40u in the resource domain is 25%, and the first ratio of the available resource quantity of 20g corresponding to the standard memory specification of 1g to the total resource quantity of 50g in the resource domain is 40%. Since the first ratio of the available resource quantity of 10u corresponding to 1u to the total resource quantity of 40u in the resource domain is 25%, which is less than the threshold waterline of 50% for the standard resource specification of 1u1g, the server notifies the corresponding operations and maintenance personnel to expand the resource domain, thus determining the resource management strategy of the resource domain.

[0047] The resource management method for a resource domain provided in this embodiment determines a strategy configuration table, which includes each standard resource specification and its corresponding threshold watermark, and a resource configuration table, which includes the available resource quantity for each standard resource specification and the total resource quantity of the resource domain. Then, based on the available resource quantity for each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold watermark, a resource management strategy for the resource domain is determined. Since the available resource quantity for each standard resource specification is determined based on the resource quantity available to each computing node in the resource domain under the standard resource specification, the available resource quantity for each standard resource specification in this application is determined based on the actual situation of each computing node. For example, if each computing node has 1u2g of remaining available resources, then the available resource quantity corresponding to the standard specification 2u4g is 0. In other words, this application's determination of the available resource quantity for each standard resource specification is a more refined and accurate approach compared to traditional techniques that only determine the remaining available resources of the entire resource domain. Furthermore, for each standard resource specification, this application can determine a resource management strategy based on the available resource quantity corresponding to the standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold level. Since the available resource quantity corresponding to the standard resource specification is accurate, the resource management strategy determined by this application conforms to the actual situation of each computing node in the resource domain. This avoids the situation in traditional technologies where virtual machine creation fails due to insufficient available resources of computing nodes, requiring maintenance personnel to conduct reverse investigations, thereby improving maintenance efficiency.

[0048] Figure 3 This is a flowchart illustrating a resource management strategy for determining a resource domain in an embodiment of this application. (Refer to...) Figure 3 This embodiment relates to an optional implementation of how to determine the resource management strategy of a resource domain. Based on the above embodiment, step S203, which determines the resource management strategy of a resource domain according to the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold water level, includes the following steps:

[0049] S301, determine the target resource specification from the various standard resource specifications.

[0050] In this embodiment, before determining the resource management policy for a resource domain, the server first needs to determine the target resource specification from among the various standard resource specifications. The target resource specification can be one standard resource specification, or initially multiple standard resource specifications. The target resource specification can be one or more standard resource specifications determined randomly or sequentially by the server, or it can be one or more standard resource specifications specified by the user.

[0051] S302, based on the available resource quantity corresponding to each standard resource specification, determine the available resource quantity corresponding to the target resource specification in the target application scenario.

[0052] In this embodiment, the server determines the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each standard resource specification. The target application scenario can be one of a scheduled task scenario and a user-submitted task scenario. For example, if the server determines that the target resource specification is 1u1g, and the available resource quantity corresponding to 1u1g is 10u10g, and the target application scenario is a scheduled task scenario, then the server determines that the available resource quantity of the target resource specification in the target application scenario is 10u10g.

[0053] S303, determine the first ratio, wherein the first ratio is equal to the ratio of the available resource quantity corresponding to the target resource specification in the target application scenario to the total resource quantity.

[0054] In this embodiment, the server determines a first ratio between the available resource quantity corresponding to the target resource specification in the target application scenario and the total resource quantity of the resource domain. It is understood that since a resource specification includes at least one sub-resource specification, the server can determine multiple first ratios. For example, if the available resource quantity corresponding to the target resource specification 1u1g in the target application scenario is 10u12g, and the total resource quantity of the resource domain is 200u200g, then the server determines the first ratios to be 5% and 6%, respectively.

[0055] S304. Determine the resource management strategy for the resource domain based on the first ratio and the threshold water level corresponding to the target resource specification.

[0056] In this embodiment, the server determines the resource management strategy for the resource domain based on the first ratio and the threshold level corresponding to the target resource specification. For example, if the first ratio is less than the threshold level corresponding to the target resource specification, the server notifies the corresponding operations and maintenance personnel to expand the resource domain. The operations and maintenance personnel can maintain this in the policy configuration table; that is, the policy configuration table also includes the correspondence between each standard resource specification and the corresponding operations and maintenance personnel.

[0057] This embodiment determines the target resource specification from various standard resource specifications, and then determines the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each standard resource specification. A first ratio is then determined, and based on the first ratio and the threshold waterline corresponding to the target resource specification, the resource management strategy for the resource domain is determined. Since the first ratio is equal to the ratio of the available resource quantity of the target resource specification in the target application scenario to the total resource quantity, this application can determine the resource management strategy for the resource domain based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold waterline. Furthermore, the determined resource management strategy conforms to the actual situation of each computing node in the resource domain, avoiding the situation in traditional technologies where virtual machine creation fails due to insufficient available resources on computing nodes, requiring maintenance personnel to conduct reverse investigations, thus improving maintenance efficiency.

[0058] Optionally, in step S302 above, determining the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each standard resource specification can be achieved in the following way:

[0059] If the target application scenario is a scheduled task scenario, then the available resource quantity corresponding to the target resource specification will be used as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0060] In this embodiment, if the target application scenario is a scheduled task scenario, the user does not need to request resources. That is, the server only needs to determine whether the available resource quantity corresponding to the target resource specification is in a healthy state. Therefore, the server uses the available resource quantity corresponding to the target resource specification as the available resource quantity corresponding to the target resource specification in the target application scenario. For example, referring to Table 2, if the target resource specification is 1u1g and the target application scenario is a scheduled task scenario, then the server determines that the available resource quantity corresponding to the target resource specification 1u1g in the scheduled task scenario is 100u100g.

[0061] In this embodiment, if the target application scenario is a scheduled task scenario, the available resource quantity corresponding to the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario. This application takes into account the actual situation of scheduled task scenarios. Therefore, the available resource quantity corresponding to the target resource specification in the scheduled task scenario is accurate, which further improves the subsequent operation and maintenance efficiency.

[0062] Optionally, S302 above, which determines the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each standard resource specification, can also be implemented in the following way:

[0063] If the target application scenario is a user-requested task scenario, then the difference between the available resource quantity corresponding to the target resource specification and the target resource specification will be used as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0064] In this embodiment, if the target application scenario is a user requesting a task, the user needs to request resources. The user sends a resource request to the server through the terminal, and the target resource specification is determined based on the resource request. For example, if the user requests 1u2g of resources, then the target resource specification is 1u2g. Further, the server needs to determine whether the available resource quantity corresponding to the target resource specification is still in a healthy state after the user requests the resources. That is, the server uses the difference between the available resource quantity corresponding to the target resource specification and the target resource specification as the available resource quantity corresponding to the target resource specification in the target application scenario. For example, referring to Table 2, if the target resource specification is 1u2g, the target application scenario is a user requesting a task, and the available resource quantity corresponding to the target resource specification 1u2g is 50u50g, then the available resource quantity corresponding to the target resource specification 1u2g in the user requesting a task scenario is 49u48g.

[0065] In this embodiment, if the target application scenario is a user-requested task scenario, the difference between the available resource quantity corresponding to the target resource specification and the target resource specification itself is taken as the available resource quantity corresponding to the target resource specification in the target application scenario. This application takes into account the actual situation of user-requested task scenarios; therefore, the available resource quantity corresponding to the target resource specification in user-requested task scenarios is accurate, further improving subsequent operation and maintenance efficiency.

[0066] Optionally, the resource management strategy for the resource domain determined in S304 above, based on the first ratio and the threshold water level corresponding to the target resource specification, can be implemented in the following way:

[0067] If the first ratio is less than or equal to the threshold water level corresponding to the target resource specification, the first prompt message is output. The first prompt message is used to determine the resource management strategy of the resource domain.

[0068] In this embodiment, if the first ratio is less than or equal to the threshold level corresponding to the target resource specification, the server outputs a first prompt message. This first prompt message is used to determine the resource management strategy for the resource domain. For example, if the target resource specification is 1u1g, in a scheduled task scenario, the available resource quantity corresponding to the target resource specification 1u1g in the target application scenario is 10u10g, and the total resource quantity of the resource domain is 200u200g, the server determines that the first ratio is 5%. Since the first ratio is less than or equal to the threshold level of 50% corresponding to the target resource specification 1u1g, the server outputs the first prompt message to notify the corresponding operations and maintenance personnel to expand the resource domain to determine the resource domain management strategy. The same applies to user-submitted task scenarios, and will not be elaborated further here.

[0069] In this embodiment, if the first ratio is less than or equal to the threshold water level corresponding to the target resource specification, the first prompt information is output. The first prompt information is used to determine the resource management strategy of the resource domain. In other words, this application provides an early warning of the possibility that the available resources corresponding to the target resource specification may be insufficient in different application scenarios, thereby improving operation and maintenance efficiency.

[0070] Optionally, the resource management strategy for the resource domain determined in step S304 above, based on the first ratio and the threshold water level corresponding to the target resource specification, can also be implemented in the following way:

[0071] If the first ratio is greater than the threshold water level corresponding to the target resource specification, then the resource management strategy for the resource domain is determined based on the target resource specification.

[0072] In this embodiment, if the first ratio is greater than the threshold waterline corresponding to the target resource specification, the resource management strategy of the resource domain is determined based on the target resource specification. For example, if the target resource specification is 1u2g, in a user request task scenario, the available resource quantity corresponding to the target resource specification 1u2g in the target application scenario is 49u48g, and the total resource quantity of the resource domain is 200u200g. The server determines that the first ratios are 24.5% and 24%, respectively. Both the first ratios of 24.5% and 24% are greater than the threshold waterline of 20% corresponding to the target resource specification 1u2g. Therefore, the server calls OpenStack to perform resource provisioning operations from a certain compute node based on the target resource specification 1u2g, that is, to allocate resources to the resource domain, thereby determining the resource management strategy of the resource domain.

[0073] In this embodiment, if the first ratio is greater than the threshold water level corresponding to the target resource specification, the resource management strategy of the resource domain is determined according to the target resource specification. When the available resources corresponding to the target resource specification are sufficient in different application scenarios, the resource management strategy of the resource domain is determined according to the target resource specification, thereby improving the operation and maintenance efficiency.

[0074] Figure 4 This is a schematic diagram of a process for determining a resource allocation table in an embodiment of this application. (Refer to...) Figure 4 This embodiment relates to an optional implementation of how to determine the resource configuration table. Based on the above embodiment, step S201, determining the policy configuration table, includes the following steps:

[0075] S401, determine the total amount of resources and the amount of resources used by each computing node in the resource domain.

[0076] In this embodiment, the server determines the total resources and used resources of each compute node in the resource domain. One possible approach is for the server to read the total resources and used resources of each compute node in the resource domain through the OpenStack interface. Specifically, the server reads the total CPU, total memory, used CPU, and used memory of each compute node in the resource domain through the OpenStack interface.

[0077] S402 determines the number of virtual machines that can be supplied to each computing node under each standard resource specification, based on the total resources and used resources of each computing node.

[0078] In this embodiment, the server determines the number of virtual machines that can be supplied to each compute node under each standard resource specification based on the total resources and the resources already used by each compute node. Of course, the server may also use other methods to determine the number of virtual machines that can be supplied to each compute node under each standard resource specification, and this embodiment does not impose any restrictions.

[0079] Specifically, the server can also determine the resource configuration table as shown in Table 3 below. It should be noted that the data in Tables 1, 2, and 3 are merely examples for ease of understanding.

[0080] Table 3 Resource Allocation Table

[0081]

[0082] S403, based on the same standard resource specification and the number of virtual machines that can be supplied to each compute node under the same standard resource specification, determine the amount of available resources corresponding to each standard resource specification.

[0083] In this embodiment, the server determines the available resource quantity corresponding to each standard resource specification based on the same standard resource specification and the number of virtual machines that can be supplied to each compute node under the same standard resource specification. Specifically, referring to Table 3, taking the standard resource specification 1u1g as an example, the number of virtual machines that can be supplied to each compute node is 4, (1u1g)×4×10=40u40g, so the server determines the available resource quantity corresponding to the standard resource specification 1u1g to be 40u40g. The principle is the same for other standard resource specifications, and will not be repeated here.

[0084] S404, determine the resource allocation table based on the available resource quantity corresponding to each standard resource specification.

[0085] In this embodiment, the server can determine the resource configuration table based on the available resource quantity corresponding to each of the above standard resource specifications.

[0086] In this embodiment, the total and used resources of each compute node in the resource domain are determined. Based on these resources, the number of virtual machines (VMs) that can be supplied to each compute node under each standard resource specification is determined. Then, based on the same standard resource specification and the number of VMs that can be supplied to each compute node under that specification, the available resources corresponding to each standard resource specification are determined. Finally, a resource configuration table is determined based on the available resources corresponding to each standard resource specification. Since the available resources corresponding to each standard resource specification are determined based on the same standard resource specification and the number of VMs that can be supplied to each compute node under that specification, the available resources and the total resources of the resource domain determined in this application are accurate values ​​that reflect the actual resource situation, and therefore, the determined resource configuration table is accurate.

[0087] Figure 5 This is a schematic diagram of a process for determining the number of available virtual machines in an embodiment of this application. (Refer to...) Figure 5 This embodiment relates to an optional implementation of how to determine the number of virtual machines that can be supplied to each compute node under each standard resource specification. Based on the above embodiment, step S402, which determines the number of virtual machines that can be supplied to each compute node under each standard resource specification according to the total resource quantity and the used resource quantity of each compute node, includes the following steps:

[0088] S501, subtract the used resources of each computing node from the total resources of each computing node to determine the first available resources of each computing node. The first available resources include at least two sub-available resources.

[0089] In this embodiment, the server reads the total resource quantity and the used resource quantity of each compute node in the resource domain through the OpenStack interface. The total resource quantity of each compute node is subtracted from the used resource quantity to determine the first available resource quantity for each compute node. Specifically, the first available resource quantity includes CPU and memory; that is, the first available resource quantity includes the available CPU resource quantity and the available memory resource quantity. Taking compute node 1 as an example, if the total CPU resource quantity is 8u and the used resource quantity is 4u, then the available CPU resource quantity of compute node 1 is 4u; if the total memory resource quantity is 32g and the used resource quantity is 16g, then the available memory resource quantity of compute node 1 is 16g. Therefore, the first available resource quantity of compute node 1 is 4u16g.

[0090] S502, based on the quotient obtained by dividing the sub-available resources of each compute node by the corresponding sub-standard resource specification under the standard resource specification, determine the number of virtual machines that can be supplied to each compute node under each standard resource specification.

[0091] In this embodiment, the server determines the number of virtual machines that can be supplied by each computing node under each standard resource specification by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification. Referring to Table 3, taking computing node 1 under the standard resource specification 1u1g as an example, if the first available resource quantity of the computing node is 4u16g, and the sub-available resource quantities are CPU resource quantity 4u and memory resource quantity 16g, the first available resource quantity 4u16g includes the sub-available resource quantity 4u and the sub-available resource quantity 16g. The standard resource specification 1u1g includes the sub-standard specification 1u and the sub-standard specification 1g. Dividing 4u by 1u yields a quotient of 4, and dividing 16g by 1g yields a quotient of 16. Further, based on the quotients 4 and 16, for example, taking the minimum value of the quotients and multiplying it by a preset coefficient 'a', the number of virtual machines that can be supplied by computing node 1 under the standard resource specification 1u1g can be determined, where 'a' is an integer less than or equal to 1.

[0092] In this embodiment, the total resource quantity of each computing node is subtracted from the used resource quantity of each computing node to determine the first available resource quantity of each computing node. The first available resource quantity includes at least two sub-available resource quantities. Based on the quotient obtained by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification, the number of virtual machines that can be supplied by each computing node under each standard resource specification is determined. Therefore, the number of virtual machines that can be supplied by each computing node under each standard resource specification determined in this application is consistent with the actual situation of each computing node in the resource domain, thereby enabling the determination of the corresponding resource management strategy to improve operation and maintenance efficiency.

[0093] Figure 6 This is a schematic diagram illustrating another process for determining the number of available virtual machines in an embodiment of this application. (Refer to...) Figure 6 This embodiment relates to an optional implementation of how to determine the number of virtual machines that can be supplied to each compute node under each standard resource specification. Based on the above embodiment, step S502, which determines the number of virtual machines that can be supplied to each compute node under each standard resource specification by dividing the sub-available resource quantity of each compute node by the corresponding sub-standard resource specification under the standard resource specification, includes the following steps:

[0094] S601, determine the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node.

[0095] In this embodiment, the server determines the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node. Continuing with the example of S502 above, the server determines the quotients corresponding to the sub-available resource quantities 4u and 16g of computing node 1, that is, the minimum value among the quotients 4 and 16.

[0096] S602, the minimum value among the quotients corresponding to the sub-available resources of each compute node is taken as the number of virtual machines that can be supplied to the corresponding compute node.

[0097] In this embodiment, the server uses the minimum value among the quotients corresponding to the sub-available resources of each compute node as the number of virtual machines that can be supplied to the corresponding compute node. Continuing with the example in S601 above, the server directly determines the minimum quotient 4 and uses the minimum quotient 4 as the number of virtual machines that can be supplied to compute node 1 under the standard resource specification 1u1g. Similarly, the server determines the number of virtual machines that can be supplied to each compute node under other standard resource specifications, resulting in the resource configuration table shown in Table 4, which will not be described in detail here.

[0098] This embodiment determines the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node, and uses the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node as the number of virtual machines that can be supplied by the corresponding computing node. Since the number of virtual machines that can be supplied by each computing node under each standard resource specification is determined based on the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node in this application is necessarily that computing node, the determined number of virtual machines that can be supplied by each computing node is the number of virtual machines that can be provided under each standard resource specification. Thus, based on the same standard resource specification and the number of virtual machines that can be supplied by each computing node under the same standard resource specification, the available resource quantity corresponding to each standard resource specification can be determined, so as to determine the resource configuration table.

[0099] Figure 7 This is a schematic diagram of the overall resource management method for the resource domain in the embodiments of this application. For example... Figure 7 As shown, this application proposes a cloud management platform, which runs in a system such as... Figure 1 In the server shown, the database (DB) and resource domain are located on the cloud or other network servers. Specifically, the resource domain itself is located on a private cloud. Users or operations and maintenance personnel can log in to the cloud management platform's front-end page through a terminal. For example, users can submit resource requests through the front-end page, and operations and maintenance personnel can configure threshold levels corresponding to various standard resource specifications, etc., through the front-end page.

[0100] Furthermore, the policy configuration module in the cloud management platform determines a policy configuration table, which includes each standard resource specification and its corresponding threshold level. Additionally, the resource calculation module in the cloud management platform also determines a resource configuration table, which includes the available resource quantity for each standard resource specification and the total resource quantity for each resource domain.

[0101] The cloud management platform in this application includes two application scenarios: a scheduled task scenario and a user-submitted task scenario. In the scheduled task scenario, the cloud management platform determines the target resource specifications according to a preset order. In the user-submitted task scenario, the user specifies the target resource specifications. The available resource quantity corresponding to the target resource specifications differs in different application scenarios. The available resource quantity corresponding to the target resource specifications in the scheduled task scenario is simply the available resource quantity corresponding to the target resource specifications. In the user-submitted task scenario, the available resource quantity corresponding to the target resource specifications is the difference between the available resource quantity corresponding to the target resource specifications and the target resource specifications themselves.

[0102] Furthermore, in the scheduled task scenario, the scheduled task module in the cloud management platform drives the resource calculation module to update the resource configuration table at fixed intervals and compares the first ratio with the threshold waterline corresponding to the target resource specification. If the first ratio is less than or equal to the threshold waterline corresponding to the target resource specification, the policy execution module sends a prompt message to the terminal to notify the corresponding operations and maintenance personnel to expand the resource domain. Here, the first ratio is equal to the ratio of the available resource quantity to the total resource quantity corresponding to the target resource specification in the scheduled task scenario.

[0103] In a user-requested task scenario, the policy configuration module on the server receives the user's resource request, which includes the target resource specification. The policy configuration module then drives the resource calculation module to compare a first ratio with the threshold level corresponding to the target resource specification. If the first ratio is less than or equal to the threshold level, the policy execution module sends a notification to the terminal to instruct the relevant operations personnel to expand the resource domain. If the first ratio is greater than the threshold level, the policy execution module invokes OpenStack to perform resource provisioning operations from the resource domain. The first ratio is equal to the ratio of the available resources corresponding to the target resource specification to the total resources in the user-requested task scenario.

[0104] In summary, this application manages the resource usage of different computing nodes within a resource domain in a refined manner, calculating in real-time the available supply capacity for different standard resource specifications on different computing nodes, i.e., the available resource quantity corresponding to each standard resource specification. Furthermore, this application sets corresponding threshold watermarks for different standard resource specifications within the resource domain. Based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold watermarks, the resource management strategy for the resource domain can be determined. Through this resource domain management strategy, problems of localized resource shortages in the current resource domain can be detected in advance, and users can be notified to change resource specifications in advance, or maintenance personnel can be informed in advance to expand the resource domain. This early warning of resource shortages avoids high resource supply failure rates and untimely responses to resource shortages, improving the success rate of user resource requests and virtual machine creation, i.e., the success rate of resource supply. When computing node failures occur in the resource domain, the success rate of virtual machine migration can also be guaranteed, ensuring the normal and stable operation of the resource domain, thereby improving operational efficiency.

[0105] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0106] Based on the same inventive concept, this application also provides a resource management device for implementing the resource management method for the resource domain described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more resource management device embodiments provided below can be found in the limitations of the resource management method for the resource domain described above, and will not be repeated here.

[0107] Figure 8 This is a structural block diagram of the resource management device in the resource domain in the embodiments of this application, such as... Figure 8 As shown, this application embodiment provides a resource management device 800 for a resource domain, including: a first determining module 801, a second determining module 802, and a third determining module 803, wherein:

[0108] The first determining module 801 is used to determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification.

[0109] The second determining module 802 is used to determine the resource configuration table, which includes the available resource quantity corresponding to each standard resource specification and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity of each computing node in the resource domain under the standard resource specification.

[0110] The third determination module 803 is used to determine the resource management strategy of the resource domain based on the available resource quantity corresponding to each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold water level.

[0111] The resource management device for the resource domain provided in this application determines the resource domain's resource management strategy by establishing a strategy configuration table, which includes each standard resource specification and its corresponding threshold level, and a resource configuration table, which includes the available resource quantity for each standard resource specification and the total resource quantity of the resource domain. Based on the available resource quantity for each standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold level, the resource management strategy for the resource domain is determined. Since the available resource quantity for each standard resource specification is determined based on the resource quantity available to each computing node in the resource domain under the standard resource specification, the available resource quantity for each standard resource specification in this application is determined based on the actual situation of each computing node. For example, if each computing node has 1u2g of remaining available resources, then the available resource quantity corresponding to the standard specification 2u4g is 0. In other words, the method used in this application to determine the available resource quantity for each standard resource specification is more refined and accurate than the traditional approach of only determining the remaining available resources of the entire resource domain. Furthermore, for each standard resource specification, this application can determine a resource management strategy based on the available resource quantity corresponding to the standard resource specification, the total resource quantity of the resource domain, and the corresponding threshold level. Since the available resource quantity corresponding to the standard resource specification is accurate, the resource management strategy determined by this application conforms to the actual situation of each computing node in the resource domain. This avoids the situation in traditional technologies where virtual machine creation fails due to insufficient available resources of computing nodes, requiring maintenance personnel to conduct reverse investigations, thereby improving maintenance efficiency.

[0112] Optionally, the third determining module 803 includes:

[0113] The first determining unit is used to determine the target resource specification from the various standard resource specifications.

[0114] The second determining unit is used to determine the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each standard resource specification.

[0115] The third determining unit is used to determine the first ratio, wherein the first ratio is equal to the ratio of the available resource quantity corresponding to the target resource specification in the target application scenario to the total resource quantity.

[0116] The fourth determining unit is used to determine the resource management strategy of the resource domain based on the first ratio and the threshold water level corresponding to the target resource specification.

[0117] Optionally, the second determining unit is specifically used to determine, if the target application scenario is a timed task scenario, the available resource quantity corresponding to the target resource specification as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0118] Optionally, the second determining unit is further specifically used to, if the target application scenario is a user-requested task scenario, take the difference between the available resource quantity corresponding to the target resource specification and the target resource specification as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0119] Optionally, the fourth determining unit is specifically used to output a first prompt message if the first ratio is less than or equal to the threshold water level corresponding to the target resource specification. The first prompt message is used to determine the resource management strategy of the resource domain.

[0120] Optionally, the fourth determining unit is also specifically used to determine the resource management strategy of the resource domain based on the target resource specification if the first ratio is greater than the threshold water level corresponding to the target resource specification.

[0121] Optionally, the first determining module 801 includes:

[0122] The fifth determining unit is used to determine the total amount of resources and the amount of resources used by each computing node in the resource domain.

[0123] The sixth determining unit is used to determine the number of virtual machines that can be supplied to each computing node under each standard resource specification, based on the total resources and the resources already used by each computing node.

[0124] The seventh determining unit is used to determine the available resource quantity corresponding to each standard resource specification based on the same standard resource specification and the number of available virtual machines corresponding to each computing node under the same standard resource specification.

[0125] The eighth determining unit is used to determine the resource allocation table based on the available resource quantity corresponding to each standard resource specification.

[0126] Optionally, the sixth determining unit includes:

[0127] The first determining subunit is used to subtract the used resources of each computing node from the total resources of each computing node to determine the first available resources of each computing node. The first available resources include at least two sub-available resources.

[0128] The second determining subunit is used to determine the number of virtual machines that can be supplied to each computing node under each standard resource specification based on the quotient obtained by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification.

[0129] Optionally, the second determining subunit is specifically used to determine the minimum value among the quotients corresponding to the sub-available resources of each computing node; and to use the minimum value among the quotients corresponding to the sub-available resources of each computing node as the number of virtual machines that can be supplied to the corresponding computing node.

[0130] Each module in the resource management device of the aforementioned resource domain can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0131] Figure 9 This is an internal structure diagram of a computer device in an embodiment of this application. This application provides a computer device, which may be a server, and its internal structure diagram can be as follows. Figure 9 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores relevant data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a resource domain resource management method.

[0132] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0134] Determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification;

[0135] A resource configuration table is determined, which includes the available resource quantity corresponding to each of the standard resource specifications and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply.

[0136] Based on the available resource quantity corresponding to each of the standard resource specifications, the total resource quantity of the resource domain, and the corresponding threshold water level, the resource management strategy of the resource domain is determined.

[0137] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0138] Determine the target resource specification from each of the aforementioned standard resource specifications;

[0139] Based on the available resource quantity corresponding to each of the standard resource specifications, determine the available resource quantity corresponding to the target resource specification in the target application scenario;

[0140] A first ratio is determined, wherein the first ratio is equal to the ratio of the available resource quantity corresponding to the target resource specification in the target application scenario to the total resource quantity;

[0141] Based on the first ratio and the threshold water level corresponding to the target resource specification, the resource management strategy of the resource domain is determined.

[0142] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0143] If the target application scenario is a scheduled task scenario, then the available resource quantity corresponding to the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0144] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0145] If the target application scenario is a user-requested task scenario, then the difference between the available resource quantity corresponding to the target resource specification and the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0146] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0147] If the first ratio is less than or equal to the threshold water level corresponding to the target resource specification, then a first prompt message is output, which is used to determine the resource management strategy of the resource domain.

[0148] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0149] If the first ratio is greater than the threshold water level corresponding to the target resource specification, then the resource management strategy of the resource domain is determined according to the target resource specification.

[0150] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0151] Determine the total resource quantity and the used resource quantity of each computing node in the resource domain;

[0152] Based on the total resources and used resources of each computing node, determine the number of virtual machines that can be supplied to each computing node under each standard resource specification;

[0153] Based on the same standard resource specification and the number of available virtual machines corresponding to each computing node under the same standard resource specification, determine the amount of available resources corresponding to each of the same standard resource specifications;

[0154] The resource configuration table is determined based on the available resource quantity corresponding to the same standard resource specification.

[0155] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0156] The total resource amount of each computing node is subtracted from the used resource amount of each computing node to determine the first available resource amount of each computing node, wherein the first available resource amount includes at least two sub-available resource amounts;

[0157] The number of virtual machines that can be supplied by each computing node under each standard resource specification is determined by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification.

[0158] In one embodiment, the processor, when executing a computer program, also performs the following steps:

[0159] Determine the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node;

[0160] The minimum value among the quotients corresponding to the sub-available resources of each computing node is taken as the number of virtual machines that can be supplied to the corresponding computing node.

[0161] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:

[0162] Determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification;

[0163] A resource configuration table is determined, which includes the available resource quantity corresponding to each of the standard resource specifications and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply.

[0164] Based on the available resource quantity corresponding to each of the standard resource specifications, the total resource quantity of the resource domain, and the corresponding threshold water level, the resource management strategy of the resource domain is determined.

[0165] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0166] Determine the target resource specification from each of the aforementioned standard resource specifications;

[0167] Based on the available resource quantity corresponding to each of the standard resource specifications, determine the available resource quantity corresponding to the target resource specification in the target application scenario;

[0168] A first ratio is determined, wherein the first ratio is equal to the ratio of the available resource quantity corresponding to the target resource specification in the target application scenario to the total resource quantity;

[0169] Based on the first ratio and the threshold water level corresponding to the target resource specification, the resource management strategy of the resource domain is determined.

[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0171] If the target application scenario is a scheduled task scenario, then the available resource quantity corresponding to the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0172] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0173] If the target application scenario is a user-requested task scenario, then the difference between the available resource quantity corresponding to the target resource specification and the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

[0174] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0175] If the first ratio is less than or equal to the threshold water level corresponding to the target resource specification, then a first prompt message is output, which is used to determine the resource management strategy of the resource domain.

[0176] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0177] If the first ratio is greater than the threshold water level corresponding to the target resource specification, then the resource management strategy of the resource domain is determined according to the target resource specification.

[0178] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0179] Determine the total resource quantity and the used resource quantity of each computing node in the resource domain;

[0180] Based on the total resources and used resources of each computing node, determine the number of virtual machines that can be supplied to each computing node under each standard resource specification;

[0181] Based on the same standard resource specification and the number of available virtual machines corresponding to each computing node under the same standard resource specification, determine the amount of available resources corresponding to each of the same standard resource specifications;

[0182] The resource configuration table is determined based on the available resource quantity corresponding to the same standard resource specification.

[0183] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0184] The total resource amount of each computing node is subtracted from the used resource amount of each computing node to determine the first available resource amount of each computing node, wherein the first available resource amount includes at least two sub-available resource amounts;

[0185] The number of virtual machines that can be supplied by each computing node under each standard resource specification is determined by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification.

[0186] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0187] Determine the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node;

[0188] The minimum value among the quotients corresponding to the sub-available resources of each computing node is taken as the number of virtual machines that can be supplied to the corresponding computing node.

[0189] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0190] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0191] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0192] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0193] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A resource management method for a resource domain, characterized in that, The method includes: Determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification; A resource configuration table is determined, which includes the available resource quantity corresponding to each of the standard resource specifications and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply. Determine the target resource specification from each of the aforementioned standard resource specifications; Based on the available resource quantity corresponding to each of the standard resource specifications, determine the available resource quantity corresponding to the target resource specification in the target application scenario; A first ratio is determined, wherein the first ratio is equal to the ratio of the available resource quantity corresponding to the target resource specification in the target application scenario to the total resource quantity; Based on the first ratio and the threshold water level corresponding to the target resource specification, the resource management strategy of the resource domain is determined; The available resource quantity is determined as follows: the total resource quantity and the used resource quantity of each computing node in the resource domain are determined; based on the total resource quantity and the used resource quantity of each computing node, the number of virtual machines that can be supplied under each standard resource specification is determined; based on the same standard resource specification and the number of virtual machines that can be supplied to each computing node under the same standard resource specification, the available resource quantity corresponding to each standard resource specification is determined; the available resource quantity is equal to the number of virtual machines that can be supplied multiplied by the standard resource specification.

2. The method according to claim 1, characterized in that, The step of determining the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each of the standard resource specifications includes: If the target application scenario is a scheduled task scenario, then the available resource quantity corresponding to the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

3. The method according to claim 1, characterized in that, The step of determining the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each of the standard resource specifications includes: If the target application scenario is a user-requested task scenario, then the difference between the available resource quantity corresponding to the target resource specification and the target resource specification is taken as the available resource quantity corresponding to the target resource specification in the target application scenario.

4. The method according to any one of claim 2 or 3, characterized in that, The step of determining the resource management strategy for the resource domain based on the first ratio and the threshold water level corresponding to the target resource specification includes: If the first ratio is less than or equal to the threshold water level corresponding to the target resource specification, then a first prompt message is output, which is used to determine the resource management strategy of the resource domain.

5. The method according to claim 3, characterized in that, The step of determining the resource management strategy for the resource domain based on the first ratio and the threshold water level corresponding to the target resource specification includes: If the first ratio is greater than the threshold water level corresponding to the target resource specification, then the resource management strategy of the resource domain is determined according to the target resource specification.

6. The method according to claim 1, characterized in that, The determination of the resource configuration table includes: The resource configuration table is determined based on the available resource quantity corresponding to the same standard resource specification.

7. The method according to claim 6, characterized in that, The step of determining the number of virtual machines that can be supplied to each computing node under each standard resource specification based on the total resources and used resources of each computing node includes: The total resource amount of each computing node is subtracted from the used resource amount of each computing node to determine the first available resource amount of each computing node, wherein the first available resource amount includes at least two sub-available resource amounts; The number of virtual machines that can be supplied by each computing node under each standard resource specification is determined by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification.

8. The method according to claim 7, characterized in that, The step of determining the number of virtual machines that can be supplied by each computing node under each standard resource specification by dividing the sub-available resource quantity of each computing node by the corresponding sub-standard resource specification under the standard resource specification includes: Determine the minimum value among the quotients corresponding to the sub-available resource quantities of each computing node; The minimum value among the quotients corresponding to the sub-available resources of each computing node is taken as the number of virtual machines that can be supplied to the corresponding computing node.

9. A resource management device for a resource domain, characterized in that, The device includes: The first determining module is used to determine the strategy configuration table, which includes each standard resource specification and the corresponding threshold water level line for each standard resource specification. The second determining module is used to determine a resource configuration table, which includes the available resource quantity corresponding to each of the standard resource specifications and the total resource quantity of the resource domain. The available resource quantity is determined based on the resource quantity under the standard resource specification that each computing node in the resource domain can supply. The third determining module is used to determine a target resource specification from each of the standard resource specifications; determine the available resource quantity of the target resource specification in the target application scenario based on the available resource quantity corresponding to each of the standard resource specifications; determine a first ratio, wherein the first ratio is equal to the ratio of the available resource quantity of the target resource specification in the target application scenario to the total resource quantity; and determine the resource management strategy of the resource domain based on the first ratio and the threshold water level line corresponding to the target resource specification. The available resource quantity is determined as follows: the total resource quantity and the used resource quantity of each computing node in the resource domain are determined; based on the total resource quantity and the used resource quantity of each computing node, the number of virtual machines that can be supplied under each standard resource specification is determined; based on the same standard resource specification and the number of virtual machines that can be supplied to each computing node under the same standard resource specification, the available resource quantity corresponding to each standard resource specification is determined; the available resource quantity is equal to the number of virtual machines that can be supplied multiplied by the standard resource specification.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Resource measurement and calculation method and device in cloud environment, equipment and storage medium

    CN114564308A