CN117201319B - Micro-service deployment method and system based on edge calculation - Google Patents

Micro-service deployment method and system based on edge calculation Download PDF

Info

Publication number
CN117201319B
CN117201319B CN202311461056.2A CN202311461056A CN117201319B CN 117201319 B CN117201319 B CN 117201319B CN 202311461056 A CN202311461056 A CN 202311461056A CN 117201319 B CN117201319 B CN 117201319B
Authority
CN
China
Prior art keywords
micro
service
group
deployment
memory pool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311461056.2A
Other languages
Chinese (zh)
Other versions
CN117201319A (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.)
Three Gorges High Technology Information Technology Co ltd
Huazhong University of Science and Technology
Original Assignee
Three Gorges High Technology Information Technology Co ltd
Huazhong University of Science and Technology
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 Three Gorges High Technology Information Technology Co ltd, Huazhong University of Science and Technology filed Critical Three Gorges High Technology Information Technology Co ltd
Priority to CN202311461056.2A priority Critical patent/CN117201319B/en
Publication of CN117201319A publication Critical patent/CN117201319A/en
Application granted granted Critical
Publication of CN117201319B publication Critical patent/CN117201319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to a micro-service deployment method and a micro-service deployment system based on edge calculation, wherein the method comprises the following steps: forming a plurality of micro services into micro service group clusters, and forming a memory pool; calculating an evaluation function through the interrelationship of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool; deploying the one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group; optimizing the deployed micro service group based on a variable neighborhood search algorithm, and adding the deployed micro service group into a memory pool; repeating the steps, and continuously iterating the memory pool to obtain a final deployment scheme. According to the invention, deployment is performed through micro-service clustering and greedy heuristic, the deployment scheme is evaluated through the request routing result, and then through continuous memorization and optimization, the network delay and energy consumption are reduced, massive requests are handled, and the application experience of users is improved.

Description

