CN115118731B - Cloud resource management method and device, storage medium and electronic equipment - Google Patents
Cloud resource management method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN115118731B CN115118731B CN202210724906.2A CN202210724906A CN115118731B CN 115118731 B CN115118731 B CN 115118731B CN 202210724906 A CN202210724906 A CN 202210724906A CN 115118731 B CN115118731 B CN 115118731B
- Authority
- CN
- China
- Prior art keywords
- user
- cloud
- cloud resource
- resource
- resources
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007726 management method Methods 0.000 title claims abstract description 35
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000011156 evaluation Methods 0.000 claims abstract description 26
- 238000012544 monitoring process Methods 0.000 claims abstract description 14
- 238000011084 recovery Methods 0.000 claims description 37
- 238000013468 resource allocation Methods 0.000 claims description 10
- 238000004064 recycling Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 5
- 239000002699 waste material Substances 0.000 abstract description 6
- 230000008569 process Effects 0.000 description 11
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 238000013210 evaluation model Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000012163 sequencing technique Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000012550 audit Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000011990 functional testing Methods 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 230000035800 maturation Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1023—Server selection for load balancing based on a hash applied to IP addresses or costs
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a cloud resource management method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources; responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition; monitoring the use state information of the cloud resources; calculating cost loss of the user according to the using state information of the cloud resource, and determining a using score of the user according to the cost loss of the user; generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage. By applying the method provided by the embodiment of the invention, the cloud resource utilization rate can be provided, and the empty and waste of the cloud resource can be avoided.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a cloud resource management method and apparatus, a storage medium, and an electronic device.
Background
In recent years, with the continuous maturation of cloud computing technology and the expansion of cloud market scale, the threshold of using cloud resources by users is greatly reduced. When a user uses resources, in order to ensure that the resource requirements of long-term planning are met and the resource use under the condition of peak traffic is met, the user often oversubscribes resources, so that the blank and waste of cloud resources are easily caused.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a cloud resource management method which can provide the cloud resource utilization rate and avoid the empty and waste of cloud resources.
The invention also provides a cloud resource management device for ensuring the realization and application of the method in practice.
A cloud resource management method, comprising:
receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources;
responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition;
monitoring the use state information of the cloud resources;
calculating cost loss of the user according to the using state information of the cloud resource, and determining a using score of the user according to the cost loss of the user;
generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
The method, optionally, calculates the cost loss of the user according to the usage status information of the cloud resource, including:
determining resource product unit price, key indexes and index unit price of the key indexes of the cloud resource;
calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information;
calculating to obtain the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the using state information;
and calculating the cost loss of the user according to the using cost loss and the limit cost loss.
The method, optionally, the determining the usage score of the user according to the cost loss of the user includes:
determining the total cost of key resources of tenants;
and determining a use score of the user according to the total cost of the key resources of the tenant and the cost loss of the user.
The method, optionally, after determining the usage score of the user according to the cost loss of the user, further includes:
receiving a capacity expansion request of the user; the capacity expansion request comprises capacity expansion parameters;
judging whether cloud resources distributed to the user meet preset capacity expansion conditions or not according to the capacity expansion parameters, the cost loss and the limit cost loss;
under the condition that the cloud resources meet the capacity expansion conditions, expanding the capacity of the cloud resources;
outputting prompt information under the condition that the cloud resource does not meet the capacity expansion condition; the prompt information is used for prompting the user to optimize the use of resources.
In the foregoing method, optionally, after monitoring the usage status information of the cloud resource, the method further includes:
obtaining recovery influence parameters from the use state information of the cloud resources; the reclamation influencing parameters comprise at least one of idle time and resource utilization rate of unused resources;
judging whether the cloud resource meets a preset recovery condition according to the recovery influence parameter;
determining the recovery limit of the cloud resource under the condition that the cloud resource meets the preset recovery condition;
and recycling the cloud resources according to the recycling limit.
The method, optionally, of allocating, for the user, a cloud resource corresponding to the cloud resource request, includes:
acquiring resource parameters of the cloud resource request;
and distributing cloud resources corresponding to the cloud resource request to the user according to the resource parameters.
A cloud resource management apparatus, comprising:
the cloud resource allocation device comprises a receiving unit, a cloud resource allocation unit and a cloud resource allocation unit, wherein the receiving unit is used for receiving a cloud resource request of a user, and the cloud resource request is used for requesting allocation of cloud resources;
the allocation unit is used for responding to the cloud resource request and allocating cloud resources corresponding to the cloud resource request for the user under the condition that the user meets the preset allocation condition;
the monitoring unit is used for monitoring the use state information of the cloud resources;
the computing unit is used for computing the cost loss of the user according to the using state information of the cloud resource, and determining the using score of the user according to the cost loss of the user;
the output unit is used for generating a cloud resource use evaluation result according to the cost loss and the use score of the user and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
The above apparatus, optionally, the computing unit includes:
a first determining subunit, configured to determine a resource product unit price of the cloud resource, a key index, and an index unit price of the key index;
the first calculating subunit is used for calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information;
the second calculating subunit is used for calculating and obtaining the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the using state information;
and the third calculation subunit is used for calculating the cost loss of the user according to the use cost loss and the limit cost loss.
A storage medium comprising stored instructions, wherein the instructions, when executed, control a device on which the storage medium resides to perform a cloud resource management method as described above.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to perform a cloud resource management method as described above by one or more processors.
Compared with the prior art, the invention has the following advantages:
the invention provides a cloud resource management method and device, a storage medium and electronic equipment, wherein the method comprises the following steps: receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources; responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition; monitoring the use state information of the cloud resources; calculating cost loss of the user according to the using state information of the cloud resource, and determining a using score of the user according to the cost loss of the user; generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage. By applying the method provided by the embodiment of the invention, the cloud resource utilization rate can be provided, and the empty and waste of the cloud resource can be avoided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a method flow chart of a cloud resource management method provided by the invention;
FIG. 2 is a flow chart of a process for calculating cost loss for a user in accordance with the present invention;
FIG. 3 is a flow chart of a process for determining a user's usage score provided by the present invention;
fig. 4 is a schematic structural diagram of a cloud resource management device provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to the present invention;
fig. 6 is a flowchart of a cloud resource management process provided by the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the invention provides a cloud resource management method, which can be applied to electronic equipment, wherein the electronic equipment can be equipment in a cloud resource management platform, and a flow chart of the method is shown in fig. 1, and specifically comprises the following steps:
s101: and receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources.
In this embodiment, the cloud resource request may be a request sent when a user has a cloud resource requirement.
Optionally, the cloud resource may include at least one product of a cloud server, a cloud hard disk, a database, and a network bandwidth.
S102: responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition.
In this embodiment, in response to the cloud resource request, whether the user satisfies a preset allocation condition may be determined first.
Optionally, one possible way to determine whether the user meets the preset allocation condition may be: determining service demand information of a user, judging whether the service demand information is matched with cloud resource quota requested by the cloud resource request, and determining that the user meets allocation conditions under the condition that the service demand information is matched with the cloud resource quota; and under the condition that the service demand information is not matched with the cloud resource amount, determining that the user does not meet the allocation condition.
Another possible way to determine whether the user meets the preset allocation condition may be: determining a history cloud resource which is currently obtained by a user, determining whether the history cloud resource can be optimally used, and if the history cloud resource can be optimally used and the history cloud resource after being optimally used can meet the service demand information of the user, determining that the user does not meet the allocation condition; otherwise, determining that the user meets the allocation condition.
S103: and monitoring the using state information of the cloud resource.
In this embodiment, the usage status information of the cloud resource may include information such as a resource usage rate of the cloud resource, a resource usage condition, and a cloud resource quota, where the resource usage condition may include whether there is an unused resource, a free duration of the unused resource, and the unused quota of the cloud resource.
S104: and calculating the cost loss of the user according to the using state information of the cloud resource, and determining the using score of the user according to the cost loss of the user.
In this embodiment, the cost loss of the user may include a usage cost loss and a credit cost loss; the use cost loss can be calculated according to the resource utilization rate, and the limit cost loss is calculated according to the unused limit of the cloud resource.
S105: generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
In this embodiment, the cloud resource usage evaluation result may be displayed and output on a preset display interface, or may be sent to a terminal of the user.
In some embodiments, one possible way to generate the cloud resource usage assessment results is: after the cost loss of the user is calculated, the cost loss of the user can be compared with a preset loss threshold value, and a comparison result is obtained; and after determining the use scores of the users, sequencing the use scores of the users and the use scores of other users to obtain the sequencing of the users, and generating a cloud resource use evaluation result according to the sequencing of the users and the comparison result.
By applying the method provided by the embodiment of the invention, the cloud resource use evaluation result is generated according to the cost loss and the use score of the user, and the cloud resource use evaluation result is output so as to instruct the user to optimize the resource use. The cloud resource utilization rate can be provided, and empty and waste of cloud resources are avoided.
In an embodiment of the present invention, based on the foregoing solution, optionally, the calculating the cost loss of the user according to the usage status information of the cloud resource, as shown in fig. 2, includes:
s201: and determining the resource product unit price of the cloud resource, a key index and the index unit price of the key index.
The cloud resources in this embodiment may include at least one product of a cloud server, a cloud hard disk, a database, and a network bandwidth, and the key index of the resources may be at least one of a CPU, a memory, a storage space, and a data space.
S202: and calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information.
In this embodiment, the usage rate thresholds corresponding to the different cloud resources may be the same or different, and the usage rate threshold may be a preset required usage rate, for example, in the case that the cloud resource is a cloud server CVM, the usage rate threshold may be 20%; in the case where the cloud resource is a cloud hard disk CBS, the usage threshold may be 20%; in the case where the cloud resource is a database, the usage threshold may be 20%; in the case where the cloud resource is network bandwidth, the usage threshold may be 25%.
Alternatively, one possible way to calculate the cost of use loss is:
I i =|R-Mi|*Ci*P1
wherein I is i The cost loss of the cloud resource product i is achieved, R is a utilization rate threshold value, the value of L can be 20%, mi is a resource utilization rate, ci is a key index, and P1 is an index unit price.
Specifically, under the condition that the number of the products of the cloud resources is multiple, the use cost losses of all the products of the cloud resources can be summed to obtain the total use cost loss of the cloud resources.
S203: and calculating the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the use state information.
In this embodiment, the unused amount may be an amount of unused resources in the cloud resources, that is, an amount of idle resources.
Alternatively, one possible way to calculate the loss of the user's frontal cost is:
K i =(C q -Q*T)*P2
wherein K is i The loss of the rated cost of the product i of the cloud resource, C q For unused quota, Q is total quota, T is maneuvering quota space proportion, T can take 10% value, and P2 is resource product unit price.
Specifically, under the condition that the number of the products of the cloud resources is multiple, the sum of the sum cost losses of all the products of the cloud resources can be obtained, so that the total sum cost loss of the cloud resources is obtained.
S204: and calculating the cost loss of the user according to the using cost loss and the limit cost loss.
In this embodiment, the cost loss of cloud resource usage and the cost loss of the quota may be summed to obtain the cost loss of the user.
In an embodiment of the present invention, based on the foregoing solution, optionally, the determining the usage score of the user according to the cost loss of the user, as shown in fig. 3, specifically includes:
s301: the total cost of the tenant key resources is determined.
In this embodiment, the total cost of the tenant key resource may be determined from a preset cost information table, where the total cost of the tenant key resource is the total cost of the tenant key resource, and the key resource refers to a resource of a preset type.
S302: and determining a use score of the user according to the total cost of the key resources of the tenant and the cost loss of the user.
In this embodiment, the usage score may characterize whether the user's resource optimization is reasonable, and may be used to prompt the user to optimize the resource usage.
Optionally, one specific way to determine the usage score of the user is:
wherein S is the use score, L is the cost loss of the user, and F is the total cost of the key resources of the tenant.
In an embodiment of the present invention, based on the foregoing solution, optionally, after determining the usage score of the user according to the cost loss of the user, the method further includes:
receiving a capacity expansion request of the user, wherein the capacity expansion request comprises capacity expansion parameters;
judging whether cloud resources distributed to the user meet preset capacity expansion conditions or not according to the capacity expansion parameters, the cost loss and the limit cost loss;
under the condition that the cloud resources meet the capacity expansion conditions, expanding the capacity of the cloud resources;
outputting prompt information under the condition that the cloud resource does not meet the capacity expansion condition; the prompt information is used for prompting the user to optimize the use of resources.
In this embodiment, the capacity expansion request may include a capacity expansion parameter, where the capacity expansion parameter may include a product and resource quota information of the user requesting capacity expansion.
Optionally, according to the capacity expansion parameter, the cost loss and the quota cost loss, one feasible way of judging whether the cloud resources allocated to the user meet the capacity expansion condition is to compare the cost loss with the quota loss, prompt the user to optimize the resource configuration of the cloud resources under the condition that the cost loss is greater than the quota loss, judge whether the optimized resources are matched with the capacity expansion parameter after the user completes the optimization of the resource configuration of the cloud resources is detected, and determine that the cloud resources do not meet the capacity expansion condition if the optimized resources are matched with the capacity expansion parameter; determining whether unused resources and unused credits of cloud resources of the user meet the capacity expansion parameter under the condition that the credit loss is larger than the cost loss; under the condition that the unused resources and the unused amount do not meet the capacity expansion parameters, determining that the cloud resources do not meet the capacity expansion conditions; and under the condition that the unused resources and the unused amount do not meet the capacity expansion parameters, determining that the cloud resources meet the capacity expansion conditions.
Under the condition that the cloud resources meet the capacity expansion conditions, determining a target capacity expansion parameter according to the capacity expansion parameter and the optimized resources, or determining the target capacity expansion parameter according to unused resources, unused amount and capacity expansion parameters; and expanding the capacity of the cloud resource according to the determined target capacity expansion parameter.
Under the condition that cloud resources do not meet capacity expansion conditions and cost loss is larger than limit loss, a user can be prompted to obtain required resources from unused resources preferentially; when the cloud resources do not meet the capacity expansion condition, and the quota loss is larger than the cost loss, a user can be prompted to adjust the resource allocation of the cloud resources preferentially, and the resources recovered after adjustment are used for meeting the resource change requirement.
In an embodiment of the present invention, based on the above solution, optionally, after monitoring the usage status information of the cloud resource, the method further includes:
obtaining recovery influence parameters from the use state information of the cloud resources; the reclamation influencing parameters comprise at least one of idle time and resource utilization rate of unused resources;
judging whether the cloud resource meets a preset recovery condition according to the recovery influence parameter;
determining the recovery limit of the cloud resource under the condition that the cloud resource meets the preset recovery condition;
and recycling the cloud resources according to the recycling limit.
In this embodiment, when the idle time length of the unused resource is greater than a preset idle time length threshold, or the resource usage rate is less than a preset resource usage rate threshold, it is determined that the cloud resource does not satisfy the recovery condition, otherwise, it is determined that the cloud resource satisfies the recovery condition.
In this embodiment, when the idle time length of the unused resource is greater than a preset idle time length threshold, determining a recovery unit according to the unused resource; recycling the unused resources according to the recycling amount, wherein the unused resources = the total amount of cloud resources allocated as users-the used amount; recovery credit = unused resources a predetermined first recovery ratio; the first recovery ratio may be 90%, and unused resources in the cloud resources are recovered according to the recovery credit.
In this embodiment, when the resource usage rate is lower than the preset usage rate threshold, the recovery quota=the total quota of the cloud resource is a preset second recovery ratio, where the second recovery ratio may be 50%; and recovering cloud resources according to the recovery limit.
By applying the method provided by the embodiment of the invention, the waste of cloud resources can be effectively avoided.
In an embodiment of the present invention, based on the above-mentioned scheme, optionally, the allocating, for the user, a cloud resource corresponding to the cloud resource request includes:
acquiring resource parameters of the cloud resource request;
and distributing cloud resources corresponding to the cloud resource request to the user according to the resource parameters.
In this embodiment, the resource parameters may include the requested product and the requested resource credit.
The cloud resource allocation method provided by the embodiment of the invention can be used for rapidly and accurately allocating cloud resources for users.
Corresponding to the method shown in fig. 1, the embodiment of the present invention further provides a cloud resource management device, which is used for implementing the method shown in fig. 1, where the cloud resource management device provided in the embodiment of the present invention may be applied to an electronic device, and the structural schematic diagram of the cloud resource management device is shown in fig. 4, and specifically includes:
a receiving unit 401, configured to receive a cloud resource request of a user, where the cloud resource request is used to request allocation of a cloud resource;
an allocation unit 402, configured to allocate, in response to the cloud resource request, a cloud resource corresponding to the cloud resource request to the user when the user meets a preset allocation condition;
a monitoring unit 403, configured to monitor usage status information of the cloud resource;
a calculating unit 404, configured to calculate a cost loss of the user according to the usage state information of the cloud resource, and determine a usage score of the user according to the cost loss of the user;
an output unit 405, configured to generate a cloud resource usage evaluation result according to the cost loss and the usage score of the user, and output the cloud resource usage evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
In an embodiment of the present invention, based on the foregoing solution, specifically, the calculating unit 404 includes:
a first determining subunit, configured to determine a resource product unit price of the cloud resource, a key index, and an index unit price of the key index;
the first calculating subunit is used for calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information;
the second calculating subunit is used for calculating and obtaining the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the using state information;
and the third calculation subunit is used for calculating the cost loss of the user according to the use cost loss and the limit cost loss.
In an embodiment of the present invention, based on the foregoing solution, specifically, the calculating unit 404 includes:
a second determining subunit, configured to determine a total cost of the tenant key resource;
and a third determining subunit, configured to determine a usage score of the user according to the total cost of the tenant key resource and the cost loss of the user.
In an embodiment of the present invention, based on the foregoing solution, specifically, the cloud resource management device further includes:
the first execution unit is used for receiving the capacity expansion request of the user; the capacity expansion request comprises capacity expansion parameters;
the first judging unit is used for judging whether cloud resources distributed to the user meet preset capacity expansion conditions according to the capacity expansion parameters, the cost loss and the limit cost loss;
the capacity expansion unit is used for expanding the cloud resources under the condition that the cloud resources meet the capacity expansion conditions;
the prompting unit is used for outputting prompting information under the condition that the cloud resources do not meet the capacity expansion condition; the prompt information is used for prompting the user to optimize the use of resources.
In an embodiment of the present invention, based on the foregoing solution, specifically, the cloud resource management device further includes:
the second execution unit is used for obtaining recovery influence parameters from the using state information of the cloud resources; the reclamation influencing parameters comprise at least one of idle time and resource utilization rate of unused resources;
the second judging unit is used for judging whether the cloud resources meet preset recovery conditions or not according to the recovery influence parameters;
a second determining unit, configured to determine a recovery unit of the cloud resource when the cloud resource meets a preset recovery condition;
and the recovery unit is used for recovering the cloud resources according to the recovery limit.
In an embodiment of the present invention, based on the foregoing solution, specifically, the allocation unit 402 includes:
an acquisition subunit, configured to acquire a resource parameter of the cloud resource request;
and the allocation subunit is used for allocating cloud resources corresponding to the cloud resource requests to the users according to the resource parameters.
The specific principle and execution process of each unit and module in the cloud resource management device disclosed in the embodiment of the present invention are the same as those of the cloud resource management method disclosed in the embodiment of the present invention, and may refer to corresponding parts in the cloud resource management method provided in the embodiment of the present invention, which are not described in detail herein.
The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein the equipment where the storage medium is located is controlled to execute the cloud resource management method when the instructions run.
The embodiment of the present invention further provides an electronic device, whose structural schematic diagram is shown in fig. 5, specifically including a memory 501, and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and configured to be executed by the one or more processors 503, where the one or more instructions 502 perform the following operations:
receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources;
responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition;
monitoring the use state information of the cloud resources;
calculating cost loss of the user according to the using state information of the cloud resource, and determining a using score of the user according to the cost loss of the user;
generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
In some embodiments, the cloud resource management method provided by the embodiment of the present invention may be applied to cloud resource refinement management of an enterprise, and performs management control from a full life cycle of cloud resources to achieve maximum utilization of enterprise-level cloud platform resources, as shown in fig. 6, and is a flowchart of a cloud resource management process provided by the embodiment of the present invention, and specifically includes the following steps:
step one: and (5) applying for cloud resources.
The principle of 'on-demand allocation and elastic capacity expansion' is followed when resources are allocated, so that a user is required to apply for cloud resources according to the minimum configuration application provided by a cloud platform, and if a user is required to apply for larger configuration, a non-functional test report and the like are provided, and a manager performs auditing, so that the resources can be allocated after auditing.
Step two: cloud resource usage.
And designing a post-evaluation model aiming at the use condition of the tenant resources to quantify the occupation and use condition of the resources and guide the platform to audit and manage the user resources.
The key product indexes of the post-evaluation model are shown in table 1:
TABLE 1
The post-evaluation model calculation method is as follows:
the cost loss I is calculated by the absolute value of the difference between the required utilization rate (20%) and the actual utilization rate Mi of the product example and the key index C of the product example i And index unit price P.
For example: use cost loss I of Shan Tai cloud server cvm-i =|20%-Mi|*Ci*P。
Total cost of use loss of cloud server products
Total cost of use loss for the user i=i cvm +I cbs +I MySQL +I Redis +I Oracle +I net 。
The loss of credit cost K is calculated by not using credit C in the user account q After deducting the 10% maneuvering limit space of the total limit Q, the product of the maneuvering limit space and the unit price P of the product is obtained.
For example: frontal cost penalty K for cloud server products cvm =(C q-cvm -Q cvm *10%)*P。
The user total amount cost loss k=k cvm +K cbs +K MySQL +K Redis +K Oracle +K net 。
Total cost loss of user l=i+k.
The calculation method of the post-user evaluation total score S is that the total cost loss L of the user is divided by the total cost F of the key resources of the tenant to obtain a proportion, 1 is subtracted from the proportion, and then 100 is multiplied to obtain the tenant score:
the model comprehensively evaluates the use condition of the resources of the evaluation user from two aspects of the resource limit and the resource utilization rate, and quantifies data by taking the resource cost as a unified measurement unit, so that the post-evaluation result is clearer. And intuitively displaying the condition that the user applies for the resource in excess and the utilization rate is low. According to the two indexes, statistical reports of all users can be obtained, and the statistical reports can be used for restricting and managing the flows of resource application, change, recovery and the like of the users.
Step three: and (5) cloud resource change.
When a user applies for changes such as cloud resource capacity expansion, a cloud platform side manager can grasp the current use situation of the user cloud resources by combining the statistical report in (2), and formulate a related strategy for users with lower scores so as to check the change requirement:
the loss of the amount cost is higher, the resources are preferentially obtained from the resources allocated by the user, and the resources required by the change are not additionally allocated.
The use cost loss is higher, the user is preferentially urged to adjust the existing resource allocation to achieve larger utilization rate, and the resource recovered after adjustment can be used for meeting the changing requirement.
Step four: and (5) recovering cloud resources.
Combining the periodic post-evaluation work in the second step, aiming at the user with higher loss cost, organizing and urging the user to carry out resource recovery work:
unused resource recovery: unused resources (allocated resources-used resources) were recovered 90% of the unused resources (unused resources) within 45 days after allocation of the resources, leaving 10% of the maneuver line space.
And (3) low-resource-utilization-rate recovery: the utilization rate of each index of the resource is lower than 20%, the configuration is halved, and if the original configuration is the lowest, the adjustment is not needed.
The application of the embodiment of the invention has the following advantages: (1) The post-use evaluation model prescribes the standard and specification of resource use, and carries out quantitative statistics and display on the use condition of the user resource, and the model can not only respectively display the condition of excessive application of the resource and low use rate, but also carry out transverse comparison and comprehensive control on the overall condition of all users, and guide enterprises to carry out fine management on cloud resources.
(2) Aiming at the situation that a great amount of zombie resources exist due to excessive application of resources by users, in the embodiment, the resource application and change phases strictly control the user resource demands according to strategies, and timely recover the unused resources which are allocated, thereby being beneficial to the resource scheduling and allocation of the whole cloud platform.
(3) Aiming at the phenomenon that the used resources of the user are low in utilization rate, statistics and analysis are periodically carried out, the utilization report and ranking are utilized to prompt the user to timely adjust the resource allocation and recycle idle resources, the capacity of the cloud computing elastic adjustment allocation is fully utilized, the resource utilization rate of the whole cloud platform is maximized, the cost of using cloud resources by the user is effectively reduced, and the resource utilization efficiency is improved.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in the same piece or pieces of software and/or hardware when implementing the present invention.
From the above description of embodiments, it will be apparent to those skilled in the art that the present invention may be implemented in software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The cloud resource management method provided by the invention is described in detail, and specific examples are applied to illustrate the principle and the implementation of the invention, and the description of the above examples is only used for helping to understand the method and the core idea of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. A cloud resource management method, comprising:
receiving a cloud resource request of a user, wherein the cloud resource request is used for requesting to allocate cloud resources;
responding to the cloud resource request, and distributing cloud resources corresponding to the cloud resource request for the user under the condition that the user meets a preset distribution condition;
monitoring the use state information of the cloud resources;
calculating cost loss of the user according to the using state information of the cloud resource, and determining a using score of the user according to the cost loss of the user;
generating a cloud resource use evaluation result according to the cost loss and the use score of the user, and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
2. The method of claim 1, wherein said calculating a cost penalty for the user based on the usage status information of the cloud resource comprises:
determining resource product unit price, key indexes and index unit price of the key indexes of the cloud resource;
calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information;
calculating to obtain the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the using state information;
and calculating the cost loss of the user according to the using cost loss and the limit cost loss.
3. The method of claim 1 or 2, wherein said determining a usage score for the user based on cost loss for the user comprises:
determining the total cost of key resources of tenants;
and determining a use score of the user according to the total cost of the key resources of the tenant and the cost loss of the user.
4. The method of claim 2, wherein after determining the usage score for the user based on the cost penalty for the user, further comprising:
receiving a capacity expansion request of the user; the capacity expansion request comprises capacity expansion parameters;
judging whether cloud resources distributed to the user meet preset capacity expansion conditions or not according to the capacity expansion parameters, the cost loss and the limit cost loss;
under the condition that the cloud resources meet the capacity expansion conditions, expanding the capacity of the cloud resources;
outputting prompt information under the condition that the cloud resource does not meet the capacity expansion condition; the prompt information is used for prompting the user to optimize the use of resources.
5. The method of claim 1, wherein after monitoring the usage status information of the cloud resource, further comprising:
obtaining recovery influence parameters from the use state information of the cloud resources; the reclamation influencing parameters comprise at least one of idle time and resource utilization rate of unused resources;
judging whether the cloud resource meets a preset recovery condition according to the recovery influence parameter;
determining the recovery limit of the cloud resource under the condition that the cloud resource meets the preset recovery condition;
and recycling the cloud resources according to the recycling limit.
6. The method of claim 1, wherein the allocating the cloud resource corresponding to the cloud resource request to the user comprises:
acquiring resource parameters of the cloud resource request;
and distributing cloud resources corresponding to the cloud resource request to the user according to the resource parameters.
7. A cloud resource management apparatus, comprising:
the cloud resource allocation device comprises a receiving unit, a cloud resource allocation unit and a cloud resource allocation unit, wherein the receiving unit is used for receiving a cloud resource request of a user, and the cloud resource request is used for requesting allocation of cloud resources;
the allocation unit is used for responding to the cloud resource request and allocating cloud resources corresponding to the cloud resource request for the user under the condition that the user meets the preset allocation condition;
the monitoring unit is used for monitoring the use state information of the cloud resources;
the computing unit is used for computing the cost loss of the user according to the using state information of the cloud resource, and determining the using score of the user according to the cost loss of the user;
the output unit is used for generating a cloud resource use evaluation result according to the cost loss and the use score of the user and outputting the cloud resource use evaluation result; the cloud resource usage assessment results are used for indicating a user to optimize resource usage.
8. The apparatus of claim 7, wherein the computing unit comprises:
a first determining subunit, configured to determine a resource product unit price of the cloud resource, a key index, and an index unit price of the key index;
the first calculating subunit is used for calculating the use cost loss of the user according to the key index, the index unit price, a preset use rate threshold value and the resource use rate in the use state information;
the second calculating subunit is used for calculating and obtaining the limit cost loss of the user according to the unused limit, the total limit and the unit price of the resource product contained in the using state information;
and the third calculation subunit is used for calculating the cost loss of the user according to the use cost loss and the limit cost loss.
9. A storage medium comprising stored instructions, wherein the instructions, when executed, control a device in which the storage medium is located to perform the cloud resource management method of any of claims 1-6.
10. An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the cloud resource management method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210724906.2A CN115118731B (en) | 2022-06-24 | 2022-06-24 | Cloud resource management method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210724906.2A CN115118731B (en) | 2022-06-24 | 2022-06-24 | Cloud resource management method and device, storage medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115118731A CN115118731A (en) | 2022-09-27 |
CN115118731B true CN115118731B (en) | 2024-02-27 |
Family
ID=83327417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210724906.2A Active CN115118731B (en) | 2022-06-24 | 2022-06-24 | Cloud resource management method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115118731B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164279A (en) * | 2011-12-13 | 2013-06-19 | 中国电信股份有限公司 | Method and system for distributing cloud computing resources |
CN110913016A (en) * | 2019-12-13 | 2020-03-24 | 杭州城市大数据运营有限公司 | Resource management system for cloud resource platform and storage medium |
CN112884382A (en) * | 2021-04-14 | 2021-06-01 | 北京百度网讯科技有限公司 | Resource quota management method, device, equipment and storage medium of cloud platform |
KR20220006490A (en) * | 2021-12-29 | 2022-01-17 | 케이웨어 (주) | Hybrid cloud resource allocation method for workload dynamic resource placement and optimization performance management |
CN114629909A (en) * | 2022-03-28 | 2022-06-14 | 联通(广东)产业互联网有限公司 | Cloud resource cost analysis method |
-
2022
- 2022-06-24 CN CN202210724906.2A patent/CN115118731B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103164279A (en) * | 2011-12-13 | 2013-06-19 | 中国电信股份有限公司 | Method and system for distributing cloud computing resources |
CN110913016A (en) * | 2019-12-13 | 2020-03-24 | 杭州城市大数据运营有限公司 | Resource management system for cloud resource platform and storage medium |
CN112884382A (en) * | 2021-04-14 | 2021-06-01 | 北京百度网讯科技有限公司 | Resource quota management method, device, equipment and storage medium of cloud platform |
KR20220006490A (en) * | 2021-12-29 | 2022-01-17 | 케이웨어 (주) | Hybrid cloud resource allocation method for workload dynamic resource placement and optimization performance management |
CN114629909A (en) * | 2022-03-28 | 2022-06-14 | 联通(广东)产业互联网有限公司 | Cloud resource cost analysis method |
Also Published As
Publication number | Publication date |
---|---|
CN115118731A (en) | 2022-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108090225B (en) | Database instance running method, device and system and computer readable storage medium | |
JP5289588B2 (en) | Method and system for calculating charges online based on user service volume | |
Niu et al. | Cost-effective cloud HPC resource provisioning by building semi-elastic virtual clusters | |
US20130290511A1 (en) | Managing a sustainable cloud computing service | |
CN112332404B (en) | Intelligent management system and method for heating service | |
CN113010576A (en) | Method, device, equipment and storage medium for capacity evaluation of cloud computing system | |
CN113626199B (en) | Management method and device of idle cloud computing resources, electronic equipment and storage medium | |
CN110618867A (en) | Method and device for predicting resource usage amount | |
CN111080235B (en) | Data processing method, device, electronic equipment and computer readable medium | |
CN115860300A (en) | Battery replacement scheduling method and device for vehicle, electronic equipment and storage medium | |
CN114153687A (en) | Cost calculation method and system for cloud platform resources and related device | |
CN115118731B (en) | Cloud resource management method and device, storage medium and electronic equipment | |
CN112862319B (en) | Order scheduling method, device, equipment and storage medium | |
CN105574637A (en) | Electric quantity load management method and system | |
CN112884327A (en) | Electric bicycle tide scheduling method, server system and readable storage medium | |
CN108563504A (en) | A kind of resource management-control method and device | |
Shen et al. | Stochastic modeling and approaches for managing energy footprints in cloud computing service | |
CN116737387A (en) | Cloud computing resource prediction system and method based on power grid digital service | |
CN111160991A (en) | PDB advertisement traffic optimization method, device, storage medium and electronic equipment | |
CN115952054A (en) | Simulation task resource management method, device, equipment and medium | |
CN108076443A (en) | The distribution method and online charging system of flow in a kind of online charging system | |
CN111522843B (en) | Control method, system, equipment and storage medium of data platform | |
CN113947441A (en) | Charging method for application of software as a service (SaaS) industrial Application (APP) | |
CN115080220A (en) | Cloud resource allocation method and equipment | |
CN111080368A (en) | Real-time hierarchical selection method for cloud agent aiming at multi-period reserved instances |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |