CN118101500A - Service deployment method and system under edge environment based on improved genetic algorithm - Google Patents

Service deployment method and system under edge environment based on improved genetic algorithm Download PDF

Info

Publication number
CN118101500A
CN118101500A CN202410459145.1A CN202410459145A CN118101500A CN 118101500 A CN118101500 A CN 118101500A CN 202410459145 A CN202410459145 A CN 202410459145A CN 118101500 A CN118101500 A CN 118101500A
Authority
CN
China
Prior art keywords
service
deployment
population
service deployment
cost
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
CN202410459145.1A
Other languages
Chinese (zh)
Other versions
CN118101500B (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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN202410459145.1A priority Critical patent/CN118101500B/en
Publication of CN118101500A publication Critical patent/CN118101500A/en
Application granted granted Critical
Publication of CN118101500B publication Critical patent/CN118101500B/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 discloses a service deployment method and a system under an edge environment based on an improved genetic algorithm, relates to the field of edge computing resource allocation, and is used for solving the problem of instability of online dynamic deployment and improving the performance and cost performance of a service deployment scheme. The invention uses the service deployment matrix to represent the deployment scheme of service instance deployment of various services on each edge server, and constructs an initialization population by taking the service deployment matrix as a coding mode; constructing an objective function according to the performance index and the cost index of service deployment; selecting a feasible solution population from the initialized population according to constraint conditions, selecting individuals to evolve according to fitness, and correcting illegal solutions in the processes of crossover operation and mutation operation; and finally, selecting the chromosome with the highest fitness for service deployment. According to the invention, the optimal solution can be obtained in an off-line mode, the cost and the performance are balanced, the excellent genes of the illegal solution are kept for evolution, and the reliability of the optimal solution is improved.

Description

Service deployment method and system under edge environment based on improved genetic algorithm
Technical Field
The invention relates to the field of edge computing resource allocation, in particular to a service deployment method and system under an edge environment based on an improved genetic algorithm.
Background
In recent years, the field of edge computing has received a great deal of attention as a hotspot field for service computing. Edge computing deploys the workload more closely to the user than traditional centralized cloud computing. Due to the high-speed development of services and scenes such as 5G, ioT (Internet of things-Things) and the like and the great increase of the number of intelligent terminal devices, the sinking appeal of edge computing services is increased more and more. However, in a mobile edge system scenario where the server or network load is large, since computing resources and communication resources are limited in the edge server cluster, the developer has to keep the balance of the overall system load while obtaining satisfactory performance by selecting a reasonable service deployment policy, and also needs to consider the cost overhead of deploying the service and allocating resources to the system.
The patent document of chinese publication No. CN112148492a discloses a service deployment and resource allocation method considering multi-user mobility, the method comprising: (1) establishing a mathematical model for a moving edge computing scene: according to cloud computing node user equipment nodes contained in a mobile edge computing scene, computing nodes of a model are obtained, a service deployment decision is made between a section of discrete time slices, the time of the model is defined as a discrete time slice set, and a decision space formed by service deployment and resource allocation problems is analyzed; three overheads contained in the scene are calculated from the mobile edges: and calculating delay cost, transmission delay cost and service migration cost, and determining an optimization target of the model. (2) And solving the established mathematical model to obtain a multi-user service deployment and resource allocation scheme. The method has the defects that the service deployment and the service migration are required to be carried out on line in real time, and the real-time sensing calculation and the scheme dynamic adjustment are required to be carried out on the system condition, so that additional calculation and network overhead cost are brought.
The patent document with the Chinese publication number of CN117149443A discloses an edge computing service deployment method based on a neural network, which comprises the following steps: firstly, an edge server acquires characteristic information of a vehicle user; predicting through a graph neural network prediction model, and marking the positions of all vehicle users at the next moment on a map according to longitude and latitude to obtain a position coordinate graph; clustering by using an improved K-means clustering algorithm to obtain K class clusters; calculating the fitness value of the edge server in each class cluster, and taking the edge server with the largest fitness value as a pre-deployment edge server; calculating the total cost of directly migrating the service to the pre-deployment edge server and directly deploying the service from the cloud server to the pre-deployment edge server, comparing the total cost of the two schemes, and selecting a scheme with the lower total cost for service deployment. The method has the defects that the time cost of the prediction model by using the graph neural network is high, the efficiency is low, and the method is mainly aimed at the deployment cost and lacks consideration on the system performance.
Disclosure of Invention
The invention aims at: aiming at all or part of the problems, the service deployment system method and the system under the edge environment based on the improved genetic algorithm are provided, the unstable problems existing in the on-line dynamic deployment are solved by means of off-line deployment service examples, and the performance and the cost performance of the service deployment scheme are improved.
The technical scheme adopted by the invention is as follows:
a service deployment method under an edge environment based on an improved genetic algorithm comprises the following steps:
The method comprises the steps that a service deployment matrix is used for representing a deployment scheme of service instance deployment of various services on various edge servers, wherein the service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by one edge server; generating an initialization population according to a preset population scale by taking the service deployment matrix as a chromosome coding mode;
constructing an objective function according to performance indexes and cost indexes of service deployment, and setting constraint conditions of the objective function; the performance index is average request processing time delay, and the cost index consists of budget surplus and system balance benefit;
Selecting a feasible solution population from the initialized population according to the constraint condition, taking each chromosome in the feasible solution population as an individual, calculating a performance index and a cost index of service deployment by using the chromosome, solving an objective function value, and taking the reciprocal of the objective function value as the fitness of the individual; selecting individuals to inherit to a next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals to generate new individuals to inherit to the next generation population, performing illegal solution correction on the individuals which are obtained by the crossover operation and the mutation operation and do not meet the constraint conditions, and selecting a feasible solution population from the next generation population according to the constraint conditions, so as to circulate until a set genetic algebra is reached; final selection with maximum fitness is subjected to service deployment.
Further, the constructing an objective function according to the performance index and the cost index of service deployment, and setting constraint conditions of the objective function, includes:
The construction objective function is as follows:
Wherein, For objective function value,/>For average request processing latency,/>For budget surplus,/>For system balance benefit,/>And/>Respectively settable parameters;
the constraint conditions of the objective function are set as follows:
constraint one: Wherein/> Representing that edge server h allocates resources to services/>Is a representation vector of (1), S represents a service set,/>Representing class w services in a service set S,/>Representing the total available resources of the edge server h;
Constraint II:
further, the calculation method of the average request processing time delay comprises the following steps:
Wherein, Representing access point/>For service/>Average number of requests received per unit time,/>Representing access point/>Bearer related to service/>Service request total lifecycle,/>Representing a set of access points.
Further, the service request total lifecycle is obtained by summing a wireless transmission phase time cost, a request routing phase time cost, and a service execution phase time cost, wherein:
wireless transmission phase time cost The calculation method of (1) is as follows:
Wherein, Represents the/>Class services/>Data size of one service request of/>Representing access point/>Is determined based on the average radio transmission rate of (a);
request routing phase time cost The calculation method of (1) is as follows:
Wherein, Representation of services/>From access point/>Node path/>, through which flows to target edge serverNumber of middle nodes,/>Representing nodes/>Average data transfer rate between/(
Service execution phase time costThe calculation method of (1) is as follows:
Wherein, Representing class w services/>Average processing speed of service instances in allocating unit resources.
Further, the budget surplusThe calculation method of (1) is as follows:
Wherein, Is a service/>Unit cost for deploying a service instance, H represents the edge server set,/>Representing the number of edge servers.
Further, the system balances benefitsThe calculation method of (1) is as follows:
Wherein, ,/>Representing the variance.
Further, the illegal solution correction method comprises the following steps:
Removing service instances exceeding total available resources of the deployed edge servers in individuals which do not meet the constraint conditions;
And redeploying the rejected service instance to an idle edge server.
Further, the generating an initialization population according to a preset population scale by using the service deployment matrix as a chromosome coding mode comprises the following steps:
and taking the service deployment matrix as a chromosome coding mode, generating new chromosomes continuously through a random chromosome coding mode when the number of the chromosomes in the current population is lower than the population scale according to the preset population scale, and adding the new chromosomes into the current population until the number of the chromosomes reaches the population scale, so as to obtain an initialized population.
In order to solve the problems, the invention also provides a service deployment system under the edge environment based on the improved genetic algorithm, which comprises a chromosome coding and initializing module, a performance and cost evaluation module and an optimal deployment scheme acquisition module; wherein:
the chromosome encoding and initialization module is configured to:
The method comprises the steps that a service deployment matrix is used for representing a deployment scheme of service instance deployment of various services on various edge servers, wherein the service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by one edge server; generating an initialization population according to a preset population scale by taking the service deployment matrix as a chromosome coding mode;
the performance and cost assessment module is configured to:
Receiving configuration of an objective function and constraint conditions, wherein the objective function is constructed based on performance indexes and cost indexes of service deployment, the performance indexes are average request processing time delay, and the cost indexes consist of budget surplus and system balance benefits;
the optimal deployment scenario acquisition module is configured to:
Selecting a feasible solution population from the initialized population according to the constraint condition, taking each chromosome in the feasible solution population as an individual, calculating a performance index and a cost index of service deployment by using the chromosome, solving an objective function value, and taking the reciprocal of the objective function value as the fitness of the individual; selecting individuals to inherit to a next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals to generate new individuals to inherit to the next generation population, performing illegal solution correction on the individuals which are obtained by crossover operation and do not meet the constraint conditions, and selecting a feasible solution population from the next generation population according to the constraint conditions, so as to circulate until a set genetic algebra is reached; the chromosome with the greatest fitness is finally selected for service deployment.
Further, the optimal deployment scheme obtaining module carries out illegal solution correction on the individuals which are obtained by the cross operation and do not meet the constraint conditions according to the following configuration:
Removing service instances exceeding total available resources of the deployed edge servers in individuals which do not meet the constraint conditions;
And redeploying the rejected service instance to an idle edge server.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows:
the invention uses the service deployment matrix to encode the chromosome genes of the service deployment scheme in the edge environment, and overcomes the technical obstacle that the optimization of the service deployment scheme cannot be processed by using the population genetic optimization algorithm. In addition, the invention comprehensively considers the system performance index and the cost index of the edge calculation, so that the obtained service deployment scheme can reach balance on the system performance and the cost. According to the method, the offline calculation of the service deployment scheme can be performed by inputting the current known attribute information of the edge computing system, embedding or real-time sensing is not needed, and the threshold and cost of service deployment in the edge computing system are reduced. In addition, the invention aims at the service deployment problem of the edge computing system, improves the genetic algorithm, and in the population genetic process, illegally solves individuals to correct, so that excellent gene segments are reserved as much as possible, the genetic algorithm has more pertinence to service deployment, and the performance and cost performance of a final service deployment scheme are improved.
Drawings
The invention will now be described by way of example and with reference to the accompanying drawings in which:
FIG. 1 is one embodiment of a process for obtaining an optimal service deployment scenario based on a genetic algorithm.
FIG. 2 is one embodiment of an architecture of the service deployment system of the present invention.
Fig. 3 is a comparative example of the optimization effect of the inventive protocol versus the baseline method.
Fig. 4 is a time comparative example of the inventive protocol versus the baseline method.
Detailed Description
All of the features disclosed in this specification, or all of the steps in a method or process disclosed, may be combined in any combination, except for mutually exclusive features and/or steps.
Any feature disclosed in this specification (including any accompanying claims, abstract) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise. That is, each feature is one example only of a generic series of equivalent or similar features, unless expressly stated otherwise.
Example 1
The service deployment method under the edge environment based on the improved genetic algorithm comprises three parts:
(1) Chromosome coding and initialization part
The part utilizes a service deployment matrix to represent a deployment scheme of service instance deployment of various services on various edge servers. The service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by an edge server. And generating an initialization population according to a preset population scale by taking the service deployment matrix as a chromosome coding mode.
Specifically, this section needs to process the service deployment scenario in order to input it into the genetic algorithm. As a design constraint on the service deployment method, attribute information and related parameters (collectively referred to as system information) of the edge computing system need to be acquired first, including the service request size and the average processing speed of each service when deploying a single instance; edge computing network edge environment connection topological graph, average transmission rate of each link and preset request transmission path-finding algorithm; the average request quantity, the wireless transmission rate of the access point and the like in various service unit time of the access point. In some embodiments, the attribute information and parameters used are shown in table 1.
Table 1 data parameter description table
In this embodiment, various services in the edge computing system are represented as a service setThe set of edge servers that can deploy service instances is denoted/>Because the service deployment matrix is a concatenation of the resource allocation vectors, that is, the resource allocation vector of each edge server is a concatenation unit in the service deployment matrix, in the present invention, an "edge server h" is used to represent any edge server in the edge server set, and the subscript is omitted, so that the complexity of the expression of the related parameters and formulas can be omitted. Wherein service set/>Is/are of any kind of serviceCan be at any edge server/>, in HA service instance is deployed and started. If service set/>W-class services/>At edge server/>On which a service instance is deployed, then at that edge server/>Corresponding services/>, in the resource allocation vector of (a)And the position of the edge server is represented by 1, otherwise, the position of the edge server is represented by 0, in this way, the resource allocation vector of each edge server can be obtained, and the resource allocation vectors of all edge servers are spliced according to columns, so that the service deployment matrix can be usedTo represent a service deployment scenario for the system service instance, wherein/>Representing the number of categories of service,/>Representing the number of edge servers.
Since genetic algorithms require the decoding of a problem into a set of numbers from 0 to 1, they are referred to as chromosomes in genetic algorithms. Chromosomes carry all the genetic information of an individual in biology, so a chromosome can also be referred to as an individual. The above steps represent the service deployment scheme as a binary service deployment matrixTherefore, the service deployment matrix can be directly used as a chromosome coding mode.
After determining the chromosome coding, the genetic algorithm requires an initial population. Based on the entered population sizeWhen the number of chromosomes in the current population is lower than the population scale, generating new chromosomes by a random chromosome coding mode, adding the new chromosomes into the current population until the number of the chromosomes reaches the population scale, and obtaining an initialized population.
(2) Performance and cost assessment portion of a service deployment scenario
The part constructs an objective function according to the performance index and the cost index of service deployment, and sets constraint conditions of the objective function. The performance index is average request processing time delay, and the cost index consists of budget surplus and system balance benefit.
In this embodiment, according to three constituent phases of the mobile device request lifecycle, the average request processing delay of the edge computing system is calculated and used as the performance index of the edge computing system.
1) And a wireless transmission stage.
When an access pointSurrounding access devices (i.e. mobile devices)Q/s service request rate issue for service/>Access device and access point/>, upon service request ofWireless transmission phase time cost between/>It can be calculated as:
Wherein, Represents the/>Class services/>Data size of one service request of/>Is the access point/>Is used for the average radio transmission rate of (a).
2) A request routing phase.
Service request from access pointThe node path that needs to be passed in the process of flowing to the target edge server is expressed as:
representation of services/> From access point/>Number of nodes in the path of nodes (i.e., edge servers) that flow to the target edge server,/>Representing the i-th node in the node path,/>
The cost of the time of the request routing phase of the entire routing processIt can be calculated as:
Wherein, Representing nodes/>Average data transfer rate between/(
3) And a service execution stage.
When the target edge server receives the service request, its corresponding service instance will begin the request processing procedure. Suppose a class w serviceThe average processing speed of the service instance of (a) in the allocation of unit resources is/>Service execution time cost/>It can be calculated as:
Service request overall lifecycle By wireless transmission phase time cost/>Request routing phase time cost/>And service execution phase time cost/>And (3) summing to obtain:
Average request processing latency for an entire edge computing system It can be calculated as:
Wherein, Represents a set of access points, and/>It has been said hereinbefore that access points/>, are representedAccess device to service/>Service request rate of (i.e. access point/>)For service/>The number of requests received is averaged over a unit time of (a).
For the service deployment scheme, in addition to considering the performance of the edge computing system, the deployment cost of the system is also considered in the invention. As previously mentioned, the cost index of an edge computing system consists of budget surplus and system balance revenue.
1) Budget surplus.
Budget surplus, i.e., the difference between the budget and deployment costs of edge device resources used by an edge computing system. In this embodiment, using a linear pricing model to calculate the cost spent allocating resources for a service instance, then the budget is surplusThe calculation method of (1) is as follows:
Wherein, Is a service/>Unit cost of deploying a service instance,/>From table 1, it can be seen that the edge server h allocates resources to services/>Is a representation vector of (c).
2) System balance benefit.
Unnecessary resource waste is caused by unbalance of resource allocation, and cost is wasted. Therefore, the system balance benefit is considered as a cost index in the present embodiment.
Defining system balance benefitsThe calculation method of (1) is as follows:
Wherein, ,/>Representing the variance.
According to the performance index and cost index of service deployment, in the embodiment, an objective function for the purpose of total optimization is constructed
Wherein,And/>The two weight parameters are respectively settable parameters, and the calculated objective function value can be more reliable by adjusting the two weight parameters.
In addition, constraint conditions of the objective function are set:
constraint one: . Wherein/> Representing the total available resources of the edge server h. I.e. constraint that a sum of service instances representing the deployment of an edge server h cannot exceed the total available resources of the edge server h.
Constraint II: . I.e. each service is provided with at least one service instance to prevent that a certain type of service request cannot be handled.
Through the design of the part, a mathematical model of the optimized service deployment scheme can be obtained.
(3) Optimal deployment scenario acquisition section based on improved genetic algorithm
The part selects a feasible solution population from the initialized population according to the constraint condition, uses each chromosome in the feasible solution population as an individual, calculates a performance index and a cost index of service deployment by using the chromosome, obtains an objective function value, and uses the reciprocal of the objective function value as the fitness of the individual. Selecting individuals to be transferred to the next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals, generating new individuals to be transferred to the next generation population, and performing illegal solution correction on the individuals which are obtained by the crossover operation and the mutation operation and do not meet the constraint conditions. And selecting a feasible solution population from the next generation population according to the constraint condition, and circulating (namely repeatedly executing the processes of calculating the fitness of the individuals in the feasible solution population and the follow-up processes) until the set genetic algebra is reached. And finally, selecting the chromosome with the greatest fitness from all feasible solutions for service deployment.
The service deployment matrix is taken as a solution of the problem in the genetic algorithm, and the service deployment scheme meeting the two constraints is called a feasible solution. Before the genetic algorithm is executed, it is necessary to set the maximum genetic algebra (i.e., evolution algebra), crossover probability, mutation probability, and the like.
In the initialized population, selecting individuals meeting the constraint conditions according to the constraint conditions to construct a feasible solution population. In some embodiments, randomly generated chromosomes in the initializing population (i.e., the service deployment matrix) are all feasible solutions, i.e., the initializing population is a feasible solution population. As shown in FIG. 1, for each service deployment matrix in a feasible solution population, the columns of the service deployment matrix are connected to form a real number encoded chromosome by constructing an objective functionSolving the objective function value, and using the reciprocal of the objective function value/>As fitness of the individual to participate the chromosome in a subsequent genetic process. And selecting individuals according to the fitness and inheriting the individuals to the next generation population, wherein the selected rules are similar to the traditional genetic algorithm, and one or more individuals with the greatest fitness are selected. In addition, the selected individuals are subjected to crossover operation and mutation operation, and new individual genetic transmission to the next generation population is generated. In the new individuals obtained by the crossover operation and the mutation operation, there may be a service deployment scheme which does not satisfy the constraint condition, the individuals are discarded according to the traditional genetic algorithm, but it is found through research that some excellent gene fragments may also exist in the individuals which do not satisfy the constraint condition, namely, deployment of part of service examples in the service deployment scheme is still excellent, and considering this, the original genetic algorithm is improved, and illegal solution correction is performed on the individuals which do not satisfy the constraint condition obtained by the crossover operation and the mutation operation. And selecting a feasible solution population from the next generation population according to the constraint condition, and circulating until the set genetic algebra is reached. And finally, selecting the chromosome with the greatest fitness from all feasible solutions for service deployment.
The illegal solution correction includes two steps: illegal service deployment culling and service instance migration.
The illegal service deployment and rejection steps are as follows: service instances exceeding the total available resources of the deployed edge servers in individuals who do not meet the constraint condition are removed. For example, in some embodiments, service instances that exceed the maximum capacity of the MEC (Mobile Edge Computing ) system are culled from new individuals that do not meet the constraints resulting from the crossover and mutation operations to correct the individual so that the total resource constraint of the service deployment aggregate is met.
The illegal service deployment and rejection step ensures that the total service instance does not exceed the upper limit of the system, and after that, the rejected service instance needs to be redeployed to a proper edge server, so that the service instance migration step is executed: and redeploying the rejected service instance to an idle edge server. This step inputs the service deployment matrixAnd instance bearer upper limit/>, of each edge serverConstraint/>, by redeploying service instances beyond the upper limit to edge servers with free spaceIs satisfied again.
The modification method aims at the service deployment problem of the edge computing system, improves the genetic algorithm, adds two modification process algorithms, and enhances the exploratory property of the genetic algorithm for the problem.
Example 2
The embodiment corresponds to embodiment 1, and introduces a service deployment system under an edge environment based on an improved genetic algorithm, and as shown in fig. 2, the system includes a chromosome coding and initializing module, a performance and cost evaluation module, and an optimal deployment scheme obtaining module, which correspond to the three parts in embodiment 1 respectively.
Specifically, there are:
The chromosome encoding and initialization module is configured to:
The method comprises the steps that a service deployment matrix is used for representing a deployment scheme of service instance deployment of various services on various edge servers, wherein the service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by one edge server; using a service deployment matrix as a chromosome coding mode, and generating an initialization population according to a preset population scale;
The performance and cost assessment module is configured to:
receiving configuration of an objective function and constraint conditions, wherein the objective function is constructed based on performance indexes and cost indexes of service deployment, the performance indexes are average request processing time delay, and the cost indexes consist of budget surplus and system balance benefits;
the optimal deployment scenario acquisition module is configured to:
Selecting a feasible solution population from the initialized population according to constraint conditions, taking each chromosome in the feasible solution population as an individual, calculating a performance index and a cost index of service deployment by using the chromosome, solving an objective function value, and taking the reciprocal of the objective function value as the fitness of the individual; selecting individuals to inherit to a next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals to generate new individuals to inherit to the next generation population, performing illegal solution correction on the individuals which are obtained by crossover operation and do not meet constraint conditions, and selecting a feasible solution population from the next generation population according to the constraint conditions, so as to circulate until a set genetic algebra is reached; and finally, selecting the chromosome with the maximum fitness as an optimal service deployment strategy to deploy the service.
As another key point of the present invention, in some embodiments, the optimal deployment solution obtaining module performs illegal solution correction on the individual that does not satisfy the constraint condition, which is obtained by the crossover operation, according to the following configuration:
Removing service instances exceeding total available resources of the deployed edge servers in individuals which do not meet the constraint conditions; and redeploying the rejected service instance to an idle edge server.
The specific configuration schemes of the chromosome coding and initializing module, the performance and cost evaluation module, and the optimal deployment scheme obtaining module may correspond to the technical features described in the three parts in embodiment 1, and are not described herein.
Example 3
The embodiment performs performance verification on the design scheme of the invention. The service deployment scheme designed by the invention is represented by GA4CBST, the following representative heuristic algorithms are selected as a baseline method in the embodiment, and the performance test is carried out by comparing the GA4CBST of the invention:
1) Original genetic algorithm GA. GA is a meta heuristic algorithm inspired by the natural selection process, solving the optimization problem by simulating population evolution. The algorithm uses fitness functions to evaluate the population or individuals whose functions describe the fitness of the organisms in the population to the environment, and the GA will iteratively select and save those individuals that are highly fitness.
2) Artificial fish swarm algorithm AFSA. AFSA is a population-based gradient-free algorithm for solving the complex problem of nonlinearity. The main idea of AFSA is that the water area where fish live is similar to the solution space of the target problem, searching for the optimal solution is just as if fish were looking for food in the water. In general, fish can find food by looking at the environment alone or following others, and in this way obtain an optimal solution.
3) Particle swarm optimization algorithm PSO. The PSO algorithm is also a population-based algorithm, the population of which consists of a number of particles. Based on the current position and velocity of these particles, they are moved in the search space, eventually the particles will reach the optimal position and find the optimal solution.
4) The differential evolution algorithm DE. DE is a population-based meta-heuristic iterative search algorithm that solves a non-convex optimization problem. Unlike traditional real number coding genetic algorithms and evolutionary strategies, DE uses mandatory self-directed variation on its population members, each of which is interfered by the proportional differences of the current generation individuals.
Fig. 3 shows a plot of the change in objective function using the method of the present invention versus the four baseline methods described above in the same configuration. It is evident from this figure that GA4CBST has significant advantages over the baseline approach as populations evolve iteratively. The main reason is that the GA4CBST has better exploration capability compared with other baseline algorithms, through the crossover operation, the mutation operation and the illegal solution correction process designed by the invention, solutions which are excellent but not in compliance with constraint conditions in a plurality of iterative processes are reserved, and the characteristics provide more opportunities for the GA4CBST to find the optimal solution, so that the GA4CBST can evolve to 79 th generation, and most of other baseline methods generate convergence solutions around 25 th generation.
The objective function determined by the inventionIs an integration of related system metrics including budget surplus, system balance benefit and average request processing delay, so separate inspection of these metrics is also required. The results are shown in Table 2. It can be seen that the budget surplus index of the GA4CBST is 12.4% higher than the optimal baseline method, and the system balance gain and the average request processing delay are relatively similar, with the system balance gain and the average request processing delay of the GA4CBST being only 1.39% and 1.62% worse than the optimal baseline method. In summary, the improved genetic algorithm GA4CBST approach proposed by the present invention achieves a more balanced operating environment with minimal cost compared to the baseline approach, while its average time cost is within an acceptable range.
Table 2 System Each index is compared before and after optimization
The complex operators designed to correct solutions that exceed the constraints bring additional computation, so the run time of the GA4CBST will be slightly increased over the original GA approach. In fig. 4, the time it takes for GA4CBST and other baseline methods to approach the optimal solution step by step during iterative evolution is shown. As can be seen from FIG. 4, the run time curve of GA4CBST is located above the run time curve of GA compared to the original GA method, which means that GA4CBST requires more time to generate a product with the sameAnd (5) solving the value. However, this cost is acceptable because when both curves reach 60% of the optimal solution, i.e. the best value that can be achieved by the GA method, they almost intersect, which means that GA4CBST can take as much time as it costs to reach the best optimization of the baseline method, but if a better optimization is desired, GA4CBST is the only optimization method that can break through the upper limit of 60%.
The invention is not limited to the specific embodiments described above. The invention extends to any novel one, or any novel combination, of the features disclosed in this specification, as well as to any novel one, or any novel combination, of the steps of the method or process disclosed.

Claims (10)

1. The service deployment method under the edge environment based on the improved genetic algorithm is characterized by comprising the following steps:
The method comprises the steps that a service deployment matrix is used for representing a deployment scheme of service instance deployment of various services on various edge servers, wherein the service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by one edge server; generating an initialization population according to a preset population scale by taking the service deployment matrix as a chromosome coding mode;
constructing an objective function according to performance indexes and cost indexes of service deployment, and setting constraint conditions of the objective function; the performance index is average request processing time delay, and the cost index consists of budget surplus and system balance benefit;
Selecting a feasible solution population from the initialized population according to the constraint condition, taking each chromosome in the feasible solution population as an individual, calculating a performance index and a cost index of service deployment by using the chromosome, solving an objective function value, and taking the reciprocal of the objective function value as the fitness of the individual; selecting individuals to inherit to a next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals to generate new individuals to inherit to the next generation population, performing illegal solution correction on the individuals which are obtained by the crossover operation and the mutation operation and do not meet the constraint conditions, and selecting a feasible solution population from the next generation population according to the constraint conditions, so as to circulate until a set genetic algebra is reached; final selection with maximum fitness is subjected to service deployment.
2. The method for service deployment in an edge environment based on an improved genetic algorithm according to claim 1, wherein said constructing an objective function with performance index and cost index of service deployment and setting constraint conditions of said objective function comprises:
The construction objective function is as follows:
Wherein, For objective function value,/>For average request processing latency,/>For budget surplus,/>For system balance benefit,/>And/>Respectively settable parameters;
the constraint conditions of the objective function are set as follows:
constraint one: Wherein/> Representing that edge server h allocates resources to services/>Is a representation vector of (1), S represents a service set,/>Representing class w services in a service set S,/>Representing the total available resources of the edge server h;
Constraint II:
3. The service deployment method in the edge environment based on the improved genetic algorithm as claimed in claim 2, wherein the calculation method of the average request processing delay is:
Wherein, Representing access point/>For service/>Average number of requests received per unit time,/>Representing access point/>Bearer related to service/>Service request total lifecycle,/>Representing a set of access points.
4. The improved genetic algorithm-based service deployment method in edge environment of claim 3 wherein said service request total lifecycle is derived from a sum of wireless transmission phase time cost, request routing phase time cost, and service execution phase time cost, wherein:
wireless transmission phase time cost The calculation method of (1) is as follows:
Wherein, Represents the/>Class services/>Data size of one service request of/>Representing access point/>Is determined based on the average radio transmission rate of (a);
request routing phase time cost The calculation method of (1) is as follows:
Wherein, Representation of services/>From access point/>Node path/>, through which flows to target edge serverNumber of middle nodes,/>Representing nodes/>Average data transfer rate between/(
Service execution phase time costThe calculation method of (1) is as follows:
Wherein, Representing class w services/>Average processing speed of service instances in allocating unit resources.
5. The improved genetic algorithm based edge environmenta service deployment method of claim 2, wherein said budget surplusThe calculation method of (1) is as follows:
Wherein, Is a service/>Unit cost for deploying a service instance, H represents the edge server set,/>Representing the number of edge servers.
6. The improved genetic algorithm based edge environmenta service deployment method of claim 5, wherein said system balances revenueThe calculation method of (1) is as follows:
Wherein, ,/>Representing the variance.
7. The service deployment method in the edge environment based on the improved genetic algorithm as claimed in claim 1 or 2, wherein the method of illegally solving the correction comprises:
Removing service instances exceeding total available resources of the deployed edge servers in individuals which do not meet the constraint conditions;
And redeploying the rejected service instance to an idle edge server.
8. The service deployment method under the edge environment based on the improved genetic algorithm according to claim 1, wherein the generating an initialization population according to a preset population scale by using the service deployment matrix as a chromosome coding mode comprises:
and taking the service deployment matrix as a chromosome coding mode, generating new chromosomes continuously through a random chromosome coding mode when the number of the chromosomes in the current population is lower than the population scale according to the preset population scale, and adding the new chromosomes into the current population until the number of the chromosomes reaches the population scale, so as to obtain an initialized population.
9. The service deployment system under the edge environment based on the improved genetic algorithm is characterized by comprising a chromosome coding and initializing module, a performance and cost evaluation module and an optimal deployment scheme acquisition module; wherein:
the chromosome encoding and initialization module is configured to:
The method comprises the steps that a service deployment matrix is used for representing a deployment scheme of service instance deployment of various services on various edge servers, wherein the service deployment matrix is formed by splicing a plurality of resource allocation vectors according to columns, and each resource allocation vector is a representation vector for allocating resources to various services by one edge server; generating an initialization population according to a preset population scale by taking the service deployment matrix as a chromosome coding mode;
the performance and cost assessment module is configured to:
Receiving configuration of an objective function and constraint conditions, wherein the objective function is constructed based on performance indexes and cost indexes of service deployment, the performance indexes are average request processing time delay, and the cost indexes consist of budget surplus and system balance benefits;
the optimal deployment scenario acquisition module is configured to:
Selecting a feasible solution population from the initialized population according to the constraint condition, taking each chromosome in the feasible solution population as an individual, calculating a performance index and a cost index of service deployment by using the chromosome, solving an objective function value, and taking the reciprocal of the objective function value as the fitness of the individual; selecting individuals to inherit to a next generation population according to the fitness, performing crossover operation and mutation operation on the selected individuals to generate new individuals to inherit to the next generation population, performing illegal solution correction on the individuals which are obtained by crossover operation and do not meet the constraint conditions, and selecting a feasible solution population from the next generation population according to the constraint conditions, so as to circulate until a set genetic algebra is reached; the chromosome with the greatest fitness is finally selected for service deployment.
10. The improved genetic algorithm-based edge environment service deployment system according to claim 9, wherein the optimal deployment scenario acquisition module performs illegal solution correction on individuals not meeting the constraint conditions obtained by the crossover operation according to the following configuration:
Removing service instances exceeding total available resources of the deployed edge servers in individuals which do not meet the constraint conditions;
And redeploying the rejected service instance to an idle edge server.
CN202410459145.1A 2024-04-17 2024-04-17 Service deployment method and system under edge environment based on improved genetic algorithm Active CN118101500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410459145.1A CN118101500B (en) 2024-04-17 2024-04-17 Service deployment method and system under edge environment based on improved genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410459145.1A CN118101500B (en) 2024-04-17 2024-04-17 Service deployment method and system under edge environment based on improved genetic algorithm

Publications (2)

Publication Number Publication Date
CN118101500A true CN118101500A (en) 2024-05-28
CN118101500B CN118101500B (en) 2024-06-25

Family

ID=91144296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410459145.1A Active CN118101500B (en) 2024-04-17 2024-04-17 Service deployment method and system under edge environment based on improved genetic algorithm

Country Status (1)

Country Link
CN (1) CN118101500B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588318A (en) * 2004-09-16 2005-03-02 上海交通大学 Application server sample pool dynamic configuration method based on real number coding genetic calculation
US20070005522A1 (en) * 2005-06-06 2007-01-04 Wren William E Resource assignment optimization using direct encoding and genetic algorithms
CN113672295A (en) * 2021-07-05 2021-11-19 桂林理工大学 Collaborative computing unloading method based on genetic algorithm in mobile cloud environment
CN115834386A (en) * 2022-11-04 2023-03-21 北京沐融信息科技股份有限公司 Intelligent service deployment method, system and terminal for edge computing environment
CN117196020A (en) * 2023-10-07 2023-12-08 大连工业大学 Conflict resolution method based on improved genetic algorithm

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588318A (en) * 2004-09-16 2005-03-02 上海交通大学 Application server sample pool dynamic configuration method based on real number coding genetic calculation
US20070005522A1 (en) * 2005-06-06 2007-01-04 Wren William E Resource assignment optimization using direct encoding and genetic algorithms
CN113672295A (en) * 2021-07-05 2021-11-19 桂林理工大学 Collaborative computing unloading method based on genetic algorithm in mobile cloud environment
CN115834386A (en) * 2022-11-04 2023-03-21 北京沐融信息科技股份有限公司 Intelligent service deployment method, system and terminal for edge computing environment
CN117196020A (en) * 2023-10-07 2023-12-08 大连工业大学 Conflict resolution method based on improved genetic algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HONGYUE WU等: "Service Selection for Composition in Mobile Edge Computing Systems", 《2018 IEEE INTERNATIONAL CONFERENCE ON WEB SERVICES (ICWS)》, 6 September 2018 (2018-09-06) *
刘阳: "基于边缘计算的电力物联网任务分配系统设计与实现", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, no. 3, 15 March 2024 (2024-03-15), pages 042 - 1478 *
贾万睿: "基于移动边缘计算的任务协同卸载策略", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 7, 15 July 2020 (2020-07-15), pages 136 - 486 *

Also Published As

Publication number Publication date
CN118101500B (en) 2024-06-25

Similar Documents

Publication Publication Date Title
Kuang et al. Offloading decision methods for multiple users with structured tasks in edge computing for smart cities
CN112512056B (en) Multi-objective optimization calculation unloading method in mobile edge calculation network
Maia et al. An improved multi-objective genetic algorithm with heuristic initialization for service placement and load distribution in edge computing
CN110968426B (en) Edge cloud collaborative k-means clustering model optimization method based on online learning
CN113918240B (en) Task unloading method and device
CN112784362A (en) Hybrid optimization method and system for unmanned aerial vehicle-assisted edge calculation
CN114585006B (en) Edge computing task unloading and resource allocation method based on deep learning
Wang et al. Reputation-enabled federated learning model aggregation in mobile platforms
CN111694664A (en) Calculation unloading distribution method of edge server
Li et al. Load balancing edge server placement method with QoS requirements in wireless metropolitan area networks
CN111488528A (en) Content cache management method and device and electronic equipment
Ebrahim et al. A deep learning approach for task offloading in multi-UAV aided mobile edge computing
CN113992677A (en) MEC calculation unloading method for delay and energy consumption joint optimization
Li et al. Multi-edge collaborative offloading and energy threshold-based task migration in mobile edge computing environment
Li et al. DQN-enabled content caching and quantum ant colony-based computation offloading in MEC
Zhang et al. Effective multi-controller management and adaptive service deployment strategy in multi-access edge computing environment
Zou et al. ST-EUA: Spatio-temporal edge user allocation with task decomposition
CN118101500B (en) Service deployment method and system under edge environment based on improved genetic algorithm
El Gaily et al. Constrained quantum optimization for resource distribution management
Afzal et al. Optimum bandwidth allocation in wireless networks using differential evolution
CN111047040A (en) Web service combination method based on IFPA algorithm
CN115361453B (en) Load fair unloading and migration method for edge service network
CN114785692A (en) Virtual power plant aggregation regulation and control communication network flow balancing method and device
CN112988275A (en) Task perception-based mobile edge computing multi-user computing unloading method
CN112579246B (en) Virtual machine migration processing method and device

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