CN113515382B - Cloud resource allocation method and device, electronic equipment and storage medium - Google Patents

Cloud resource allocation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113515382B
CN113515382B CN202110834973.5A CN202110834973A CN113515382B CN 113515382 B CN113515382 B CN 113515382B CN 202110834973 A CN202110834973 A CN 202110834973A CN 113515382 B CN113515382 B CN 113515382B
Authority
CN
China
Prior art keywords
resource
rule
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.)
Active
Application number
CN202110834973.5A
Other languages
Chinese (zh)
Other versions
CN113515382A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a cloud resource allocation method, a cloud resource allocation device, electronic equipment and a storage medium, 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 allocation of resources of the cloud service platform; judging whether the resource expansion rule is matched with the operation business of the cloud service platform or not according to the business operation monitoring information; if the service operation monitoring information is not matched, 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 distributing the resources according to the predicted result of the resource expansion rule. The method and the system can ensure that the service operation requirements are met in the operation process of the cloud service platform.

Description

Cloud resource allocation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a cloud resource allocation method, a cloud resource allocation device, an electronic device, and a storage medium.
Background
The cloud service platform realizes unified management and dynamic allocation of heterogeneous resources through technologies such as distributed and virtualized technologies, so that infrastructure resources such as calculation and storage can be purchased and centralized operation and maintenance as required.
However, in the related technology, 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 requirement is 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 storage medium, and aims to solve the technical problem of insufficient cloud resource allocation in the related technology.
In order to achieve the above object, the present invention provides a method for distributing cloud resources, including:
acquiring a resource extension rule and service operation monitoring information of a cloud service platform, wherein the resource extension 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 business of the cloud service platform according to the business operation monitoring information;
if the rule prediction model is not matched with the resource expansion rule prediction result, the service operation monitoring information is input into the rule prediction model, and the resource expansion rule prediction result output by the rule prediction model is obtained;
and allocating resources according to the predicted result of the resource expansion rule.
In one embodiment, allocating resources according to a resource scaling rule prediction result includes:
obtaining a rule arrangement instruction set according to the resource extension rule prediction result;
updating the resource expansion rule according to the rule arrangement instruction set to obtain an updated resource expansion rule;
distributing resources according to the updated resource expansion rule;
wherein the rule orchestration instruction set comprises at least one of the following instructions:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity shrinkage trigger threshold, capacity expansion trigger duration, capacity shrinkage trigger duration, resource capacity expansion granularity and resource capacity shrinkage granularity.
In an embodiment, obtaining a resource extension rule and service operation monitoring information of a cloud service platform includes:
and acquiring a resource expansion rule and service operation monitoring information of the cloud service platform in a current preset period.
In an embodiment, after determining whether the resource extension rule and the service operation monitoring information are matched, the method further includes:
if the cloud service platform is matched with the cloud service platform, a next preset period is entered, and execution is returned to acquire the resource expansion rule and the service operation monitoring information of the cloud service platform in the current preset period.
In an embodiment, according to the service operation monitoring information, determining whether the resource extension rule is matched with the operation service of the cloud service platform includes:
acquiring the average resource allocation shortage rate and/or the resource allocation excess rate of the cloud service platform in the current preset period according to the service operation monitoring information;
judging whether the average resource allocation shortage rate and/or the resource allocation excess rate in the current preset period meet preset conditions or not;
and determining whether the resource expansion rule is matched with the operation business of the cloud service platform according to the judging result.
In an embodiment, before acquiring the resource extension 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 the historical service operation monitoring information and the historical resource expansion rule;
inputting a training data set in a training sample into a machine learning library function in the 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 the verification result.
In an embodiment, if the rule prediction model is not matched, the service operation monitoring information is input into the rule prediction model, and after the 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 set training rule prediction model to obtain a new rule prediction model.
In a second aspect, the present invention further provides a cloud resource allocation apparatus, including:
the information acquisition module is used for acquiring resource expansion rules and service operation monitoring information of the cloud service platform;
the matching judging module is used for judging whether the resource expansion rule is matched with the operation business of the cloud service platform according to the business 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 predicted result of the resource expansion rule.
In a third aspect, the present invention also provides an electronic device, including: a memory, a processor and a 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 present invention also provides a computer storage medium comprising executable program code, the processor implementing a method as described above when executing the program code.
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 or not 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, so that a 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 resources according to 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 the cloud resource allocation method of the present invention;
FIG. 2 is a flowchart of a first embodiment of a cloud resource allocation method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a cloud resource allocation method according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of a cloud resource allocation method according to the present invention;
fig. 5 is a schematic diagram of functional modules of the cloud resource allocation apparatus according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of 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 virtualized technologies. The method can realize purchase and centralized operation and maintenance on demand of infrastructure resources such as calculation and storage, has the advantages of saving cost, improving availability and fault tolerance, and is widely applied to the fields of medical treatment, education, government, business and the like. The common cloud resource allocation method comprises three modes of fixed configuration, timing allocation and elastic Scaling (Auto Scaling).
Wherein, the fixed configuration is to purchase fixed quantity of resources at one time, and later manual configuration is needed if expansion. This approach ensures adequate resources during business operation, but the cloud resources are wasted largely during off-peak periods. And once the peak value is suddenly increased, the service influence is still caused by untimely resource expansion.
Timing scheduling increases timing resource scheduling on a fixed configuration basis, and the number of allocated instances is also preset and fixed. However, the method is only suitable for the situation that part of service fluctuation is more regular or the peak value is predictable, but when the service peak value is earlier than the timing task suddenly rises, a certain service influence is caused by untimely resource timing allocation, namely the dynamic adaptation capability is not provided.
The flexible mode can automatically adjust the number of resources after defining the rule set. Specifically, the elastic expansion mode is changed according to the monitoring index, and the service of the business resource is automatically adjusted through the expansion strategy. The expansion strategy can be defined according to the service requirement, so that the workload of manually and repeatedly adjusting resources to cope with service change and load peaks is reduced, and the resources and the labor operation and maintenance cost are saved. The expansion strategy, namely the resource expansion rule, comprises an expansion trigger group, an expansion instance group, an expansion rule group and the like. The telescopic trigger group defines various monitoring indexes, monitoring inspection tasks, timing tasks and the like, and the rule defines factors such as conditions, time and the like for triggering resource allocation; the telescopic example group defines the resource type, granularity and the like of single allocation operation, and examples are the general meaning units of resources in a cloud service platform; the set of telescoping rules defines the duration after reaching the trigger set condition, and the cooling time. However, the flexible expansion mode depends on the configuration of the resource expansion rule, and when the pre-configured resource expansion rule cannot adapt to the service feature, the resource allocation is insufficient and the corresponding service feature is difficult to adapt.
The invention provides a cloud resource allocation method, which is characterized in that business operation monitoring information of a cloud service platform is monitored, so that when a resource expansion rule is not matched with the business operation monitoring information, the business operation monitoring information is input into a rule prediction model, and a resource expansion rule prediction result output by the rule prediction model is obtained, so that the allocation of resources of the cloud service platform is adjusted.
The inventive concepts of the present application are further described below in conjunction with some specific embodiments.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device according to 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 a cloud resource allocation program stored on the memory and executable on the processor, the cloud resource allocation program being configured to implement the steps of the cloud resource allocation method as described in the method embodiments below.
Processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 301 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central ProcessingUnit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 301 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. The processor 301 may also include an AI (Artificial Intelligence ) processor for processing allocation operations with respect to cloud resources so that an allocation model of cloud resources may be self-trained for learning, 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 cloud resource allocation method 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. The respective peripheral devices may be connected to the communication interface 303 through a bus, signal line, or circuit board.
The communication interface 303 may be used to connect at least one peripheral device associated with an 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, either or both of the processor 301, the memory 302, and the communication interface 303 may be implemented on separate chips or circuit boards, which is not limited in this embodiment.
Those skilled in the art will appreciate that the structure shown in fig. 1 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or may be arranged in different components.
Based on the electronic device but not limited to the electronic device, a first embodiment of a cloud resource allocation method is provided. Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of a cloud resource allocation method according to the present invention.
In this embodiment, the cloud resource allocation method includes:
step S101, 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 resource expansion allocation or the capacity reduction allocation of the cloud service platform.
The resource expansion rule comprises an expansion trigger group, an expansion instance group, an expansion rule group and the like. The telescopic trigger group defines various monitoring indexes, monitoring checking tasks, timing tasks and the like, and the rule defines factors such as conditions, time and the like for triggering resource allocation. The telescopic example group defines the resource type, granularity and the like of single allocation operation, and examples are the general meaning units of resources in a cloud service platform; the telescopic rule group defines rules such as duration time after reaching the condition of the trigger group and preset period duration time. And each resource extension rule corresponds to a service of the cloud service platform, such as mail, instant messaging, shopping, and the like. Each business may include multiple availability zones in the cloud service platform. The available zones are physically isolated from each other. Each availability zone may include at least one resource.
The service operation monitoring information may select a CPU utilization rate or a memory utilization rate as a monitoring index according to an example property, for example, a CPU-intensive application may select a CPU utilization rate as a service operation monitoring index, and a storage-intensive application may select a memory and a disk utilization rate as a service operation monitoring index.
When the cloud service platform operates, the resource expansion rule of the cloud service platform can be obtained through reading of the cloud service platform components such as the included hardware physical resources, platform management software and the like. And the collection of the business 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 expansion rule may be inconsistent, the resource expansion 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 a configuration in a set of expansion rules in the resource expansion rules.
And step S102, judging whether the resource expansion rule is matched with the operation business of the cloud service platform according to the business operation monitoring information.
The service operation monitoring information can reflect the operation result of the cloud service platform in a period of time, so that whether the resource expansion rule is matched with the operation service or not can be judged.
And step S103, if the two types of the resource expansion rule prediction results are not matched, inputting the service operation monitoring information into the rule prediction model, and obtaining the resource expansion rule prediction results output by the rule prediction model.
In the step, the rule prediction model is obtained by training a GRU (Gate Recurrent Unit) cyclic neural network model through a training sample set, wherein 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 into the rule prediction model, and the rule prediction model may generate a resource extension rule prediction result that matches the service operation monitoring information. Compared with the existing resource extension rule, the resource extension rule prediction result is more matched with the service reflected by the service operation monitoring information.
The rule prediction model may be obtained by:
(1) And acquiring historical service operation monitoring information and historical resource expansion rules of the cloud service platform.
(2) And determining a training sample set according to the historical service operation monitoring information and the historical resource expansion rule.
(3) The training data set in the training sample is input 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 the 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 set of historical data is acquired from a cloud service platform: and the historical service operates the monitoring information and the historical resource expansion rules, and corresponding training samples are determined according to each set of historical data to obtain a plurality of groups of training samples. The obtained set of historical data is historical service operation monitoring information of a certain preset period T0 in the past, and the specifically obtained historical data can be preset, for example, for CPU intensive applications, the CPU utilization rate can be selected as a service operation monitoring index. The CPU utilization rate of 7 preset periods T0, T1, T2, T3, T4, T5 and T6 can be selected as the service operation monitoring index. Meanwhile, in the 7 preset periods, if the preset resource expansion rules are difficult to match with service requirements, and when the allocation is insufficient, the user manually configures the resource expansion 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 expansion 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. And inputting the 7 groups of training models into a GRU neural network model for training to obtain a prediction rule model. The more the historical data is obtained, the more training times are carried out, and the corresponding output rule prediction result is more accurate in matching. Specifically, the training sample comprises a training data set and a verification data set, and the data in the training data set and the data in the verification data set are marked in advance by a user.
In the embodiment of the invention, a training data set is input into a GRU neural network model, and when the GRU neural network model is trained according to an 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 verification in the obtained training function according to the verification data set, and finally outputting a rule prediction model through comparison.
And step S104, distributing resources according to the predicted result of the resource expansion rule.
After the resource expansion rule prediction result output by the rule prediction model is obtained, the resources corresponding to the service in the cloud service platform can be allocated and scheduled. The allocation may be a capacity expansion allocation or a capacity contraction allocation. So that the allocated and scheduled resources can meet the service requirement at this time.
Step 105, if yes, enter the next preset period, and return to execute step 101.
If the resource expansion rule is matched with the service operation monitoring information, the resource expansion rule is not required to be updated, and at the moment, the service can be normally operated. Until the next preset period is reached, the execution of step S102 is triggered.
In this embodiment, when a resource expansion rule of a service of the cloud service platform cannot match a service requirement, a resource expansion rule prediction result is obtained through historical service operation monitoring information and a rule prediction model at the moment, so that scheduling of resources is completed, and scheduling of the resources can be matched with the service requirement. Compared with manually configuring the resource expansion rule, the embodiment can dynamically and automatically adjust the resource expansion rule in time according to the service operation requirement, thereby realizing the dynamic allocation of cloud resources along with the service change, reducing the resource purchase cost and the monitoring operation and maintenance cost on the premise of ensuring the service availability, and improving the resource utilization rate.
In an embodiment, a second embodiment of the cloud resource allocation method of the present invention is provided on the basis of the first embodiment of the cloud resource allocation method of the present invention. Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of the cloud resource allocation method according to the present invention.
In this embodiment, step S104 includes:
a10, obtaining a rule arranging instruction set according to a resource expansion rule prediction result;
wherein the rule orchestration instruction set comprises at least one of the following instructions:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity shrinkage trigger threshold, capacity expansion trigger duration, capacity shrinkage trigger duration, resource capacity expansion granularity and resource capacity shrinkage granularity.
The rule programming instruction set is an instruction that can be identified by the cloud service platform. The cloud service platform can convert the resource extension rule prediction result into a rule arrangement instruction set through the semantic conversion module.
In one embodiment, the set of operation instructions identifiable by the cloud service platform may be defined as an octave: MInterval not more than i (t),CDP i (t),U-Threshold i (t),L-Threshold i (t),U-BDura i (t),L-BDura i (t), Δigr (n) and Δdgr (n).
Wherein: MInterval not more than i (t) is a monitoring interval, which represents the interval time between every two service operation monitoring information acquisitions of a monitoring index i of a certain service;
CDP i (t) is a preset period duration, and represents the time for waiting for the next trigger, which is judged by the previous trigger rule of the monitoring index i;
U-Threshold i (t) is a capacity expansion triggering threshold, and represents an upper limit value which is required to be reached by the operation of triggering the expansion instance by the monitoring index i, and starting timing monitoring after reaching the upper threshold value so as to judge whether the instance is expanded;
L-Threshold i (t) is a shrinkage triggering threshold, which represents a lower limit value which is required to be reached by the operation of triggering the shrinkage example by the monitoring index i, and starts timing monitoring after reaching the lower threshold to judge whether the shrinkage example is shrunk or not;
U-BDura i (t) is the expansion trigger time length, which indicates that the monitoring index i only reaches the threshold value and remains highTriggering the action of the expansion instance when the threshold state exceeds the time;
L-BDura i (t) for a duration of time, indicating that the monitor indicator i can trigger a shrink instance action only if the threshold is reached and remains below the threshold state for more than that time;
ΔIGr (n) is the granularity of the expansion of the resource, which means that the expansion trigger threshold is reached and the state is kept exceeding U-BDura i (t) one-time expanding the granularity of r-class resources corresponding to the service;
ΔDGr (n) is the resource capacity reduction granularity, which means that the capacity reduction triggering threshold is reached and the state is kept to exceed L-BDura i (t) contracting the granularity of r-class resources corresponding to the service at one time.
And step A20, updating the resource expansion rule according to the rule arrangement instruction set to obtain the updated resource expansion rule.
And step A30, distributing the resources according to the updated resource expansion rule.
Specifically, the rule prediction model outputs a resource-scalable rule prediction result in the form of a vector, and thus it is also required to convert it into a rule orchestration instruction set. Therefore, the cloud service platform updates the resource expansion rule according to the rule arrangement instruction set, and the updated resource expansion rule is obtained. The cloud service platform can allocate resources according to the updated resource expansion rule.
In this embodiment, after obtaining the resource expansion prediction result output by the rule prediction model, the cloud service platform may update the existing resource expansion rule to obtain the updated resource expansion rule. The updated resource expansion rule improves the elastic expansion level in terms of a plurality of rule parameters such as a monitoring threshold, trigger time, expansion granularity and the like. The goals of adapting to business requirements and reducing cost are achieved by reducing the conditions of excessive resources and insufficient resources.
As an embodiment, a third embodiment of the cloud resource allocation method of the present invention is presented on the basis of the above-described embodiment of the cloud resource allocation method of the present invention. Referring to fig. 4, fig. 4 is a flow chart of a third embodiment of the cloud resource allocation method according to the present invention.
In this embodiment, step S102 includes:
and step B10, obtaining the average resource allocation shortage rate and/or the resource allocation excess rate of the cloud service platform in the current preset period according to the service operation monitoring information.
And B20, judging whether the average resource allocation shortage rate and/or the resource allocation excess rate in the current preset period meet preset conditions.
And step B30, determining whether the resource expansion rule is matched with the operation business of the cloud service platform according to the judging result.
Wherein the average resource allocation shortage rate is defined by P u (T) represents, P u (T) is represented by the formulaAnd (5) calculating to obtain the product.
Wherein P is u,x (t s ,t e ) For the x-th time interval, i.e. t s To t e The resource allocation shortages of the time periods are summed up and divided by the preset period duration T to obtain the average resource allocation shortages of the current preset period.
Resource allocation overrate is defined by P o (T) is represented by the formulaCalculated, where P o,x (t s ,t e ) For the x-th time interval, i.e. t s To t e And summing the resource allocation residual amounts 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 excess rate in the current preset period.
The user may configure a first preset threshold for the average resource allocation deficiency rate and a second preset threshold for the resource allocation excess rate. At this time, the preset conditions may be:
the average resource allocation shortage rate is larger than a first preset threshold value;
the resource allocation overrate is larger than a second preset threshold value; or alternatively
The average resource allocation shortage rate is greater than a first preset threshold and the resource allocation excess rate 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 business of the cloud service platform. And when the judging result is that the preset condition is met, determining that the resource expansion rule is not matched with the operation business of the cloud service platform.
In this embodiment, whether the resources of the cloud service platform are matched with the service operation can be accurately determined through the average resource allocation shortage rate and/or the resource allocation excess rate.
As an embodiment, a fourth embodiment of the cloud resource allocation method of the present invention is presented 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 a rule prediction model is input according to service operation monitoring information for a period of time, prediction is performed to obtain a resource expansion rule adapted to service requirements. And the service operation monitoring information is input into the GRU cyclic neural network model again as a training set. Therefore, the rule prediction model can be continuously trained and learned, and is suitable for the business operation requirements of the cloud service platform. 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 a cloud resource allocation apparatus, including:
the information acquisition module 10 is used for acquiring the resource expansion rule and the service operation monitoring information of the cloud service platform;
the matching judging module 20 is configured to judge 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 input the service operation monitoring information into a rule prediction model if the service operation monitoring information is not matched, and obtain a resource expansion rule prediction result output by the rule prediction model;
the resource allocation module 40 allocates resources according to the predicted result of the resource expansion rule.
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 repeated herein.
The invention further provides a computer program product comprising executable program code which, when executed by a processor, implements the steps of the cloud resource allocation method as described above. Therefore, a detailed description will not be given here. In addition, the description of the beneficial effects of the same method is omitted. For technical details not disclosed in the embodiments of the computer program product according to the present application, reference is made to the description of the embodiments of the method according to the present application. As an 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.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of computer programs, which may be stored on a computer-readable storage medium, and which, when executed, may comprise the steps 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 (Random AccessMemory, RAM), or the like.
It should be further noted that the above-described apparatus embodiments are merely illustrative, where elements described as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the present invention may be implemented by means of software plus necessary general purpose hardware, or of course by means of special purpose hardware including application specific integrated circuits, special purpose CPUs, special purpose memories, special purpose components, etc. Generally, functions performed by computer programs can be easily implemented by corresponding hardware, and specific hardware structures for implementing the same functions can be varied, such as analog circuits, digital circuits, or dedicated circuits. However, a software program implementation is a preferred embodiment for many more of the cases of the present invention. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product 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, randomAccessMemory), a magnetic disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method of the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (9)

1. The cloud resource allocation method is characterized by comprising the following steps of:
acquiring a resource expansion rule and service operation monitoring information of a cloud service platform, wherein the resource expansion rule is used for controlling allocation of resources of the cloud service platform;
judging whether the resource expansion rule is matched with the operation business of the cloud service platform or not according to the business operation monitoring information;
if the service operation monitoring information is not matched, 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;
distributing the resources according to the resource expansion rule prediction result;
judging whether the resource expansion rule is matched with the operation business of the cloud service platform according to the business operation monitoring information comprises the following steps:
acquiring the average resource allocation shortage rate and/or the resource allocation excess rate of the cloud service platform in the current preset period according to the service operation monitoring information;
judging whether the average resource allocation shortage rate and/or the resource allocation excess rate in the current preset period meet preset conditions or not;
determining whether the resource expansion rule is matched with the operation business of the cloud service platform according to the judging result;
wherein, the preset conditions include:
the average resource allocation shortage rate is larger than a first preset threshold value;
the resource allocation overrate is larger than a second preset threshold value; or alternatively
The average resource allocation shortage rate is larger than a first preset threshold value, and the resource allocation excess rate is larger than a second preset threshold value;
and determining whether the resource expansion rule is matched with the operation business of the cloud service platform according to the judging result, wherein the method comprises the following steps:
and when the judgment result is that the preset condition is not met, determining that the resource expansion rule is matched with the operation business of the cloud service platform.
2. The method for allocating cloud resources according to claim 1, wherein allocating the resources according to the predicted result of the resource scaling rule comprises:
obtaining a rule arrangement instruction set according to the resource extension rule prediction result;
updating the resource expansion rule according to the rule arrangement instruction set to obtain an updated resource expansion rule;
distributing the resources according to the updated resource expansion rule;
wherein the rule orchestration instruction set comprises at least one of the following instructions:
monitoring interval, preset period duration, capacity expansion trigger threshold, capacity shrinkage trigger threshold, capacity expansion trigger duration, capacity shrinkage trigger duration, resource capacity expansion granularity and resource capacity shrinkage granularity.
3. The method for distributing cloud resources according to claim 2, wherein the obtaining the resource scaling rule and the service operation monitoring information of the cloud service platform includes:
and acquiring a resource expansion rule of the cloud service platform in a current preset period and the service operation monitoring information.
4. The method for allocating cloud resources according to claim 3, wherein after said determining whether the resource scaling rule matches the service operation monitoring information, the method further comprises:
if the cloud service platform is matched with the service operation monitoring information, a next preset period is entered, and execution is returned to acquire the resource expansion rule of the cloud service platform in the current preset period and the service operation monitoring information.
5. The method for allocating cloud resources according to any one of claims 1 to 4, 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 the historical service operation monitoring information and the historical resource expansion rule;
inputting a 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.
6. The cloud resource allocation method according to claim 5, wherein if the service operation monitoring information is not matched, the service operation monitoring information is input into a rule prediction model, and after a resource expansion rule prediction result output by the rule prediction model is obtained, the method further comprises:
and training the rule prediction model by taking the service operation monitoring information as a training set to obtain a new rule prediction model.
7. A cloud resource allocation apparatus, comprising:
the information acquisition module is used for acquiring resource expansion rules and service operation monitoring information of the cloud service platform;
the matching judging module is used for judging whether the resource expansion rule is matched with the operation business of the cloud service platform according to the business 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;
the resource allocation module allocates the resources according to the resource expansion rule prediction result;
the matching judging module is specifically configured to obtain, according to the service operation monitoring information, a resource average configuration shortage rate and/or a resource configuration excess rate of the cloud service platform in a current preset period; judging whether the average resource allocation shortage rate and/or the resource allocation excess rate in the current preset period meet preset conditions or not; determining whether the resource expansion rule is matched with the operation business of the cloud service platform according to the judging result; wherein, the preset conditions include: the average resource allocation shortage rate is larger than a first preset threshold value; the resource allocation overrate is larger than a second preset threshold value; or the average resource allocation shortage rate is larger than a first preset threshold value and the resource allocation excess rate is larger than a second preset threshold value;
and the matching judgment module is specifically used for determining that the resource expansion rule is matched with the operation business of the cloud service platform when the judgment result does not meet the preset condition.
8. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any of claims 1-6 when executing the computer program.
9. A computer readable storage medium comprising executable program code, which when executed by a processor implements the method of any of claims 1 to 6.
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 CN113515382A (en) 2021-10-19
CN113515382B true 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)

