CN108093062B - Cloud resource management method and device - Google Patents

Cloud resource management method and device Download PDF

Info

Publication number
CN108093062B
CN108093062B CN201711435505.0A CN201711435505A CN108093062B CN 108093062 B CN108093062 B CN 108093062B CN 201711435505 A CN201711435505 A CN 201711435505A CN 108093062 B CN108093062 B CN 108093062B
Authority
CN
China
Prior art keywords
current
resource
resources
preset
preset time
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
Application number
CN201711435505.0A
Other languages
Chinese (zh)
Other versions
CN108093062A (en
Inventor
宋健
王佳
高雪挺
朱岩
李梓苒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BEIJING WELINK Co.,Ltd.
Original Assignee
Beijing Welink Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Welink Co ltd filed Critical Beijing Welink Co ltd
Priority to CN201711435505.0A priority Critical patent/CN108093062B/en
Publication of CN108093062A publication Critical patent/CN108093062A/en
Application granted granted Critical
Publication of CN108093062B publication Critical patent/CN108093062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1031Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a cloud resource management method and a device, firstly, a target cloud service to be accessed by a user is obtained, then, application program interface conversion is carried out according to the target cloud service, and the user is accessed to the target cloud service, so that the user is connected to the required target cloud service by using the application program interface conversion, namely, various cloud services can be conveniently provided for the user without independent registration and purchase; in addition, the technical scheme of the embodiment of the invention can effectively supervise and reasonably distribute the operation resources according to the use condition and the task processing condition of the cloud resources, thereby avoiding the unbalanced resource distribution in the cloud service, simultaneously improving the task processing efficiency in the cloud service and realizing the effective supervision of the tasks.

Description

Cloud resource management method and device
Technical Field
The embodiment of the invention relates to the technical field of internet and cloud service, in particular to a cloud resource management method and device.
Background
Cloud services are an augmentation, usage, and interaction model for internet-based related services, typically involving the provision of dynamically scalable and often virtualized resources over the internet.
Currently, there are many different vendors that offer cloud services, such as Tencent cloud, Array cloud, Amazon cloud, etc. The user needs to purchase the different cloud services respectively when using the different cloud services, and then needs to perform operations such as configuration, connection and the like respectively to use the different cloud services, so that the user cannot conveniently and quickly use the different cloud services, and the utilization rate of the cloud services is also influenced.
In addition, most of the current cloud services perform resource allocation according to the load, which causes resource allocation imbalance of the whole cloud service, easily causes that some users need to wait for a long time to obtain corresponding cloud services, and greatly affects user experience.
In addition, the current cloud service cannot realize effective supervision on the tasks according to the use condition of the resources in the current cloud service, and the task processing efficiency in the cloud service is reduced.
In summary, how to flexibly switch among various cloud services, how to reasonably allocate cloud resources, and how to effectively supervise tasks to improve task processing efficiency are technical problems that need to be solved at present.
Disclosure of Invention
Embodiments of the present invention provide a cloud resource management method and apparatus, which can provide multiple cloud services for a user without separately purchasing and connecting, and can effectively supervise and reasonably allocate cloud resources according to usage and task processing conditions of the cloud resources, thereby avoiding resource allocation imbalance in the cloud services, improving task processing efficiency in the cloud services, and achieving effective supervision of tasks.
In a first aspect, a cloud resource management method is provided, where the method includes the following steps:
acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service, and accessing the user to the target cloud service;
at each first preset time, acquiring the resource utilization rate of running resources on the target cloud service, screening the resources of which the resource utilization rate exceeds a preset upper limit value, and obtaining a first resource set corresponding to each first preset time;
at each first preset time, calculating the quotient of the number of the resources in the corresponding first resource set and the number of the running resources at the current first preset time to obtain the resource use online rate at each first preset time;
at each first preset time, judging whether the corresponding resource use online rate exceeds a first preset value, if so, judging whether the resource use online rates corresponding to the first N preset times of the current first preset time exceed the first preset value, and if so, determining the number of operating resources needing to be newly added at the current first preset time according to the number of the operating resources at the current first preset time, wherein N is a positive integer greater than or equal to 1.
With reference to the first aspect, in a first possible implementation manner, the method further includes the following steps:
screening the resources with the resource utilization rate lower than a preset lower limit value at each first preset moment to obtain a second resource set corresponding to each first preset moment;
at each first preset time, calculating the quotient of the number of the resources in the corresponding second resource set and the number of the running resources at the current first preset time to obtain the resource use offline rate at each first preset time;
at each first preset time, judging whether the corresponding resource use lower rate exceeds a second preset value or not, if the corresponding resource use lower rate exceeds the second preset value, judging whether the resource use lower rate corresponding to the first S preset times of the current first preset time exceeds the second preset value or not, and if the resource use lower rate corresponding to the first S preset times of the current first preset time exceeds the second preset value, determining the quantity of running resources needing to be reduced at the current first preset time according to the quantity of the running resources at the current first preset time; wherein S is a positive integer greater than or equal to 1.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner, the method further includes the following steps:
at each second preset moment, acquiring the number of tasks to be processed and running resources on the target cloud service;
at each second preset time, judging whether the number of the tasks to be processed at the current second preset time is less than the number of the tasks to be processed at the last second preset time of the current second preset time, if the number of the tasks to be processed at the current second preset time is not less than the number of the tasks to be processed at the last second preset time of the current second preset time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, and determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time.
With reference to the second possible implementation manner of the first aspect, in a third possible implementation manner, the determining, according to the number of tasks to be processed at the current second predetermined time, the upper limit of the predefined resource expansion and contraction, and the number of running resources at the current second predetermined time, the number of running resources that need to be newly added at the current second predetermined time includes the following sub-steps:
calculating a quotient of the number of the tasks to be processed at the current second preset moment and 2, and taking an integer part of the quotient to obtain a first numerical value;
and calculating the sum of the first numerical value and the number of the running resources at the current second preset time to obtain a second numerical value, judging whether the second numerical value is greater than the preset resource expansion upper limit, if so, calculating the difference value between the preset resource expansion upper limit and the number of the running resources at the current second preset time to obtain the number of the running resources needing to be newly added at the current second preset time, and if not, taking the first numerical value as the number of the running resources needing to be newly added at the current second preset time.
With reference to the first possible implementation manner of the first aspect, in a fourth possible implementation manner, the method further includes the following steps:
at each second preset time, acquiring resources on the target cloud service, wherein the resources on the target server comprise running resources and idle resources;
and at each second preset time, judging whether the quantity of idle resources at the current second preset time is less than the quantity of idle resources at the previous second preset time at the current second preset time, if the quantity of idle resources at the current second preset time is not less than the quantity of idle resources at the previous second preset time at the current second preset time, judging whether the quantity of running resources at the current second preset time is greater than a preset resource expansion lower limit, and if the quantity of running resources at the current second preset time is greater than the preset resource expansion lower limit, determining the quantity of running resources which need to be reduced at the current second preset time according to the quantity of resources on the target cloud service, the quantity of idle resources at the current second preset time and the preset resource expansion lower limit.
With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner, the determining, according to the number of resources on the target cloud service, the number of idle resources at the current second predetermined time, and the predetermined resource scaling lower limit, the number of operating resources that need to be reduced at the current second predetermined time includes the following sub-steps:
calculating a quotient of the number of the idle resources at the current second preset moment and 2, and taking an integer part of the quotient to obtain a third numerical value;
calculating a difference value between the number of resources on the target cloud service at the current second preset time and the third numerical value to obtain a fourth numerical value, judging whether the fourth numerical value is smaller than the preset resource expansion lower limit, and calculating a difference value between the number of resources on the target cloud service at the current second preset time and the preset resource expansion lower limit if the fourth numerical value is smaller than the preset resource expansion lower limit to obtain the number of operating resources required to be reduced at the current second preset time; and if the fourth numerical value is not less than the preset resource expansion lower limit, taking the third numerical value as the number of the running resources needing to be reduced at the current second preset time.
In a second aspect, an apparatus for cloud resource management is provided, the apparatus comprising:
the cloud service access module is used for acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service and accessing the user to the target cloud service;
the first resource acquisition module is used for acquiring the resource utilization rate of the running resources on the target cloud service at each first preset time, screening the resources of which the resource utilization rate exceeds a preset upper limit value, and obtaining a first resource set corresponding to each first preset time;
a resource usage online rate determining module, configured to calculate, at each first predetermined time, a quotient between the number of resources in the corresponding first resource set and the number of resources operated at the current first predetermined time, to obtain a resource usage online rate at each first predetermined time;
the first resource adjusting module is configured to determine, at each first predetermined time, whether the corresponding resource usage uplink rate exceeds a first predetermined value, determine, if the corresponding resource usage uplink rate exceeds the first predetermined value, whether the resource usage uplink rates corresponding to first N first predetermined times of the current first predetermined time all exceed the first predetermined value, and determine, according to the number of the running resources at the current first predetermined time, the number of the running resources that need to be newly added at the current first predetermined time if the resource usage uplink rates corresponding to the first N first predetermined times of the first predetermined time all exceed the first predetermined value, where N is a positive integer greater than or equal to 1.
With reference to the second aspect, in a first possible implementation manner, the apparatus further includes:
a second resource obtaining module, configured to screen, at each first predetermined time, a resource whose resource usage rate is lower than a predetermined lower limit value, so as to obtain a second resource set corresponding to each first predetermined time;
the resource use offline rate determining module is used for calculating the quotient of the number of the corresponding resources in the second resource set and the number of the running resources at the current first preset time at each first preset time to obtain the resource use offline rate at each first preset time;
a second resource adjusting module, configured to determine, at each first predetermined time, whether the corresponding resource usage offline rate exceeds a second predetermined value, if the corresponding resource usage offline rate exceeds the second predetermined value, determine whether the resource usage offline rates corresponding to S first predetermined times before the current first predetermined time all exceed the second predetermined value, and if the resource usage offline rates corresponding to S first predetermined times before the current first predetermined time all exceed the second predetermined value, determine, according to the number of operating resources at the current first predetermined time, the number of operating resources that needs to be decreased at the current first predetermined time; wherein S is a positive integer greater than or equal to 1.
With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner, the apparatus further includes:
the third resource acquisition module is used for acquiring the number of tasks to be processed and the running resources on the target cloud service at each second preset moment;
a third resource adjusting module, configured to determine, at each second predetermined time, whether the number of the to-be-processed tasks at the current second predetermined time is smaller than the number of the to-be-processed tasks at a second predetermined time that is previous to the current second predetermined time, if the number of the to-be-processed tasks at the current second predetermined time is not smaller than the number of the to-be-processed tasks at the second predetermined time that is previous to the current second predetermined time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, and determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner, the third resource adjusting module includes:
the first numerical value determining submodule is used for calculating the quotient of the number of the tasks to be processed at the current second preset moment and 2, and taking the integer part of the quotient to obtain a first numerical value;
and the resource increment determining submodule is used for calculating the sum of the first numerical value and the number of the running resources at the current second preset time to obtain a second numerical value, judging whether the second numerical value is greater than the preset resource expansion upper limit, if the second numerical value is greater than the preset resource expansion upper limit, calculating the difference value between the preset resource expansion upper limit and the number of the running resources at the current second preset time to obtain the number of the running resources needing to be newly added at the current second preset time, and if the second numerical value is not greater than the preset resource expansion upper limit, taking the first numerical value as the number of the running resources needing to be newly added at the current second preset time.
With reference to the first possible implementation manner of the second aspect, in a fourth possible implementation manner, the apparatus further includes:
a fourth resource obtaining module, configured to obtain, at each second predetermined time, a resource on the target cloud service, where the resource on the target server includes an operating resource and an idle resource;
and a fourth resource adjusting module, configured to determine, at each second predetermined time, whether the number of idle resources at the current second predetermined time is less than the number of idle resources at a second predetermined time before the current second predetermined time, determine, if the number of idle resources at the current second predetermined time is not less than the number of idle resources at the second predetermined time before the current second predetermined time, whether the number of operating resources at the current second predetermined time is greater than a predetermined resource scaling lower limit, and determine, according to the number of resources on the target cloud service, the number of idle resources at the current second predetermined time, and the predetermined resource scaling lower limit, the number of operating resources that needs to be reduced at the current second predetermined time.
With reference to the fourth possible implementation manner of the second aspect, in a fifth possible implementation manner, the fourth resource adjusting module includes:
the third numerical value determining submodule is used for calculating the quotient of the number of the idle resources at the current second preset time and 2, and taking the integer part of the quotient to obtain a third numerical value;
the resource decrement determining submodule is used for calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the third numerical value to obtain a fourth numerical value, judging whether the fourth numerical value is smaller than the preset resource expansion lower limit, and calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the preset resource expansion lower limit to obtain the running resource quantity needing to be reduced at the current second preset time if the fourth numerical value is smaller than the preset resource expansion lower limit; and if the fourth numerical value is not less than the preset resource expansion lower limit, taking the third numerical value as the number of the running resources needing to be reduced at the current second preset time.
In the technical scheme of the embodiment of the invention, the target cloud service to be accessed by the user is firstly obtained, then the application program interface conversion is carried out according to the target cloud service, and the user is accessed to the target cloud service, so that the user can be connected to the required target cloud service by using the application program interface conversion, namely, various cloud services can be conveniently provided for the user without independently registering and purchasing; in addition, the technical scheme of the embodiment of the invention can effectively supervise and reasonably distribute the operation resources according to the use condition and the task processing condition of the cloud resources, thereby avoiding the unbalanced resource distribution in the cloud service, simultaneously improving the task processing efficiency in the cloud service and realizing the effective supervision of the tasks.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 schematically shows a flowchart of a cloud resource management method according to an embodiment of the present invention.
Fig. 2 schematically shows a flowchart of a cloud resource management method according to still another embodiment of the present invention.
Fig. 3 schematically shows a flowchart of a cloud resource management method according to still another embodiment of the present invention.
Fig. 4 schematically shows a flowchart of a cloud resource management method according to still another embodiment of the present invention.
Fig. 5 schematically shows a flowchart of a cloud resource management method according to still another embodiment of the present invention.
Fig. 6 schematically shows a flowchart of a cloud resource management method according to still another embodiment of the present invention.
Fig. 7 is a block diagram schematically illustrating a cloud resource management apparatus according to an embodiment of the present invention.
Fig. 8 schematically shows a cloud platform architecture diagram in the present invention.
Fig. 9 is a schematic diagram illustrating the cloud platform architecture component modules according to the present invention.
Fig. 10 schematically shows a cloud service flow diagram in the present invention.
Fig. 11 schematically shows a cloud platform security protection diagram in the present invention.
Fig. 12 schematically shows a cloud service provisioning flowchart in the present invention.
Fig. 13 is a flow chart schematically illustrating a process of purchasing a cloud service by a user in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A cloud resource management method, as shown in fig. 1, includes the following steps:
110. acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service, and accessing the user to the target cloud service;
in the step, the target cloud service can be changed at any time according to the specific requirements of the user, and the user can be connected to the target cloud service which is newly required by the user by utilizing the conversion of the application program interface after the target cloud service is changed, so that the operations of respectively purchasing and installing each cloud service are not required; the application program interface conversion is an interface for transferring the cloud platform to a specific target cloud service, as shown in fig. 8, the application program interface conversion is cloud resource/service API conversion in the drawing; the cloud platform can be connected to various cloud services such as Ariicloud, Amazon cloud, Tencent cloud and the like through program interface conversion, and can manage various cloud services, and the cloud platform has strong docking capacity;
120. at each first preset time, acquiring the resource utilization rate of running resources on the target cloud service, and screening the resources of which the resource utilization rate exceeds a preset upper limit value to obtain a first resource set corresponding to each first preset time;
in this step, a plurality of first predetermined times are set at equal time intervals, and the step is executed once at each predetermined time, and specifically, the step can be executed at each first predetermined time in a polling manner; the equal time interval here may be, but is not limited to, 1 minute;
in this step, the resource utilization rate may be, but is not limited to, the CPU or/and memory utilization rate of the resource;
in this step, the predetermined upper limit value may be flexibly limited according to the actual application scenario, for example, it is visible as 80%, and the value of the predetermined upper limit value is not limited by the present invention;
130. at each first preset time, calculating the quotient of the number of the resources in the corresponding first resource set and the number of the running resources at the current first preset time to obtain the resource use online rate at each first preset time;
in this step, the number of the running resources at each first predetermined time may be obtained in the polling at the corresponding predetermined time, for example, may be obtained by the cluster manager in the polling of the resource monitoring device at each predetermined time; the cluster manager can obtain not only the running resources at each first preset time, but also the idle resources at each first preset time;
in this step, the resource utilization rate can be calculated by using the following formula:
Figure BDA0001525749610000061
wherein t1 represents the number of resources in the first resource set, t2 represents the number of resources operated at the first predetermined time, and t represents the resource utilization rate, i.e., the quotient of the number of resources in the corresponding first resource set and the number of resources operated at the current first predetermined time;
in this step, the resource utilization rate is the ratio of the resource utilization rate exceeding a preset upper limit value in the running resources at the current moment;
140. at each first preset time, judging whether the corresponding resource use online rate exceeds a first preset value, if so, judging whether the resource use online rates corresponding to the first N first preset times of the current first preset time exceed the first preset value, and if so, determining the number of operating resources needing to be newly added at the current first preset time according to the number of the operating resources at the current first preset time, wherein N is a positive integer greater than or equal to 1;
in this step, the first predetermined value may be flexibly defined according to the actual application scenario, for example, may be 50%, and the specific value of the first predetermined value is not limited by the present invention;
in this step, determining the number of the operating resources that need to be newly added at the current first predetermined time according to the number of the operating resources at the current first predetermined time, and specifically, setting the number of the newly added operating resources as half of the number of the existing resources (including the operating resources and the idle resources);
in this step, when there is a resource usage rate of the resource having a predetermined occupation ratio (i.e., exceeding the first predetermined value) greater than a preset value (i.e., a predetermined upper limit value), the number of operating resources is increased.
According to the technical scheme, the target cloud service to be accessed by the user is obtained, the application program interface conversion is carried out according to the target cloud service, and the user is accessed to the target cloud service, so that the user is connected to the required target cloud service by using the application program interface conversion, and various cloud services can be conveniently provided for the user without independent registration and purchase; in addition, the technical scheme of the embodiment can effectively supervise and reasonably distribute the operating resources according to the service condition of the cloud resources, thereby avoiding unbalanced resource distribution in the cloud service, improving the task processing efficiency in the cloud service, and realizing effective supervision on the tasks.
In an embodiment, as shown in fig. 2, the cloud resource management method further includes, based on the first embodiment, the following steps:
210. screening resources with the resource utilization rate lower than a preset lower limit value at each first preset moment to obtain a second resource set corresponding to each first preset moment;
in this step, the predetermined lower limit value may be flexibly limited according to the actual application scenario, for example, may be 50%, and the value of the predetermined lower limit value is not limited by the present invention;
220. at each first preset time, calculating the quotient of the quantity of the resources in the corresponding second resource set and the quantity of the running resources at the current first preset time to obtain the offline rate of the resource use at each first preset time;
in this step, the resource utilization rate is the ratio of the resource utilization rate lower than the predetermined lower limit value in the running resource at the current moment;
230. at each first preset time, judging whether the corresponding resource use lower rate exceeds a second preset value, if so, judging whether the resource use lower rate corresponding to S first preset times of the current first preset time exceeds the second preset value, and if so, determining the quantity of running resources needing to be reduced at the current first preset time according to the quantity of the running resources at the current first preset time; wherein S is a positive integer greater than or equal to 1;
in this step, the second predetermined value may be flexibly defined according to the actual application scenario, for example, may be 50%, and the specific value of the second predetermined value is not limited by the present invention;
in this step, the number of the operating resources that need to be reduced at the current first scheduled time is determined according to the number of the operating resources at the current first scheduled time, and specifically, the reduced number of the operating resources may be set to be half of the number of the existing resources.
In the embodiment, when the resource utilization rate of the resource with the predetermined occupation ratio (i.e. exceeding the second predetermined value) is smaller than the preset value (i.e. the predetermined lower limit value), the amount of the running resource is reduced. According to the technical scheme, the cloud resources can be effectively supervised and reasonably distributed according to the using condition of the cloud resources, the resource distribution imbalance in the cloud service is avoided, meanwhile, the task processing efficiency in the cloud service is improved, and the effective supervision on the tasks is realized.
In both embodiments, the resource is scheduled according to the use condition of the cloud resource.
In one embodiment, as shown in fig. 3, the cloud resource management method further includes the following steps:
310. at each second preset moment, acquiring the number of tasks to be processed and running resources on the target cloud service;
in this step, a plurality of second predetermined times are set at equal time intervals, and the step is executed once at each predetermined time, and specifically, the step can be executed at each second predetermined time in a polling manner; the equal time interval here may be, but is not limited to, 1 minute;
in this step, the number of tasks to be processed can be obtained by task monitoring in a timed polling manner, and the operating resources on the target cloud service can be obtained in a cluster management and resource counting manner;
320. at each second scheduled time, judging whether the number of the tasks to be processed at the current second scheduled time is less than the number of the tasks to be processed at the last second scheduled time at the current second scheduled time, if the number of the tasks to be processed at the current second scheduled time is not less than the number of the tasks to be processed at the last second scheduled time at the current second scheduled time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time;
in the step, the preset resource expansion upper limit is set to ensure the sufficient resource, the preset resource expansion upper limit can be flexibly limited according to the practical application scene, and the value of the preset resource expansion upper limit is not limited;
the essence of the step is that when the number of the tasks to be processed is not reduced in two continuous polling, and the number of the tasks to be processed is larger than the number of the operation resources, the number of the operation resources is increased, and the cloud service resources are scheduled according to the execution condition of the tasks and the use condition of the resources, so that the processing efficiency of the tasks can be improved, the user experience degree is improved, and the uneven distribution of the cloud resources is avoided.
In this embodiment, the determining, in step 320, the number of the running resources that need to be newly added at the current second predetermined time according to the number of the tasks to be processed at the current second predetermined time, the upper limit of the predefined resource expansion and contraction, and the number of the running resources at the current second predetermined time includes the following substeps:
step one, calculating the quotient of the number of the tasks to be processed at the current second preset time and 2, and taking the integer part of the quotient to obtain a first numerical value;
step two, calculating the sum of the first value and the number of the running resources at the current second preset time to obtain a second value, judging whether the second value is greater than a preset resource expansion upper limit, if the second value is greater than the preset resource expansion upper limit, calculating the difference value between the preset resource expansion upper limit and the number of the running resources at the current second preset time to obtain the number of the running resources needing to be newly added at the current second preset time, and if the second value is not greater than the preset resource expansion upper limit, taking the first value as the number of the running resources needing to be newly added at the current second preset time;
the step sets the number of newly added running resources according to the preset resource expansion upper limit, and ensures that idle resources can be used by subsequent incoming tasks.
In one embodiment, as shown in fig. 4, the cloud resource management method further includes the following steps:
410. at each second preset moment, acquiring resources on the target cloud service, wherein the resources on the target server comprise running resources and idle resources;
in this step, specifically, a timed polling mode may be used to obtain operating resources and idle resources on the target cloud service through cluster management and resource counting;
420. at each second preset time, judging whether the quantity of idle resources at the current second preset time is less than the quantity of idle resources at the previous second preset time at the current second preset time, if the quantity of idle resources at the current second preset time is not less than the quantity of idle resources at the previous second preset time at the current second preset time, judging whether the quantity of running resources at the current second preset time is greater than a preset resource expansion lower limit, and if the quantity of running resources at the current second preset time is greater than the preset resource expansion lower limit, determining the quantity of running resources which need to be reduced at the current second preset time according to the quantity of resources on the target cloud service, the quantity of idle resources at the current second preset time and the preset resource expansion lower limit;
in the step, the preset resource expansion lower limit is set to ensure that the task can immediately respond after being submitted to the cluster;
the essence of the step is that when the number of idle resources is not reduced in two continuous polling and the number of the operating resources is greater than the preset resource expansion lower limit, the number of the operating resources is reduced, and the cloud service resources are scheduled according to the execution condition of the tasks and the use condition of the resources, so that the processing efficiency of the tasks can be improved, the user experience degree is improved, and the uneven distribution of the cloud resources is avoided.
In this embodiment, the determining, according to the number of resources on the target cloud service, the number of idle resources at the current second predetermined time, and the predetermined resource expansion/contraction lower limit in step 420, the number of resources that need to be reduced at the current second predetermined time includes the following sub-steps:
step one, calculating the quotient of the number of the idle resources at the current second preset time and 2, and taking the integer part of the quotient to obtain a third numerical value;
step two, calculating a difference value between the number of resources on the target cloud service at the current second preset time and a third value to obtain a fourth value, judging whether the fourth value is smaller than a preset resource expansion lower limit, and calculating the difference value between the number of resources on the target cloud service at the current second preset time and the preset resource expansion lower limit if the fourth value is smaller than the preset resource expansion lower limit to obtain the number of running resources which need to be reduced at the current second preset time; if the fourth value is not less than the preset resource expansion lower limit, taking the third value as the number of the running resources needing to be reduced at the current second preset moment;
the step reduces the number of the running resources according to the preset resource expansion lower limit setting, and ensures that the running resources can respond immediately after the tasks are submitted to the cluster.
The cloud resource management method of the present invention is further specifically described below with reference to an embodiment.
As shown in fig. 5, the cloud resource management method of this embodiment includes the following steps:
step one, setting a preset upper limit value and a preset lower limit value of a resource utilization rate;
step two, the resource monitoring acquires the use condition of the resources in a timing polling mode, namely the resource utilization rate (including the utilization rate of a CPU (Central processing Unit) and a memory) of the running resources on the target cloud service and the quantity of the running resources are acquired;
step three, the resource monitoring transmits the acquired information to a related intelligent scheduling device, the intelligent scheduling device analyzes the acquired information to obtain a resource scheduling result, and the related device for resource scheduling executes the resource scheduling result, namely, the increase or reduction of the running resources is carried out according to the resource scheduling result;
in this step, the analysis process of the intelligent scheduling device specifically includes:
when the number of the CPUs or the memories operating the resources twice (corresponding to the first predetermined value in the above embodiment) exceeds a predetermined upper limit (for example, the utilization rate is 80%), increasing the operating resources; when the number of the CPUs or the memories of the computing resources exceeds a preset lower limit value (for example, the utilization rate is 50%) after two consecutive occurrences of the majority (corresponding to the second predetermined value in the above embodiment), reducing the running resources;
in this step, the number of the running resources increased or reduced each time is 2/the number of the existing resources.
The embodiment realizes resource scheduling according to the resource utilization rate.
The cloud resource management method of the present invention is further specifically described below with reference to an embodiment.
As shown in fig. 6, the cloud resource management method of this embodiment includes the following steps:
step one, setting a preset resource expansion upper limit and a preset resource expansion lower limit;
step two, the resource monitoring acquires the use condition of the resources in a timing polling mode through a resource counter, namely acquiring the number of running resources and the number of idle resources on the target cloud service; then reporting the acquired information to intelligent scheduling;
step three, the task monitoring acquires the number of tasks to be processed in the task queue in a timing polling mode, whether the number of the tasks to be processed is reduced can be acquired through two continuous polling, and then the acquired information is reported to intelligent scheduling;
analyzing the acquired information by the intelligent scheduling device to obtain a resource scheduling result, and executing the resource scheduling result by the related device for resource scheduling, namely increasing or reducing the running resources according to the resource scheduling result;
in this step, the analysis process of the intelligent scheduling device specifically includes:
in two continuous polling, if the number of the tasks to be processed is not reduced and the number of the tasks to be processed is greater than the number of the running resources, the running resources need to be increased; the increased number of operating resources is determined according to the following steps: firstly, judging whether the number of tasks to be processed/2 + running resources is greater than a preset resource expansion upper limit or not, and if so, increasing the number to be the preset resource expansion upper limit-running resources; otherwise, the increased number is 2/2 of the number of the tasks to be processed; where "/" denotes an integer division.
In two continuous polling, if the number of idle resources is not reduced and the number of running resources is greater than a preset resource expansion lower limit, the running resources need to be reduced; the reduced number of operating resources is determined according to the following steps: firstly, judging whether the total quantity of resources-the quantity of idle resources/2 is smaller than a preset resource expansion lower limit, and if so, reducing the quantity to the total quantity of resources-the preset resource expansion lower limit; otherwise the reduction amount is the amount of free resources/2. Where "/" denotes an integer division.
The embodiment determines whether to increase or decrease the number of the running resources according to the task execution condition, the number of the running resources and the number of the idle resources.
Corresponding to the cloud resource management method, an embodiment of the present invention further provides a cloud resource management device, as shown in fig. 7, where the device includes:
the cloud service access module is used for acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service and accessing the user to the target cloud service;
the first resource acquisition module is used for acquiring the resource utilization rate of running resources on the target cloud service at each first preset time, screening resources of which the resource utilization rate exceeds a preset upper limit value, and obtaining a first resource set corresponding to each first preset time;
the resource use online rate determining module is used for calculating the quotient of the number of the resources in the corresponding first resource set and the number of the running resources at the current first preset time at each first preset time to obtain the resource use online rate at each first preset time;
the first resource adjusting module is used for judging whether the corresponding resource use uplink rate exceeds a first preset value at each first preset time, if so, judging whether the resource use uplink rates corresponding to the first N first preset times of the current first preset time exceed the first preset value, and if so, determining the number of the operating resources needing to be newly added at the current first preset time according to the number of the operating resources at the current first preset time, wherein N is a positive integer greater than or equal to 1.
In one embodiment, the cloud resource management apparatus further includes:
the second resource acquisition module is used for screening the resources with the resource utilization rate lower than a preset lower limit value at each first preset moment to obtain a second resource set corresponding to each first preset moment;
the resource use offline rate determining module is used for calculating the quotient of the number of the resources in the corresponding second resource set and the number of the running resources at the current first preset time at each first preset time to obtain the resource use offline rate at each first preset time;
the second resource adjusting module is used for judging whether the corresponding resource use lower rate exceeds a second preset value at each first preset time, if so, judging whether the resource use lower rate corresponding to the first S preset times of the current first preset time exceeds the second preset value, and if so, determining the quantity of the running resources needing to be reduced at the current first preset time according to the quantity of the running resources at the current first preset time; wherein S is a positive integer greater than or equal to 1.
In one embodiment, the cloud resource management apparatus further includes:
the third resource acquisition module is used for acquiring the number of the tasks to be processed and the running resources on the target cloud service at each second preset moment;
a third resource adjusting module, configured to determine, at each second predetermined time, whether the number of the to-be-processed tasks at the current second predetermined time is smaller than the number of the to-be-processed tasks at a previous second predetermined time at the current second predetermined time, if the number of the to-be-processed tasks at the current second predetermined time is not smaller than the number of the to-be-processed tasks at the previous second predetermined time at the current second predetermined time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, and determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time.
The third resource adjustment module includes:
the first numerical value determining submodule is used for calculating the quotient of the number of the tasks to be processed at the current second preset moment and 2, and taking the integer part of the quotient to obtain a first numerical value;
and the resource increment determining submodule is used for calculating the sum of the first numerical value and the quantity of the running resources at the current second preset time to obtain a second numerical value, judging whether the second numerical value is greater than a preset resource expansion upper limit, if the second numerical value is greater than the preset resource expansion upper limit, calculating the difference value between the preset resource expansion upper limit and the quantity of the running resources at the current second preset time to obtain the quantity of the running resources needing to be newly added at the current second preset time, and if the second numerical value is not greater than the preset resource expansion upper limit, taking the first numerical value as the quantity of the running resources needing to be newly added at the current second preset time.
In one embodiment, the cloud resource management apparatus further includes:
the fourth resource acquisition module is used for acquiring resources on the target cloud service at each second preset moment, wherein the resources on the target server comprise running resources and idle resources;
and the fourth resource adjusting module is used for judging whether the quantity of idle resources at the current second preset time is less than the quantity of idle resources at the previous second preset time at the current second preset time at each second preset time, judging whether the quantity of running resources at the current second preset time is greater than a preset resource expansion lower limit if the quantity of idle resources at the current second preset time is not less than the quantity of idle resources at the previous second preset time at the current second preset time, and determining the quantity of running resources which need to be reduced at the current second preset time according to the quantity of resources on the target cloud service, the quantity of idle resources at the current second preset time and the preset resource expansion lower limit if the quantity of running resources at the current second preset time is greater than the preset resource expansion lower limit.
The fourth resource adjustment module includes:
the third numerical value determining submodule is used for calculating the quotient of the number of the idle resources at the current second preset time and 2, and taking the integer part of the quotient to obtain a third numerical value;
the resource decrement determining submodule is used for calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the third numerical value to obtain a fourth numerical value, judging whether the fourth numerical value is smaller than a preset resource expansion lower limit, and calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the preset resource expansion lower limit if the fourth numerical value is smaller than the preset resource expansion lower limit to obtain the running resource quantity which needs to be reduced at the current second preset time; and if the fourth numerical value is not less than the preset resource expansion lower limit, taking the third numerical value as the number of the running resources needing to be reduced at the current second preset moment.
It should be noted that each step of the method according to the embodiment of the present invention corresponds to an execution step of a corresponding apparatus according to the embodiment of the present invention, and therefore repeated description thereof is omitted.
The device or the method of the embodiment of the invention is operated on a cloud platform, such as a starriver cloud platform, and the technical scheme and the principle of the invention are explained in detail by taking the starriver cloud platform as an example.
Fig. 8 shows a schematic architecture of a cloud platform, which is divided into three layers: cloud service business layer, cloud platform and official network. The cloud service provider supports interfacing with a variety of cloud service providers and private cloud platforms, including the Aliskiu, Amazon, Tencent cloud, Kingshan cloud, and OpenStack private cloud platforms.
The cloud platform provides a cloud resource/service API conversion interface for the lower cloud service business layer resources, the cloud service business resources can be seamlessly connected to the star river cloud platform, and resource calling and supervision are achieved, wherein the resources comprise virtual machines, storage resources, VPCs, IPs and the like;
the cloud platform forms computing resources, network resources, storage basic resources and database services, big data services, artificial intelligence services, mobile services, cloud security and the like in the middle, and provides resources or services which can better meet customer requirements and are more professional for cloud users.
The cloud platform provides star cloud resources and services for upper-layer users through the cloud resource/service interface API, and user requirements are met. The operation management supports user management, product management, order management and payment management, fine charging management, an operation support system is provided for the whole cloud platform, and the operation of the star river cloud platform is realized.
The official website serves as a service portal and provides service introduction, user registration and various service entrances for the users, and the users can conveniently and uniformly manage and use the star-river cloud service.
The platform composition module is shown in fig. 9: the cloud platform consists of an official website, operation management, operation and maintenance management, a management console and cloud resources.
The official website: the service portal is used for providing service introduction, user registration and each service entrance for the user, so that the user can conveniently and uniformly manage and use the star-river cloud service;
a management console: and as a cloud platform core, all cloud services are displayed for the user, and the functions of monitoring and managing all resources and services are provided so as to realize own services.
Operation management: the system carries out operation management on the satellite-river cloud platform, and has the functions of user management, cost management, work order management, message management, service monitoring, user service statistics and the like.
Operation and maintenance management: and operation and maintenance management service is provided, and the safety and stability of users, resources and service on the platform are guaranteed. The operation and maintenance platform is a sufficient guarantee for the whole cloud platform to carry out service operation, and the platform maintenance difficulty is reduced.
Cloud resources: the method provides bottom-layer resource support for the cloud platform of the river, supports the access of resources of a plurality of manufacturers, and comprises computing resources such as Aliskiren, Amazon, Tencent cloud, Baidu cloud, Jinshan cloud, OpenStack and the like
The service flow diagram of the platform is shown in fig. 10, and includes the following steps:
step one, a user is registered as a cloud user, and real-name authentication is completed;
step two, user operation auditing;
step three, recharging the user account;
step four, ordering, purchasing and paying the product;
step five, opening the operation and maintenance line, and completing service opening on the service line by operation;
step six, service use, the post-paid product can generate a bill;
step seven, bill settlement.
The cloud service provisioning flowchart is shown in fig. 12, and includes the following steps:
step one, web access to a river cloud official network;
step two, registering enterprise/individual users;
step three, user information authentication and verification;
step four, if the audit is not passed, ending the cloud service opening process; logging in a starriver cloud management console if the verification is passed, and executing the following steps;
placing orders for products or services;
step six, according to the product pricing statistics cost, generating a bill;
step seven, the user pays online;
step eight, opening cloud service;
counting a post-payment bill according to product pricing;
step ten, post-payment online payment.
According to the method, a user registers an account number through an official website and completes real-name authentication, and then an operation manager performs auditing. After the verification is passed, the user can enter a management console to charge and purchase service, and the service is opened after the payment is completed.
The flow chart of the cloud service purchase by the user is shown in fig. 13, and includes the following steps:
step one, visiting a river cloud official network;
step two, registering and logging in a user;
step three, opening a star river cloud console;
step four, when the real name authentication is passed and the balance is larger than a preset value, for example 150, placing an order and opening a payment cloud service, and when the balance is larger than the preset value, recharging;
and step five, placing orders and opening free cloud service when the real-name authentication is passed.
According to the method, a user accesses an official website, registers and logs in a system, real-name authentication is required before purchasing services, if the services are not free services, the account balance is required to be confirmed to exceed 150 Yuan, and otherwise, the services cannot be opened by ordering.
The cloud platform further provides a cloud service price comparison function, specifically, various cloud resource providers are connected in a butt joint mode through the resource price api, cloud resource price comparison of different dimensions (areas and configurations) is carried out, reference is provided for users, and resources most suitable for the users are selected.
The cloud platform is safe and controllable, five safety guarantees of platform safety management, network safety management, system safety management, application safety management and content safety management can be provided, access data encryption service based on an application layer is provided, and high-standard SLA (service level agreement) is provided, wherein the agreement is defined between a service provider and a user and is approved by both parties under certain expenditure.
The cloud platform is compatible with IaaS/PaaS platforms of various cloud service providers, supports extremely simple service access, flexible resource deployment and unified management, provides refined operation management, and creates a new service ecology of Internet enterprises in an open idea. The platform has the following characteristics:
the cloud platform is in butt joint with services and resources of different public cloud manufacturers, unified user management is adopted, and unified management on the resources of different cloud platforms is achieved;
the platform service supports purchase as required, is quickly opened and ready to use, and is purchased at any time and opened at any time;
the service support provided by the platform performs resource elastic expansion according to the resource use condition and the task execution condition, and completes the calculation task by moderate resources;
the cloud platform product has low service price, and after-sale processing response is timely, so that real-time communication is supported;
the platform supports cloud resource monitoring and service monitoring management;
consumption prediction and intelligent resource allocation recommendation service are provided, and economy and high efficiency are achieved completely.
The method is flexible in deployment, provides rich IaaS/PaaS services, and can customize a resource deployment mode according to a service scene.
The system is safe and controllable, and provides five safety guarantees of a platform, a network, a system, an application and contents; providing an access data encryption service based on an application layer; providing a high standard SLA.
The cloud platform is used as an open service platform, provides resources of various manufacturers and platform general services, is open to the outside, and enables users to access the star river cloud platform through the Internet and perform account management and service purchase opening by directly registering account numbers. The method is used after the service is opened, the due renewal is supported, the purchase of the post-paid service is supported, if the post-paid service is purchased, a post-paid bill is generated every hour, and the fee is automatically deducted from the balance. The user can view all the consumption details from the order management and billing management. All operations are completed on line, and the platform provides an online problem processing function to help users to process various related problems.
The above description is only an embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present invention, and the present invention shall be covered thereby. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A cloud resource management method is characterized by comprising the following steps:
acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service, and accessing the user to the target cloud service;
at each first preset time, acquiring the resource utilization rate of running resources on the target cloud service, screening the resources of which the resource utilization rate exceeds a preset upper limit value, and obtaining a first resource set corresponding to each first preset time;
at each first preset time, calculating the quotient of the number of the resources in the corresponding first resource set and the number of the running resources at the current first preset time to obtain the resource use online rate at each first preset time;
at each first preset time, judging whether the corresponding resource use online rate exceeds a first preset value, if so, judging whether the resource use online rates corresponding to the first N preset times of the current first preset time exceed the first preset value, and if so, determining the number of operating resources needing to be newly added at the current first preset time according to the number of the operating resources at the current first preset time, wherein N is a positive integer greater than or equal to 1;
the method further comprises the steps of:
at each second preset moment, acquiring the number of tasks to be processed and running resources on the target cloud service;
at each second preset time, judging whether the number of the tasks to be processed at the current second preset time is less than the number of the tasks to be processed at the last second preset time of the current second preset time, if the number of the tasks to be processed at the current second preset time is not less than the number of the tasks to be processed at the last second preset time of the current second preset time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time;
the method for determining the number of the operating resources required to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time comprises the following substeps:
calculating a quotient of the number of the tasks to be processed at the current second preset moment and 2, and taking an integer part of the quotient to obtain a first numerical value;
and calculating the sum of the first numerical value and the number of the running resources at the current second preset time to obtain a second numerical value, judging whether the second numerical value is greater than the preset resource expansion upper limit, if so, calculating the difference value between the preset resource expansion upper limit and the number of the running resources at the current second preset time to obtain the number of the running resources needing to be newly added at the current second preset time, and if not, taking the first numerical value as the number of the running resources needing to be newly added at the current second preset time.
2. The method according to claim 1, characterized in that the method further comprises the steps of:
screening the resources with the resource utilization rate lower than a preset lower limit value at each first preset moment to obtain a second resource set corresponding to each first preset moment;
at each first preset time, calculating the quotient of the number of the resources in the corresponding second resource set and the number of the running resources at the current first preset time to obtain the resource use offline rate at each first preset time;
and at each first preset time, judging whether the corresponding resource use lower rate exceeds a second preset value, if so, judging whether the resource use lower rate corresponding to S first preset times at the current first preset time exceeds the second preset value, and if so, determining the quantity of the running resources needing to be reduced at the current first preset time according to the quantity of the running resources at the current first preset time, wherein S is a positive integer greater than or equal to 1.
3. The method according to claim 2, characterized in that the method further comprises the steps of:
at each second preset time, acquiring resources on the target cloud service, wherein the resources on the target cloud service comprise operating resources and idle resources;
and at each second preset time, judging whether the quantity of idle resources at the current second preset time is less than the quantity of idle resources at the previous second preset time at the current second preset time, if the quantity of idle resources at the current second preset time is not less than the quantity of idle resources at the previous second preset time at the current second preset time, judging whether the quantity of running resources at the current second preset time is greater than a preset resource expansion lower limit, and if the quantity of running resources at the current second preset time is greater than the preset resource expansion lower limit, determining the quantity of running resources which need to be reduced at the current second preset time according to the quantity of resources on the target cloud service, the quantity of idle resources at the current second preset time and the preset resource expansion lower limit.
4. The method according to claim 3, wherein the determining the number of the operating resources that need to be reduced at the current second predetermined time according to the number of the resources on the target cloud service, the number of the idle resources at the current second predetermined time, and the predetermined resource scaling lower limit comprises the following sub-steps:
calculating a quotient of the number of the idle resources at the current second preset moment and 2, and taking an integer part of the quotient to obtain a third numerical value;
calculating a difference value between the number of resources on the target cloud service at the current second preset time and the third numerical value to obtain a fourth numerical value, judging whether the fourth numerical value is smaller than the preset resource expansion lower limit, and calculating a difference value between the number of resources on the target cloud service at the current second preset time and the preset resource expansion lower limit if the fourth numerical value is smaller than the preset resource expansion lower limit to obtain the number of operating resources required to be reduced at the current second preset time; and if the fourth numerical value is not less than the preset resource expansion lower limit, taking the third numerical value as the number of the running resources needing to be reduced at the current second preset time.
5. An apparatus for cloud resource management, the apparatus comprising:
the cloud service access module is used for acquiring a target cloud service to be accessed by a user, performing application program interface conversion according to the target cloud service and accessing the user to the target cloud service;
the first resource acquisition module is used for acquiring the resource utilization rate of the running resources on the target cloud service at each first preset time, screening the resources of which the resource utilization rate exceeds a preset upper limit value, and obtaining a first resource set corresponding to each first preset time;
a resource usage online rate determining module, configured to calculate, at each first predetermined time, a quotient between the number of resources in the corresponding first resource set and the number of resources operated at the current first predetermined time, to obtain a resource usage online rate at each first predetermined time;
a first resource adjusting module, configured to determine, at each first predetermined time, whether the corresponding resource usage uplink rate exceeds a first predetermined value, if the corresponding resource usage uplink rate exceeds the first predetermined value, determine whether the resource usage uplink rates corresponding to the first N first predetermined times of the current first predetermined time all exceed the first predetermined value, and if the resource usage uplink rates corresponding to the first N first predetermined times of the first predetermined time all exceed the first predetermined value, determine, according to the number of the running resources at the current first predetermined time, the number of the running resources that need to be newly added at the current first predetermined time, where N is a positive integer greater than or equal to 1;
the device further comprises:
the third resource acquisition module is used for acquiring the number of tasks to be processed and the running resources on the target cloud service at each second preset moment;
a third resource adjusting module, configured to determine, at each second predetermined time, whether the number of the to-be-processed tasks at the current second predetermined time is smaller than the number of the to-be-processed tasks at a second predetermined time that is previous to the current second predetermined time, if the number of the to-be-processed tasks at the current second predetermined time is not smaller than the number of the to-be-processed tasks at the second predetermined time that is previous to the current second predetermined time, judging whether the number of the tasks to be processed at the current second preset time is larger than the number of the running resources at the current second preset time or not, if so, determining the number of the operating resources which need to be newly added at the current second preset time according to the number of the tasks to be processed at the current second preset time, the preset resource expansion upper limit and the number of the operating resources at the current second preset time;
the third resource adjustment module comprises:
the first numerical value determining submodule is used for calculating the quotient of the number of the tasks to be processed at the current second preset moment and 2, and taking the integer part of the quotient to obtain a first numerical value;
and the resource increment determining submodule is used for calculating the sum of the first numerical value and the number of the running resources at the current second preset time to obtain a second numerical value, judging whether the second numerical value is greater than the preset resource expansion upper limit, if the second numerical value is greater than the preset resource expansion upper limit, calculating the difference value between the preset resource expansion upper limit and the number of the running resources at the current second preset time to obtain the number of the running resources needing to be newly added at the current second preset time, and if the second numerical value is not greater than the preset resource expansion upper limit, taking the first numerical value as the number of the running resources needing to be newly added at the current second preset time.
6. The apparatus of claim 5, further comprising:
a second resource obtaining module, configured to screen, at each first predetermined time, a resource whose resource usage rate is lower than a predetermined lower limit value, so as to obtain a second resource set corresponding to each first predetermined time;
the resource use offline rate determining module is used for calculating the quotient of the number of the corresponding resources in the second resource set and the number of the running resources at the current first preset time at each first preset time to obtain the resource use offline rate at each first preset time;
and the second resource adjusting module is used for judging whether the corresponding resource use down-rate exceeds a second preset value at each first preset time, judging whether the resource use down-rate corresponding to S first preset times at the current first preset time exceeds the second preset value if the corresponding resource use down-rate exceeds the second preset value, and determining the quantity of the running resources needing to be reduced at the current first preset time according to the quantity of the running resources at the current first preset time if the resource use down-rate corresponding to S first preset times at the current first preset time exceeds the second preset value, wherein S is a positive integer greater than or equal to 1.
7. The apparatus of claim 6, further comprising:
a fourth resource obtaining module, configured to obtain, at each second predetermined time, a resource on the target cloud service, where the resource on the target cloud service includes an operating resource and an idle resource;
and a fourth resource adjusting module, configured to determine, at each second predetermined time, whether the number of idle resources at the current second predetermined time is less than the number of idle resources at a second predetermined time before the current second predetermined time, determine, if the number of idle resources at the current second predetermined time is not less than the number of idle resources at the second predetermined time before the current second predetermined time, whether the number of operating resources at the current second predetermined time is greater than a predetermined resource scaling lower limit, and determine, according to the number of resources on the target cloud service, the number of idle resources at the current second predetermined time, and the predetermined resource scaling lower limit, the number of operating resources that needs to be reduced at the current second predetermined time.
8. The apparatus of claim 7, wherein the fourth resource adjustment module comprises:
the third numerical value determining submodule is used for calculating the quotient of the number of the idle resources at the current second preset time and 2, and taking the integer part of the quotient to obtain a third numerical value;
the resource decrement determining submodule is used for calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the third numerical value to obtain a fourth numerical value, judging whether the fourth numerical value is smaller than the preset resource expansion lower limit, and calculating the difference value between the resource quantity on the target cloud service at the current second preset time and the preset resource expansion lower limit to obtain the running resource quantity needing to be reduced at the current second preset time if the fourth numerical value is smaller than the preset resource expansion lower limit; and if the fourth numerical value is not less than the preset resource expansion lower limit, taking the third numerical value as the number of the running resources needing to be reduced at the current second preset time.
CN201711435505.0A 2017-12-26 2017-12-26 Cloud resource management method and device Active CN108093062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711435505.0A CN108093062B (en) 2017-12-26 2017-12-26 Cloud resource management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711435505.0A CN108093062B (en) 2017-12-26 2017-12-26 Cloud resource management method and device

Publications (2)

Publication Number Publication Date
CN108093062A CN108093062A (en) 2018-05-29
CN108093062B true CN108093062B (en) 2021-01-26

Family

ID=62179544

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711435505.0A Active CN108093062B (en) 2017-12-26 2017-12-26 Cloud resource management method and device

Country Status (1)

Country Link
CN (1) CN108093062B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110311810A (en) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 A kind of server resource allocation method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049309A (en) * 2012-12-11 2013-04-17 华为技术有限公司 Device, method and system for resource management of virtual machine
WO2016172848A1 (en) * 2015-04-28 2016-11-03 华为技术有限公司 Method and device for adjusting virtual resources in cloud computing
CN106133696A (en) * 2014-03-31 2016-11-16 微软技术许可有限责任公司 Dynamic marks target capacity during scaling cloud resource

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580524A (en) * 2015-01-30 2015-04-29 华为技术有限公司 Resource scaling method and cloud platform with same

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049309A (en) * 2012-12-11 2013-04-17 华为技术有限公司 Device, method and system for resource management of virtual machine
CN106133696A (en) * 2014-03-31 2016-11-16 微软技术许可有限责任公司 Dynamic marks target capacity during scaling cloud resource
WO2016172848A1 (en) * 2015-04-28 2016-11-03 华为技术有限公司 Method and device for adjusting virtual resources in cloud computing

Also Published As

Publication number Publication date
CN108093062A (en) 2018-05-29

Similar Documents

Publication Publication Date Title
US10671953B1 (en) Systems, apparatus and methods for cost and performance-based movement of applications and workloads in a multiple-provider system
US10346216B1 (en) Systems, apparatus and methods for management of software containers
US8612615B2 (en) Systems and methods for identifying usage histories for producing optimized cloud utilization
US10924537B2 (en) Systems, apparatus and methods for cost and performance-based management of resources in a cloud environment
US9888067B1 (en) Managing resources in container systems
US8606667B2 (en) Systems and methods for managing a software subscription in a cloud network
US9442771B2 (en) Generating configurable subscription parameters
US11922196B2 (en) Cloud-based utilization of software entitlements
US8713147B2 (en) Matching a usage history to a new cloud
US8631099B2 (en) Systems and methods for cloud deployment engine for selective workload migration or federation based on workload conditions
Ben-Yehuda et al. The {Resource-as-a-Service}({{{{{RaaS}}}}}) Cloud
US8949426B2 (en) Aggregation of marginal subscription offsets in set of multiple host clouds
US8504443B2 (en) Methods and systems for pricing software infrastructure for a cloud computing environment
US8782192B2 (en) Detecting resource consumption events over sliding intervals in cloud-based network
US10192246B2 (en) Generating multi-cloud incremental billing capture and administration
US11689613B2 (en) Systems, apparatus and methods for cost and performance-based management of resources in a cloud environment
US9830192B1 (en) Managing application performance in virtualization systems
US20120221454A1 (en) Systems and methods for generating marketplace brokerage exchange of excess subscribed resources using dynamic subscription periods
US20090300608A1 (en) Methods and systems for managing subscriptions for cloud-based virtual machines
US20130268940A1 (en) Automating workload virtualization
US11386371B2 (en) Systems, apparatus and methods for cost and performance-based movement of applications and workloads in a multiple-provider system
US10552586B1 (en) Systems, apparatus and methods for management of computer-based software licenses
US9413811B2 (en) Establishing upload channels to a cloud data distribution service
Nehru et al. Auction based dynamic resource allocation in cloud
US20150012398A1 (en) Credit optimization to minimize latency

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201231

Address after: 100193 rooms 4-15, 4th floor, building 10, East District, courtyard 10, northwest Wangdong Road, Haidian District, Beijing

Applicant after: BEIJING WELINK Co.,Ltd.

Address before: 100084 4034, 4th floor, No.18, shangdixinxi Road, Haidian District, Beijing

Applicant before: BEIJING GALAXY CLOUD INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: BEIJING GALAXY WORLD GROUP Co.,Ltd.

GR01 Patent grant
GR01 Patent grant