Cloud computer resource dynamic allocation method and storage medium

By dynamically adjusting the allocation of cloud computer resources, combined with linear regression prediction and real-time monitoring, the problems of untimely response and unreasonable resource allocation caused by manual adjustment in the existing technology are solved, and the resource utilization rate is improved and the response speed is accelerated.

CN119045954AInactive Publication Date: 2024-11-29SHENZHEN SEMIDUX TECH LTD

Patent Information

Application Number
CN202411542888.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing cloud computer resource allocation method relies on manual adjustment, resulting in problems such as untimely response and unreasonable resource allocation.

Method used

By obtaining the current usage status and sales status of cloud computer resources, we calculate the optimized configuration ratio, dynamically adjust the resource allocation amount, and monitor and update the configuration parameters in real time, and use linear regression to predict resource requirements to achieve automated adjustment and optimized configuration of resources.

Benefits of technology

It improves resource utilization, shortens response time, improves user satisfaction, reduces insufficient resources and oversupply, and realizes the intelligence and automation of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045954A_ABST
    Figure CN119045954A_ABST
Patent Text Reader

Abstract

The invention provides a cloud computer resource dynamic allocation method and a storage medium, and the method comprises the following steps: obtaining the current use state and selling condition of cloud computer resources, the use state including the usage amount of a CPU, a memory and storage, and the selling condition including the selling number and time of a cloud computer; on the basis of the data, calculating an optimal configuration proportion of each type of resources; dynamically adjusting the available quantity of each cloud computer resource type according to the calculated optimal configuration proportion; monitoring real-time selling and activation conditions of cloud computer resources, wherein the activation conditions comprise the use frequency and the resource occupancy rate of the resources; updating configuration parameters of each resource type in real time according to real-time selling and activation conditions; according to the method and the system, optimal configuration and dynamic adjustment of cloud computer resources are realized, and the problems of untimely response, unreasonable resource configuration and the like caused by dependence on manual adjustment in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to a cloud computing resource dynamic allocation method and storage medium. Background Art

[0002] With the rapid development of cloud computing technology, cloud PC, as a cloud-based virtual desktop service, has been widely used due to its convenience and efficiency. Through cloud PC, users can remotely use high-performance computing resources without having to configure and manage physical hardware by themselves. However, the current cloud PC resource allocation method usually relies on manual adjustments by managers, which has problems such as untimely response and unreasonable resource allocation.

[0003] Therefore, it is necessary to design a cloud computer resource dynamic allocation method to solve the above problems. Summary of the invention

[0004] The present invention provides a cloud computer resource dynamic allocation method for solving the technical problems mentioned in the background technology.

[0005] To solve the above problems, the present invention provides the following technical solution: a cloud computer resource dynamic allocation method, comprising the following steps:

[0006] S1, obtaining the current usage status and sales status of cloud computer resources, wherein the usage status includes the usage of CPU, memory and storage, and the sales status includes the current sales quantity and sales time of cloud computers;

[0007] S2, based on the usage status and sales situation, calculate the optimal configuration ratio of each cloud computer resource type, and the optimal configuration ratio is calculated by the following formula:

[0008] ;

[0009] in, is the optimal allocation ratio of the i-th type of resources, is the current usage of the i-th resource, is the sales quantity of the i-th type of resources, is the demand growth forecast value of the i-th type of resources, where the demand growth forecast value is calculated based on the historical growth rate and sales time;

[0010] S3, dynamically adjusting the available quantity of each cloud computer resource type according to the calculated optimal configuration ratio, wherein the adjustment includes increasing or decreasing the resource allocation amount;

[0011] S4, monitoring the real-time sale and activation of cloud computer resources, wherein the activation status includes the frequency of resource usage and resource occupancy rate;

[0012] S5, updating the configuration parameters of each resource type in real time according to the real-time sales and activation conditions, wherein the configuration parameters include the upper limit, lower limit and current available quantity of the resource allocation.

[0013] Furthermore, the resource demand growth prediction value Di in step S2 is calculated by linear regression based on historical sales data and current usage status, and the linear regression model is:

[0014]

[0015] in, is the demand forecast value of the i-th type of resources, is the historical sales quantity, is the current usage, The minimum resource requirement for the system. , is the regression coefficient, which is obtained by least square fitting.

[0016] Furthermore, the regression coefficient of the least squares method is calculated by the following formula:

[0017]

[0018] Among them, X is the matrix of historical sales data and usage status, and Y is the matrix of historical resource demand. is the estimated regression coefficient.

[0019] Furthermore, the update of the configuration parameters is determined by the following formula:

[0020] ;

[0021] in, is the current configuration of the i-th resource, is the initial configuration of the i-th resource, The adjustment amount is calculated based on real-time sales and activation situations.

[0022] Furthermore, the adjustment amount The calculation is based on the difference between the current usage and the predicted target usage, and the formula is:

[0023] ;

[0024] in, is the adjustment factor, is the current resource usage, The target usage is predicted based on sales and activations.

[0025] Furthermore, the dynamic adjustment of resources includes increasing or decreasing the allocated amount of resources. When the usage of a certain type of resources approaches or exceeds the configuration upper limit, the system automatically increases the allocated amount of this type of resources; when the usage is lower than the configuration lower limit, the system automatically reduces the allocated amount of this type of resources.

[0026] Furthermore, the real-time monitoring period is a fixed time interval or a dynamically adjusted time interval, and the system automatically adjusts resource allocation according to the monitoring period based on the real-time activation and sales status of the resources.

[0027] Furthermore, an early warning mechanism is set in the resource allocation process. When the usage of a certain type of resource approaches an upper limit or a lower limit, the system automatically issues an early warning and makes resource adjustments.

[0028] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method described above are implemented.

[0029] Compared with the prior art, the present invention has at least the following beneficial effects:

[0030] The present invention proposes a method for dynamically allocating cloud computer resources, which realizes the optimal configuration and dynamic adjustment of cloud computer resources by combining real-time data and historical data, and solves the problems of untimely response and unreasonable resource allocation caused by relying on manual adjustment in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 It is a flowchart of the steps of the method for dynamically allocating cloud computer resources. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention. It is understood that the drawings are only provided for reference and illustration, and are not used to limit the present invention. The connection relationship shown in the drawings is only for the convenience of clear description and does not limit the connection method.

[0034] The invention discloses a cloud computer resource dynamic allocation method, aiming to solve the problems of untimely response and unreasonable resource configuration in the cloud computer resource allocation process in the prior art.

[0035] See also Figure 1 , specifically disclosed the following:

[0036] Step S1: Obtain the current usage and sales status of cloud computer resources

[0037] The system first obtains the current usage and sales status of cloud computer resources, assuming that there are three types of resources in the current system: CPU, memory, and storage. The following is the specific data obtained:

[0038] CPU usage status: The current usage is 80 cores, and the total available number is 100 cores;

[0039] Memory usage status: Current usage is 128 GB, and the total available amount is 256 GB;

[0040] Storage usage status: Current usage is 1.5 TB, and the total available amount is 2 TB;

[0041] Sales status:

[0042] The number of CPUs sold is 50 cores, and the sales time is in the past 24 hours;

[0043] The memory sales quantity is 64 GB, and the sales time is in the past 24 hours;

[0044] The storage sales quantity is 0.5 TB and the sales time is in the past 24 hours.

[0045] Through these data, the system can fully grasp the current usage of cloud computer resources and market demand.

[0046] Step S2: Calculate the optimal allocation ratio of resources based on usage status and sales situation

[0047] Based on the usage status and sales situation, the system calculates the optimal configuration ratio of various cloud computer resources. The calculation formula for the optimal configuration ratio is:

[0048] ;

[0049] in, is the optimal allocation ratio of the i-th type of resources, is the current usage of the i-th resource, is the sales quantity of the i-th type of resources, is the forecast value of demand growth for the i-th type of resources;

[0050] Assuming that historical data shows that resource demand grows by about 3% per hour, we can forecast demand growth based on a 24-hour period:

[0051] CPU demand growth forecast: D CPU =50×3%×24=36 nuclei;

[0052] Memory demand growth forecast: D 内存 =64×3%×24=46.08 GB;

[0053] Storage demand growth forecast: D 存储 =0.5×3%×24=0.36 TB.

[0054] Substitute the above data into the calculation formula for optimizing the configuration ratio:

[0055] CPU optimization ratio: R cpu =80 / (50+36)≈0.93

[0056] Optimized memory configuration ratio: R 内存 =128 / (64+46.08)≈1.16

[0057] Optimized storage configuration ratio: R 存储 =1.5 / (0.5+0.36)≈1.74

[0058] The calculation shows that the maximum optimized configuration ratio of storage resources is 1.74, indicating that the demand for storage resources is close to the usage and expansion should be given priority. The configuration ratio of CPU is relatively low, indicating that CPU resources are relatively sufficient.

[0059] In another embodiment, the system uses historical sales data and current usage status to perform linear regression to predict future resource demand. The linear regression formula is:

[0060] ;

[0061] in, is the demand forecast value of the i-th type of resources, is the historical sales quantity, is the current usage, The minimum resource requirement for the system. , is the regression coefficient, which is obtained by least square fitting.

[0062] About the derivation of the β coefficient: In practical applications, the coefficient of the regression model , , It is trained through historical data. This involves taking historical sales data and usage as input and fitting a regression model using the least squares method (OLS). The least squares formula is: ;

[0063] Among them, X is the matrix of historical sales data and usage status, and Y is the matrix of historical resource demand. is the estimated regression coefficient.

