Resource configuration method, apparatus, device, and medium

By acquiring user resource requirements information, determining the average number of virtual machine processors, and configuring resources, the problems of complex and wasteful data center resource configuration are solved, and efficient and reasonable resource allocation is achieved.

CN116708322BActive Publication Date: 2026-05-29INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2023-06-07
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, data center resource allocation suffers from complex calculations, long cycles, and is prone to errors, leading to unreasonable resource allocation and wasted resources.

Method used

By responding to user resource allocation requests, obtaining resource requirement information, determining the average number of processors required for each virtual machine, and configuring computing and storage resources when preset thresholds are met, the resource allocation process is simplified by utilizing resource ratio values.

Benefits of technology

It simplifies resource allocation methods, improves allocation efficiency, achieves reasonable resource allocation, saves resources, and adapts to changes in user needs without the need for repeated calculations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708322B_ABST
    Figure CN116708322B_ABST
Patent Text Reader

Abstract

The present disclosure provides a resource configuration method, device, equipment, medium and program product, which can be applied to the fields of cloud computing and financial technology. The method comprises: in response to a resource allocation request of a user located in a target area within a preset time interval, obtaining resource requirement information contained in the resource allocation request; determining a mean value of the number of processors required by each virtual machine associated with the resource requirement information according to the resource requirement information; in the case where it is determined that the mean value meets a preset threshold, determining a total number of resources of a physical machine associated with the virtual machine; and according to a first resource proportion value and the total number of resources, configuring the required computing resources and storage resources for the user located in the target area, wherein the resource proportion value is determined according to the storage capacity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of cloud computing and financial technology, and in particular to resource allocation methods, apparatus, equipment, media and program products. Background Technology

[0002] With the development of data center business and the deepening of architecture transformation, the relevant matters concerning the overall construction of data centers have put forward the requirement to optimize the construction area of ​​data center clusters. Taking green data centers as the core, combined with the latest technologies and best practices of smart operation, and taking into account factors such as resource investment and implementation cycle, the optimal resource architecture should be configured in accordance with the principle of "low investment, quick results, and energy conservation and resource utilization" to achieve green and low-carbon data centers.

[0003] In the process of implementing this disclosure, it was found that manually calculating the required resources by the resource architecture staff before allocating resources has the problems of complex resource calculation methods and excessively long calculation cycles. Moreover, the required resources need to be recalculated according to changes in user needs. Repeating this complex work multiple times can easily lead to calculation errors, resulting in unreasonable resource allocation and waste of resources. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a resource allocation method, apparatus, device, medium and program product.

[0005] According to a first aspect of this disclosure, a resource allocation method is provided, comprising:

[0006] In response to a resource allocation request received from a user located in the target area within a preset time interval, the resource requirement information contained in the resource allocation request is obtained.

[0007] Based on the resource requirement information, determine the average number of processors required for each virtual machine associated with the resource requirement information;

[0008] Given that the mean value meets a preset threshold, determine the total number of resources of the physical machines associated with the virtual machines; and

[0009] Based on the first resource ratio and the total number of resources, the required computing and storage resources are configured for users located in the target area, wherein the resource ratio is determined based on the storage capacity.

[0010] According to embodiments of this disclosure, determining the average number of processors required per virtual machine associated with resource requirement information, based on resource requirement information, includes:

[0011] The resource requirement information is parsed to obtain the first quantity information of virtual machines associated with the resource requirement information;

[0012] Based on the first quantity information and the second quantity information of processors required for each virtual machine, determine the average number of processors required for each virtual machine.

[0013] According to embodiments of this disclosure, determining the total number of resources of the physical machines associated with the virtual machine, after determining that the average value meets a preset threshold, includes:

[0014] If the mean value meets the preset threshold, the number of virtual processors is obtained by over-multiplying the processors required by the physical machine by the preset multiple.

[0015] The number of target virtual processors is determined based on the initial number of virtual processors and the proportion of emergency computing resources.

[0016] Input the first quantity information, the second quantity information, and the target virtual processor quantity information into a preset algorithm, and output the total number of resources of the physical machine associated with the virtual machine.

[0017] According to embodiments of this disclosure, the storage capacity includes a first storage capacity and a second storage capacity;

[0018] The above resource allocation methods also include:

[0019] The first resource ratio is determined based on the first storage capacity available to each storage physical machine and the second storage capacity required by each computing physical machine.

[0020] According to embodiments of this disclosure, the above resource allocation method further includes:

[0021] The first storage capacity is determined based on the hard disk storage capacity used by the physical storage machine and the preset constraint ratio value;

[0022] Determine the second storage capacity based on the third storage capacity required by the virtual machine.

[0023] According to embodiments of this disclosure, a first resource ratio value is used to characterize the ratio information of computing resources and storage resources;

[0024] Specifically, based on the first resource ratio and the total number of resources, the required computing and storage resources are configured for users located in the target area, including:

[0025] Based on the first resource ratio value, determine the information on the proportion of computing resources to the total resources and the information on the proportion of storage resources to the total resources;

[0026] Multiply the information about the proportion of computing resources in the total resources by the total number of resources to obtain the computing resources;

[0027] The storage resources are obtained by multiplying the information about the proportion of storage resources in the total resources by the total number of resources.

[0028] According to embodiments of this disclosure, the above resource allocation method further includes:

[0029] If the mean value does not meet the preset threshold, the number of virtual machines that match a single physical computing machine will be set to the preset number.

[0030] Based on the preset quantity information and the first quantity information of virtual machines associated with the resource requirement information, configure the required computing resources for users located in the target area;

[0031] The second resource ratio value is determined based on the fourth storage capacity required by the virtual machine and the first storage capacity;

[0032] Based on the second resource ratio and computing resources, configure the required storage resources for users located in the target area.

[0033] A second aspect of this disclosure provides a resource allocation apparatus, comprising:

[0034] The acquisition module is used to respond to resource allocation requests received from users located in the target area within a preset time interval and to acquire resource requirement information contained in the resource allocation requests.

[0035] The first determining module is used to determine the average number of processors required for each virtual machine associated with the resource requirement information, based on the resource requirement information.

[0036] The second determining module is used to determine the total number of resources of the physical machines associated with the virtual machine, provided that the average value meets a preset threshold; and

[0037] The configuration module is used to configure the required computing and storage resources for users located in the target area based on the first resource ratio value and the total number of resources, wherein the first resource ratio value is determined based on the storage capacity.

[0038] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the resource configuration method described above.

[0039] A fourth aspect of this disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the resource configuration method described above.

[0040] The fifth aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described resource configuration method.

[0041] According to embodiments of this disclosure, based on resource requirement information, the average number of processors required for each virtual machine associated with the resource requirement information is determined, simplifying the method for determining resources for different numbers of processors required for each virtual machine associated with the resource requirement information. When a preset threshold is met, computing and storage resources are determined by the total number of resources and the resource ratio, and corresponding resources are configured for users located in the target area. This eliminates the need for repetitive manual calculations and configurations to address changes in user needs, improving resource allocation efficiency, achieving rational resource allocation, and saving resources. Attached Figure Description

[0042] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0043] Figure 1 The illustrations depict application scenarios of resource allocation methods, apparatuses, devices, media, and program products according to embodiments of the present disclosure.

[0044] Figure 2 A flowchart illustrating a resource allocation method according to an embodiment of the present disclosure is shown schematically;

[0045] Figure 3 The flowchart illustrates a method for determining the average number of processors required per virtual machine based on resource requirement information, according to an embodiment of the present disclosure.

[0046] Figure 4 The flowchart illustrates a method for determining the total number of resources of physical machines associated with virtual machines when the mean value meets a preset threshold, according to an embodiment of the present disclosure.

[0047] Figure 5 A flowchart illustrating a resource allocation method according to another embodiment of the present disclosure is shown schematically;

[0048] Figure 6 A schematic block diagram of a resource allocation apparatus according to an embodiment of the present disclosure is shown; and

[0049] Figure 7 A block diagram of an electronic device suitable for implementing a resource allocation method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0050] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0051] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0052] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0053] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0054] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (including but not limited to user personal information) comply with the provisions of relevant laws and regulations, necessary confidentiality measures have been taken, and they do not violate public order and good morals.

[0055] In the technical solutions of this disclosure, user authorization or consent is obtained before acquiring or collecting user personal information.

