CN113515382A - Cloud resource allocation method and device, electronic equipment and program product - Google Patents

Cloud resource allocation method and device, electronic equipment and program product Download PDF

Info

Publication number
CN113515382A
CN113515382A CN202110834973.5A CN202110834973A CN113515382A CN 113515382 A CN113515382 A CN 113515382A CN 202110834973 A CN202110834973 A CN 202110834973A CN 113515382 A CN113515382 A CN 113515382A
Authority
CN
China
Prior art keywords
rule
resource
monitoring information
operation monitoring
cloud
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.)
Granted
Application number
CN202110834973.5A
Other languages
Chinese (zh)
Other versions
CN113515382B (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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202110834973.5A priority Critical patent/CN113515382B/en
Publication of CN113515382A publication Critical patent/CN113515382A/en
Application granted granted Critical
Publication of CN113515382B publication Critical patent/CN113515382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Abstract

The invention discloses a method and a device for distributing cloud resources, electronic equipment and a program product, and relates to the technical field of computers. The cloud resource allocation method comprises the following steps: acquiring a resource expansion rule and service operation monitoring information of a cloud service platform, wherein the resource expansion rule is used for controlling the allocation of resources of the cloud service platform; judging whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the service operation monitoring information; if not, inputting the service operation monitoring information into a rule prediction model to obtain a resource expansion rule prediction result output by the rule prediction model; and allocating the resources according to the resource expansion rule prediction result. The invention can ensure that the service operation requirement is met in the operation process of the cloud service platform.

Description

Cloud resource allocation method and device, electronic equipment and program product
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for allocating cloud resources, an electronic device, and a program product.
Background
The cloud service platform realizes unified management and dynamic allocation of heterogeneous resources through distributed and virtualized technologies and the like, so that infrastructure resources such as computation, storage and the like can be purchased and centrally operated and maintained as required.
However, in the related art, the resource allocation of the cloud service platform is limited by rules, and the technical problems that the cloud resource allocation is insufficient and the service operation requirements are difficult to meet exist.
Disclosure of Invention
The invention mainly aims to provide a cloud resource allocation method, a cloud resource allocation device, electronic equipment and a program product, and aims to solve the technical problem of insufficient cloud resource allocation in the related art.
In order to achieve the above object, the present invention provides a method for allocating cloud resources, including:
acquiring a resource expansion rule and service operation monitoring information of a cloud service platform, wherein the resource expansion rule is used for controlling the allocation of resources of the cloud service platform;
judging whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the service operation monitoring information;
if not, inputting the service operation monitoring information into the rule prediction model to obtain a resource expansion rule prediction result output by the rule prediction model;
and allocating resources according to the resource scaling rule prediction result.
In one embodiment, allocating resources according to the resource scaling rule prediction result comprises:
obtaining a rule arrangement instruction set according to a resource expansion rule prediction result;
updating the resource expansion rule according to the rule arrangement instruction set to obtain an updated resource expansion rule;
allocating resources according to the updated resource scaling rule;
wherein the rule orchestration instruction set comprises at least one of:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity reduction trigger threshold, capacity expansion trigger duration, capacity reduction trigger duration, resource capacity expansion granularity and resource capacity reduction granularity.
In an embodiment, acquiring resource scaling rules and service operation monitoring information of a cloud service platform includes:
and acquiring resource expansion rules and service operation monitoring information of the cloud service platform in a current preset period.
In an embodiment, after determining whether the resource scaling rule matches the service operation monitoring information, the method further includes:
and if the resource expansion rule and the service operation monitoring information are matched, entering a next preset period, and returning to execute the resource expansion rule and the service operation monitoring information of the cloud service platform in the current preset period.
In an embodiment, the determining whether the resource scaling rule is matched with the operation service of the cloud service platform according to the service operation monitoring information includes:
according to the service operation monitoring information, acquiring the average resource allocation insufficient rate and/or the resource allocation excessive rate of the cloud service platform in the current preset period;
judging whether the average under-allocation rate and/or the over-allocation rate of the resources in the current preset period meet preset conditions or not;
and determining whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the judgment result.
In an embodiment, before acquiring the resource scaling rule and the service operation monitoring information of the cloud service platform, the method further includes:
acquiring historical service operation monitoring information and historical resource expansion rules of a cloud service platform;
determining a training sample set according to historical service operation monitoring information and a historical resource expansion rule;
inputting a training data set in a training sample into a machine learning library function in a GRU neural network model to determine a training function;
and inputting the verification data set in the training sample into a machine learning library function in the GRU neural network model to verify the training function, and outputting a rule prediction model according to a verification result.
In an embodiment, if the data is not matched, the service operation monitoring information is input into the rule prediction model, and after a resource expansion rule prediction result output by the rule prediction model is obtained, the method further includes:
and taking the service operation monitoring information as a training rule prediction model of the training set to obtain a new rule prediction model.
In a second aspect, the present invention further provides an apparatus for allocating cloud resources, including:
the information acquisition module is used for acquiring resource expansion rules and business operation monitoring information of the cloud service platform;
the matching judgment module is used for judging whether the resource expansion rule is matched with the operation service of the cloud service platform according to the service operation monitoring information;
the rule prediction module is used for inputting the service operation monitoring information into the rule prediction model if the service operation monitoring information is not matched with the rule prediction model, and obtaining a resource expansion rule prediction result output by the rule prediction model;
and the resource allocation module allocates resources according to the resource expansion rule prediction result.
In a third aspect, the present invention further provides an electronic device, including: memory, processor and computer program stored on the memory and executable on the processor, wherein the processor implements the method as described above when executing the computer program.
In a fourth aspect, the invention also provides a computer program product comprising executable program code, which when executed by a processor implements a method as described above.
According to the cloud resource allocation method provided by the embodiment of the invention, whether the resource expansion rule is matched with the service operation monitoring information is judged, and when the resource expansion rule is not matched with the service operation monitoring information, the service operation monitoring information is input into the rule prediction model, the resource expansion rule prediction result output by the rule prediction model is obtained, and the allocation of resources of the cloud service platform is adjusted according to the resource expansion rule prediction result, so that the resource expansion rule of the cloud service platform is timely adapted to corresponding service characteristics, the dynamic allocation of the resources along with service requirements is realized, the condition of insufficient resource allocation is avoided, and the resource utilization rate is improved.
Drawings
Fig. 1 is a schematic structural diagram of a recommended electronic device of a cloud resource allocation method according to the present invention;
fig. 2 is a schematic flowchart of a cloud resource allocation method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a cloud resource allocation method according to a second embodiment of the present invention;
fig. 4 is a flowchart illustrating a cloud resource allocation method according to a third embodiment of the present invention;
fig. 5 is a schematic functional block diagram of an apparatus for allocating cloud resources according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the related technology, the cloud service platform realizes unified management and dynamic allocation of heterogeneous resources through technologies such as distributed and virtualization. The method has the advantages of saving cost, improving availability and fault-tolerant capability, and is widely applied to the fields of medical treatment, education, government, commerce and the like. The common cloud resource allocation method comprises three modes of fixed configuration, timing allocation and elastic Scaling (Auto Scaling).
Wherein, fixed configuration means that a fixed amount of resources are purchased at one time, and manual configuration is needed in the later stage such as expansion. This approach ensures that resources are abundant during traffic operation, but cloud resources are wasted a lot during off-peak periods. And once the peak value is suddenly increased, the service influence is still caused due to the untimely resource expansion.
The timing scheduling is added with timing resource scheduling on the basis of fixed configuration, and the number of allocated instances is also preset and fixed. However, this method is only suitable for situations where part of the traffic fluctuates regularly or the peak value is predictable, but when the traffic peak value rises suddenly earlier than the timing task, a certain traffic impact is caused by untimely resource timing allocation, i.e., there is no dynamic adaptive capability.
The elastic scaling mode may automatically adjust the amount of resources after defining the rule set. Specifically, the flexible scaling, i.e., the mode, automatically adjusts the service of the service resource according to the change of the monitoring index through a scaling strategy. The flexible strategy can be defined according to the business requirement, the workload of manually and repeatedly adjusting resources to deal with business change and load peak is reduced, and therefore resources and labor operation and maintenance cost are saved. The scaling strategy, namely the resource scaling rule, comprises a scaling trigger group, a scaling instance group, a scaling rule group and the like. The flexible trigger group defines various monitoring indexes, monitoring and checking tasks, timing tasks and the like, and the rule defines factors such as conditions and opportunities for triggering resource allocation; the flexible instance group defines the resource type, granularity and the like of single allocation operation, and the instance is a general unit of resources in the cloud service platform; the telescoping rule set defines the duration and cooling time rules after the trigger set conditions are met. However, the flexible scaling mode depends on the resource scaling rule configuration, and when the pre-configured resource scaling rule cannot adapt to the service feature, the resource allocation is insufficient and it is difficult to adapt to the corresponding service feature.
Therefore, the invention provides a cloud resource allocation method, which is characterized in that the service operation monitoring information of a cloud service platform is monitored, when the resource expansion rule is not matched with the service operation monitoring information, the service operation monitoring information is input into a rule prediction model, and the resource expansion rule prediction result output by the rule prediction model is obtained, so that the resource allocation of the cloud service platform is adjusted.
The inventive concept of the present application is further illustrated below with reference to some specific embodiments.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device of a cloud resource allocation method according to an embodiment of the present invention.
The electronic device includes: at least one processor 301, a memory 302, and an allocation program of cloud resources stored on the memory and executable on the processor, the allocation program of cloud resources being configured to implement the steps of the allocation method of cloud resources as in the method embodiments below.
The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 301 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. The processor 301 may further include an AI (Artificial Intelligence) processor for processing an allocation operation regarding cloud resources, so that an allocation model of cloud resources may be trained and learned autonomously, thereby improving efficiency and accuracy.
Memory 302 may include one or more computer-readable storage media, which may be non-transitory. Memory 302 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 302 is used to store at least one instruction for execution by processor 301 to implement the method of allocating cloud resources provided by the method embodiments herein.
The electronic equipment also comprises: a communication interface 303. The processor 301, the memory 302 and the communication interface 303 may be connected by a bus or signal lines. Various peripheral devices may be connected to communication interface 303 via a bus, signal line, or circuit board.
The communication interface 303 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 301 and the memory 302. In some embodiments, processor 301, memory 302, and communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302 and the communication interface 303 may be implemented on a single chip or circuit board, which is not limited in this embodiment.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Based on the above electronic device but not limited to the above electronic device, a first embodiment of a cloud resource allocation method according to the present invention is provided. Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a cloud resource allocation method according to a first embodiment of the present invention.
In this embodiment, the method for allocating cloud resources includes:
step S101, a resource expansion rule and service operation monitoring information of the cloud service platform are obtained, wherein the resource expansion rule is used for controlling resource expansion distribution or capacity reduction distribution of the cloud service platform.
The resource scaling rule comprises a scaling trigger group, a scaling instance group, a scaling rule group and the like. The flexible trigger group defines various monitoring indexes, monitoring and checking tasks, timing tasks and the like, and the rule defines factors such as conditions and opportunities for triggering resource allocation. The flexible instance group defines the resource type, granularity and the like of single allocation operation, and the instance is a general unit of resources in the cloud service platform; the flexible rule set defines the duration and the preset period duration after the trigger set condition is reached. And each resource scaling rule corresponds to a service of the cloud service platform, such as mail, instant messaging, shopping and the like. Each service may include multiple available zones in the cloud service platform. Physical isolation between the available zones. Each available region may include at least one resource.
The service operation monitoring information may select a CPU usage rate or a memory usage rate as a monitoring index according to the instance property, for example, the CPU intensive application may select the CPU usage rate as a service operation monitoring index, and the storage intensive application may select the memory and disk usage rates as a service operation monitoring index.
When the cloud service platform runs, the resource expansion rule of the cloud service platform can be read through cloud service platform components, such as hardware physical resources and platform management software. And the collection of the service operation monitoring data of the cloud service platform is realized through a monitoring index collection interface of the cloud service platform.
In a specific embodiment, since the running states of the same service of the cloud service platform in different periods and the resource scaling rule may be inconsistent, the resource scaling rule and the service running monitoring information of the cloud service platform in the current preset period may be obtained.
The preset period may be a parameter of configuration in a scaling rule group in the resource scaling rule.
Step S102, judging whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the service operation monitoring information.
The service operation monitoring information can reflect the operation result of the cloud service platform in the past period of time, so that whether the resource expansion rule is matched with the operation service can be judged.
And S103, if the information is not matched, inputting the service operation monitoring information into the rule prediction model to obtain a resource expansion rule prediction result output by the rule prediction model.
In this step, the rule prediction model is a gru (gate recovery unit) Recurrent neural network model, and the rule prediction model is obtained by training a training sample set, where the training sample set is obtained by training historical service operation monitoring information of each operation stage of the cloud service platform and a historical resource expansion rule manually configured by a user corresponding to each stage as a training set.
Therefore, in this embodiment, the service operation monitoring information is input to the rule prediction model, and the rule prediction model may generate a resource expansion rule prediction result matched with the service operation monitoring information. Compared with the existing resource scaling rule, the resource scaling rule prediction result is more matched with the service reflected by the service operation monitoring information.
The rule prediction model can be obtained by the following steps:
(1) historical service operation monitoring information and historical resource expansion rules of the cloud service platform are obtained.
(2) And determining a training sample set according to the historical service operation monitoring information and the historical resource expansion rule.
(3) And inputting the training data set in the training sample into a machine learning library function in the GRU neural network model to determine a training function.
(4) And inputting the verification data set in the training sample into a machine learning library function in the GRU neural network model to verify the training function, and outputting a rule prediction model according to a verification result.
Specifically, after the historical service operation monitoring information and the historical resource expansion rule are obtained, the obtained historical service operation monitoring information and the historical resource expansion rule are input into the GRU neural network model, so that the GUR neural network model determines a rule prediction model according to the historical service operation monitoring information and the historical resource expansion rule.
In the embodiment of the invention, at least one group of historical data is acquired from a cloud service platform: and determining corresponding training samples according to each group of historical data by using the historical service operation monitoring information and the historical resource expansion rule to obtain a plurality of groups of training samples. The obtained group of historical data is historical service operation monitoring information of a certain past preset period T0, and the specifically obtained historical data may be preset, for example, for CPU-intensive applications, the CPU utilization may be selected as a service operation monitoring index. The CPU utilization rates of certain 7 preset periods T0, T1, T2, T3, T4, T5 and T6 can be selected as service operation monitoring indexes. Meanwhile, in the 7 preset periods, if the preset resource scaling rules are difficult to match with the service requirements, and therefore allocation is insufficient, the user manually configures the resource scaling rules to match with the service requirements of the current preset periods T0, T1, T2, T3, T4, T5 and T6, and takes the 7 groups of resource scaling rules manually configured by the user as service operation monitoring indexes. And converting the historical service operation monitoring information and the historical resource expansion rule into a vector mode, and determining the vector mode as a training sample, namely generating 7 groups of training models. Inputting the 7 groups of training models into a GRU neural network model for training to obtain a prediction rule model. The more the acquired historical data is, the more training times are performed, and the more accurate the corresponding output rule prediction result is matched. Specifically, the training sample includes a training data set and a verification data set, and data in the training data set and data in the verification data set are pre-labeled by a user.
In the embodiment of the invention, the training data set is input into the GRU neural network model, and when the GRU neural network model is trained according to the input sample, the training data set is input into a machine learning library function in the GRU neural network model to determine a training function.
And then inputting the verification data set in the training sample into a machine learning library function in the GRU neural network model to verify the training function, repeatedly verifying and adjusting the weight demonstration in the obtained training function according to the verification data set, and finally outputting a rule prediction model through comparison.
And step S104, allocating resources according to the resource expansion rule prediction result.
And after a resource expansion rule prediction result output by the rule prediction model is obtained, the resource corresponding to the service in the cloud service platform can be distributed and scheduled. The allocation may be a capacity expansion allocation or a capacity reduction allocation. So that the resources after scheduling can be allocated to meet the needs of the service at this time.
And step S105, if the matching is performed, entering the next preset period, and returning to execute the step S101.
If the resource expansion rule is matched with the service operation monitoring information, the resource expansion rule does not need to be updated, and at the moment, the service can be normally operated. Until the next preset period is reached, the step S102 is triggered and executed.
In this embodiment, when the resource expansion rule of a certain service of the cloud service platform cannot match a service requirement, the resource expansion rule prediction result is obtained through the historical service operation monitoring information and the rule prediction model at this time, so that the resource scheduling is completed, and the resource scheduling can match the service requirement. Compared with the manual resource expansion rule configuration, the resource expansion rule can be dynamically and automatically adjusted in time according to the service operation requirement, so that the cloud resource is dynamically allocated along with the service change, the resource purchase cost and the monitoring operation and maintenance cost are reduced on the premise of ensuring the service availability, and the resource utilization rate is improved.
In an embodiment, a second embodiment of the cloud resource allocation method of the present invention is proposed as a basis of the first embodiment of the cloud resource allocation method of the present invention. Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a cloud resource allocation method according to a second embodiment of the present invention.
In this embodiment, step S104 includes:
a10, obtaining a rule arrangement instruction set according to the resource expansion rule prediction result;
wherein the rule orchestration instruction set comprises at least one of:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity reduction trigger threshold, capacity expansion trigger duration, capacity reduction trigger duration, resource capacity expansion granularity and resource capacity reduction granularity.
The rule orchestration instruction set is an instruction that can be recognized by the cloud service platform. The cloud service platform can be used for escaping the resource expansion rule prediction result into a rule arrangement instruction set through the semantic conversion module.
In one embodiment, the operation instruction set recognizable by the cloud service platform may be defined as an octave: less than or equal to MINtervali(t),CDPi(t),U-Thresholdi(t),L-Thresholdi(t),U-BDurai(t),L-BDurai(t), Δ IGr (n) and Δ DGr (n).
Wherein: less than or equal to MINtervali(t) is a monitoring interval which represents the interval time between the monitoring index i of a certain service and the monitoring information acquisition of each service operation;
CDPi(t) is the duration of a preset period, and represents that the previous trigger rule of the monitoring index i judges whether the next trigger requirement is matchedThe time of waiting;
U-Thresholdi(t) is a capacity expansion triggering threshold value which represents an upper limit value which needs to be reached when the monitoring index i triggers the operation of the expansion example, and timing monitoring is started after the upper limit value reaches the threshold value so as to judge whether the expansion example is expanded or not;
L-Thresholdi(t) is a shrinkage triggering threshold value which represents a lower limit value which needs to be reached when the monitoring index i triggers the shrinkage example operation, and timing monitoring is started after the threshold value is reached so as to judge whether the shrinkage example is performed or not;
U-BDurai(t) is the expansion triggering duration, which indicates that the monitoring index i can trigger the action of the expansion instance only when the monitoring index i reaches the threshold value and keeps being higher than the threshold value for more than the time;
L-BDurai(t) a duration of delivery, indicating that the monitoring indicator i can trigger a contraction instance action only if the monitoring indicator i reaches a threshold and remains below the threshold for more than that time;
Δ IGr (n) is the resource expansion granularity, indicating that the expansion trigger threshold is reached and keeping the state over U-BDurai(t), once expanding the granularity of r-type resources corresponding to the service;
Δ DGr (n) is the resource compaction granularity, indicating that the compaction trigger threshold is reached and the state is kept beyond L-BDuraiAnd (t) shrinking the granularity of the r-type resources corresponding to the service at one time.
And A20, updating the resource expansion rule according to the rule arrangement instruction set to obtain the updated resource expansion rule.
And A30, distributing the resources according to the updated resource scaling rule.
Specifically, the rule prediction model outputs the resource scaling rule prediction result in the form of a vector, so that the rule prediction model also needs to be converted into a rule arrangement instruction set. Therefore, the cloud service platform updates the resource expansion rule according to the rule arrangement instruction set to obtain the updated resource expansion rule. The cloud service platform can allocate resources according to the updated resource scaling rule.
In this embodiment, after obtaining the resource scaling prediction result output by the rule prediction model, the cloud service platform may update the existing resource scaling rule to obtain an updated resource scaling rule. The updated resource expansion rule improves the elastic expansion level in the aspects of monitoring multiple rule parameters such as threshold, triggering time, expansion granularity and the like. The goal of adapting to business requirements and reducing costs is achieved by reducing resource excess and resource deficiency conditions.
As an embodiment, a third embodiment of the cloud resource allocation method of the present invention is proposed on the basis of the above-described embodiments of the cloud resource allocation method of the present invention. Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a cloud resource allocation method according to a third embodiment of the present invention.
In this embodiment, step S102 includes:
and step B10, acquiring the average insufficient resource allocation rate and/or the excessive resource allocation rate of the cloud service platform in the current preset period according to the service operation monitoring information.
And step B20, judging whether the average resource allocation insufficient rate and/or the resource allocation excessive rate in the current preset period meet preset conditions.
And step B30, determining whether the resource expansion rule is matched with the operation service of the cloud service platform according to the judgment result.
Wherein the resource average under-allocation rate is Pu(T) represents, Pu(T) is represented by the formula
Figure BDA0003176165370000101
And (4) calculating.
Wherein P isu,x(ts,te) For the x-th time interval, i.e. tsTo teAnd summing the resource allocation shortages in all time periods in the current preset period and dividing the sum by the preset period duration T to obtain the average resource allocation shortages in the current preset period.
Resource allocation excess rate is represented by Po(T) is represented by the formula
Figure BDA0003176165370000102
Is calculated to obtain, wherein Po,x(ts,te) Is as followsx time intervals, i.e. tsTo teAnd summing the resource configuration residual amounts in all the time periods in the current preset period and dividing the sum by the preset period duration T to obtain the average resource configuration excess rate in the current preset period.
The user can configure a first preset threshold value for the average resource allocation shortage rate and configure a second preset threshold value for the resource allocation excess rate. At this time, the preset condition may be:
the average resource allocation insufficiency rate is greater than a first preset threshold;
the resource allocation excess rate is greater than a second preset threshold; or
The average under-allocation rate of the resources is greater than a first preset threshold and the over-allocation rate of the resources is greater than a second preset threshold.
And when the judgment result is that the preset condition is not met, determining that the resource expansion rule is matched with the operation service of the cloud service platform. And when the judgment result is that the preset condition is met, determining that the resource expansion rule is not matched with the operation service of the cloud service platform.
In the embodiment, whether the resources of the cloud service platform are matched with the service operation can be accurately judged through the average insufficient resource allocation rate and/or the excessive resource allocation rate.
As an embodiment, a fourth embodiment of the cloud resource allocation method of the present invention is proposed on the basis of the above-described embodiment of the cloud resource allocation method of the present invention.
In this embodiment, after step S104, the method further includes:
and S106, taking the service operation monitoring information as a training set training rule prediction model to obtain a new rule prediction model.
In this embodiment, after the monitoring information is input into the rule prediction model according to the service operation for a period of time, a resource expansion rule adapted to the service requirement is obtained through prediction. And the service operation monitoring information is input into the GRU recurrent neural network model again as a training set. Therefore, the rule prediction model can be continuously trained and learned, and the service operation requirements of the cloud service platform are met. The result obtained by the rule prediction model is more accurate, and the predicted resource expansion rule prediction result is more matched with the service operation.
In addition, referring to fig. 5, the present invention further provides an apparatus for allocating cloud resources, including:
the information acquisition module 10 is configured to acquire a resource expansion rule and service operation monitoring information of a cloud service platform;
the matching judgment module 20 is used for judging whether the resource expansion rule is matched with the operation service of the cloud service platform according to the service operation monitoring information;
the rule prediction module 30 is configured to, if the data is not matched with the resource expansion rule, input the service operation monitoring information into the rule prediction model to obtain a resource expansion rule prediction result output by the rule prediction model;
and the resource allocation module 40 allocates resources according to the resource expansion rule prediction result.
Other embodiments and specific implementations of the cloud resource allocation apparatus provided by the present invention may refer to the foregoing embodiments, and are not described herein again.
Furthermore, the present invention also provides a computer program product comprising executable program code which, when executed by a processor, implements the steps of the method of allocation of cloud resources as above. Therefore, a detailed description thereof will be omitted. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer program product referred to in the present application, reference is made to the description of the embodiments of the method of the present application. It is determined that, by way of example, the program instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where units illustrated as separate components may or may not be physically separate, and components illustrated as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by software plus necessary general hardware, and may also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components and the like. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions may be various, such as analog circuits, digital circuits, or dedicated circuits. However, the implementation of a software program is a more preferable embodiment for the present invention. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, where the computer software product is stored in a readable storage medium, such as a floppy disk, a usb disk, a removable hard disk, a Read-only memory (ROM), a random-access memory (RAM), a magnetic disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for allocating cloud resources is characterized by comprising the following steps:
acquiring a resource expansion rule and service operation monitoring information of a cloud service platform, wherein the resource expansion rule is used for controlling the allocation of resources of the cloud service platform;
judging whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the service operation monitoring information;
if not, inputting the service operation monitoring information into a rule prediction model to obtain a resource expansion rule prediction result output by the rule prediction model;
and allocating the resources according to the resource expansion rule prediction result.
2. The method according to claim 1, wherein the allocating the resources according to the resource scaling rule prediction result comprises:
obtaining a rule arrangement instruction set according to the resource expansion rule prediction result;
updating the resource expansion rule according to the rule arrangement instruction set to obtain an updated resource expansion rule;
allocating the resources according to the updated resource scaling rule;
wherein the rule orchestration instruction set comprises at least one of:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity reduction trigger threshold, capacity expansion trigger duration, capacity reduction trigger duration, resource capacity expansion granularity and resource capacity reduction granularity.
3. The method according to claim 2, wherein the obtaining of the resource scaling rule and the service operation monitoring information of the cloud service platform comprises:
and acquiring a resource expansion rule and the service operation monitoring information of the cloud service platform in a current preset period.
4. The method according to claim 3, wherein after determining whether the resource scaling rule matches the service operation monitoring information, the method further includes:
and if the resource expansion rule and the service operation monitoring information are matched, entering a next preset period, and returning to execute the resource expansion rule and the service operation monitoring information of the cloud service platform in the current preset period.
5. The method according to claim 2, wherein the determining whether the resource scaling rule is matched with the operation service of the cloud service platform according to the service operation monitoring information includes:
according to the service operation monitoring information, acquiring the average resource allocation insufficient rate and/or the resource allocation excessive rate of the cloud service platform in the current preset period;
judging whether the average under-allocation rate and/or the resource allocation excess rate of the resources in the current preset period meet preset conditions or not;
and determining whether the resource expansion rule is matched with the operation service of the cloud service platform or not according to the judgment result.
6. The method for allocating cloud resources of any one of claims 1 to 5, wherein before the obtaining the resource scaling rule and the service operation monitoring information of the cloud service platform, the method further comprises:
acquiring historical service operation monitoring information and historical resource expansion rules of the cloud service platform;
determining a training sample set according to historical service operation monitoring information and a historical resource expansion rule;
inputting the training data set in the training sample into a machine learning library function in a GRU neural network model to determine a training function;
and inputting the verification data set in the training sample into a machine learning library function in the GRU neural network model to verify the training function, and outputting a rule prediction model according to a verification result.
7. The method according to claim 6, wherein if the service operation monitoring information is not matched with the resource expansion rule prediction result, the method further comprises:
and training the rule prediction model by using the service operation monitoring information as a training set to obtain a new rule prediction model.
8. An apparatus for allocating cloud resources, comprising:
the information acquisition module is used for acquiring resource expansion rules and business operation monitoring information of the cloud service platform;
the matching judgment module is used for judging whether the resource expansion rule is matched with the operation service of the cloud service platform according to the service operation monitoring information;
the rule prediction module is used for inputting the service operation monitoring information into a rule prediction model if the service operation monitoring information is not matched with the rule prediction model, and obtaining a resource expansion rule prediction result output by the rule prediction model;
and the resource allocation module allocates the resources according to the resource expansion rule prediction result.
9. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, wherein the processor when executing the computer program implements the method according to any of claims 1 to 7.
10. A computer program product comprising program code which is executable by a processor to implement a method as claimed in any one of claims 1 to 7 when the program code is run.
CN202110834973.5A 2021-07-22 2021-07-22 Cloud resource allocation method and device, electronic equipment and storage medium Active CN113515382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110834973.5A CN113515382B (en) 2021-07-22 2021-07-22 Cloud resource allocation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110834973.5A CN113515382B (en) 2021-07-22 2021-07-22 Cloud resource allocation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113515382A true CN113515382A (en) 2021-10-19
CN113515382B CN113515382B (en) 2024-04-09

Family

ID=78067721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110834973.5A Active CN113515382B (en) 2021-07-22 2021-07-22 Cloud resource allocation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113515382B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919989A (en) * 2021-10-29 2022-01-11 国信蓝桥教育科技(杭州)股份有限公司 Cloud resource configuration detection method and system
CN114205246A (en) * 2021-12-14 2022-03-18 中国电信股份有限公司 Cloud resource planning method and device and storage medium
CN114745277A (en) * 2022-03-30 2022-07-12 杭州博盾习言科技有限公司 Elastic expansion method and device for public cloud cross-domain private line, electronic equipment and medium
CN114844791A (en) * 2022-07-06 2022-08-02 北京悦游信息技术有限公司 Cloud service automatic management and distribution method and system based on big data and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103984602A (en) * 2014-05-20 2014-08-13 华为技术有限公司 VM (virtual machine) resource scheduling method, device and system
CN104202388A (en) * 2014-08-27 2014-12-10 福建富士通信息软件有限公司 Automatic load balancing system based on cloud platform
CN105493066A (en) * 2013-08-30 2016-04-13 慧与发展有限责任合伙企业 Maintain a service on a cloud network based on a scale rule
CN107784440A (en) * 2017-10-23 2018-03-09 国网辽宁省电力有限公司 A kind of power information system resource allocation system and method
CN107911399A (en) * 2017-05-27 2018-04-13 广东网金控股股份有限公司 A kind of elastic telescopic method and system based on load estimation
CN110389820A (en) * 2019-06-28 2019-10-29 浙江大学 A kind of private clound method for scheduling task carrying out resources based on v-TGRU model
CN111523565A (en) * 2020-03-30 2020-08-11 中南大学 Streaming processing method, system and storage medium for big data
US10761893B1 (en) * 2018-11-23 2020-09-01 Amazon Technologies, Inc. Automatically scaling compute resources for heterogeneous workloads
CN111884826A (en) * 2020-06-13 2020-11-03 苏州浪潮智能科技有限公司 Elastic scaling processing method, system and device for strategy and execution of isomerization
CN112000459A (en) * 2020-03-31 2020-11-27 华为技术有限公司 Method for expanding and contracting service and related equipment
CN112948109A (en) * 2021-02-20 2021-06-11 山东英信计算机技术有限公司 Quota flexible scheduling method, device and medium for AI computing cluster
CN113076196A (en) * 2021-04-08 2021-07-06 上海电力大学 Cloud computing host load prediction method combining attention mechanism and gated cycle unit

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105493066A (en) * 2013-08-30 2016-04-13 慧与发展有限责任合伙企业 Maintain a service on a cloud network based on a scale rule
US20160191343A1 (en) * 2013-08-30 2016-06-30 Hewlett-Packard Development Company, L.P. Maintain a service on a cloud network based on a scale rule
CN103984602A (en) * 2014-05-20 2014-08-13 华为技术有限公司 VM (virtual machine) resource scheduling method, device and system
CN104202388A (en) * 2014-08-27 2014-12-10 福建富士通信息软件有限公司 Automatic load balancing system based on cloud platform
CN107911399A (en) * 2017-05-27 2018-04-13 广东网金控股股份有限公司 A kind of elastic telescopic method and system based on load estimation
CN107784440A (en) * 2017-10-23 2018-03-09 国网辽宁省电力有限公司 A kind of power information system resource allocation system and method
US10761893B1 (en) * 2018-11-23 2020-09-01 Amazon Technologies, Inc. Automatically scaling compute resources for heterogeneous workloads
CN110389820A (en) * 2019-06-28 2019-10-29 浙江大学 A kind of private clound method for scheduling task carrying out resources based on v-TGRU model
CN111523565A (en) * 2020-03-30 2020-08-11 中南大学 Streaming processing method, system and storage medium for big data
CN112000459A (en) * 2020-03-31 2020-11-27 华为技术有限公司 Method for expanding and contracting service and related equipment
CN111884826A (en) * 2020-06-13 2020-11-03 苏州浪潮智能科技有限公司 Elastic scaling processing method, system and device for strategy and execution of isomerization
CN112948109A (en) * 2021-02-20 2021-06-11 山东英信计算机技术有限公司 Quota flexible scheduling method, device and medium for AI computing cluster
CN113076196A (en) * 2021-04-08 2021-07-06 上海电力大学 Cloud computing host load prediction method combining attention mechanism and gated cycle unit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113919989A (en) * 2021-10-29 2022-01-11 国信蓝桥教育科技(杭州)股份有限公司 Cloud resource configuration detection method and system
CN114205246A (en) * 2021-12-14 2022-03-18 中国电信股份有限公司 Cloud resource planning method and device and storage medium
CN114745277A (en) * 2022-03-30 2022-07-12 杭州博盾习言科技有限公司 Elastic expansion method and device for public cloud cross-domain private line, electronic equipment and medium
CN114844791A (en) * 2022-07-06 2022-08-02 北京悦游信息技术有限公司 Cloud service automatic management and distribution method and system based on big data and storage medium

Also Published As

Publication number Publication date
CN113515382B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
CN113515382A (en) Cloud resource allocation method and device, electronic equipment and program product
CN113377540A (en) Cluster resource scheduling method and device, electronic equipment and storage medium
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
CN110795238B (en) Load calculation method and device, storage medium and electronic equipment
CN104035747B (en) Method and apparatus for parallel computation
CN103473115A (en) Virtual machine placing method and device
CN113157379A (en) Cluster node resource scheduling method and device
CN107624181B (en) Virtual machine management method and apparatus including idling and scheduling of virtual processors
CN115586961A (en) AI platform computing resource task scheduling method, device and medium
CN116185588A (en) Task scheduling method and device, electronic equipment and readable storage medium
CN109634714B (en) Intelligent scheduling method and device
Panneerselvam et al. An approach to optimise resource provision with energy-awareness in datacentres by combating task heterogeneity
CN111598768B (en) Image optimization processing method and device, computer equipment and storage medium
EP4258096A1 (en) Predictive block storage size provisioning for cloud storage volumes
WO2023216500A1 (en) Computing power resource deployment method and apparatus for intelligent computing center, and device and storage medium
CN110806918A (en) Virtual machine operation method and device based on deep learning neural network
CN111400035A (en) Video memory allocation method and device, electronic equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN115934349A (en) Resource scheduling method, device, equipment and computer readable storage medium
CN114880079A (en) Kubernetes cluster scale adjustment method, system and equipment based on reinforcement learning
CN105279008A (en) Virtual machine migration method for energy saving of virtual machine cluster and virtual machine migration device for energy saving of virtual machine cluster
CN114153592A (en) Physical host load scheduling method and device of cloud platform, electronic equipment and medium
CN114138453A (en) Resource optimization allocation method and system suitable for edge computing environment
CN110955644A (en) IO control method, device, equipment and storage medium of storage system
CN112148469B (en) Method and device for managing resources and computer storage medium

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