[0064] The specific calculation process includes:

[0065] 1. Create a data matrix:

[0066] Set up an X matrix, where each row represents the data at a time point, and the columns include the historical sales quantity and current usage.

[0067] Set the Y matrix to represent the actual resource demand at the corresponding time point.

[0068] 2. Calculate the regression coefficient

[0069] 3. Fitting results

[0070] After calculation, the following regression coefficients are obtained:

[0071] For CPU resources, the regression coefficient =0.6, =1.2;

[0072] For memory resources, the regression coefficient =0.8, =1.1;

[0073] For storage resources, the regression coefficient =1.1, =0.9;

[0074] In this embodiment, the linear regression formula is substituted to obtain the following regression model:

[0075] For CPU: D CPU =10+0.6X1+1.2X2;

[0076] For memory :D 内存 =15+0.8X1+1.1X2;

[0077] For storage: D 存储 =5+1.0X1+0.9X2.

[0078] Substitute current sales and usage data into the formula:

[0079] CPU demand forecast:

[0080] D CPU =10+0.6×50+1.2×80=10+30+96=136 cores

[0081] Memory requirement forecast:

[0082] D 内存 =15+0.8×64+1.1×128=15+51.2+140.8=207 GB

[0083] Storage demand forecast:

[0084] D 存储 =5+1.0×0.5+0.9×1.5=5+0.5+1.35=6.85 TB

[0085] These demand forecasts provide the basis for subsequent resource allocation adjustments.

[0086] Step S3: Dynamically adjust resource allocation

[0087] Based on the above calculated optimal configuration ratio and predicted demand, the system automatically adjusts the allocation of cloud computer resources. When the actual usage of a certain type of resource exceeds or falls short of its predicted demand, the system automatically increases or decreases the allocation of that type of resource.

[0088] For example:

[0089] CPU: The current usage is 80 cores, and the predicted demand is 136 cores. The system will automatically increase the CPU resource configuration by 56 cores;

[0090] Memory: Current usage is 128 GB, predicted demand is 207 GB, and the system will automatically increase memory resources by 79 GB;

[0091] Storage: Current usage is 1.5 TB, predicted demand is 6.85 TB, and the system will automatically add 5.35 TB of storage resources.

[0092] This automated adjustment avoids resource shortages or surpluses and ensures maximum resource utilization.

[0093] Step S4: monitor real-time sales and activation status

[0094] The system monitors resource usage and sales every 5 minutes. Assuming that the CPU sales suddenly increase by 20 cores during a monitoring period, the system will recalculate and update the configuration parameters, predict demand, and adjust resource allocation in real time. For example, the system will recalculate the optimized configuration ratio based on the new data and update the resource allocation in real time to ensure sufficient resources.

[0095] Step S5: Update resource configuration parameters in real time

[0096] The system automatically updates the configuration parameters of various resources based on real-time monitoring results. The update formula for configuration parameters is:

[0097] ;

[0098] in, is the current configuration of the i-th resource, is the initial configuration of the i-th resource, The adjustment amount is calculated based on real-time sales and activation situations.

[0099] Assuming that the initial CPU configuration is 100 cores, and the system's demand change based on monitoring is 56 cores, the updated CPU configuration is:

[0100] C cpu =100+56=156 cores

[0101] Similarly, the configured amounts of memory and storage are automatically updated based on demand.

[0102] In the present invention, the adjustment amount of resources Based on current resource usage and predicted target usage To calculate. The specific formula is as follows:

[0103]

[0104] is the adjustment coefficient to control the sensitivity of resource allocation. This formula is used to dynamically adjust the resource allocation to ensure that resource supply is consistent with actual demand.

[0105] In addition, the present invention introduces a priority mechanism to prioritize resource allocation according to the importance and scarcity of resources. When a certain type of resource (such as CPU or memory) is close to the upper limit of usage, the system will prioritize the allocation of this type of resource to ensure that key resources will not have bottlenecks.

[0106] For example, when the CPU resource utilization rate is close to 90%, the system automatically increases the CPU allocation and postpones the allocation of storage resources. Through this intelligent priority strategy, the system can ensure the supply of key resources when resources are tight.

[0107] In order to ensure the reasonable allocation of resources, the present invention sets an early warning mechanism. When the usage of a certain type of resource approaches the upper or lower limit, the system will automatically send out an early warning signal to remind the management personnel to intervene or the system will automatically adjust the resources. The threshold of the early warning mechanism can be dynamically adjusted according to the actual situation.

[0108] For example, when memory usage exceeds 90%, the system triggers an alert and automatically sends a notification to the administrator. At the same time, the system starts to automatically calculate and increase the amount of memory allocated to avoid system crashes caused by insufficient memory.

