Microservice deployment method, readable storage medium and device

The microservice deployment method dynamically redeploys services based on service contribution value to address heterogeneity and load distribution issues, enhancing system performance and user experience in cloud-edge collaborative environments.

CN114201180BActive Publication Date: 2024-12-17INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111517932.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-09-24
Filing Date
2021-12-13
Publication Date
2024-12-17
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Existing service deployment strategies in cloud-edge collaborative environments fail to account for the heterogeneity and uneven load distribution of edge servers, leading to suboptimal system performance and user experience due to static deployment and limited resources.

Method used

A microservice deployment method that dynamically redeploys services by selecting those with the highest service contribution value, calculated as the difference between migration time and scheduling time, to balance service scheduling and migration, prioritizing services exceeding maximum tolerance time for redeployment.

Benefits of technology

This approach minimizes average response time, improves service quality, and enhances user experience by optimizing service redeployment strategies in heterogeneous environments with limited resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_3
    Figure QLYQS_3
  • Figure QLYQS_11
    Figure QLYQS_11
Patent Text Reader

Abstract

The present invention discloses a microservice deployment method, which obtains the deployed computing services in the deployed nodes, detects the service quality every time slot t; when the redeployment condition is triggered, screens the computing services S1 whose service quality does not meet the expectation; obtains the service contribution value of the computing service S1, which is determined by the difference between the migration time of the corresponding computing service and the scheduling time under the original deployment scheme; and selects the computing service with the highest service contribution value for redeployment. The scheme of the present invention optimizes the response deployment of the service, thereby facilitating the improvement of the efficiency and cost of the execution of system services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to computer technology, and in particular to a microservice deployment method, readable storage medium and device in a cloud-edge collaborative environment for edge vision applications. Background Art

[0002] Nowadays, with the rapid development of the Internet of Things and edge intelligence technology, the intelligent era of the Internet of Everything is accelerating. Along with this, the number of devices at the edge of the network and the data generated are growing rapidly, which poses a huge challenge to the currently widely used cloud computing model. For this reason, edge computing has appeared in the public eye in recent years. Edge computing is a new computing model that provides intelligent services at the edge of the network close to the terminal device. It is worth noting that although edge computing has so many advantages and characteristics, due to the limited resources of edge nodes and the fact that some data and tasks must be stored and executed in the cloud center, cloud-edge collaboration has a wider practical significance.

[0003] Although the cloud-edge collaborative computing model provides an opportunity to optimize the response time of applications / services, it also faces its corresponding problems. First, edge servers are small servers with limited resources and cannot meet all service requirements. The number of service requests in different node ranges is different, and the deployment of services at different nodes has different effects on system performance. On this basis, the mobility of terminal applications and changes in service requirements lead to dynamic changes in load distribution. When service requests change a lot, static service deployment is no longer applicable and it is impossible to achieve optimal system performance in all time periods.

[0004] In recent years, a lot of research results have been achieved on the service deployment problem. Next, we will introduce the current status of service deployment and dynamic deployment problems. Today's service deployment strategies are more about using various optimization goals, such as maximizing the number of edge service request responses, minimizing system costs, etc. However, these studies need to be based on the premise that each work has dedicated computing, storage, and bandwidth resources. Although feasible, the utilization rate of storage resources will become very low. Most recent research works use prediction methods to study the deployed services. The prediction content can be the cost of data transmission, processing, and migration, etc. For example, with the goal of balancing load and network latency, a Pareto-based optimal K-Medoids dynamic resource allocation algorithm is proposed.

[0005] At present, some deployment strategy studies have ignored the heterogeneity of the system. For example, in a homogeneous edge computing environment, service deployment strategies are obtained by considering both latency and cost, or using greedy strategies to treat service performance requirements as the same. Obviously, this does not conform to the real scenario. The resources of edge servers are often heterogeneous and limited.

[0006] Although some studies have considered the heterogeneity of the environment, they have ignored other indicators of the system. For example, in a heterogeneous edge computing environment, the deployment strategy with the highest benefit is selected by dividing the nodes, which will lead to the emergence of multiple copies of the same node and increase the power consumption of the system. Another example is the use of linear programming to jointly determine the service deployment and request scheduling strategy, which is partially related to the present invention, but ignores the problem of uneven load distribution.

[0007] There are also many studies that consider the dynamic changes of users and propose dynamic adjustment strategies for service deployment. Some studies introduce user mobility and use Markov chains to represent the problem of service migration and obtain approximately optimal solutions; or use the principle of the shortest path to study the service migration strategy, but this is limited to a single service and a single user.

[0008] However, none of the above studies have taken into account the unevenness of service load and the heterogeneity of the system, nor have they studied service deployment and request scheduling strategies under the premise of considering the overall service and users.

[0009] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0010] The purpose of the present invention is to provide a microservice deployment method, a readable storage medium and a device in a cloud-edge collaborative environment for edge vision applications, which can obtain a nearly optimal redeployment strategy by balancing service scheduling and service migration.

[0011] To achieve the above objectives, an embodiment of the present invention provides a microservice deployment method, in which, in an already deployed node, a deployed computing service is obtained, and the service quality is detected every time slot t; when a redeployment condition is triggered, a computing service S1 whose service quality does not meet expectations is screened; a service contribution value of the computing service S1 is obtained, and the service contribution value is determined by the difference between the migration time of the corresponding computing service and the scheduling time under the original deployment plan; and the computing service with the highest service contribution value is selected for redeployment.

[0012] In one or more embodiments of the present invention, the redeployment condition is that when the overall service quality of the node is lower than expected, redeployment is triggered.

[0013] In one or more embodiments of the present invention, the service quality includes at least a single service response time or an average service response time within the system or a migration service response time.

[0014] In one or more embodiments of the present invention, redeployment is to obtain a corresponding set of migration nodes for the computing service that needs to be redeployed, obtain the service migration time, and compare the service migration time with the scheduling time under the original service deployment plan, so as to select the computing service with the shortest response time for redeployment.

[0015] In one or more embodiments of the present invention, the service contribution value Q s for:

[0016] Where T s is the scheduling time under the original deployment plan, t ms is the migration service response time, min{t ms} is the minimum migration service response time corresponding to the migration node set.

[0017] In one or more embodiments of the present invention, a single service response time is the delay time in the process of dispatching a request to an edge server for calculation and then transmitting back the result.

[0018] In one or more embodiments of the present invention, a single service response time is positively correlated with at least one of an input parameter transmission time, a service execution time, and an output parameter transmission time.

[0019] In one or more embodiments of the present invention, a readable storage medium is further provided, which stores a computer program for executing the aforementioned microservice deployment method.

[0020] In one or more embodiments of the present invention, a device is also provided, including the readable storage medium as described above or used to execute the microservice deployment method as described above.

[0021] Compared with the prior art, according to the microservice deployment method, readable storage medium and device in the cloud-edge collaborative environment for edge vision applications according to the implementation mode of the present invention, for dynamic changes in service requests, static service deployment strategies cannot guarantee the optimal system performance at any time. For the heterogeneity of nodes and service attributes in the system, service deployment at different nodes will have different effects on system performance and service quality. Based on the above system characteristics, the present invention proposes a service redeployment strategy, which prioritizes services with the largest contribution value for redeployment for services that exceed the maximum tolerance time, and obtains an approximately optimal redeployment strategy by weighing service scheduling and service migration. The present invention aims to minimize the average response time of all services in the system, studies the dynamic redeployment strategy of edge vision application services, improves service response quality, and improves user service experience. For dynamic changes in service requests, static service deployment strategies cannot guarantee the optimal system performance at any time; for the heterogeneity of nodes and service attributes in the system, service deployment at different nodes will have different effects on system performance and service quality. Based on the above system characteristics, the present invention proposes a service redeployment strategy. For a service set that exceeds the maximum tolerance time, the service with the largest contribution value is preferentially selected for redeployment. By balancing service scheduling and service migration, an approximately optimal redeployment strategy is obtained. DETAILED DESCRIPTION

[0022] The following is a detailed description in conjunction with specific implementations, but it should be understood that the protection scope of the present invention is not limited by the specific implementations.

[0023] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0024] The present invention proposes a service dynamic redeployment strategy, which calculates the service contribution value for the service that does not meet the expected response delay, selects the service with the highest service contribution value for redeployment, and the contribution value is determined by the difference between the migration time and the scheduling time of the service. This strategy is implemented in a deployed system, and the service quality is tested every time slot t. The service quality in the present invention mainly refers to the average response time of the overall service. When the service quality is lower than expected, the overall service is considered to be redeployed.

[0025] Each re-deployed service has a corresponding set of migration nodes. The restriction condition is: when the remaining resource block size of the node exceeds the resource block size required by the service, the method with the shortest service response time is selected by comparing the service migration time with the scheduling time under the original service deployment plan.

[0026] Assume that the load distribution matrix L of the service s in the system at the initial state of time slot t = 0 and the resource amount r required by each service s are known. s And the calculation delay of the service at each node. We can get the service deployment strategy X0 at t=0 and the service response time Y0. Then, when the time slot t>0, the load continues to change over time, and the decision to redeploy is made based on t=0.

[0027] 3.1 Average response delay of system services

[0028] Single service response time

[0029] The response time of a service refers to the delay time from dispatching a request to the edge server for calculation and then transmitting the result back. In addition to the delay time caused by transmission, it is also related to the delay time caused by the node processing service. You can use:

[0030] T=t i +t c +t o (H.1)

[0031] Indicates that

[0032] 1)t i Refers to the input parameter transmission time, which can be calculated using the following formula

[0033]

[0034] d i is the data size of the input parameter, e j The edge server that receives the request, e k For edge or cloud servers that execute services, v jk for e j and e k The speed at which data is transferred between servers.

[0035] 2)t c is the service execution time, and is the service processing delay. It can be calculated as

[0036]

[0037] d i is the data size of the input parameter, v c It is the processing speed of the edge server that executes the service. When the server that executes the service is a cloud server, the service processing time is very short due to the strong computing power of the cloud server, so the service processing time can be set to 0; when the server that executes the service is an edge server, the processing time is the ratio of the input parameter size to the processing speed.

[0038] 3)to The output parameter transmission time can be calculated as

[0039]

[0040] where d o is the data size of the output parameter. j The edge server that receives the request, e k For edge or cloud servers that perform services, v kj for e k and e j The speed at which data is transferred between servers.

[0041] Migration service response time t ms

[0042] If the service is deployed on different nodes in adjacent time slots, migration operations are required. During the service migration process, some service requests will be dispatched to the original deployment node for response. When the service migration is completed, the service at the original deployment node will be deleted, and all requests in the system will be dispatched to the new deployment node for response. Therefore, in adjacent time slots, the response time t of service s under the condition of service migration is ms The definition is as follows

[0043] 1) t is the current time slot, t-1 is the previous time slot

[0044] 2) α represents the proportion of services scheduled in the original deployment plan before the service migration is successful, and the deployment time t of the service is used p It is measured as a ratio to the time period t and is defined as follows:

[0045]

[0046] 3) β represents the proportion of services scheduled in the new deployment plan after the service is successfully migrated, which can be calculated as

[0047] β=1-α (3.7)

[0048] 4) T sp It is expressed as the average response time when all requests for service s in the system are dispatched to node p, which can be calculated as

[0049]

[0050] where load s,j Represents the number of requests for service s within the range of node j.

[0051] Similarly, T sqIt represents the average response time when all requests for service s in the system are dispatched to node q.

[0052] 5) When the service is migrated to the cloud, since all service copies exist in the cloud, the migration time is 0. That is, the current node service is deleted immediately and all requests are scheduled to the response time in the cloud. The response time considered for migration at this time is t ms =t <<s,n>,cloud> .

[0053] Service response time s,n ∈X, (s∈S, n∈N). The lowercase s represents the service, and the uppercase S represents the service set. The relationship between the two is s∈S. n represents the node, and N represents the node set.

[0054] y s,n It represents the response time of requesting service s at node n. Its value is equivalent to the scheduling time t of scheduling the request of service s within the range of n nodes to node p. <<s,n>,p> , defined as follows:

[0055]

[0056] In each time slot t, the initial state of the system is represented by the symbol ξ(t), which includes three properties, namely ξ(t) = <L t , Y t , L t >. They are the load distribution L in time slot t. t , redeployment strategy X t and scheduling strategy Y t . The redeployment strategy X t It is determined by the initial state ξ(t), node characteristics, and service characteristics. When it is detected that the system needs to be redeployed, the redeployment operation will change the system to the initial state ξ(t) = <L t , Y t , L t >becomes ξ(t′)=(L t ′,X t ′,Y t ′) and used as the initial state of the next time slot t+1, that is, ξ(t+1)=ξ(t')

[0057] We define Xt as the service deployment plan in time slot t, and Yt as the response time of the service in time slot t. t When (s, n) = 1, it means that service s is deployed at node n, and the corresponding request response time is y t (s, n).

[0058] The present invention improves the quality of service and the user experience by reducing the response time of the service. And the total amount of resources required for node deployment service should be less than the total amount of node resources. The redeployment problem of the present invention is studied with the goal of minimizing the average service response time in the system under the premise of limited node resources, and the formula definition is as follows.

[0059]

[0060]

[0061] The above formula is the system optimization goal and constraint conditions: The optimization goal (3.10) is to minimize the average service response time in the system, that is, to minimize the ratio of the sum of the response time of all services in all nodes to the load of all services in the entire system. The constraint condition (3.11) is that the total resources required by all services deployed on the node do not exceed the total node resources.

[0062] 3.2 Service Contribution Value

[0063] Dynamic changes in service requests will lead to changes in service response time. Services with large differences in response time before and after redeployment are redeployed first. The research goal of this invention is to minimize the average response time of system services. Therefore, the standard for measuring the service contribution value Q is the time difference before and after redeployment.

[0064] First, determine whether the edge node has deployed service s. If the service is not deployed on the edge node, the return value is 0, and the delayed response time of the service is the response time in the cloud. The specific calculation method is the formula in definition 3.1, where the calculation time of the service in the centralized cloud is 0. Otherwise, calculate the response time of the service deployed on the edge side, then the getResponseTime() function can be used to calculate the response time, where the calculation method of the getResponseTime() function is the formula in 3.1.

[0065] Secondly, for each node, when the remaining resources of the node are greater than the resources required by the service, the shortest migration time of the service in the nodes that can be migrated is calculated through getMinMigrationTime(). When there is no node that can be migrated, the return value is -1. The calculation method of the getMinMigrationTime() function is the algorithm in 3.5.

[0066] After obtaining the response time and migration time of the service, the service contribution value is calculated according to the following formula. When the shortest migration time of the service exceeds the response time, the value of Q is 0; the service contribution value of service s is calculated according to the formula in Definition 4.1. When the contribution value is greater than 0, it proves that the service can be migrated.

[0067]

[0068] 3.3 Service Redeployment Algorithm

[0069] In the redeployment algorithm, the contribution value of each service in the redeployment service set is calculated, and the service with the largest contribution value is selected for redeployment. First, the node where the service was originally deployed is calculated, and then getMigrationNode() calculates the node with the shortest migration time. When Q is 0, the service request is scheduled according to the original deployment plan; when Q is not 0, that is, the migration time is shorter than the original response time of the service, the service is migrated and deleted from the redeployment set after migration.

[0070] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0071] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A microservice deployment method, It is characterized in that In the deployed nodes, the deployed computing services are obtained, and the service quality is tested every time slot t; when the redeployment condition is triggered, the computing services S1 whose service quality does not meet the expectations are screened; the service contribution value of the computing service S1 is obtained, and the service contribution value is determined by the difference between the migration time of the corresponding computing service and the scheduling time under the original deployment plan; The computing service with the highest service contribution value is selected for redeployment. The redeployment condition is that when the overall service quality of the node is lower than expected, redeployment is triggered. The service quality at least includes a single service response time or an average response time of services within the system or a migration service response time, where: Single service response time ; in 1) Refers to the input parameter transmission time, calculated using the following formula ; is the data size of the input parameter, The edge server that receives the request. Edge or cloud servers that execute services, for and Data transfer speed between servers; 2) is the service execution time, is the service processing delay, and is ; is the data size of the input parameter, It is the processing speed of the edge server that executes the service. When the server that executes the service is a cloud server, the service processing time is very short due to the strong computing power of the cloud server, so the service processing time can be set to 0. When the server that executes the service is an edge server, the processing time is the ratio of the input parameter size to the processing speed. 3) is the output parameter transmission time, ; in is the data size of the output parameter; Migration service response time ; 1) is the current time slot, Indicates the previous time slot. It means that in the previous time slot t-1, service s is deployed on node p; Indicates that in the current time slot t, service s is deployed on node q. 2) Indicates the proportion of services scheduled in the original deployment plan before the service migration was successful, using the deployment time of the service With time period The ratio value is measured and defined as follows: ; 3) After the service is successfully migrated, the proportion of services scheduled in the new deployment plan can be calculated as ; 4) Represents all services in the system All requests are dispatched to the node The average response time at can be calculated as ; in represents the number of requests for service s within the range of node j; Similarly, It represents the average response time when all requests for service s in the system are dispatched to node q; 5) When the service is migrated to the cloud, since all service copies exist in the cloud, the migration time is 0, that is, the current node service is deleted immediately, and all requests are scheduled to the response time in the cloud. At this time, the response time considered for migration is .

2. The microservice deployment method according to claim 1, It is characterized in that The redeployment is to obtain the corresponding migration node set for the computing service that needs to be redeployed, obtain the service migration time, and compare the service migration time with the scheduling time under the original service deployment plan, so as to select the computing service with the shortest response time for redeployment.

3. The microservice deployment method according to claim 1, It is characterized in that The service contribution value Q s for: , where T s is the scheduling time under the original deployment plan, t ms Migration service response time, is the minimum migration service response time corresponding to the set of migration nodes.

4. A readable storage medium storing a computer program for executing the microservice deployment method as described in any one of claims 1 to 3.

5. An electronic device, comprising the readable storage medium as claimed in claim 4 or used to execute the microservice deployment method as claimed in any one of claims 1-3.