Micro-service deployment method and system based on edge calculation
Technical Field
The invention belongs to the technical field of cloud service and edge computing, and particularly relates to a micro-service deployment method and system based on edge computing.
Background
With the development of the internet of things and 5G technology, more and more application scenes need to process a large amount of data in real time. In such a context, edge computing techniques have evolved. The edge calculation is a distributed calculation model, and the calculation resources and the application programs are placed on edge equipment close to a data source as much as possible, so that the data request can be responded more quickly, the data transmission delay and network congestion are reduced, and the efficiency and the performance of the system are improved. Therefore, the method is widely applied to the fields of Internet of things, intelligent home, automatic driving vehicles and the like.
Considering that the resources of the edge server are difficult to meet the requirements of the traditional single software, various large manufacturers are turning to the micro-service architecture. The core of the micro-service architecture is to reconstruct the application program into a series of small, independent and interconnected micro-services without changing the application functions. Each microservice is concerned only with accomplishing one specific business function and interacting through a unified communication specification. These features of the micro-service architecture greatly reduce the workload of development and operation personnel, and at the same time, bring a high degree of flexibility and reusability, making updating easier. With container-based technology, micro-service based applications can be easily deployed on edge servers. However, the micro-service architecture also increases the complexity of the system, the micro-services are various, each micro-service has multiple instances, and how to deploy the instances and distribute the requests among the instances becomes a key problem for restricting the development of the micro-services.
There are many documents currently developing research for edge computing architecture, most of which focus on computing and offloading issues and are not directly applicable to micro-service architecture. Part of work is developed for the micro-service deployment problem, but only coarse-grained resource allocation is concerned, complex dependency relations among micro-services are ignored, and a large amount of resource waste can be caused. The uniqueness of the edge computing architecture is ignored in the research, the deployment algorithm of the micro-service in the cloud computing center is directly applied, only the time consumption caused by computing resources is considered, and the higher communication time delay and the limited bandwidth between the edge servers are not considered, but in practice, the micro-service with the dependency relationship is deployed on the same edge server, so that the network congestion probability can be greatly reduced, and the user service experience is greatly improved.
Disclosure of Invention
In order to solve the problems of high resource consumption and high delay of high concurrency massive user requests reaching an edge node, the first aspect of the invention provides a micro-service deployment method based on edge computing, which comprises the following steps: forming one or more micro-service groups from the plurality of micro-services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups; determining and calculating an evaluation function through the interrelationship of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool; deploying the one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group; optimizing the deployed micro service group based on a variable neighborhood search algorithm, and adding the optimized micro service group into a memory pool; repeating all the steps, and iterating the memory pool until the iteration times reach a threshold value to obtain a final deployment scheme.
In some embodiments of the present invention, said determining and calculating an evaluation function by means of the microservice correlations within each microservice group comprises: determining an evaluation function based on the data transmission amount of each micro service and the number of the micro services; the evaluation function is calculated.
Further, the evaluation function is expressed as:
wherein: c (r) represents an evaluation function,is the amount of data traffic for all of the microservices in each set of microservices,indicating that the data transmission amount after intra-group transmission is ignored, < >>Representing the number of co-chain micro services; />、/>Respectively representing the weight factors of the data quantity and the micro-service quantity in the evaluation function; />、/>The pre-cluster and post-cluster delays for each set of microservices are represented, respectively.
In some embodiments of the present invention, the optimizing the deployed micro service group based on the variable neighborhood search algorithm, and adding the optimized micro service group to the memory pool includes: determining a plurality of operators of the neighborhood according to the number of instances and the deployment position change of each micro service; optimizing the deployed micro-service group according to a plurality of operators of the neighborhood and a greedy algorithm, and adding the optimized micro-service group into a memory pool.
In some embodiments of the present invention, the deploying the one or more micro service groups after the adjusting based on the computing resources and the total latency required for each micro service group comprises: sorting the microservices in the memory pool after the iteration is completed based on the computing resources required by each microservices group; selecting the micro-service group with the highest grading function value from the sorting result, and determining one or more groups of servers matched with the resource requirements; and calculating the total time delay of one or more groups of servers of each micro-service group in the memory pool, and selecting a group of servers with the minimum total time delay to deploy the corresponding micro-service group.
Further, if the selected microservices group cannot find one or more groups of servers meeting the resource requirements, then: one or more micro-services will be pruned from the set of micro-services that require the most computing resources until one or more sets of servers are found that meet the resource requirements.
In a second aspect of the present invention, there is provided a micro-service deployment system based on edge computing, comprising: a clustering module for forming one or more micro-service groups from the plurality of micro-services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups; the adjustment module is used for determining and calculating an evaluation function through the interrelationship of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool; the adjustment module is used for deploying one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group; the optimization iteration module is used for optimizing the deployed micro-service group based on a variable neighborhood search algorithm and adding the optimized micro-service group into the memory pool; and iterating the memory pool through the clustering module, the adjusting module and the deployment module until the iteration times reach a threshold value, so as to obtain a final deployment scheme.
In a third aspect of the present invention, there is provided an electronic apparatus comprising: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are enabled to realize the micro-service deployment method based on edge calculation provided by the first aspect of the invention.
In a fourth aspect of the present invention, there is provided a computer readable medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the edge-computing-based micro-service deployment method provided in the first aspect of the present invention.
The beneficial effects of the invention are as follows:
the invention comprehensively considers the service dependence and the edge system heterogeneous type, and simultaneously solves the micro service deployment problem and the user request routing problem. Specifically, the invention considers that the micro-service clusters with correlation are deployed by adopting greedy heuristic, cross-server call is reduced, the response time delay obtained by calculating the request routing result is used as an evaluation standard to evaluate the example deployment scheme, and the solution is repeatedly constructed according to the micro-service groups selected from the memory pool to be continuously optimized. The network delay and the energy consumption are reduced, massive requests are processed, and the application experience of users is improved.
Drawings
FIG. 1 is a basic flow diagram of a micro-service deployment method based on edge computation in some embodiments of the invention;
FIG. 2 is a schematic diagram of an edge computing network architecture in accordance with some embodiments of the present invention;
FIG. 3 is a schematic diagram of micro service deployment and request routing in some embodiments of the present invention;
FIG. 4 is a particular flow diagram of a micro-service deployment method based on edge computing in some embodiments of the invention;
FIG. 5 is a schematic diagram of a micro-service deployment system based on edge computing in some embodiments of the present invention;
fig. 6 is a schematic structural diagram of an electronic device in some embodiments of the invention.
Detailed Description
The principles and features of the present invention are described below with reference to the drawings, the examples are illustrated for the purpose of illustrating the invention and are not to be construed as limiting the scope of the invention.
It can be understood that the edge architecture includes a plurality of edge servers, the edge servers communicate with each other via optical cables, a plurality of micro services are deployed on the edge servers, and micro service chains with different functions are formed by combining different micro services, each micro service chain corresponds to a user request, and each micro service has a plurality of instances; and obtaining an optimal micro-service deployment and request routing scheme based on the micro-service deployment strategy and the routing request strategy in a joint optimization mode, wherein the micro-service deployment strategy comprises the steps of determining the specific number of each micro-service instance deployed on the server of the edge node and the deployment position of each micro-service instance on the server of the edge node, and the request routing strategy comprises the specific routing path of each user request among the servers of the edge node.
Referring to fig. 1 to 4, in a first aspect of the present invention, there is provided a micro service deployment method based on edge computing, including: s100, forming one or more micro service groups by a plurality of micro services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups; s200, determining and calculating an evaluation function through the interrelation of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool; s300, deploying one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group; s400, optimizing the deployed micro service group based on a variable neighborhood search algorithm, and adding the optimized micro service group into a memory pool; repeating all the steps S100-S300, and iterating the memory pool until the iteration times reach a threshold value to obtain a final deployment scheme.
It can be understood that the invention provides an edge computing network architecture, and provides a method for deploying micro-service examples and requesting routing in a network based on the network architecture, and designs an edge system network model composed of edge servers, wherein each edge server can run a certain number of micro-services in parallel through a containerization technology. The edge servers are communicated by optical cables and are connected with each other to form a communication graph. The examples of the multiple micro services are deployed on the servers of the edge nodes, and different combinations of the micro services form micro service chains with different functions; taking computing resources and bandwidth as constraints, and establishing a performance model of the total time delay of the system according to the queuing network; based on the model, a micro-service example deployment algorithm supporting various micro-service chains is designed, the algorithm is improved based on an adaptive memory planning algorithm, and a plurality of examples of various micro-services are dynamically deployed into a network. The invention comprehensively considers the service dependence and the edge system heterogeneous type, and simultaneously solves the micro service deployment problem and the user request routing problem. The deployment schemes described above include micro-services, routing of groups of micro-services on edge computing systems (groups of servers), topology, resource scheduling or allocation, and so forth.
Referring to fig. 2 and 3, in step S100 of some embodiments of the present invention, a plurality of micro services are formed into one or more micro service groups based on a clustering algorithm; a memory pool is formed from one or more micro-service groups. Specifically, the edge architecture includes a plurality of edge servers, the edge servers communicate with each other via optical cables, a plurality of micro services are deployed on the edge servers, and different micro service chains with different functions are formed by combining different micro services, each micro service chain corresponds to a user request, and each micro service has a plurality of instances.
More specifically, each edge server may run a number of micro-services in parallel through a containerization technique. Communication delay between micro services located in the same edge server is negligible. The edge servers are communicated by optical cables and are connected with each other to form a communication graph. The micro service is different from the conventional service in that the micro service divides an application program into a plurality of modules with specific functions, and the modules cooperate with each other to jointly complete a user request. To ensure quality of service, each microservice has multiple instances from which a user request can choose to fulfill its own needs. The micro services are combined into a linear chain, namely a micro service chain, according to a certain sequence, wherein one micro service chain corresponds to one user request. After the user request reaches the system, a corresponding micro service chain can be found according to the function of the requirement, and the micro service is sequentially accessed according to the composition of the micro service chain so as to complete the requirement of the user.
It can be understood that a queuing network model of resource constraint is established based on the network architecture provided by the invention; each micro-service having a plurality of instances, the micro-service instance deployment policy including determining a specific number of individual micro-service instances and a deployment location of the individual micro-service instances on a server of the edge node; the user request routing policy includes designing a specific routing path for the request between servers; the resource limitation of the edge network and the dependence relation of the micro service are comprehensively considered by the micro service deployment and the user request routing strategy, and the two problems are optimized in continuous iteration so as to obtain the optimal micro service deployment and request routing scheme, and the system long-term average time delay is minimized and massive user requests can be borne under the condition of meeting certain constraint.
Thus, in some embodiments of the present invention, the micro service deployment and request routing policy includes: optimal micro-service deployment and request routing scheme based on self-adaptive memory planning algorithm.
It can be understood that fig. 4 is a flowchart of a micro service deployment and request routing method, and referring to fig. 4, for the micro service deployment and request routing problem, the present invention adopts an algorithm based on adaptive memory planning to obtain a corresponding solution. The micro service instance deployment algorithm flow is as follows:
algorithm 1: AMP-based micro-service deployment algorithm:
input: micro service set M, server set I, iteration number
And (3) outputting: microservice deployment results
1.
2. Initializing a memory pool Z;
3. when (when)Performing:
4. sorting the micro-service groups in the memory pool according to the evaluation function;
5. selecting r groups of micro-services from the memory pool Z with probability;
6. using heuristic algorithm to deploy micro service group to obtain solution S;
7. the generated new solution is improved by adopting variable neighborhood search to obtain
8. If it isOr->Then;
9.
10. usingUpdating the memory pool Z;
11. ending the cycle;
12. return to
The flow of the algorithm is as follows:
a. clustering the micro services to form different micro service groups, and initializing a memory pool. These combinations are not detachable at deployment time to reduce cross server communication or queuing delay;
b. based on the interrelationship of micro services in the micro service group, an evaluation function is calculatedAnd sorting the microservices groups in descending order;
c. selecting a micro service group according to the probability to construct a solution;
d. executing a deployment algorithm on the selected solution and the single micro-service not in the solution to obtain a micro-service deployment scheme;
e. the solution is improved by using a variable neighborhood search algorithm, and compared with an optimal solution, and the solution with the minimum overall average time delay is selected as the optimal solution;
f. using the improved solution to form a new microservice group to update the memory pool;
g. repeatedly executing b-f until the iteration number reaches the maximum iteration number
h. And selecting the optimal solution return as a final micro-service deployment scheme.
It is understood that the memory pool initialization can be accomplished by the following steps. To create aThe initial solution that is feasible is that we first choose one micro-service at random, then choose to cluster multiple micro-services that are in the same micro-service chain or belong to the same micro-service, until the required computing resources of the set of micro-services reach Q for the first time, or when no neighboring micro-services are available, consider the set of micro-services to be full, and continue to choose other micro-services to cluster. Until all micro services are clustered and a complete solution is built. To diversify the solution, the above process iterates multiple times with random selection of micro services. Memory pool at most storesGroup microservices.
The computing resources required by the microservices can be estimated by the queue stability conditions. The request arrival rate of the micro service chain k is as followsThe request arrival rate of all micro-services on service chain k is +.>. If the service capability of the micro service a is +.>The number of examples is->The average latency calculated using the M/c/≡model may be used:
wherein,
assuming maximum possibleTolerant of delay ofThen the number of instances can be iteratively changed to calculate the +.>The minimum number of instances required may result in the computing resources required by the microservice a. The request streams may be combined in a queuing network according to the berk theorem and the linear additivity of poisson streams. Therefore, if the same micro service a in different micro service chains is clustered into a group, the request arrival rates can be directly added, and the total arrival rate is calculated and then calculated according to the above formula. The required computing resources of the micro service group are the sum of the resources required by all the micro services.
In step S200 of some embodiments of the present invention, determining and calculating the evaluation function by the microservice correlations within each microservice group includes:
s201, determining an evaluation function based on the data transmission quantity of each micro service and the quantity of the micro services; in particular, the number of data transmissions or micro-services based can be characterized by a number of different metrics, such as throughput, throughput rate of change, time delay or time delay change, etc.; and the number of micro services includes the type, number, total number or cluster number of micro services, etc.
S202, calculating the evaluation function.
Further, the evaluation function is expressed as:
wherein: c (r) represents an evaluation function,is the amount of data traffic for all of the microservices in each set of microservices,indicating that the data transmission amount after intra-group transmission is ignored, < >>Representing the number of co-chain micro services; />、/>Respectively representing the weight factors of the data quantity and the micro-service quantity in the evaluation function; />、/>The pre-cluster and post-cluster delays for each set of microservices are represented, respectively.
It will be appreciated that the first part of C (r) represents a reduction in the amount of transmitted data due to micro-service clustering on the same chain,is the data transmission amount of all the microservices in the set of microservices, and +.>Indicating that the data transmission amount after intra-group transmission is ignored, < >>Representing the number of co-chain micro-services. The second part represents the delay reduction due to the same micro-service cluster and is normalized. For the M/M/c/≡system, the multi-service platform combination helps to reduce queuing delay, thereby improving overall performance. Wherein the parameters->,/>Representing the weight factor. Thus, a good microservice group can simultaneously reduce queuing delay and reduce the amount of data transmitted.
It is appreciated that the AMP algorithm recognizes that components of high quality solutions can be used to construct other high quality solutions, and therefore, when choosing a microservice group to construct a solution, the higher the evaluation score, the higher the probability that a microservice will be selected. Can be represented by the following formula:
wherein the method comprises the steps ofRepresenting the size of the memory pool, i represents the sequential designation of the micro service group in the memory pool. By iteratively selecting a microservice group construction solution from Z, once a set of microservices is selected from the memory pool, all remaining microservice groups occupying the same microservice as the selected microservice group will be removed from the selectable list. The selection is repeated until the memory pool is empty or the remaining microservices groups cannot generate a viable solution.
In the above steps we have obtained a series of microservices groups, although they have reduced the latency within the system by aggregation, obtaining a globally optimal solution on the servers to be deployed remains an NP-hard problem. In this case, we propose a greedy heuristic to solve the optimization for the micro-service deployment.
Thus, in step S300 of some embodiments of the present invention, the deploying the one or more micro service groups after adjustment based on the computing resources and the total latency required for each micro service group includes:
s301, sorting the micro-service groups in the memory pool based on the calculation resources required by each micro-service group; specifically, non-incremental ordering of the selected microservices groups according to the required computing resources;
s302, selecting a micro-service group with the highest grading function value from the sorting result, and determining one or more groups of servers matched with the resource requirements; namely, selecting the micro service group with the most needed resources, and calculating a server capable of meeting the resource requirements;
s303, calculating the total time delay of one or more groups of servers meeting the resource requirement of each micro-service group in the memory pool, and selecting a micro-service group corresponding to a group of servers with the minimum total time delay for deployment.
Specifically, the total delay of deployment of the micro service group n to the server v is calculatedAnd selecting a server which can obtain the minimum time delay for deployment. The time delay can be divided into three parts, namely queuing time delay, processing time delay and transmission time delay. The first two parts are related to only a single micro-service and may be collectively referred to as latency. If the service capability of the micro service a is +.>Arrival rate->The number of examples is->The average latency calculated using the M/c/≡model may be used:
wherein,
in edge systems, since edge servers are far apart, transmission delays between servers need to be considered in addition to the average linger delay of user requests. If the service group n is deployed at the edge serverIn, with edge server->The time required for the micro-service to have traffic of W data units can be calculated by:
If i=j, the communication latency is 0, since for server internal communication, the latency is typically negligible. The total time delay can be expressed as follows,
wherein the first term represents the communication delay with other micro-services and the second term represents the sum of the latency of all micro-services in the service group;
further, if the selected microservices group cannot find one or more groups of servers meeting the resource requirements, then: one or more micro-services will be pruned from the set of micro-services that require the most computing resources until one or more sets of servers are found that meet the resource requirements. It will be appreciated that the pruning operation described above may be equivalent to splitting a microservice group, i.e., a microservice group containing a plurality of microservices into a plurality of microservice groups, each microservice group containing one or more microservices.
Specifically, if a server capable of meeting the resource requirement does not exist, splitting the micro-service group into micro-services, and then adding the micro-services into a sequencing queue again, and placing the single micro-services into a failure set; repeating the steps until the micro service group N is completely deployed; splitting and deploying the micro-services which fail to be deployed, and sequentially deploying the micro-services into a server which can obtain the lowest time delay; and obtaining all routing paths of the micro service group n according to the deployment result.
The micro service group deployment algorithm flow is as follows:
algorithm 2: a micro service group deployment algorithm;
input: aggregation of all service groupsThe method comprises the steps of carrying out a first treatment on the surface of the All server nodes->The method comprises the steps of carrying out a first treatment on the surface of the Set of remaining computing resource capacities per server node +.>
And (3) outputting: each microserviceAt the server node->Distribution case->Traffic distribution matrix->
1. Initialization ofUnsuccessfully allocated microservices->
2. Non-incremental ordering according to micro-service group scores to obtain
3. Once it isPerforming:
4. from the first element in N, i.e. the top scoring microservice group N, and all satisfactionThe server of (2) is added to the collection, denoted +.>
5. For the followingIs>Performing:
6. computing total latency for deployment of microservice group n at server v
7. If it is
8.
9.
10. Ending the cycle;
11. updatingAnd->
12. If it isThen:
13. if n is a microservice group:
14. splitting into single micro-services, and inserting the single micro-services into M according to required resources;
15. otherwise:
16. adding micro service m to a list of micro services with failed deployment
17. Ending the cycle;
18. once it isPerforming:
19. calculating the time delay of the micro service m on the server v, and sequentially distributing the request flow until the complete deployment is successful;
20. updating
21. M is taken fromRemoving the components;
22. ending the cycle;
23. according to,/>Whether each micro-service request stream is successfully serviced, performing constraint checking,
and calculate
24. Return to,/>
It can be appreciated that the designed greedy heuristic is not necessarily capable of directly obtaining the optimal deployment result, and therefore the solution needs to be further optimized by the variable neighborhood search algorithm. Thus, in step S400 of some embodiments of the present invention, the optimizing the deployed micro service group based on the variable neighborhood search algorithm, and adding the optimized micro service group to the memory pool includes:
s401, determining a plurality of operators of the neighborhood according to the number of instances and the deployment position change of each micro service;
specifically, a neighborhood defined by the following four operators is included:
1) The number of examples increases: will be deployed at edge serversThe number of instances of micro service i +1,
2) The number of examples is reduced: will be deployed at edge serversThe number of instances of micro service i-1,
3) Deployment location migration: will be deployed at edge serversThe micro-service i on top migrates to the edge server +.>In,
4) Deployment location exchange: will be deployed at edge serversMicro-service i on and deployed at edge server +.>The upper micro service j performs a location exchange.
S402, optimizing the deployed micro-service group according to a plurality of operators and greedy algorithms of the neighborhood, and adding the optimized micro-service group into a memory pool.
Specifically, in each search, starting to check from the neighborhood defined by the operator 1), if no more optimal solution than the current solution is found, entering the next neighborhood to continue searching; if a better solution is found, updating the solution to search again until the maximum searching times are reached.
After the optimized solution is obtained, a new microservice group is also obtained at the same time. However, as some micro-service groups are split during redeployment, there may be some non-clustered micro-services in the edge server. The transformation of the C (r) values after the micro-services join the same intra-server micro-service group can be calculated and the most advantageous way to combine is selected. Finally, the new micro service set is added to the memory pool. If the number of micro-service groups stored in the memory pool is greater thanThen delete therefrom the |Z|- -, where the C (r) value is the largest>Group microservices.
It will be appreciated that the above steps should be repeated until the number of iterations reaches the maximum number of iterations. After the last iteration, the deployment scheme with the smallest average time delay is selected as the final micro-service deployment scheme.
It can be seen that the micro-service deployment and routing method based on edge calculation provided by the embodiment of the invention mainly comprises the following points:
(1) Integrating popular micro-service architecture in cloud computing into a system of edge computing; a network model composed of multi-edge servers is designed. The server deploys the micro service instances in a containerized manner, and different micro services form a micro service chain with specific functions according to a certain sequence. When the user request arrives at the edge network, the system can select proper micro service examples in the system to sequentially complete the user request according to the composition of the micro service chain corresponding to the user request.
(2) The micro-service clusters are divided into two parts of same-chain clusters and same-kind clusters. The micro-service clusters on the same chain can reduce data transmission across servers, the same micro-service clusters are deployed on the same server to reduce queuing delay of an M/M/C model, and accordingly a total delay model of the system is established.
(3) The method solves the problem of deployment of the micro-service examples based on an improved self-adaptive memory planning algorithm, and evaluates the current deployment scheme by taking the response time delay obtained by calculation after the request routing as an evaluation standard.
The invention comprehensively considers service dependency and edge system abnormal shape, adopts a joint optimization mode to simultaneously solve the problem of micro service deployment and the problem of user request routing, and specifically, the patent considers that the micro service cluster with correlation is deployed by adopting greedy heuristic, reduces cross-server call, evaluates an example deployment scheme by taking the overall time delay as an evaluation standard, repeatedly constructs a solution according to the micro service group selected from a memory pool, and continuously optimizes. The network time delay and the energy consumption are reduced, massive requests can be handled, and the application experience of a user is effectively improved.
Example 2
Referring to fig. 5, in a second aspect of the present invention, there is provided a micro service deployment system 1 based on edge computing, comprising: a clustering module 11, configured to form one or more micro service groups from a plurality of micro services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups; an adjustment module 12 for determining and calculating an evaluation function by the interrelationship of the micro services within each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool; a deployment module 13 for deploying the one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group; the optimization iteration module 14 is used for optimizing the deployed micro-service group based on a variable neighborhood search algorithm and adding the optimized micro-service group into the memory pool; repeating all the steps, and iterating the memory pool until the iteration times reach a threshold value to obtain a final deployment scheme.
Further, the optimization iteration module 14 includes: the determining unit is used for determining a plurality of operators of the neighborhood according to the number of instances and the deployment position change of each micro service; and the optimizing unit is used for optimizing the deployed micro-service group according to the operators of the neighborhood and the greedy algorithm, and adding the optimized micro-service group into the memory pool.
Example 3
Referring to fig. 6, a third aspect of the present invention provides an electronic device, including: one or more processors; and a storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the edge-computing-based micro-service deployment method of the present invention in the first aspect.
The electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with programs stored in a Read Only Memory (ROM) 502 or loaded from a storage 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following devices may be connected to the I/O interface 505 in general: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, a hard disk; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead. Each block shown in fig. 6 may represent one device or a plurality of devices as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In an embodiment of the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present disclosure, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more computer programs which, when executed by the electronic device, cause the electronic device to:
computer program code for carrying out operations of embodiments of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++, python and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A method for deploying micro-services based on edge computation, comprising:
forming one or more micro-service groups from the plurality of micro-services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups;
determining and calculating an evaluation function through the interrelationship of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool;
deploying the one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group;
optimizing the deployed micro service group based on a variable neighborhood search algorithm, and adding the optimized micro service group into a memory pool; repeating all the steps, and iterating the memory pool until the iteration times reach a threshold value to obtain a final deployment scheme.
2. The edge-computing-based micro-service deployment method of claim 1, wherein said determining and computing an evaluation function from the micro-service correlations within each micro-service group comprises:
determining an evaluation function based on the data transmission amount of each micro service and the number of the micro services;
the evaluation function is calculated.
3. The method for edge-computing-based micro-service deployment of claim 2, wherein,
the evaluation function is expressed as:
wherein: c (r) represents an evaluation function,is the data transmission amount of all micro-services in each group of micro-services,/>Indicating that the data transmission amount after intra-group transmission is ignored, < >>Representing the number of co-chain micro services; />、/>Respectively representing the weight factors of the data quantity and the micro-service quantity in the evaluation function; />、/>The pre-cluster and post-cluster delays for each set of microservices are represented, respectively.
4. The edge computing-based micro-service deployment method of claim 1, wherein optimizing the deployed micro-service group based on the variable neighborhood search algorithm and adding the optimized micro-service group to the memory pool comprises:
determining a plurality of operators of the neighborhood according to the number of instances and the deployment position change of each micro service;
optimizing the deployed micro-service group according to a plurality of operators of the neighborhood and a greedy algorithm, and adding the optimized micro-service group into a memory pool.
5. The edge computing-based micro service deployment method of claim 1, wherein the deploying the one or more micro service groups after adjustment based on the computing resources and the total latency required by each micro service group comprises:
sorting the microservices in the memory pool after the iteration is completed based on the computing resources required by each microservices group;
selecting the micro-service group with the highest grading function value from the sorting result, and determining one or more groups of servers matched with the resource requirements;
and calculating the total time delay of one or more groups of servers of each micro-service group in the memory pool, and selecting a group of servers with the minimum total time delay to deploy the corresponding micro-service group.
6. The edge-computing-based micro-service deployment method of claim 5, further comprising: if the selected microservice group cannot find one or more groups of servers meeting the resource requirements, then: one or more micro-services will be pruned from the set of micro-services that require the most computing resources until one or more sets of servers are found that meet the resource requirements.
7. A micro-service deployment system based on edge computing, comprising:
a clustering module for forming one or more micro-service groups from the plurality of micro-services based on a clustering algorithm; forming a memory pool according to one or more micro-service groups;
the adjustment module is used for determining and calculating an evaluation function through the interrelationship of the micro services in each micro service group; according to the evaluation function and the queuing model, adjusting the processing sequence of one or more micro service groups in the memory pool;
the deployment module is used for deploying one or more micro service groups after adjustment based on the computing resources and the total time delay required by each micro service group;
the optimization iteration module is used for optimizing the deployed micro-service group based on a variable neighborhood search algorithm and adding the optimized micro-service group into the memory pool; and iterating the memory pool through the clustering module, the adjusting module and the deployment module until the iteration times reach a threshold value, so as to obtain a final deployment scheme.
8. The edge computing-based micro-service deployment system of claim 7, wherein the optimization iteration module comprises:
the determining unit is used for determining a plurality of operators of the neighborhood according to the number of instances and the deployment position change of each micro service;
and the optimizing unit is used for optimizing the deployed micro-service group according to the operators of the neighborhood and the greedy algorithm, and adding the optimized micro-service group into the memory pool.
9. An electronic device, comprising: one or more processors; storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the edge-computing based micro-service deployment method of any of claims 1 to 6.
10. A computer readable medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the edge computing based micro-service deployment method of any of claims 1 to 6.
CN202311461056.2A 2023-11-06 2023-11-06 Micro-service deployment method and system based on edge calculation Active CN117201319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311461056.2A CN117201319B (en) 2023-11-06 2023-11-06 Micro-service deployment method and system based on edge calculation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311461056.2A CN117201319B (en) 2023-11-06 2023-11-06 Micro-service deployment method and system based on edge calculation

Publications (2)

Publication Number Publication Date
CN117201319A CN117201319A (en) 2023-12-08
CN117201319B true CN117201319B (en) 2024-01-09

Family

ID=88989052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311461056.2A Active CN117201319B (en) 2023-11-06 2023-11-06 Micro-service deployment method and system based on edge calculation

Country Status (1)

Country Link
CN (1) CN117201319B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398899A (en) * 2020-07-10 2021-02-23 南京邮电大学 Software micro-service combination optimization method for edge cloud system
CN114338504A (en) * 2022-03-15 2022-04-12 武汉烽火凯卓科技有限公司 Micro-service deployment and routing method based on network edge system
CN115529316A (en) * 2022-09-30 2022-12-27 湖北省楚天云有限公司 Micro-service deployment method based on cloud computing center network architecture
CN116225649A (en) * 2023-02-28 2023-06-06 山东理工大学 Fine-granularity electric power task cloud edge collaborative optimization scheduling method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10255052B2 (en) * 2017-05-30 2019-04-09 International Business Machines Corporation Dynamic deployment of an application based on micro-services

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112398899A (en) * 2020-07-10 2021-02-23 南京邮电大学 Software micro-service combination optimization method for edge cloud system
WO2022007212A1 (en) * 2020-07-10 2022-01-13 南京邮电大学 Software microservice combination optimization method for edge cloud system
CN114338504A (en) * 2022-03-15 2022-04-12 武汉烽火凯卓科技有限公司 Micro-service deployment and routing method based on network edge system
CN115529316A (en) * 2022-09-30 2022-12-27 湖北省楚天云有限公司 Micro-service deployment method based on cloud computing center network architecture
CN116225649A (en) * 2023-02-28 2023-06-06 山东理工大学 Fine-granularity electric power task cloud edge collaborative optimization scheduling method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于进化多目标优化的微服务组合部署与调度策略;马武彬;王锐;王威超;吴亚辉;邓苏;黄宏斌;;***工程与电子技术(01);全文 *
数字图书馆微服务评价指标体系构建及实证研究;刘健;毕强;马卓;;现代图书情报技术(05);全文 *