[0056] In implementing this disclosure, it was discovered that in cloud computing scenarios, with the emergence of virtual machine technology, cloud services have gained widespread application. A large number of users are continuously migrating their infrastructure to the cloud. To meet the ever-increasing demand for cloud services, cloud service providers need to continuously invest servers into resource pools to support the normal operation of cloud services. Virtual machines are installed on servers to provide cloud services. How data centers can quickly configure the resources required by users through appropriate resource calculations is becoming increasingly important. Currently, the method of manually calculating the required resources by resource architects before configuring resources suffers from complex calculation methods and excessively long calculation cycles. Moreover, the need to recalculate the required resources according to changes in user needs, and repeated complex work is prone to calculation errors, leading to unreasonable resource configuration and wasted resources.

[0057] Embodiments of this disclosure provide a resource allocation method, comprising: responding to a received resource allocation request from a user located in a target area within a preset time interval, obtaining resource requirement information contained in the resource allocation request; determining, based on the resource requirement information, an average number of processors required for each virtual machine associated with the resource requirement information; determining, if the average value satisfies a preset threshold, a total number of resources for physical machines associated with the virtual machines; and configuring the required computing and storage resources for the user located in the target area based on a first resource ratio value and the total number of resources, wherein the resource ratio value is determined based on the storage capacity.

[0058] Figure 1 The illustration shows an application scenario diagram of a resource configuration method, apparatus, device, medium, and program product according to embodiments of the present disclosure.

[0059] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0060] Users can interact with server 105 via network 104 using at least one of the first terminal device 101, second terminal device 102, and third terminal device 103 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, second terminal device 102, and third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0061] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0062] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0063] It should be noted that the resource configuration method provided in this embodiment can generally be executed by server 105. Correspondingly, the resource configuration device provided in this embodiment can generally be located in server 105. The resource configuration method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the resource configuration device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0064] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0065] The following will be based on Figure 1 The described scene, through Figures 2-5 The resource configuration method of the disclosed embodiments will be described in detail.

[0066] Figure 2 A flowchart illustrating a resource configuration method according to an embodiment of the present disclosure is shown schematically.

[0067] like Figure 2 As shown, the resource configuration method 200 of this embodiment includes operations S210 to S240.

[0068] In operation S210, in response to a received resource allocation request from a user located in the target area within a preset time interval, the resource requirement information contained in the resource allocation request is obtained.

[0069] According to embodiments of this disclosure, the preset time interval can be divided into quarters. The target area can be different resource domains in different parks. The resource allocation request can be generated by a user when conducting actual business. Resource requirement information can include the number of virtual machines required.

[0070] Among them, a resource domain can refer to the various regions into which resources are logically isolated according to different network areas.

[0071] For example, the preset time interval can be any quarter of a year, including the first, second, third, and fourth quarters. The target area can be a specific resource domain of a park in a city.

[0072] In operation S220, based on resource requirement information, the average number of processors required for each virtual machine associated with the resource requirement information is determined.

[0073] According to embodiments of this disclosure, the required number of virtual machines can be determined based on resource requirement information. Based on the required number of virtual machines and the number of processors required per virtual machine, an average number of processors required per virtual machine associated with the resource requirement information is determined. The processors may be central processing units (CPUs).

[0074] For example, the total number of processors required by each virtual machine can be summed to obtain the total number of processors required by all virtual machines. Dividing the total number of processors required by all virtual machines by the total number of virtual machines yields the average number of processors required by each virtual machine.

[0075] In operation S230, if the mean value meets the preset threshold, the total number of resources of the physical machines associated with the virtual machine is determined.

[0076] According to embodiments of this disclosure, the preset threshold can be determined based on practical experience. The mean value can be compared with the preset threshold; if the mean value is greater than the preset threshold, it is determined that the mean value meets the preset threshold; if the mean value is less than the preset threshold, it is determined that the mean value does not meet the preset threshold. If the mean value is determined to meet the preset threshold, the total number of physical machine resources associated with the virtual machine can be determined according to a preset algorithm. That is, the number of physical machines required to build the necessary virtual machine.

[0077] In operation S240, the required computing and storage resources are configured for users located in the target area based on the first resource ratio value and the total number of resources, wherein the resource ratio value is determined based on the storage capacity.

[0078] According to embodiments of this disclosure, the required storage capacity for computing resources and the available storage capacity can be determined based on the storage capacity. A first resource ratio value is obtained based on the ratio of the required storage capacity to the available storage capacity. Computing resources are determined based on the ratio of the required storage capacity to the total storage capacity, combined with the total number of resources, to allocate the required computing resources to users located in the target area. Storage resources are determined based on the ratio of the available storage capacity to the total storage capacity, combined with the total number of resources, to allocate the required storage resources to users located in the target area.

[0079] According to embodiments of this disclosure, based on resource requirement information, the average number of processors required for each virtual machine associated with the resource requirement information is determined, simplifying the method for determining resources by addressing the varying processor requirements of each virtual machine associated with the resource requirement information. When a preset threshold is met, computing and storage resources are determined by the total number of resources and the resource ratio, and corresponding resources are configured for users located in the target area. This eliminates the need for repetitive manual calculations and configurations to address changes in user needs, improving resource allocation efficiency, achieving rational resource allocation, and saving resources.

[0080] Figure 3 The flowchart illustrates a method for determining the average number of processors required per virtual machine based on resource requirement information, according to an embodiment of the present disclosure.

[0081] like Figure 3 As shown, the method 320 of this embodiment for determining the average number of processors required per virtual machine associated with resource requirement information based on resource requirement information includes operations S321 to S322.

[0082] In operation S321, the resource requirement information is parsed to obtain the first quantity information of virtual machines associated with the resource requirement information.

[0083] According to embodiments of this disclosure, a first quantity of virtual machines associated with resource requirement information can be used to characterize the number of virtual machines associated with resource requirement information.

[0084] In operation S322, the average number of processors required for each virtual machine is determined based on the first quantity information and the second quantity information of processors required for each virtual machine.

[0085] According to embodiments of this disclosure, the number of virtual machines associated with resource requirement information can be determined based on first quantity information. The number of processors required for each virtual machine is determined based on second quantity information. The total number of processors required for all virtual machines associated with resource requirement information is obtained based on the number of virtual machines associated with resource requirement information and the number of processors required for each virtual machine. The average number of processors required for each virtual machine is obtained based on this total number and the number of virtual machines associated with resource requirement information.

[0086] For example, the sum of the number of CPUs required by each virtual machine associated with the resource requirement information is divided by the number of virtual machines associated with the resource requirement information to obtain the average number of processors required by each virtual machine.

[0087] According to embodiments of this disclosure, the average number of processors required for each virtual machine is determined by using first quantity information of virtual machines associated with resource requirement information and second quantity information of processors required for each virtual machine. This simplifies the method for determining resources, taking into account the different number of processors required for each virtual machine associated with resource requirement information, and is beneficial for determining relevant information of the physical machine associated with the virtual machine.

[0088] Figure 4 The flowchart illustrates a method for determining the total number of resources of physical machines associated with virtual machines when the mean value meets a preset threshold, according to an embodiment of the present disclosure.

[0089] like Figure 4 As shown, the method 430 for determining the total number of resources of the physical machine associated with the virtual machine in this embodiment, when the mean value meets a preset threshold, includes operations S431 to S433.

[0090] In operation S431, after determining that the mean meets the preset threshold, the number of processors required by the physical machine is super-divided by a preset multiple to obtain the initial number of virtual processors.

[0091] According to embodiments of this disclosure, the number of initial virtual processors can be used to characterize the number of initial virtual processors.

[0092] For example, the preset threshold can be 8. If the average number of CPUs required by each virtual machine is greater than 8, the number of CPUs required by a physical computing machine can be increased by 4 times to obtain 320 initial virtual CPUs.

[0093] In operation S432, the number of target virtual processors is determined based on the initial number of virtual processors and the emergency computing resource ratio.

[0094] According to embodiments of this disclosure, the emergency computing resource ratio can be determined based on daily operational experience, taking into account the need to reserve relevant emergency resources in the event of architecture version iterations and daily computing resource downtime. The emergency computing resource ratio can be used to characterize the percentage of required emergency resources in the total computing resources. The number of target virtual processors can be determined by multiplying the initial number of virtual processors by the emergency computing resource ratio.

[0095] For example, the emergency computing resource ratio could be 40%. Approximately 320 initial virtual CPUs could be multiplied by 40% to obtain 192 target virtual CPUs.

[0096] In operation S433, the first quantity information, the second quantity information, and the quantity information of the target virtual processor are input into a preset algorithm, and the total number of resources of the physical machine associated with the virtual machine is output.

[0097] According to embodiments of this disclosure, the preset algorithm may be constructed based on the number of virtual machines associated with resource requirement information, the number of processors required by each virtual machine, the target number of virtual processors, and the total resources of the physical machines associated with the virtual machines.

[0098] For example, the total resources of the physical machines associated with virtual machines can be determined by summing the cumulative number of CPUs required by each virtual machine and dividing by the target number of virtual processors.

[0099] According to the embodiments of this disclosure, when the mean value meets a preset threshold, the total number of resources of the physical machine associated with the virtual machine is determined by over-dividing the processor required by the physical machine by a preset multiple and taking into account emergency computing resources. This is beneficial for obtaining accurate computing and storage resources and facilitates the rational allocation of resources.

[0100] According to embodiments of this disclosure, in addition to including the operations S210 to S240 described above, the resource allocation method may also include:

[0101] The first resource ratio is determined based on the first storage capacity available to each storage physical machine and the second storage capacity required by each computing physical machine.

[0102] The storage capacity may include a first storage capacity and a second storage capacity.

[0103] According to embodiments of this disclosure, the first resource ratio can be determined based on the ratio of the second storage capacity required by each computing physical machine to the first storage capacity available for each storage physical machine.

[0104] According to the embodiments of this disclosure, a first resource ratio value is determined based on the first storage capacity that each storage physical machine can supply and the second storage capacity required by each computing physical machine. This can indirectly determine the ratio value between storage physical machines and computing physical machines from the perspective of storage capacity, thereby facilitating the accurate determination of computing resources and storage resources, enabling reasonable resource allocation and saving resources.

[0105] According to embodiments of this disclosure, the resource allocation method may further include, in addition to the methods described above:

[0106] The first storage capacity is determined based on the hard disk storage capacity used by the physical storage machine and the preset constraint ratio; the second storage capacity is determined based on the third storage capacity required by the virtual machine.

[0107] According to embodiments of this disclosure, the preset constraint ratio value can be determined based on actual operation and maintenance experience, taking into account the high availability of the service.

[0108] For example, a single physical storage machine can have 12 internal disks, each with a size of 7.68TB. Therefore, the total hard drive storage capacity of a single physical storage machine is 7.68TB * 12. With a preset constraint ratio of 0.9, the initial storage capacity is 7.68TB * 12 * 0.9. If a physical storage machine has three replicas, then the initial storage capacity is 7.68TB * 12 * 0.9 / 3, which is 27.648TB.

[0109] According to embodiments of this disclosure, the number of virtual machines that each physical computing machine can supply can be determined based on the average number of processors required per virtual machine associated with resource requirement information and the target number of virtual processors. The third storage capacity required by the virtual machines can be determined based on the storage capacity required by each virtual machine and the number of virtual machines that each physical computing machine can supply.

[0110] According to embodiments of this disclosure, the third storage capacity required by the virtual machine can be used as the second storage capacity required by each physical computing machine.

[0111] According to embodiments of this disclosure, the number of virtual machines that each physical computing machine can supply can also be determined based on operational experience. If the average number of processors required by each virtual machine associated with resource demand information meets preset conditions, the third storage capacity required by the virtual machine can be determined by using a preset value and the storage capacity required by each virtual machine.

[0112] For example, if each virtual machine requires 400GB of storage, and the preset condition is that the average number of processors required by each virtual machine, associated with resource requirements, fluctuates around 12, then the preset value can be 16. It can be determined that the second storage capacity required by a single physical computing machine is 16 * 400GB. Based on the fact that 1TB is equivalent to 1024GB, the second storage capacity required by a single physical computing machine is 6.25TB. The first resource ratio can be 4.42:1.

[0113] According to the embodiments of this disclosure, by determining the first storage capacity and the second storage capacity, the first resource ratio value can be further determined. This is beneficial for quickly and accurately determining computing resources and storage resources by combining the total number of resources, so as to achieve reasonable resource allocation. In response to changes in user needs, there is no need to manually repeat the calculations before configuration, thereby improving work efficiency and saving resources.

[0114] According to embodiments of this disclosure, a first resource ratio value can be used to characterize the ratio of computing resources to storage resources.

[0115] The allocation of required computing and storage resources for users located in the target region, based on the first resource ratio and the total number of resources, may include:

[0116] Based on the first resource ratio, determine the information on the proportion of computing resources to the total resources and the information on the proportion of storage resources to the total resources; multiply the information on the proportion of computing resources to the total resources by the total resources to obtain computing resources; multiply the information on the proportion of storage resources to the total resources by the total resources to obtain storage resources.

[0117] According to embodiments of this disclosure, the first resource ratio can be determined based on the ratio of the second storage capacity required by each computing physical machine to the first storage capacity available for each storage physical machine.

[0118] According to embodiments of this disclosure, corresponding resources are configured for users located in the target area based on the obtained computing and storage resources, thereby achieving reasonable resource allocation, saving resources, and improving resource allocation efficiency.

[0119] Figure 5 A flowchart illustrating a resource configuration method according to another embodiment of the present disclosure is shown.

[0120] like Figure 5 As shown, the resource configuration method 500 of this embodiment may include operations S510 to S540.

[0121] When operating S510, if it is determined that the average value does not meet the preset threshold, the number of virtual machines matched with a single physical computing machine is set to the preset number.

[0122] According to embodiments of this disclosure, the preset threshold may be determined based on practical experience. The mean value can be compared with the preset threshold; if the mean value is less than the preset threshold, it is determined that the mean value does not meet the preset threshold. The preset quantity information is used to characterize the number of virtual machines matched with a single physical computing machine.

[0123] For example, the number of virtual machines that can be matched with a single physical computing machine can be set as 20 virtual machines. 20 virtual machines can be set as the preset number.

[0124] When operating S520, the required computing resources are configured for users located in the target area based on the preset quantity information and the first quantity information of virtual machines associated with the resource requirement information.

[0125] According to embodiments of this disclosure, a first quantity of virtual machines associated with resource requirement information can be used to characterize the number of virtual machines associated with the resource requirement information. The required number of physical computing machines can be obtained by dividing the number of virtual machines associated with the resource requirement information by the number of virtual machines matching a single physical computing machine, and the required computing resources can be configured for users located in the target area based on the number of physical computing machines.

[0126] When operating S530, determine the second resource ratio value based on the fourth storage capacity required by the virtual machine and the first storage capacity.

[0127] According to embodiments of this disclosure, a first storage capacity can be determined based on the hard disk storage capacity used by the physical storage machine and a preset constraint ratio. The preset constraint ratio can be determined based on actual operational experience, taking into account service high availability. A fourth storage capacity required by a virtual machine can be determined based on preset quantity information and the storage capacity required by each virtual machine. A second resource ratio is determined based on the ratio of the fourth storage capacity to the first storage capacity.

[0128] For example, a single physical storage machine can have 12 internal disks, each with a size of 7.68TB. Therefore, the total hard drive storage capacity of a single physical storage machine is 7.68TB * 12. With a preset constraint ratio of 0.9, the initial storage capacity is 7.68TB * 12 * 0.9. If a physical storage machine has three replicas, then the initial storage capacity is 7.68TB * 12 * 0.9 / 3, which is 27.648TB.

[0129] Each virtual machine requires 400GB of storage, and the preset number of virtual machines is 20. Therefore, the fourth storage capacity required by a single physical computing machine is 20 * 400GB. Based on the fact that 1TB is equivalent to 1024GB, the fourth storage capacity required by a single physical computing machine is 7.8125TB. The second resource ratio can be 3.54:1.

[0130] In operation S540, the required storage resources are configured for users located in the target area based on the second resource ratio value and computing resources.

[0131] According to embodiments of this disclosure, storage resources can be determined based on a second resource ratio value and computing resources. The determined storage resources are then configured for users located in the target area.

[0132] According to the embodiments of this disclosure, by considering the case where the mean does not meet the preset threshold, computing resources and storage resources are determined, and corresponding resources are configured for users located in the target area. In response to changes in user needs, there is no need for manual repetitive calculations and configuration, which improves the efficiency of resource configuration, realizes reasonable resource allocation, and saves resources.

[0133] According to embodiments of this disclosure, it is necessary to reserve relevant emergency resources in the event of architecture version iterations and daily computing resource downtime. The proportion of emergency computing resources can be determined based on daily operation and maintenance experience. The proportion of emergency computing resources can be used to represent the percentage of required emergency resources in the total computing resources. For example, the proportion of emergency computing resources can be 40%. After determining the computing resources and storage resources according to the resource configuration method provided in this disclosure, the emergency computing resources are added to the computing resources before configuring the corresponding resources for users located in the target area.

[0134] According to the embodiments of this disclosure, since a storage pool can generally be built with 32 storage nodes and two resource domains, the construction status of the storage pool needs to be considered in a coordinated manner when calculating storage resources in different quarters.

[0135] Based on the above resource allocation method, this disclosure also provides a resource allocation apparatus. The following will be combined with... Figure 6 The device is described in detail.

[0136] Figure 6 A schematic block diagram of a resource configuration apparatus according to an embodiment of the present disclosure is shown.

[0137] like Figure 6 As shown, the resource configuration device 600 of this embodiment includes an acquisition module 610, a first determination module 620, a second determination module 630, and a configuration module 640.

[0138] The acquisition module 610 is used to respond to a received resource allocation request from a user located in the target area within a preset time interval, and to acquire the resource requirement information contained in the resource allocation request. In one embodiment, the acquisition module 610 can be used to perform the operation S210 described above, which will not be repeated here.

[0139] The first determining module 620 is used to determine the average number of processors required for each virtual machine associated with the resource requirement information, based on the resource requirement information. In one embodiment, the first determining module 620 can be used to perform the operation S220 described above, which will not be repeated here.

[0140] The second determining module 630 is used to determine the total number of resources of the physical machines associated with the virtual machine when the average value meets a preset threshold. In one embodiment, the second determining module 630 can be used to perform the operation S230 described above, which will not be repeated here.

[0141] The configuration module 640 is used to configure the required computing and storage resources for users located in the target area based on a first resource ratio value and the total number of resources, wherein the first resource ratio value is determined based on the storage capacity. In one embodiment, the configuration module 640 can be used to perform the operation S240 described above, which will not be repeated here.

[0142] According to embodiments of this disclosure, the resource allocation device 600 may further include a third determining module.

[0143] The third determining module is used to determine the first resource ratio value based on the first storage capacity that each storage physical machine can supply and the second storage capacity required by each computing physical machine.

[0144] According to embodiments of this disclosure, the resource allocation device 600 may further include a fourth determining module and a fifth determining module.

[0145] The fourth determining module is used to determine the first storage capacity based on the hard disk storage capacity used by the storage physical machine and the preset constraint ratio value.

[0146] The fifth determining module is used to determine the second storage capacity based on the third storage capacity required by the virtual machine.

[0147] According to embodiments of this disclosure, the resource configuration device 600 may further include an information setting module, a first sub-configuration module, a sixth determination module, and a second sub-configuration module.

[0148] The information setting module is used to set the number of virtual machines matched with a single computing physical machine to a preset number when the mean value does not meet the preset threshold.

[0149] The first sub-configuration module is used to configure the required computing resources for users located in the target area based on the preset quantity information and the first quantity information of virtual machines associated with the resource requirement information.

[0150] The sixth determining module is used to determine the second resource ratio value based on the fourth storage capacity required by the virtual machine and the first storage capacity.

[0151] The second sub-configuration module is used to configure the required storage resources for users located in the target area based on the second resource ratio value and computing resources.

[0152] According to embodiments of this disclosure, any plurality of modules among the acquisition module 610, the first determination module 620, the second determination module 630, and the configuration module 640 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the acquisition module 610, the first determination module 620, the second determination module 630, and the configuration module 640 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in any one of software, hardware, and firmware methods, or in a suitable combination of any of these methods. Alternatively, at least one of the acquisition module 610, the first determination module 620, the second determination module 630, and the configuration module 640 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0153] Figure 7 A block diagram of an electronic device suitable for implementing a resource allocation method according to an embodiment of the present disclosure is shown schematically.

[0154] like Figure 7As shown, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0155] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0156] According to embodiments of this disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0157] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0158] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 702 and / or RAM 703 and / or one or more memories other than ROM 702 and RAM 703 described above.

[0159] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.

[0160] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0161] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0162] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0163] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0164] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0165] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0166] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A resource allocation method, comprising: In response to a received resource allocation request from a user located in the target area within a preset time interval, the resource requirement information contained in the resource allocation request is obtained; Based on the resource requirement information, determine the average number of processors required for each virtual machine associated with the resource requirement information; If the average value is determined to be greater than a preset threshold, the total number of resources of the physical machines associated with the virtual machine is determined. The first resource ratio is determined based on the first storage capacity available to each storage physical machine and the second storage capacity required by each computing physical machine; Based on the first resource ratio value and the total number of resources, configure the required computing and storage resources for the user located in the target area; If the mean value is determined to be less than a preset threshold, the number of virtual machines matched with a single physical computing machine is set to the preset number. Based on the preset quantity information and the first quantity information of the virtual machines associated with the resource requirement information, configure the required computing resources for the user located in the target area; The second resource ratio value is determined based on the fourth storage capacity required by the virtual machine and the first storage capacity; Based on the second resource ratio and the computing resources, the required storage resources are configured for the user located in the target area.

2. The method according to claim 1, wherein determining the average number of processors required per virtual machine associated with the resource requirement information based on the resource requirement information comprises: The resource requirement information is parsed to obtain the first quantity information of the virtual machines associated with the resource requirement information; Based on the first quantity information and the second quantity information of processors required for each virtual machine, the average number of processors required for each virtual machine is determined.

3. The method according to claim 2, wherein, The step of determining the total number of resources of the physical machines associated with the virtual machine when the average value is greater than a preset threshold includes: When the mean value is determined to be greater than a preset threshold, the number of initial virtual processors is obtained by over-dividing the processors required by the physical machine by a preset multiple. Based on the initial number of virtual processors and the emergency computing resource ratio, the number of target virtual processors is determined. Based on the first quantity information and the second quantity information, the total number of central processing units required by each virtual machine is summed and then divided by the number of target virtual processors to obtain the total number of resources of the physical machine associated with the virtual machine.

4. The method according to claim 1, further comprising: The first storage capacity is determined based on the hard disk storage capacity used by the storage physical machine and a preset constraint ratio value; The second storage capacity is determined based on the third storage capacity required by the virtual machine.

5. The method according to claim 1, wherein the first resource ratio value is used to characterize the ratio information of the computing resources and the storage resources; in, The step of configuring the required computing and storage resources for the user located in the target area based on the first resource ratio value and the total number of resources includes: Based on the first resource ratio value, determine the information about the proportion of computing resources to the total number of resources and the information about the proportion of storage resources to the total number of resources; The computing resources are obtained by multiplying the information about the proportion of computing resources to the total number of resources. The storage resource is obtained by multiplying the information about the proportion of the storage resource to the total number of resources.

6. A resource allocation device, comprising: The acquisition module is used to respond to a resource allocation request received from a user located in the target area within a preset time interval, and to acquire the resource requirement information contained in the resource allocation request. The first determining module is used to determine, based on the resource requirement information, the average number of processors required for each virtual machine associated with the resource requirement information; The second determining module is used to determine the total number of resources of the physical machines associated with the virtual machine when the average value is determined to be greater than a preset threshold. The third determining module is used to determine the first resource ratio value based on the first storage capacity that each storage physical machine can supply and the second storage capacity required by each computing physical machine; The configuration module is used to configure the required computing and storage resources for the user located in the target area according to the first resource ratio value and the total number of resources; The information setting module is used to set the number of virtual machines matched with a single computing physical machine to a preset number when it is determined that the average value is less than a preset threshold. The first sub-configuration module is used to configure the required computing resources for the user located in the target area based on the preset quantity information and the first quantity information of the virtual machines associated with the resource requirement information; The sixth determining module is used to determine a second resource ratio value based on the fourth storage capacity required by the virtual machine and the first storage capacity; The second sub-configuration module is used to configure the required storage resources for the user located in the target area according to the second resource ratio value and the computing resources.

7. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 5.

9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 5.