Families Citing this family (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
CN114745277B (en) * 2022-03-30 2024-05-28 杭州博盾习言科技有限公司 Elastic expansion method and device for public cloud cross-domain private line, electronic equipment and medium
CN114844791B (en) * 2022-07-06 2022-09-23 北京悦游信息技术有限公司 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 (12)

* 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
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

Also Published As

Publication number Publication date
CN113515382A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN113515382B (en) Cloud resource allocation method and device, electronic equipment and storage medium
CN111176852A (en) Resource allocation method, device, chip and computer readable storage medium
CN111861412B (en) Completion time optimization-oriented scientific workflow scheduling method and system
JP2021521518A (en) Virtual machine scheduling method and equipment
CN109710376A (en) The dynamic dispatching method and device of container cluster management system
CN110300959B (en) Method, system, device, apparatus and medium for dynamic runtime task management
CN110058882B (en) OPU instruction set definition method for CNN acceleration
CN112685153A (en) Micro-service scheduling method and device and electronic equipment
CN113157379A (en) Cluster node resource scheduling method and device
CN109739627B (en) Task scheduling method, electronic device and medium
CN113886080A (en) High-performance cluster task scheduling method and device, electronic equipment and storage medium
CN109634714B (en) Intelligent scheduling method and device
CN113378498B (en) Task allocation method and device
CN112463334B (en) Training task queuing reason analysis method, system, equipment and medium
CN111598768B (en) Image optimization processing method and device, computer equipment and storage medium
CN117130888A (en) Automatic server tuning method and system based on historical data and machine learning
WO2023216500A1 (en) Computing power resource deployment method and apparatus for intelligent computing center, and device and storage medium
CN115185685B (en) Task scheduling method, device, computer equipment and storage medium
CN116360990A (en) Distributed computing task rationality pre-judging method, system, equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN115827179A (en) Computing power scheduling method, device, equipment and storage medium for physical machine equipment
CN113283879A (en) Method and device for determining construction amount, electronic equipment and readable storage medium
CN114153592A (en) Physical host load scheduling method and device of cloud platform, electronic equipment and medium
CN108471362B (en) Resource allocation prediction technique and device
CN110955644A (en) IO control method, device, equipment and storage medium of storage system

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