Also Published As

Publication number Publication date
CN117201319A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN111756812B (en) Energy consumption perception edge cloud cooperation dynamic unloading scheduling method
US11018979B2 (en) System and method for network slicing for service-oriented networks
CN103092683B (en) For data analysis based on didactic scheduling
CN114338504B (en) Micro-service deployment and routing method based on network edge system
CN113708972B (en) Service function chain deployment method and device, electronic equipment and storage medium
CN108667657B (en) SDN-oriented virtual network mapping method based on local feature information
CN108322333B (en) Virtual network function placement method based on genetic algorithm
CN111538570B (en) Energy-saving and QoS guarantee-oriented VNF deployment method and device
CN114610474B (en) Multi-strategy job scheduling method and system under heterogeneous supercomputing environment
CN109656713B (en) Container scheduling method based on edge computing framework
CN111274036A (en) Deep learning task scheduling method based on speed prediction
CN113821318A (en) Internet of things cross-domain subtask combined collaborative computing method and system
Kanwal et al. A genetic based leader election algorithm for IoT cloud data processing
Doan et al. SAP: Subchain-aware NFV service placement in mobile edge cloud
CN115134371A (en) Scheduling method, system, equipment and medium containing edge network computing resources
Jain et al. Optimal task offloading and resource allotment towards fog-cloud architecture
CN106407007B (en) Cloud resource configuration optimization method for elastic analysis process
Peng et al. Genetic algorithm-based task scheduling in cloud computing using mapreduce framework
AlOrbani et al. Load balancing and resource allocation in smart cities using reinforcement learning
CN110958192B (en) Virtual data center resource allocation system and method based on virtual switch
CN117201319B (en) Micro-service deployment method and system based on edge calculation
CN113422726B (en) Service chain deployment method and device, storage medium and electronic equipment
EP2565788B1 (en) Method and apparatus for selecting optimum computing resources
Sato et al. Program file placement strategies for machine-to-machine service network platform in dynamic scenario
CN111813525A (en) Heterogeneous system workflow scheduling method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant