CN117667618A - Cloud resource combination optimal allocation method and terminal - Google Patents

Cloud resource combination optimal allocation method and terminal Download PDF

Info

Publication number
CN117667618A
CN117667618A CN202311281892.2A CN202311281892A CN117667618A CN 117667618 A CN117667618 A CN 117667618A CN 202311281892 A CN202311281892 A CN 202311281892A CN 117667618 A CN117667618 A CN 117667618A
Authority
CN
China
Prior art keywords
service
load
mode
cloud resource
virtual
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
CN202311281892.2A
Other languages
Chinese (zh)
Other versions
CN117667618B (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.)
Harbin Institute of Technology Weihai
Original Assignee
Harbin Institute of Technology Weihai
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 Harbin Institute of Technology Weihai filed Critical Harbin Institute of Technology Weihai
Priority to CN202311281892.2A priority Critical patent/CN117667618B/en
Priority claimed from CN202311281892.2A external-priority patent/CN117667618B/en
Publication of CN117667618A publication Critical patent/CN117667618A/en
Application granted granted Critical
Publication of CN117667618B publication Critical patent/CN117667618B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a cloud resource combination optimal allocation method and a terminal, which belong to the field of cloud computing, classify service division types according to service characteristics in a cloud environment, and establish a cloud resource combination optimal allocation mode; configuring a service component partitioning strategy based on different types of service partitioning modes; configuring a hybrid genetic annealing algorithm based on load decomposition to determine a cloud resource supply scheme meeting preset conditions; and constructing a virtual data center according to the cloud resource supply scheme. According to the method, accurate and effective modeling can be conducted on large-scale service deployment in public cloud environments according to three different deployment modes of online application, an efficient heuristic algorithm solution cloud resource supply scheme is built, and combination optimization distribution of cloud resources is achieved.

Description

Cloud resource combination optimal allocation method and terminal
Technical Field
The invention belongs to the field of cloud computing, and particularly relates to a cloud resource combination optimal allocation method and a terminal.
Background
With the rapid development of the internet and modern service industry, the scale of internet users is continuously expanding, and various online applications for providing services for these users are also growing. In this case, the conventional manner of building a private cloud by a service provider itself to provide an application service gradually fails to meet the needs of large-scale users and the service provider cannot bear the cost of the continuous expansion of the private cloud. Thus, service providers often purchase large-scale public cloud services to deploy their own applications, with the cloud providers providing corresponding computing resources according to the different quality of service requirements of the various services.
However, in public cloud environment, online application can be deployed by taking an application instance as a basic unit, and can be deployed by dividing the application into one application instance and a plurality of service instances. The service division mode of the large-scale online application can be any one of the two modes, or can be a mixture of the two modes, so that the cloud resource allocation is more flexible, and the maximization of the cloud resource utilization rate can be realized.
However, the number of application instances, service instances and virtual units are uncertain, and a complex association relationship exists between the service quality and the cloud resource consumption, which is a strong NP-hard problem. This also results in a very complex modeling environment for the problem and when the problem is large in size, the cost of accurate solution algorithms is very high. Therefore, how to perform modeling of large-scale service deployment in an accurate and effective public cloud environment and design an efficient heuristic algorithm to solve a cloud resource supply scheme is a problem to be solved by cloud resource combination optimization allocation.
Disclosure of Invention
The invention provides a cloud resource combination optimization distribution method, which can accurately and effectively model large-scale service deployment in public cloud environment aiming at three different deployment modes of online application, and construct an efficient heuristic algorithm to solve a cloud resource supply scheme so as to realize combination optimization distribution of cloud resources.
The method comprises the following steps:
s1: classifying service division types according to service characteristics in a cloud environment, and establishing a cloud resource combination optimization allocation mode;
s2: configuring a service component partitioning strategy based on different types of service partitioning modes;
s3: configuring a hybrid genetic annealing algorithm based on load decomposition to determine a cloud resource supply scheme meeting preset conditions;
s4: and constructing a virtual data center according to the cloud resource supply scheme.
In the step S1, all services in the online application are configured as service components, and the service components are deployed on the virtual unit;
the service division is divided into three modes, namely an integral mode, a combined mode and a mixed mode;
the whole mode is to divide all services in the online application into one service component;
the combination mode is to divide the online application into a composite service component and a plurality of basic service components;
the basic service component encapsulates one or more services, and the composite service component encapsulates the execution flow of the services;
the mixed mode includes an overall mode and a combined mode.
In the method, the cloud resource combination optimization allocation mode in the overall mode is to determine the maximum load and the use number of each type of virtual units, and the method is implemented as follows:
Let A be the service set contained in the online application, λ be the load of the online application, V= {1,2, …, m } be the set of virtual unit types, the maximum response time of the node be rt, the maximum error rate of the node be err;
is provided withFor a multi-service node->For service set, j E V is virtual unit, lambda ij The load of the service I epsilon I on the virtual unit j;
taking all services in I as one type of service, and letting mu Ij And c Ij Processing power and available capacity for I for virtual unit j, respectively, and is defined as μ Ij =∑ i∈I γ ij ·μ ij ,c Ij =∑ i∈I γ ij ·c ij
Wherein,for the probability that service i is executing on virtual element j, μ ij Represents the average number of times per unit time that the virtual unit j can perform service i, c ij The maximum concurrent request quantity of the service i which can be accepted by the virtual unit j in unit time is represented;
by M/M/1/c Ij Model to metric multiple service nodesIs a quality of service of (1);
order theFor multiple service nodes->According to Markov steady state analysis method, calculating nodesThe response time (rt), error rate (err), the calculation formula is: />
Determining the maximum load lambda that each virtual unit i epsilon V can bear i And translates into the following optimization problems:
maxλ i
s.t.
0<λ i ≤λ (3)
wherein constraint (1) represents a nodeIs less than or equal to rt, constraint (2) represents node +. >Error rate of (2) is equal to or less than err;
determining the number of virtual units of each type of deployment application, and setting an optimization target to be that the use cost of cloud resources is lower than a preset threshold value;
let x be i Represents the number of uses of the virtual unit i, c=f (x 1 ,x 2 ,…,x m ) As a use cost function of the cloud resources, a mathematical model that the use cost of the cloud resources is lower than a preset threshold is:
min c=f(x 1 ,x 2 ,…,x m )
s.t.λ 1 x 22 x 2 +…+λ m x m ≥λ。
it should be further noted that, the method of executing the combination mode includes: let p= { S 0 ,S 1 ,…,S K The service division mode of online application, the division mode P satisfies the condition: a=s 0 ∪S 1 ∪…∪S K
P represents an architecture mode for dividing an online application into a composite service component and K basic service components, and an initial service S 0 Included in the composite service member, each service set being mapped to a basic service member;
the composite service member further comprises a step of removing S 0 The other services, let B represent the service set contained in the composite service component;
determining the number of composite service components and the deployed virtual units, and replacing the service set A with the service set B for solving;
determining the number of basic service components connected with each composite service component and deployed virtual units;
let L be the number of composite service members, bc i (i=1, 2, …, L) is a composite service element, and the load applied online is λ, allocated to the composite service element bc i Load of lambda i Lambda is provided as 12 +…+λ L =λ;
Determining a composite service component bc based on dependencies between services and service transition probabilities i The load of each specific service and proxy service in (a), each basic service component c is determined based on the service load k (k=1, 2, …, K) which is the sum of the loads of the services it contains;
determining each basic service component c using an overall deployment mode k And the number of virtual units deployed, replacing service set A with service set S k And replacing the application load with the component load to solve.
It should be further noted that, in the method, the hybrid mode is decomposed into a combined deployment mode with two types of composite service components;
determining the number of application instance components and composite service components and deployed virtual units using methods in an overall deployment mode, setλ i Representing the maximum load, delta, that a virtual unit i epsilon V can handle to deploy an application instance component i Representing the maximum load that virtual unit i can afford to deploy the composite service member;
let x i Representing the number, y, of virtual units i used to deploy the application instance component i Representing the number, z, of virtual units i used to deploy the composite service element i =x i +y i Representing the total number of virtual units i used, let the use cost function of cloud resources be c=f (z 1 ,z 2 ,…,z m ) The mathematical model that minimizes the cost of cloud resource usage is:
min c=f(z 1 ,z 2 ,…,z m )
s.t.
the number of basic service components connected by each composite service component and the deployed virtual units are determined according to the composite deployment mode.
It should be further noted that step S2 further includes: on-line application is divided into fine granularity based on a combination mode and a mixed mode, wherein the division mode is to determine a service division mode according to business rules in the application field, and a condensation hierarchical clustering method is adopted to divide service components;
based on the aggregation hierarchical clustering method, each service partition is configured into a service component, and then a mode of gradually combining from bottom to top is adopted to form the service component with larger granularity, and the specific steps are as follows:
s21: dividing each service in the online application into one service component, determining a cloud resource optimal supply scheme of each service component by adopting a cloud resource optimal allocation method based on load decomposition, and calculating the corresponding cloud resource use cost;
s22: calculating the distance between any two service components, and selecting two service components with minimum distance and negative number;
S23: combining the two selected service components into a new service component, determining an optimal cloud resource supply scheme of the new service component by adopting a cloud resource optimal allocation method based on load decomposition, and calculating the corresponding cloud resource use cost;
s24: repeating S22 to S23 until there are no two service members whose distances are negative;
s25: output service component division.
It should be further noted that, the step S3 further includes: the service deployment of the combined mode and the mixed mode adopts a method of an integral deployment mode, and is processed based on a mixed genetic annealing algorithm of load decomposition;
the hybrid genetic annealing algorithm of the load decomposition comprises the following steps:
s31: importing an online application service set A, an online application load lambda and a virtual unit set V;
initializing various parameters of a hybrid genetic annealing algorithm, wherein the parameters comprise population quantity Q of genetic operation, maximum optimization algebra G, crossover probability Pc, mutation probability Pv, mutation quantity k and initial temperature t of simulated annealing operation 0 Termination temperature t e The temperature reduction coefficient a and the iteration number N;
s32: determining the maximum load capacity of each virtual unit by adopting a binary search algorithm;
s33: generating an initial population; the chromosome is represented by integer codes, the length of the chromosome is the number of virtual units, each gene represents one virtual unit, and the value of the gene is the number of the corresponding virtual units;
S34: calculating chromosome fitness meeting the load requirement of online application, namely using cost of cloud resources, and recording a chromosome with the maximum fitness;
s35: selecting a population by adopting a roulette method;
s36: randomly generating a random number of [0,1], performing cross operation according to the cross probability, performing cross to perform double-tangent-point operation, and performing heuristic repair after the operation;
s37: randomly generating a random number of [0,1], carrying out mutation operation according to mutation probability, and carrying out heuristic repair after the operation, wherein the mutation is multi-point combination mutation operation;
s38: performing neighborhood operation on the next generation population, and receiving the changed chromosomes according to a Metropolis criterion;
s39: judging whether the iteration times G are reached, if so, executing S310, otherwise, jumping to S34;
s310: and outputting the global optimal cloud resource allocation scheme.
It should be further noted that the binary search algorithm in the step 2 specifically includes:
s32.1: importing an online application load lambda, a virtual unit set V, wherein the maximum response time of a service node is rt, and the maximum error rate of the service node is err; initializing algorithm parameters, namely a load factor left boundary x, a load factor right boundary y and a threshold delta;
S32.2: judging whether the virtual unit set is traversed, if yes, jumping to the step S32.7, otherwise, taking out the next virtual unit, and transferring to the step S32.3;
s32.3: setting a left boundary x of a load coefficient as 0 and a right boundary y as 1;
s32.4: calculating a load coefficient as an average of left and right boundaries; calculating the product of the load coefficient and the online application load, and rounding down the result; judging whether the response time and the error rate of the service node under the current load are smaller than the maximum corresponding time rt and the error rate err, if so, setting a left boundary as a load factor, and recording the obtained load factor, otherwise, setting a right boundary as the load factor;
s32.5: judging whether the left-right boundary difference value is smaller than a threshold delta, if yes, turning to S32.6, otherwise, turning to S32.4;
s32.6: storing the load corresponding to the virtual unit in the current cycle, namely the product of the recorded load coefficient and the online application load, and jumping to S32.2;
s32.7: and outputting the maximum load corresponding to the virtual unit.
It should be further noted that, the intersecting operation in the step S36 specifically includes:
randomly selecting two non-repeated points from the two selected chromosomes, exchanging gene fragments between the two points, and repairing by a heuristic algorithm; calculating the ratio of the maximum load and the use cost of the load units, arranging the load units in descending order of the ratio, and distributing the residual load;
The mutation operation in step S37 specifically includes:
and randomly selecting k positions in the chromosome by adopting a multi-point combination variation mode, emptying virtual units allocated to the k positions, and reallocating residual loads in the selected virtual units according to a heuristic algorithm.
The invention also provides a terminal, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the cloud resource combination optimal allocation method when executing the program.
From the above technical scheme, the invention has the following advantages:
according to the cloud resource combination optimization distribution method provided by the invention, the service division modes of the online application are divided into an integral mode, a combination mode and a mixed mode, and a corresponding cloud resource combination optimization distribution model is established according to the three division modes. Secondly, a service component division strategy is configured, namely, the service components are divided according to business rules or a condensation hierarchical clustering algorithm in the application field. Then, an efficient solving algorithm, namely a hybrid genetic annealing algorithm based on load decomposition is configured to determine an optimal cloud resource supply scheme. And finally, constructing a virtual data center by adopting a corresponding automation tool according to the formulated cloud resource supply scheme, and realizing the combined optimal allocation of cloud resources.
The invention further subdivides the service component division mode corresponding to the online application deployment into three types aiming at the large-scale service deployment in the public cloud environment, and defines a problem model of cloud resource combination optimization distribution in the three types of modes. Aiming at the composite service component division, the service component division strategy provided by the invention carries out the composite service component division through the business rule or the aggregation hierarchical clustering algorithm in the application field, and the method can effectively reduce the complexity of the problem and quickly obtain the better service component. The method of the invention can also obtain the service member with lower cloud resource use cost. Therefore, the hybrid genetic annealing algorithm based on the load decomposition can obtain a cloud resource combination optimization allocation scheme, constructs a virtual data center to realize application deployment, minimizes the use cost of cloud resources on the premise of meeting the service quality constraint, and has practical value.
Drawings
In order to more clearly illustrate the technical solutions of the present invention, the drawings that are needed in the description will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a cloud resource combination optimization allocation method;
FIG. 2 is an exemplary tree view of a cloud resource allocation scheme of the present invention;
FIG. 3 is a flowchart of the aggregation hierarchical clustering service component algorithm of the present invention;
FIG. 4 is a flowchart of a load decomposition algorithm based on binary search according to the present invention;
FIG. 5 is a flow chart of a hybrid genetic annealing algorithm based on load decomposition according to the present invention.
Detailed Description
The cloud resource combination optimization allocation method provided by the invention can classify the service division types according to the service characteristics in the cloud environment, and establish a cloud resource combination optimization allocation model; then, aiming at different types of service division modes, configuring a service component division strategy; configuring a hybrid genetic annealing algorithm based on load decomposition to determine an optimal cloud resource supply scheme, wherein the aim is to minimize the use cost of cloud resources; and finally, constructing a virtual data center according to the formulated cloud resource supply scheme by adopting a corresponding automation tool.
The characteristics of various service types and dynamic change in the cloud environment make the number of service instances and the types and the number of correspondingly used virtual units difficult to directly determine, and the resource utilization rate is low. The method classifies the service division types based on calculation and storage resources and resources required by users, further adopts load decomposition to determine the corresponding relation between service instances and virtual unit types and quantity, and utilizes an efficient heuristic algorithm to solve a cloud resource supply scheme.
The cloud resource combination optimization distribution method can acquire and process the associated data based on the cloud resource intelligent analysis technology. The cloud resource combination optimization distribution method can utilize the intelligence of machine simulation, extension and expansion controlled by a digital computer to sense the environment, acquire knowledge and acquire the theory, method, technology and application device of the best result by using the knowledge.
Of course, the methods may also write computer program code for performing the operations of the present disclosure in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The cloud resource combination optimization allocation method can also be applied to one or more terminals, wherein the terminals are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware of the terminals comprises, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices and the like.
The terminal may be any electronic product that can interact with a user, such as a personal computer, a tablet, a smart phone, a personal digital assistant (Personal Digital Assistant, PDA), an interactive internet protocol television (Internet Protocol Television, IPTV), a smart wearable device, etc.
The terminal may also include network devices and/or user devices. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The network in which the terminal is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 to 5, a flowchart of a cloud resource combination optimization allocation method in an embodiment is shown, where the method includes:
s1: classifying service division types according to service characteristics in a cloud environment, and establishing a cloud resource combination optimization allocation mode;
the service division in this embodiment is to configure all services in the online application as service components, and deploy the service components on the virtual units.
The service division is divided into three modes, namely an integral mode, a combined mode and a mixed mode.
The global mode refers to dividing all services in an online application into one service component.
The combination mode refers to an execution flow of dividing the online application into a composite service component and a plurality of basic service components, wherein the basic service components encapsulate one or more services, and the composite service component encapsulates the services.
The mixed mode refers to both the overall mode and the combined mode of the service division of the online application.
For service deployment in the overall mode, the key of the cloud resource combination optimization allocation problem is to determine the maximum load and the number of use of each type of virtual unit. Let a be a service set contained in an online application, λ be a load of the online application, v= {1,2, …, m } be a set of virtual unit types, maximum response time of a node be rt, and maximum error rate of the node be err.
Is provided withFor a multi-service node->For service set, j E V is virtual unit, lambda ij For the load of service I e I on virtual unit j, if all the services in I are regarded as one type of service, let mu Ij And c Ij Processing power and available capacity for I for virtual unit j, respectively, defined as μ Ij =∑ i∈I γ ij ·μ ij ,c Ij =∑ i∈I γ ij ·c ij . Wherein,for the probability that service i is executing on virtual element j, μ ij Represents the average number of times per unit time that the virtual unit j can perform service i, c ij The maximum concurrent request number of the service i which can be accepted by the virtual unit j in unit time is represented. Here, the present embodiment may employ M/M/1/c Ij Model to measure multiple service nodes->Is to be used for the quality of service of (a).
Order theFor multiple service nodes->According to Markov steady state analysis method, the node can be calculatedThe response time (rt), error rate (err), the calculation formula is: />
The present embodiment determines the maximum load λ that each virtual unit i e V can withstand i And translates into the following optimization problems:
maxλ i
s.t.
0<λ i ≤λ (3)
wherein constraint (1) represents a nodeIs less than or equal to rt, constraint (2) represents node +.>Error rate of err or less.
Second, the number of uses of each type of virtual unit deploying the application is determined, and the optimization goal is that the use cost of cloud resources is the lowest.
Let x be i Represents the number of uses of the virtual unit i, c=f (x 1 ,x 2 ,…,x m ) As a use cost function of cloud resources, the mathematical model of the problem is:
min c=f(x 1 ,x 2 ,…,x m )
s.t.λ 1 x 22 x 2 +…+λ m x m ≥λ
according to embodiments of the present application, service deployment in a combined mode requires a division of services of an online application. Let p= { S 0 ,S 1 ,…,S K The method is characterized in that the method is an optimal service division mode of online application, and the division mode P meets the condition: 1) A=s 0 ∪S 1 ∪…∪S K
P represents an architecture mode for dividing an online application into a composite service component and K basic service components, and an initial service S 0 Included in the composite service construct, each of the other service sets is mapped to a basic service construct. The composite service member includes, in addition to S 0 In addition to other services, let B denote the set of services contained in the composite service component.
The number of composite service components and the deployed virtual units are determined, and the process can adopt a method of an overall deployment mode to replace the service set A with the service set B for solving.
Then, the number of basic service components connected to each composite service component and the deployed virtual units are determined. Let L be the number of composite service members, bc i (i=1, 2, …, L) is a composite service element, and the load applied online is λ, allocated to the composite service element bc i Load of lambda i Lambda is provided as 12 +…+λ L =λ. Determining a composite service component bc based on dependencies between services and service transition probabilities i The load of each specific service and proxy service in (c), based on the service load, each basic service component c can be determined k (k=1, 2, …, K), which is the sum of the loads of the services it contains. Determining each basic service component c k The process of the number of virtual units and the deployed virtual units also adopts a method of an overall deployment mode, and the service set A is replaced by the service set S k And replacing the application load with the component load to solve.
For the hybrid mode of the present embodiment, the service deployment thereof is to decompose the hybrid deployment mode into a combined deployment mode having two types of composite service components, one type of composite service component being an application instance component containing all services; the other type is a composite service component constructed according to the optimal service division mode, and the composite service component is connected with a plurality of basic service components.
The present embodiment utilizes methods in the overall deployment modeTo determine the number of application instance components and composite service components and the deployed virtual units, let lambda i Representing the maximum load, delta, that a virtual unit i epsilon V can handle to deploy an application instance component i Representing the maximum load that virtual unit i can take to deploy the composite service member. Let x i Representing the number, y, of virtual units i used to deploy the application instance component i Representing the number, z, of virtual units i used to deploy the composite service element i =x i +y i Representing the total number of virtual units i used, let the use cost function of cloud resources be c=f (z 1 ,z 2 ,…,z m ) Thus, the mathematical model that minimizes the cost of cloud resource usage is:
min c=f(z 1 ,z 2 ,…,z m )
s.t.
the present embodiment also determines the number of basic service components connected to each composite service component and the deployed virtual units according to the method in the composite deployment mode.
In the cost-driven cloud resource combination optimization allocation process described in the present implementation, it mainly includes service division, load decomposition, component placement and application deployment.
The cloud resource optimization allocation schemes (i.e., virtual data centers) generated in each deployment mode may be abstracted into a hierarchical tree structure, which is called a cloud resource allocation scheme tree (Cloud Resource Allocation Project Tree, CRAPT). The root node of CRAPT represents an online application, each node of layer 1 represents a composite service component deployed in a virtual unit, each node of layer 2 represents a service set, all services in the service set are contained in one service component, and each node of layer 3 represents a basic service component deployed in a virtual unit. According to the method, the use cost of cloud resources can be calculated according to the member nodes in the cloud resource allocation scheme tree, and the cloud resource optimization allocation scheme with the lowest cost is selected to guide the construction of the virtual data center.
Fig. 2 shows an example of a cloud resource allocation scheme tree in different service division modes, where fig. 2 (a) corresponds to an overall mode, fig. 2 (b) corresponds to a combined mode, and fig. 2 (c) corresponds to a mixed mode.
S2: configuring a service component partitioning strategy based on different types of service partitioning modes;
according to the embodiment of the present application, the online application in the overall mode is divided into one service component based on all services, and no special division is required at this time.
For the combined mode and the mixed mode, finer granularity division needs to be carried out on the online application, an optimal service division mode can be determined according to business rules in the application field, and a condensation hierarchical clustering method can also be adopted to divide service components.
For the method of aggregation hierarchical clustering analysis of this embodiment, each service is first divided into one service component, and then a bottom-up gradual merging mode is adopted to form a service component with larger granularity, which specifically includes the following steps:
s21: dividing each service in the online application into one service component, then determining a cloud resource optimal supply scheme of each service component by adopting a cloud resource optimal allocation method based on load decomposition, and calculating the corresponding cloud resource use cost;
S22: calculating the distance between any two service components, and selecting two service components with the smallest distance and negative number (ensuring the reduction of the use cost of cloud resources);
s23: combining the two selected service components into a new service component, then adopting a cloud resource optimal allocation method based on load decomposition to determine an optimal cloud resource supply scheme of the new service component, and calculating the corresponding cloud resource use cost;
s24: repeating steps S22 to S23 until there are no two service members whose distances are negative;
s25: output service component division.
FIG. 3 is a flow chart depicting the aggregation hierarchical clustering service component algorithm. It can be seen that the distance between the two service components is the difference between the cloud resource usage cost of the new service component obtained after the two service components are combined and the sum of the cloud resource usage costs of the two service components, and if the difference is negative, the cloud resource supply scheme after the two service components are combined is better than the cloud resource supply scheme before the two service components are combined.
S3: a hybrid genetic annealing algorithm based on load decomposition is configured to determine a cloud resource supply scheme meeting preset conditions.
For the combination mode and the hybrid mode of the embodiment, the service deployment can adopt a method of an overall deployment mode, and the specific steps of the hybrid genetic annealing algorithm based on load decomposition in the overall deployment mode are as follows:
S31: importing data, wherein the data comprises an online application service set A, an online application load lambda and a virtual unit set V; each parameter of the initialization algorithm comprises population quantity Q, maximum optimization algebra G, crossover probability Pc, mutation probability Pv, mutation quantity k of genetic operation and initial temperature t of simulated annealing operation 0 Termination temperature t e The cooling coefficient a and the iteration number N.
S32: a binary search algorithm is employed to determine the maximum load capacity of each virtual unit.
In this step, as illustrated in fig. 4, a load decomposition algorithm flow based on a binary search is described, where the binary search algorithm includes the following steps:
s32.1: importing data, wherein the data specifically comprises an online application load lambda, a virtual unit set V, a maximum response time of a service node is rt, and a maximum error rate of the service node is err; initializing algorithm parameters, namely a load factor left boundary x, a load factor right boundary y and a threshold delta;
s32.2: judging whether the virtual unit set is traversed, if so, jumping to S32.7, otherwise, taking out the next virtual unit, and transferring to S32.3;
s32.3: setting a left boundary x of a load coefficient as 0 and a right boundary y as 1;
s32.4: calculating a load coefficient as an average of left and right boundaries; calculating the product of the load coefficient and the online application load, and rounding down the result; judging whether the response time and the error rate of the service node under the current load are smaller than the maximum corresponding time rt and the error rate err, if so, setting a left boundary as a load factor, and recording the obtained load factor, otherwise, setting a right boundary as the load factor;
S32.5: judging whether the left-right boundary difference value is smaller than a threshold delta, if yes, turning to S32.6, otherwise, turning to S32.4;
s32.6: storing the load corresponding to the virtual unit in the current cycle, namely the product of the recorded load coefficient and the online application load, and jumping to S32.2;
s32.7: and outputting the maximum load corresponding to the virtual unit.
S33: generating an initial population; the chromosome is represented by integer codes, the length of the chromosome is the number of virtual units, each gene represents one virtual unit, and the value of the gene is the number of the corresponding virtual units.
S34: and calculating the chromosome fitness meeting the load requirement of the online application, namely the use cost of cloud resources, and recording the chromosome with the largest fitness.
S35: the selection of the population is performed using roulette.
S36: and randomly generating a random number of [0,1], performing cross operation according to the cross probability, performing cross to perform double-tangent point operation, and performing heuristic repair after the operation.
In this embodiment, the crossover operation involves the following steps:
randomly selecting two non-repeated points from the two selected chromosomes, exchanging gene fragments in the middle of the two points, and repairing by a heuristic algorithm under the condition that the load requirements of online application are not met after the exchange; in order to meet the load requirement, calculating the ratio of the maximum load and the use cost of the load units, arranging the load units in descending order of the ratio, and distributing the residual load.
S37: randomly generating a random number of [0,1], carrying out mutation operation according to mutation probability, and carrying out heuristic repair after mutation into multipoint combination mutation operation.
Illustratively, the mutation operation involves the following:
and randomly selecting k positions in the chromosome by adopting a multi-point combination variation mode, emptying the distributed virtual units of the k positions, and redistributing the residual load in the selected virtual units according to a heuristic algorithm.
S38: neighborhood manipulation was performed on the next generation population, accepting the changed chromosomes under Metropolis criteria.
In this embodiment, the neighborhood operation specifically includes a swap operation and an insert operation.
The exchange operation adopts fragment exchange, randomly selects two nodes and fragment lengths, and exchanges two gene fragments;
the inserting operation adopts segment insertion, randomly selects two nodes and the length of the inserted segment, and inserts the segment starting from the selected rear node to the front position of the front node.
S39: and judging whether the iteration times G are reached, if so, executing S310, otherwise, jumping to S34.
S310: and outputting the global optimal cloud resource allocation scheme.
FIG. 5 illustrates a flow of a hybrid genetic annealing algorithm based on load decomposition.
S4: and constructing a virtual data center according to the cloud resource supply scheme.
As one example, the combined allocation of cloud resources is accomplished by an automated tool provided by a public cloud environment to execute a cloud resource provisioning scheme.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present invention.
The terminal provided by the invention is the units and algorithm steps of each example described in connection with the embodiments disclosed herein, and can be implemented as electronic hardware, computer software, or a combination of both, and to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described generally in terms of functionality in the foregoing description. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
As will be readily understood by those skilled in the art from the foregoing description of the embodiments, the cloud resource combination optimization allocation method described herein may be implemented by software, or may be implemented by combining software with necessary hardware. Accordingly, the technical solution of the disclosed embodiments according to the cloud resource combination optimization allocation method may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the indexing method according to the disclosed embodiments.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. The cloud resource combination optimizing and distributing method is characterized by comprising the following steps of:
s1: classifying service division types according to service characteristics in a cloud environment, and establishing a cloud resource combination optimization allocation mode;
s2: configuring a service component partitioning strategy based on different types of service partitioning modes;
s3: configuring a hybrid genetic annealing algorithm based on load decomposition to determine a cloud resource supply scheme meeting preset conditions;
s4: and constructing a virtual data center according to the cloud resource supply scheme.
2. The cloud resource combination optimal allocation method according to claim 1, wherein,
In the step S1, the service division is to configure all services in the online application as service components, and deploy the service components on the virtual units;
the service division is divided into three modes, namely an integral mode, a combined mode and a mixed mode;
the whole mode is to divide all services in the online application into one service component;
the combination mode is to divide the online application into a composite service component and a plurality of basic service components;
the basic service component encapsulates one or more services, and the composite service component encapsulates the execution flow of the services;
the mixed mode includes an overall mode and a combined mode.
3. The cloud resource combination optimal allocation method according to claim 2, wherein in the method, the cloud resource combination optimal allocation mode in the overall mode is to determine the maximum load and the number of use of each type of virtual unit, and the method is implemented as follows:
let A be the service set contained in the online application, λ be the load of the online application, V= {1,2, …, m } be the set of virtual unit types, the maximum response time of the node be rt, the maximum error rate of the node be err;
is provided withFor a multi-service node->For service set, j E V is virtual unit, lambda ij The load of the service I epsilon I on the virtual unit j;
taking all services in I as one type of service, and letting mu Ij And c Ij Processing power and available capacity for I for virtual unit j, respectively, and is defined as μ Ij =∑ i∈I γ ij ·μ ij ,c Ij =∑ i∈I γ ij ·c ij
Wherein,for the probability that service i is executing on virtual element j, μ ij Represents the average number of times per unit time that the virtual unit j can perform service i, c ij The maximum concurrent request quantity of the service i which can be accepted by the virtual unit j in unit time is represented;
by M/M/1/c Ij Model to metric multiple service nodesIs a quality of service of (1);
order theFor multiple service nodes->According to Markov steady state analysis method, computing node +.>The response time (rt), error rate (err), the calculation formula is: />
Determining the maximum load lambda that each virtual unit i epsilon V can bear i And is converted into the following advantagesThe chemical problems are as follows:
maxλ i
s.t.
0<λ i ≤λ (3)
wherein constraint (1) represents a nodeIs less than or equal to rt, constraint (2) represents node +.>Error rate of (2) is equal to or less than err;
determining the number of virtual units of each type of deployment application, and setting an optimization target to be that the use cost of cloud resources is lower than a preset threshold value;
let x be i Represents the number of uses of the virtual unit i, c=f (x 1 ,x 2 ,…,x m ) As a use cost function of the cloud resources, a mathematical model that the use cost of the cloud resources is lower than a preset threshold is:
min c=f(x 1 ,x 2 ,…,x m )
s.t.λ 1 x 22 x 2 +…+λ m x m ≥λ。
4. The cloud resource combination optimization allocation method according to claim 2, wherein the combination mode execution manner of the method comprises: let p= { S 0 ,S 1 ,…,S K The service division mode of online application, the division mode P satisfies the condition:
p represents an architecture mode for dividing an online application into a composite service component and K basic service components, and an initial service S 0 Included in the composite service member, each service set being mapped to a basic service member;
the composite service member further comprises a step of removing S 0 The other services, let B represent the service set contained in the composite service component;
determining the number of composite service components and the deployed virtual units, and replacing the service set A with the service set B for solving;
determining the number of basic service components connected with each composite service component and deployed virtual units;
let L be the number of composite service members, bc i (i=1, 2, …, L) is a composite service element, and the load applied online is λ, allocated to the composite service element bc i Load of lambda i Lambda is provided as 12 +…+λ L =λ;
Determining a composite service component bc based on dependencies between services and service transition probabilities i The load of each specific service and proxy service in (a), each basic service component c is determined based on the service load k (k=1, 2, …, K) which is the sum of the loads of the services it contains;
determining each basic service component c using an overall deployment mode k And the number of virtual units deployed, replacing service set A with service set S k And replacing the application load with the component load to solve.
5. The cloud resource combination optimal allocation method according to claim 2, wherein in the method, the hybrid mode is decomposed into a combined deployment mode having two types of composite service components;
determining the number of application instance components and composite service components and deployed virtual units using methods in an overall deployment mode, let lambda i Representation ofVirtual unit i epsilon V deploys the maximum load that the application instance component can bear, delta i Representing the maximum load that virtual unit i can afford to deploy the composite service member;
let x i Representing the number, y, of virtual units i used to deploy the application instance component i Representing the number, z, of virtual units i used to deploy the composite service element i =x i +y i Representing the total number of virtual units i used, let the use cost function of cloud resources be c=f (z 1 ,z 2 ,…,z m ) The mathematical model that minimizes the cost of cloud resource usage is:
min c=f(z 1 ,z 2 ,…,z m )
The number of basic service components connected by each composite service component and the deployed virtual units are determined according to the composite deployment mode.
6. The cloud resource combination optimal allocation method according to claim 2, wherein step S2 further comprises: on-line application is divided into fine granularity based on a combination mode and a mixed mode, wherein the division mode is to determine a service division mode according to business rules in the application field, and a condensation hierarchical clustering method is adopted to divide service components;
based on the aggregation hierarchical clustering method, each service partition is configured into a service component, and then a mode of gradually combining from bottom to top is adopted to form the service component with larger granularity, and the specific steps are as follows:
s21: dividing each service in the online application into one service component, determining a cloud resource optimal supply scheme of each service component by adopting a cloud resource optimal allocation method based on load decomposition, and calculating the corresponding cloud resource use cost;
s22: calculating the distance between any two service components, and selecting two service components with minimum distance and negative number;
s23: combining the two selected service components into a new service component, determining an optimal cloud resource supply scheme of the new service component by adopting a cloud resource optimal allocation method based on load decomposition, and calculating the corresponding cloud resource use cost;
S24: repeating S22 to S23 until there are no two service members whose distances are negative;
s25: output service component division.
7. The cloud resource combination optimization allocation method according to claim 2, wherein the step S3 further comprises: the service deployment of the combined mode and the mixed mode adopts a method of an integral deployment mode, and is processed based on a mixed genetic annealing algorithm of load decomposition;
the hybrid genetic annealing algorithm of the load decomposition comprises the following steps:
s31: importing an online application service set A, an online application load lambda and a virtual unit set V;
initializing various parameters of a hybrid genetic annealing algorithm, wherein the parameters comprise population quantity Q of genetic operation, maximum optimization algebra G, crossover probability Pc, mutation probability Pv, mutation quantity k and initial temperature t of simulated annealing operation 0 Termination temperature t e The temperature reduction coefficient a and the iteration number N;
s32: determining the maximum load capacity of each virtual unit by adopting a binary search algorithm;
s33: generating an initial population; the chromosome is represented by integer codes, the length of the chromosome is the number of virtual units, each gene represents one virtual unit, and the value of the gene is the number of the corresponding virtual units;
S34: calculating chromosome fitness meeting the load requirement of online application, namely using cost of cloud resources, and recording a chromosome with the maximum fitness;
s35: selecting a population by adopting a roulette method;
s36: randomly generating a random number of [0,1], performing cross operation according to the cross probability, performing cross to perform double-tangent-point operation, and performing heuristic repair after the operation;
s37: randomly generating a random number of [0,1], carrying out mutation operation according to mutation probability, and carrying out heuristic repair after the operation, wherein the mutation is multi-point combination mutation operation;
s38: performing neighborhood operation on the next generation population, and receiving the changed chromosomes according to a Metropolis criterion;
s39: judging whether the iteration times G are reached, if so, executing S310, otherwise, jumping to S34;
s310: and outputting the global optimal cloud resource allocation scheme.
8. The cloud resource combination optimization allocation method according to claim 7, wherein the binary search algorithm in step 2 specifically comprises:
s32.1: importing an online application load lambda, a virtual unit set V, wherein the maximum response time of a service node is rt, and the maximum error rate of the service node is err; initializing algorithm parameters, namely a load factor left boundary x, a load factor right boundary y and a threshold delta;
S32.2: judging whether the virtual unit set is traversed, if yes, jumping to the step S32.7, otherwise, taking out the next virtual unit, and transferring to the step S32.3;
s32.3: setting a left boundary x of a load coefficient as 0 and a right boundary y as 1;
s32.4: calculating a load coefficient as an average of left and right boundaries; calculating the product of the load coefficient and the online application load, and rounding down the result; judging whether the response time and the error rate of the service node under the current load are smaller than the maximum corresponding time rt and the error rate err, if so, setting a left boundary as a load factor, and recording the obtained load factor, otherwise, setting a right boundary as the load factor;
s32.5: judging whether the left-right boundary difference value is smaller than a threshold delta, if yes, turning to S32.6, otherwise, turning to S32.4;
s32.6: storing the load corresponding to the virtual unit in the current cycle, namely the product of the recorded load coefficient and the online application load, and jumping to S32.2;
s32.7: and outputting the maximum load corresponding to the virtual unit.
9. The cloud resource combination optimal allocation method according to claim 7, wherein,
the intersecting operation in step S36 specifically includes:
randomly selecting two non-repeated points from the two selected chromosomes, exchanging gene fragments between the two points, and repairing by a heuristic algorithm; calculating the ratio of the maximum load and the use cost of the load units, arranging the load units in descending order of the ratio, and distributing the residual load;
The mutation operation in step S37 specifically includes:
and randomly selecting k positions in the chromosome by adopting a multi-point combination variation mode, emptying virtual units allocated to the k positions, and reallocating residual loads in the selected virtual units according to a heuristic algorithm.
10. A terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the cloud resource combination optimization allocation method according to any one of claims 1 to 9 when executing the program.
CN202311281892.2A 2023-09-28 Cloud resource combination optimal allocation method and terminal Active CN117667618B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311281892.2A CN117667618B (en) 2023-09-28 Cloud resource combination optimal allocation method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311281892.2A CN117667618B (en) 2023-09-28 Cloud resource combination optimal allocation method and terminal

Publications (2)

Publication Number Publication Date
CN117667618A true CN117667618A (en) 2024-03-08
CN117667618B CN117667618B (en) 2024-07-09

Family

ID=

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957261A (en) * 2014-05-06 2014-07-30 湖南体运通信息技术有限公司 Cloud computing resource distributing method based on energy consumption optimization
CN107609650A (en) * 2017-09-20 2018-01-19 河南理工大学 Based on the particle genetic algorithm optimization method, apparatus and system that time load is balanced
US20210067599A1 (en) * 2019-08-31 2021-03-04 Nutanix, Inc. Cloud resource marketplace
CN116126534A (en) * 2023-01-28 2023-05-16 哈尔滨工业大学(威海) Cloud resource dynamic expansion method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103957261A (en) * 2014-05-06 2014-07-30 湖南体运通信息技术有限公司 Cloud computing resource distributing method based on energy consumption optimization
CN107609650A (en) * 2017-09-20 2018-01-19 河南理工大学 Based on the particle genetic algorithm optimization method, apparatus and system that time load is balanced
US20210067599A1 (en) * 2019-08-31 2021-03-04 Nutanix, Inc. Cloud resource marketplace
CN116126534A (en) * 2023-01-28 2023-05-16 哈尔滨工业大学(威海) Cloud resource dynamic expansion method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
孟凡超等: "基于混合遗传模拟退火算法的SaaS构件优化放置", 《软件学报》, 14 January 2016 (2016-01-14) *
汪汉新;李鹏威;: "基于遗传退火的密集D2D网络资源分配算法", 中南民族大学学报(自然科学版), no. 01, 5 February 2020 (2020-02-05) *
蔡文伟;白伟华;: "云计算资源调度及管理服务平台研究与设计", 信息与电脑(理论版), no. 11, 10 June 2020 (2020-06-10) *

Similar Documents

Publication Publication Date Title
Comellas et al. Recursive graphs with small-world scale-free properties
Chattopadhyay et al. QoS-aware automatic Web service composition with multiple objectives
CN110008023B (en) Cloud computing system budget constraint random task scheduling method based on genetic algorithm
CN111694664B (en) Calculation unloading distribution method of edge server
Candan et al. A dynamic island model for adaptive operator selection
CN114461368A (en) Multi-target cloud workflow scheduling method based on cooperative fruit fly algorithm
Aguilar-Fuster et al. A novel evaluation function for higher acceptance rates and more profitable metaheuristic-based online virtual network embedding
Bang et al. Improved genetic algorithm for minimum latency problem
CN113687780B (en) QoS optimization method, system, terminal and storage medium for distributed storage server
CN108289115B (en) Information processing method and system
El Gaily et al. Constrained quantum optimization for resource distribution management
CN117667618B (en) Cloud resource combination optimal allocation method and terminal
Vanegas et al. Compactness in spatial decision support: a literature review
CN117667618A (en) Cloud resource combination optimal allocation method and terminal
CN112446484A (en) Multitask training cluster intelligent network system and cluster network optimization method
Wang et al. Multi-granularity decomposition for componentized multimedia applications based on graph clustering
CN115509715A (en) Distributed task scheduling method and device and electronic equipment
CN109889573A (en) Based on the Replica placement method of NGSA multiple target in mixed cloud
Abdellah et al. RAP-G: Reliability-aware service placement using genetic algorithm for deep edge computing
CN115421885A (en) Distributed multi-target cloud task scheduling method and device and cloud service system
Alzahrani et al. Energy-aware virtual network embedding approach for distributed cloud
CN114124818A (en) Newly-added function node deployment optimization method for multicast transmission in SDN network
CN112953781A (en) Particle swarm-based virtual service fault recovery method and device under network slice
Fister et al. Hybridization of evolutionary algorithms
Shouman et al. Static Workload Distribution of Parallel Applications in Heterogeneous Distributed Computing Systems with Memory and Communication Capacity Constraints

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