[0109] Through the implementation of the present invention, the problems of untimely response and unreasonable resource allocation caused by manual adjustment in the prior art are solved. The cloud computer resource dynamic allocation method achieves at least the following beneficial effects:

[0110] Improved resource utilization: Through automatic calculation and dynamic adjustment, resource utilization has increased by an average of 20%, avoiding resource waste and shortage.

[0111] Faster response: The system can quickly adjust when resource requirements change, reducing the response time from several hours of manual adjustment to seconds.

[0112] Improved user satisfaction: Due to the intelligent adjustment of resource allocation, the number of resource shortage issues reported by users has been reduced by 30%.

[0113] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned cloud computer resource dynamic allocation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0114] In the specification and claims of the present application, the words "include / comprise" and the words "have / include" and their variations are used to specify the existence of stated features, values, steps or components, but do not exclude the existence or addition of one or more other features, values, steps, components or combinations thereof.

[0115] Some features of the present invention are described in different embodiments for clarity of description, however, these features may also be described in combination in a single embodiment. Conversely, some features of the present invention are described in only a single embodiment for brevity, however, these features may also be described in different embodiments alone or in any suitable combination.

[0116] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for dynamically allocating cloud computer resources, characterized in that: The following steps are involved: S1, obtaining the current usage status and sales status of cloud computer resources, wherein the usage status includes the usage of CPU, memory and storage, and the sales status includes the current sales quantity and sales time of cloud computers; S2, based on the usage status and sales situation, calculate the optimal configuration ratio of each cloud computer resource type, and the optimal configuration ratio is calculated by the following formula: ; in, is the optimal allocation ratio of the i-th type of resources, is the current usage of the i-th resource, is the sales quantity of the i-th type of resources, is the demand growth forecast value of the i-th type of resources, where the demand growth forecast value is calculated based on the historical growth rate and sales time; S3, dynamically adjusting the available quantity of each cloud computer resource type according to the calculated optimal configuration ratio, wherein the adjustment includes increasing or decreasing the resource allocation amount; S4, monitoring the real-time sale and activation of cloud computer resources, wherein the activation status includes the frequency of resource usage and resource occupancy rate; S5, updating the configuration parameters of each resource type in real time according to the real-time sales and activation conditions, wherein the configuration parameters include the upper limit, lower limit and current available quantity of the resource allocation.

2. The cloud computer resource dynamic allocation method according to claim 1, characterized in that: The resource demand growth prediction value Di in step S2 is calculated by linear regression based on historical sales data and current usage status. The linear regression model is: ; in, is the demand forecast value of the i-th type of resources, is the historical sales quantity, is the current usage, is the minimum resource requirement of the system. , is the regression coefficient, which is obtained by least square fitting.

3. The cloud computer resource dynamic allocation method according to claim 2, characterized in that: The regression coefficient of the least squares method is calculated by the following formula: ; Among them, X is the matrix of historical sales data and usage status, and Y is the matrix of historical resource demand. is the estimated regression coefficient.

4. The cloud computer resource dynamic allocation method according to claim 1, characterized in that: The update of the configuration parameters is determined by the following formula: ; in, is the current configuration of the i-th resource, is the initial configuration of the i-th resource, The adjustment amount is calculated based on real-time sales and activation situations.

5. The method for dynamically allocating cloud computer resources according to claim 4, characterized in that: The adjustment amount The calculation is based on the difference between the current usage and the predicted target usage, and the formula is: ; in, is the adjustment factor, is the current resource usage, The target usage is predicted based on sales and activations.

6. The cloud computer resource dynamic allocation method according to claim 1, characterized in that: The dynamic adjustment of resources includes increasing or decreasing the allocation of resources. When the usage of a certain type of resource approaches or exceeds the configuration upper limit, the system automatically increases the allocation of this type of resource; when the usage is lower than the configuration lower limit, the system automatically decreases the allocation of this type of resource.

7. The cloud computer resource dynamic allocation method according to claim 1, characterized in that: The real-time monitoring period is a fixed time interval or a dynamically adjusted time interval. The system automatically adjusts resource allocation according to the real-time activation and sales status of the resources based on the monitoring period.

8. The cloud computer resource dynamic allocation method according to claim 1, characterized in that: In the resource allocation process, an early warning mechanism is set. When the usage of a certain type of resource approaches the upper limit or lower limit, the system automatically issues an early warning and makes resource adjustments.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • A cloud platform resource utilization prediction method and terminal equipment

    CN109714395A

  • Cloud computer resource allocation method and device, equipment, storage medium and program product

    CN118158221A

  • Method and system for allocating and managing computer cloud desktop resources

    CN118467177A

  • Hybrid elastic scaling method based on multi-dimensional resource prediction

    WO2024212614A1

Cited By

  • Resource dynamic allocation method and device and server

    CN114168248A

  • Cloud computer management method and system and readable storage medium

    CN121441904A