Dynamic expansion and placement method and device for edge computing services
Through the adaptive discrete binary particle swarm optimization algorithm and multi-stage automatic expansion model, the number and location of microservice replicas are dynamically adjusted, solving the joint optimization problem of automatic scaling and service placement in the edge computing environment, improving the reliability and efficiency of edge services, and ensuring the stability of edge computing services and user experience.
Patent Information
- Application Number
- CN202111489383.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-12-07
AI Technical Summary
Existing technologies fail to effectively solve the joint optimization problem of automatic scaling and service placement in resource-limited heterogeneous edge computing environments, resulting in the inability to guarantee the quality of edge services under dynamic load fluctuations.
An adaptive discrete binary particle swarm optimization algorithm is used in combination with a multi-stage automatic expansion model. According to the workload intensity of microservices and the performance evaluation results of edge nodes, the number of microservice replicas is dynamically adjusted and iteratively placed in the optimal location, achieving joint optimization of automatic scaling and service placement.
It improves the reliability and efficiency of edge computing services in environments with dynamic load imbalance and unreliable network status, ensures the stability and availability of edge services, reduces resource waste, and improves user experience and the stability of system services.
Smart Images

Figure CN114356548B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of edge computing technology, and in particular to a method and device for dynamic expansion and placement of edge computing services. Background Art
[0002] Edge computing, as a complement and optimization to cloud computing, focuses on the analysis and processing of real-time, short-term data. It brings applications closer to the edge, enabling more efficient responses while significantly alleviating traffic pressure from devices to the cloud. An edge computing cluster consists of a cloud-controlled master node and distributed edge nodes. The master node automatically deploys and schedules multi-region microservices on each edge node. Most approaches to dynamically scaling edge computing services only address one of the two independent issues of autoscaling and service placement. If a resource-constrained edge node cannot host scalable service replicas, they must be migrated to other edge nodes with higher communication latency. Consequently, even with autoscaling strategies, edge services may still be unavailable within a certain latency tolerance. Therefore, to ensure quality of service in edge computing, it is necessary to consider the joint optimization of autoscaling and service placement.
[0003] While existing approaches have explored scalability and service placement in cloud environments, they are not suitable for resource-limited, heterogeneous edge computing environments. Specifically, existing approaches mostly focus on scaling service replicas in resource-rich cloud environments, without considering the resource limitations and heterogeneity of edge nodes, or unstable network conditions. Furthermore, the impact of service placement strategies on scaling decisions is not fully considered. Specifically, how to appropriately place scalable service replicas on edge nodes with varying performance is also a critical issue that needs to be addressed. For edge computing environments with limited resource capacity and high communication latency, different service placement strategies can reduce the efficiency of existing scaling decisions. However, these studies treat these two issues as independent, ignoring the limited nature of edge resources and dynamic network conditions. Consequently, they are unable to guarantee the quality of service for edge applications under dynamic load fluctuations. Summary of the Invention
[0004] In view of this, embodiments of the present application provide a method and apparatus for dynamic expansion and placement of edge computing services to eliminate or improve one or more defects in the prior art.
[0005] One aspect of the present application provides a method for dynamically expanding and placing edge computing services, including:
[0006] Based on the current workload intensity prediction results of each microservice corresponding to each application in the edge computing platform and the current work performance evaluation results of each edge node, the number of microservice replicas is automatically expanded according to the target data processing request to determine the scaled optimized number of microservice replicas;
[0007] A preset adaptive discrete binary particle swarm optimization algorithm is used to obtain the mapping relationship between each microservice replica and each available edge node according to the scaling optimization number of the microservice replicas, the currently available number of edge nodes and performance information, so as to place each microservice replica on the corresponding edge node.
[0008] In some embodiments of the present application, the automatic scaling of the number of microservice replicas for target data processing requests based on the current workload intensity prediction results of each microservice corresponding to each application in the edge computing platform and the current work performance evaluation results of each edge node to determine the optimized scaling number of microservice replicas includes:
[0009] According to the target data processing request for the edge computing platform, workload intensity prediction is performed on each microservice corresponding to each application in the edge computing platform to obtain the current workload intensity prediction result of each microservice;
[0010] and, performing a work performance evaluation on each of the edge nodes in the edge computing platform according to the target data processing request, so as to obtain a current work performance evaluation result of each edge node;
[0011] Based on the current workload intensity prediction results of each microservice and the current work performance evaluation results of each edge node, a preset multi-stage automatic expansion model is used to automatically expand the number of microservice copies for the target data processing request to determine the scaled optimized number of microservice copies.
[0012] In some embodiments of the present application, the workload intensity prediction of each microservice corresponding to each application in the edge computing platform is performed based on the target data processing request for the edge computing platform to obtain the current workload intensity prediction result of each microservice, including:
[0013] Based on pipeline theory, the load groups corresponding to the respective microservices and the average workload of the respective microservices are obtained, wherein the load groups include: the output load and input load of the upstream microservice of the current microservice in the current monitoring cycle, and the output load and input load of the current microservice in the next monitoring cycle;
[0014] According to the load groups corresponding to each of the microservices and the average workload of each of the microservices, a preset workload intensity prediction model is used to predict the workload intensity of each of the microservices to obtain the current workload intensity prediction results of each of the microservices.
[0015] In some embodiments of the present application, performing a work performance evaluation on each edge node in the edge computing platform according to the target data processing request to obtain a current work performance evaluation result of each edge node includes:
[0016] Determine the service performance corresponding to each edge node according to the CPU, memory and network bandwidth utilization of each edge node in the edge computing platform;
[0017] Determine the load factor of each edge node based on the input load of the upstream microservice corresponding to each microservice in the current monitoring cycle and the service performance corresponding to each edge node;
[0018] According to the load factor of each edge node, a preset work performance evaluation model is used to evaluate the work performance of each edge node respectively, so as to obtain the current work performance evaluation result of each edge node.
[0019] In some embodiments of the present application, the workload intensity prediction result includes at least three types of results from strong to weak, and the work performance evaluation result includes at least three types of results from strong to weak;
[0020] Correspondingly, based on the current workload intensity prediction results of each microservice and the current work performance evaluation results of each edge node, a preset multi-stage automatic expansion model is used to automatically expand the number of microservice replicas for the target data processing request to determine the optimized number of microservice replicas, including:
[0021] Selecting the microservices with the highest and lowest workload intensity prediction results from among the microservices as target microservices;
[0022] and selecting the edge nodes with the highest and lowest strengths of the work performance evaluation results from among the edge nodes as target edge nodes;
[0023] According to the target microservice and the target edge node, the multi-stage automatic expansion model is used to automatically expand the initial number of copies of each target microservice to determine the scaled optimized number of each microservice copy.
[0024] In some embodiments of the present application, the preset adaptive discrete binary particle swarm optimization algorithm is used to obtain a mapping relationship between each microservice replica and each available edge node according to the scaled optimization number of the microservice replicas and the currently available number of edge nodes, so as to place each microservice replica on the corresponding edge node, including:
[0025] Obtaining an adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm;
[0026] and, obtaining linear changes of social cognitive factors and individual cognitive factors corresponding to respective currently available microservice replicas according to the scaled optimized number of the microservice replicas;
[0027] Based on the linear changes of the adaptive weight coefficients, social cognitive factors, and individual cognitive factors of the currently available microservice replicas, a preset dynamic adaptive service placement method is used to iteratively process the update formula of the adaptive discrete binary particle swarm optimization algorithm to obtain an optimal service replica placement solution with minimal latency;
[0028] A mapping relationship between each of the microservice replicas and each available edge node is obtained according to the optimal service replica placement scheme, so as to place each of the microservice replicas on the corresponding edge node.
[0029] In some embodiments of the present application, obtaining the adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm includes:
[0030] Determine the total delay of each microservice in each application based on a preset delay model;
[0031] Setting the fitness value of the particle according to the total delay;
[0032] An adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm is obtained based on the fitness value, the average fitness value of the particles, and the maximum fitness value.
[0033] Another aspect of the present application provides a device for dynamic expansion and placement of edge computing services, including:
[0034] A multi-stage automatic expansion module is used to automatically expand the number of microservice replicas in response to target data processing requests based on the current workload intensity prediction results of each microservice corresponding to each application in the edge computing platform and the current work performance evaluation results of each edge node, so as to determine the scaled optimized number of microservice replicas;
[0035] The dynamic adaptive service placement module is used to adopt a preset adaptive discrete binary particle swarm optimization algorithm to obtain the mapping relationship between each microservice replica and each available edge node according to the scaled optimization number of the microservice replicas and the currently available number of edge nodes, so as to place each microservice replica on the corresponding edge node.
[0036] Another aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for dynamically expanding and placing the edge computing service when executing the computer program.
[0037] Another aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for dynamic expansion and placement of the edge computing service.
[0038] The dynamic expansion and placement method of edge computing services in the present application solves the joint optimization problem of integrated automatic scaling and service placement by determining the number of service replicas and iteratively placing them in the optimal position. In view of the characteristics of edge environment such as unbalanced edge load, unreliable network status, limited and heterogeneous node resources, and diverse service requirements, it can improve the reliability and effectiveness of automatic expansion of edge computing services under the conditions of unbalanced edge load and unreliable network status in the edge environment, and can also improve the accuracy and reliability of service placement of edge computing services, and can effectively improve the efficiency of dynamic expansion of edge computing services, so that when the edge computing service faces the situation of exceeding the maximum carrying capacity of the existing cluster, it can reliably and efficiently adjust the scale of the cluster to improve the carrying capacity of the cluster, thereby ensuring user experience and the stability of system services; at the same time, when the cluster load is very low, it can minimize the waste of resources caused by idle servers to ensure the stability and availability of edge services.
[0039] Additional advantages, purposes, and features of the present application will be described in part in the following description and will become apparent to those skilled in the art upon study of the following or may be learned from practice of the present application. The purposes and other advantages of the present application may be achieved and obtained by the structures specifically pointed out in the specification and drawings.
[0040] Those skilled in the art will understand that the purposes and advantages that can be achieved by the present application are not limited to the above specific description, and the above and other purposes that can be achieved by the present application will be more clearly understood based on the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings described herein are intended to provide a further understanding of the present application, constitute a part of the present application, and do not constitute a limitation of the present application. The components in the drawings are not drawn to scale, but are only for the purpose of illustrating the principles of the present application. In order to facilitate the illustration and description of some parts of the present application, the corresponding parts in the drawings may be enlarged, that is, they may become larger than other components in the exemplary device actually manufactured according to the present application. In the drawings:
[0042] Figure 1 This is a flowchart of a method for dynamically expanding and placing edge computing services in one embodiment of the present application.
[0043] Figure 2 Schematic diagram of the edge computing platform architecture provided for this application example.
[0044] Figure 3 Flowchart of the dynamic adaptive service placement algorithm provided for the application example of this application.
[0045] Figure 4 This is a structural diagram of a dynamic expansion and placement device for edge computing services in another embodiment of the present application.
[0046] Figure 5 This is a schematic structural diagram of an electronic device in another embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail in conjunction with the embodiments and drawings. Here, the illustrative embodiments of this application and their descriptions are used to explain this application, but are not intended to limit this application.
[0048] It should also be noted here that in order to avoid obscuring the present application due to unnecessary details, the accompanying drawings only show structures and / or processing steps that are closely related to the scheme according to the present application, while other details that are not closely related to the present application are omitted.
[0049] It should be emphasized that the term "include / comprises" when used herein refers to the existence of features, elements, steps or components, but does not exclude the existence or addition of one or more other features, elements, steps or components.
[0050] It should also be noted that, unless otherwise specified, the term "connection" herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0051] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0052] Edge computing, as a complement and optimization to cloud computing, focuses on the analysis and processing of real-time, short-term data. It brings applications closer to the edge, enabling more efficient responses and significantly reducing traffic pressure from devices to the cloud. Applications are initiated at the edge, resulting in faster network service responses and meeting fundamental industry requirements for real-time business, application intelligence, security, and privacy. Compared to traditional architectures, microservices, by building services with independent lifecycles, reduce service granularity and improve scalability, making them widely used in edge computing scenarios. In edge computing scenarios based on a microservices architecture, latency-sensitive applications can be composed of a series of microservices running on the same or different edge nodes, communicating and collaborating to provide services to users. An edge computing cluster consists of a cloud control master node and distributed edge nodes. The master node automatically deploys and schedules multi-region microservices on each edge node.
[0053] In edge cluster service architectures, scaling theory focuses on how to adjust the cluster's size to increase its carrying capacity when the existing cluster's maximum capacity is exceeded, thereby ensuring user experience and system service stability. This also minimizes resource waste caused by idle servers when the cluster load is low. Scaling is generally categorized into application scaling, technology scaling, and resource scaling. Resource scaling refers to improving software efficiency and achieving higher system performance by increasing the investment in hardware resources such as CPU and memory. Cluster scaling methods often refer to resource scaling, which can be divided into two subcategories: vertical scaling and horizontal scaling.
[0054] Vertical scaling refers to increasing the overall processing power of a system by improving the processing capabilities of individual nodes. Improving the processing power of each node specifically involves upgrading existing server configurations, such as replacing them with higher-speed, multi-core processors, replacing them with larger memory modules, configuring hard drives with faster read / write speeds, or even replacing them with higher-end, more powerful processors.
[0055] Horizontal scaling simply increases the number of nodes to improve the overall system processing capacity. The advantage of horizontal scaling is that, while the cost of each server is relatively low, it's easy to build a cluster with guaranteed system performance. Compared to vertically scaled clusters, this cluster can more flexibly and easily handle performance bottlenecks caused by increased user or data volumes, and can significantly reduce the impact of a single server failure on the overall system.
[0056] In terms of the implementation mechanism of elastic scaling, elastic scaling methods can be roughly divided into threshold-based responsive elastic scaling algorithms and predictive-based proactive scaling algorithms:
[0057] (1) Threshold-based responsive scaling algorithm: This algorithm periodically collects key system metrics, such as CPU, memory, IO, and NET, and compares them with set thresholds to dynamically adjust the number of application replicas. The Kubernetes HPA strategy is based on this algorithm, but its drawback is that the system response is slow, and elastic scaling changes often lag behind load changes.
[0058] (2) Predictive scaling algorithms: These algorithms model data from the past and predict future events, allowing for proactive elastic scaling to address future load fluctuations. Predictive algorithms primarily include machine learning and time series analysis. Time series analysis methods primarily include simple moving average, exponential smoothing, and autoregressive models.
[0059] Based on this, the present application considers adopting a new method for determining semi-synchronous time nodes to realize semi-synchronous communication between each participating node, and then performs at least one stage of semi-synchronous training on the model through this semi-synchronous communication method. By controlling some faster participating nodes in the normal current network environment to perform semi-synchronous model training, it can effectively avoid the interference of the straggler effect, avoid the waste of computing resources and improve the convergence speed of the target model, thereby effectively improving the training efficiency and application timeliness of the target model.
[0060] Microservices Architecture is an architectural concept designed to decouple solutions by breaking functionality into discrete services. Microservices break down a large, single application or service into several or even dozens of supporting microservices. This allows for scaling individual components rather than the entire application stack, thereby meeting service-level agreements. Microservices themselves build applications around business domain components, which can be independently developed, managed, and iterated. Using cloud architecture and platform-based deployment, management, and service capabilities within these decentralized components simplifies product delivery. In a microservices architecture, each service has multiple copies—replicas—for load balancing and disaster recovery. A service can go offline at any time, and new service nodes can be added to cope with temporary fluctuations in traffic. Furthermore, applications form a service chain within the microservices architecture, with corresponding service dependencies between upstream and downstream services.
[0061] The microservices architecture offers the advantages of manageable complexity, independent, on-demand scalability, flexible technology selection, fault tolerance, and high availability. It addresses the problem of complexity. It decomposes a monolithic application into a set of services. While the overall functionality remains the same, the application is broken down into manageable chunks or services. Each service has a well-defined boundary in the form of an RPC or message-driven API; the microservices architectural pattern achieves a level of modularity. The microservices architectural pattern enables each microservice to be deployed independently. Developers do not need to coordinate changes to local services. These changes can be deployed as quickly as possible after testing. Furthermore, the microservices architectural pattern allows each service to be adjusted independently, allowing developers to deploy only the number of instances of each service that meets its capacity and availability constraints. However, microservices also present numerous technical challenges, such as the operational and maintenance difficulties of multiple services, system deployment dependencies, inter-service communication costs, data consistency, system integration testing, duplication of effort, and performance monitoring.
[0062] Furthermore, in the Particle Swarm Optimization (PSO) algorithm, each particle in a swarm represents a possible solution to a problem. Through the simple behavior of individual particles and the interaction of information within the swarm, intelligent problem solving is achieved. Due to its simple operation and fast convergence, PSO has been widely used in many fields, including function optimization, image processing, and geodesy.
[0063] Abstract: PSO simulates the hunting behavior of a flock of birds. A group of birds randomly searches for food in an area with only one piece of food. None of the birds know where the food is. However, they know how far away the food is from their current location. So what is the optimal strategy for finding the food? The simplest and most effective strategy is to search the area around the bird closest to the food. In PSO, each solution to the optimization problem is a bird in the search space, called a "particle." All particles have a fitness value determined by the function being optimized, and each particle also has a speed that determines the direction and distance they fly. The particles then follow the current optimal particle to search the solution space.
[0064] Update: PSO is initialized as a group of random particles (random solutions), and then iterates to find the optimal solution. In each iteration, the particles update themselves by tracking two "extremes." The first is the optimal solution found by the particle itself, which is called the individual extreme value pBest. The other extreme value is the optimal solution found by the entire population, which is the global extreme value gBest. Alternatively, instead of the entire population, only the neighbors of a portion of the optimal particles can be used. In this case, the extreme value among all neighbors is the local extreme value. When these two optimal values are found, the particle updates its velocity and new position according to the following formula:
[0065]
[0066] In the above formula and Representing the local and optimal positions of the particle swarm, respectively. ω is called the inertia factor and is a non-negative value. Larger values indicate stronger global optimization capabilities but weaker local optimization capabilities; smaller values indicate weaker global optimization capabilities but stronger local optimization capabilities. Dynamic ω can achieve better optimization results than fixed values. It can vary linearly during the PSO search process or dynamically based on a PSO performance measure.
[0067] Among them, the standard PSO algorithm process is as follows:
[0068] 1) Initialize a group of particles (group size is N) with random positions and velocities;
[0069] 2) Evaluate the fitness of each particle;
[0070] 3) For each particle, compare its fitness value with the best position pbest it has passed. If it is better, take it as the current best position pbest;
[0071] 4) For each particle, compare its fitness value with the best position gbest it has passed. If it is better, take it as the current best position gbest;
[0072] 5) Adjust the particle speed and position according to formulas (2) and (3);
[0073] 6) If the end condition is not met, go to step 2.
[0074] The iteration termination condition is generally selected as the maximum number of iterations Gk or (and) the optimal position searched so far by the particle swarm meets the predetermined minimum adaptation threshold according to the specific problem.
[0075] Previous work has explored numerous autoscaling and service placement strategies. Dynamic scaling mechanisms can be categorized into passive scaling based on thresholds and active scaling based on workload prediction. Representative studies have proposed hybrid autoscaling mechanisms based on on-demand time series models, predicting the intensity of incoming workloads. Furthermore, a network-aware flexible deployment tool dynamically allocates containers across computing resources using a multi-step control model. Furthermore, effective service placement strategies are another key to improving service quality and have garnered considerable attention in recent years. Many service placement algorithms have demonstrated promising performance in optimizing resource utilization, ensuring service quality, and improving service reliability. However, most of these approaches only address one of two independent issues: autoscaling and service placement. Assuming that resource-constrained edge nodes cannot host scalable service replicas, they must be migrated to other edge nodes with higher communication latency. Consequently, even with autoscaling, edge services may still be unavailable within a certain latency tolerance. Therefore, to ensure service quality in edge computing, it is necessary to consider the joint optimization problem of autoscaling and service placement. However, none of the aforementioned approaches effectively address this problem.
[0076] Ensuring the quality of service (QoS) of edge applications under load fluctuations is a key issue in edge computing and has been extensively studied in recent years. This issue can be addressed by combining dynamic autoscaling strategies with appropriate service replica placement. While existing work has explored scalability and service placement in cloud environments, it is not well suited to resource-constrained heterogeneous edge computing environments. Furthermore, the impact of service placement strategies on scaling decisions has not been fully considered.
[0077] Dynamic service scaling methods mainly focus on accurately adjusting the number of replicas based on current resource capacity, workload intensity, and service quality. Currently, there is a large amount of cloud-related research work. For example, some scholars have studied deadline-driven replica creation and data scheduling strategies in workflow jobs. Considering the popularity of data blocks and node load, the data replication scheduling problem is modeled as an integer programming problem, and a meta-heuristic DRSA algorithm is proposed for solving it. In addition, some people have proposed an adaptive replication scheme for MEC. This scheme uses the MSSA (Master Slave Selection Algorithm) algorithm to dynamically allocate the number of replicas based on read and write frequencies. However, most of the above existing work focuses on how to scale service replicas in a cloud environment with sufficient resources, without considering the limitations and heterogeneity of edge node resources and unstable network conditions.
[0078] On the other hand, when the workload changes, an effective scaling strategy is only the first step to ensure service quality. How to appropriately place scalable service replicas on edge nodes with different performance is also an important issue that needs to be addressed. Many service placement algorithms have shown good performance in optimizing resource utilization, ensuring service quality, and improving service reliability. In previous studies, the replica placement problem with the goal of minimizing the cost of placing replicas under QoS and fault tolerance constraints was described as a binary integer linear programming problem. Other scholars designed an online scheduler based on service dependency awareness to determine the placement of tasks based on online plans and network dynamics. In some studies on online risk assessment and scheduling, heterogeneous nodes with random services and unstable communication networks were considered, a risk probability model was established, and a reliable service configuration algorithm was proposed.
[0079] However, for edge computing environments with limited resource capacity and high communication latency, different service placement strategies may reduce the efficiency of existing scaling decisions. However, the above studies treat these two issues as independent issues, ignoring the limited edge resources and dynamic network conditions. Consequently, they fail to guarantee the quality of service for edge applications under dynamic load fluctuations. Given the above technical shortcomings, this application addresses the joint optimization problem of integrating autoscaling and service placement by determining the number of service replicas and iteratively placing them in the optimal location.
[0080] This application studies the joint optimization problem of dynamic scaling and adaptive service placement of edge services. In view of the characteristics of edge environment such as unbalanced edge load, unreliable network status, limited and heterogeneous node resources, and diverse service requirements, a dynamic adaptive service scaling mechanism is designed and implemented, and services are placed reasonably to ensure the stability and availability of edge services.
[0081] In one or more embodiments of the present application, ADBPSO refers to Adaptive Discrete Binary Particle Swarm Optimization (Adaptive Discrete Binary Particle Swarm Optimization algorithm).
[0082] In one or more embodiments of the present application, DAG refers to a Directed Acyclic Graph.
[0083] In one or more embodiments of the present application, DASP refers to Dynamic Adaptive Service Placement.
[0084] In one or more embodiments of the present application, IoT refers to the Internet of Things.
[0085] In one or more embodiments of the present application, PSO refers to Particle Swarm Optimization (Particle Swarm Optimization algorithm).
[0086] In one or more embodiments of the present application, QoS refers to Quality of Service.
[0087] Based on the above content, the present application also provides a dynamic expansion and placement device for edge computing services for implementing the dynamic expansion and placement method of edge computing services provided in one or more embodiments of the present application. The dynamic expansion and placement device for edge computing services can be a server (cloud monitoring center). The dynamic expansion and placement device for edge computing services can communicate and connect with each client device (edge node) in sequence by itself or through a third-party server.
[0088] The aforementioned dynamic expansion and placement device of the edge computing service performs the dynamic expansion and placement of the edge computing service in a part that can be executed in a server as described above, and in another practical application scenario, all operations can also be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the dynamic expansion and placement of edge computing services.
[0089] It is understood that the client device may include any mobile device capable of hosting an application, such as a smartphone, a tablet electronic device, a network set-top box, a portable computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. The smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.
[0090] The client device may include a communication module (i.e., a communication unit) that can establish a communication connection with a remote server to implement data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a server structure of a distributed device.
[0091] The server and the client device may communicate using any suitable network protocol, including network protocols that have not yet been developed as of the filing date of this application. Examples of such network protocols include TCP / IP, UDP / IP, HTTP, and HTTPS. Furthermore, examples of such network protocols include RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols, which are used on top of the aforementioned protocols.
[0092] The details are described in detail through the following embodiments and application examples.
[0093] In order to solve the problem that the existing dynamic expansion method of edge computing services does not consider the limitations and heterogeneity of edge node resources and unstable network conditions, and does not repeatedly consider the impact of service placement strategies on scale decisions, and thus cannot guarantee the quality of edge application services under dynamic load fluctuations, this application provides an embodiment of a dynamic expansion and placement method for edge computing services, see Figure 1 The method for dynamically expanding and placing edge computing services based on the device for dynamically expanding and placing edge computing services specifically includes the following contents:
[0094] Step 100: Based on the current workload intensity prediction results of each microservice corresponding to each application in the edge computing platform and the current work performance evaluation results of each edge node, the number of microservice copies is automatically expanded according to the target data processing request to determine the scaled optimized number of microservice copies.
[0095] Step 200: Using a preset adaptive discrete binary particle swarm optimization algorithm, according to the scaling optimization number of the microservice replicas, the number of currently available edge nodes and performance information, obtain the mapping relationship between each of the microservice replicas and each available edge node, so as to place each of the microservice replicas on the corresponding edge node.
[0096] It is understood that the edge computing platform that provides edge services consists of a cloud monitoring center and a number of geographically distributed edge nodes, which can form an edge computing service cluster. Different edge nodes within the cluster are connected to the cloud monitoring center through heterogeneous networks to achieve cloud-edge collaboration. Considering that the geographical distance of resource-limited edge nodes will lead to load fluctuations and network latency, this application requires the development of an active auto-scaling strategy to appropriately place service replicas to ensure service quality in a dynamic network environment.
[0097] From the above description, it can be seen that the dynamic expansion and placement method of edge computing services provided in the embodiment of the present application solves the joint optimization problem of integrated automatic scaling and service placement by determining the number of service replicas and iteratively placing them in the optimal position. In view of the characteristics of edge load imbalance, unreliable network status, limited and heterogeneous node resources, and diverse service requirements in the edge environment, it can improve the reliability and effectiveness of automatic expansion of edge computing services under the conditions of unbalanced edge load and unreliable network status in the edge environment, and can also improve the accuracy and reliability of service placement of edge computing services, and can effectively improve the efficiency of dynamic expansion of edge computing services, so that when the edge computing service faces the situation of exceeding the maximum carrying capacity of the existing cluster, it can reliably and efficiently adjust the scale of the cluster to improve the carrying capacity of the cluster, thereby ensuring user experience and the stability of system services; at the same time, when the cluster load is very low, it can minimize the waste of resources caused by idle servers to ensure the stability and availability of edge services.
[0098] In order to improve the reliability and intelligence of automatic expansion of the number of microservice replicas, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, step 100 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0099] Step 110: Based on the target data processing request for the edge computing platform, workload intensity prediction is performed on each microservice corresponding to each application in the edge computing platform to obtain the current workload intensity prediction results of each microservice.
[0100] Step 120: Perform a work performance evaluation on each edge node in the edge computing platform according to the target data processing request to obtain a current work performance evaluation result of each edge node.
[0101] Step 130: Based on the current workload intensity prediction results of each microservice and the current work performance evaluation results of each edge node, a preset multi-stage automatic expansion model is used to automatically expand the number of microservice copies for the target data processing request to determine the scaled optimized number of microservice copies.
[0102] In order to improve the reliability and intelligence of workload intensity prediction for each microservice corresponding to each application in the edge computing platform, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, step 110 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0103] Step 111: Based on pipeline theory, obtain the load group corresponding to each of the microservices and the average workload of each of the microservices, wherein the load group includes: the output load and input load of the upstream microservice of the current microservice in the current monitoring cycle, and the output load and input load of the current microservice in the next monitoring cycle.
[0104] Step 112: Based on the load groups corresponding to the respective microservices and the average workload of the respective microservices, a preset workload intensity prediction model is used to predict the workload intensity of the respective microservices to obtain the current workload intensity prediction results of the respective microservices.
[0105] In order to improve the reliability and intelligence of the performance evaluation of each edge node in the edge computing platform, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, step 120 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0106] Step 121: Determine the service performance corresponding to each edge node according to the CPU, memory and network bandwidth utilization of each edge node in the edge computing platform.
[0107] Step 122: Determine the load factor of each edge node based on the input load of the upstream microservice corresponding to each microservice in the current monitoring cycle and the service performance corresponding to each edge node.
[0108] Step 123: Based on the load factor of each edge node, a preset work performance evaluation model is used to evaluate the work performance of each edge node to obtain a current work performance evaluation result of each edge node.
[0109] In order to improve the reliability and intelligence of the automatic expansion of the number of microservice replicas, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, the workload intensity prediction results include at least three types of results from strong to weak, and the work performance evaluation results include at least three types of results from strong to weak; correspondingly, step 130 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0110] Step 131: Filter the microservices with the highest and lowest workload intensity prediction results as target microservices.
[0111] Step 132: Filter the edge nodes with the highest and lowest strengths of the work performance evaluation results from among the edge nodes as target edge nodes.
[0112] Step 133: Based on the target microservice and the target edge node, the multi-stage automatic expansion model is used to automatically expand the initial number of replicas of each target microservice to determine the scaled optimized number of replicas of each microservice.
[0113] In order to improve the accuracy and intelligence of obtaining the mapping relationship between each microservice replica and each available edge node, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, step 200 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0114] Step 210: Obtaining an adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm;
[0115] Step 220: Obtaining linear changes of the social cognitive factor and the individual cognitive factor corresponding to each of the currently available microservice replicas according to the scaled optimized number of the microservice replicas;
[0116] Step 230: Based on the linear changes of the adaptive weight coefficients, social cognitive factors, and individual cognitive factors of the currently available microservice replicas, a preset dynamic adaptive service placement method is used to iteratively process the update formula of the adaptive discrete binary particle swarm optimization algorithm to obtain the optimal service replica placement solution with the minimum latency.
[0117] Step 240: Obtain a mapping relationship between each of the microservice replicas and each available edge node according to the optimal service replica placement solution, so as to place each of the microservice replicas on the corresponding edge node.
[0118] In order to improve the reliability and accuracy of obtaining the adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm, in one embodiment of the method for dynamic expansion and placement of edge computing services provided in this application, step 210 of the method for dynamic expansion and placement of edge computing services specifically includes the following content:
[0119] Step 211: Determine the total delay of each microservice in each application based on a preset delay model.
[0120] Step 212: Setting the fitness value of the particle according to the total delay.
[0121] Step 213: Obtaining an adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm based on the fitness value, the average fitness value of the particles, and the maximum fitness value.
[0122] Based on this, for the above-mentioned embodiment of the dynamic expansion and placement method of edge computing services, the present application also provides a specific application example of the dynamic expansion and placement method of edge computing services for further explanation. The application example of the present application studies the joint optimization problem of dynamic self-scaling and adaptive service placement, and defines it as the problem of minimizing task delays under the conditions of resource and bandwidth constraints. First, the application example of the present application designs a multi-stage automatic expansion model based on load prediction and edge node performance evaluation to dynamically create an appropriate number of service replicas. Secondly, a dynamic adaptive service placement (DASP) method is proposed, which uses the adaptive discrete binary particle swarm optimization algorithm ADBPSO to iteratively place each service replica. DASP can determine the current optimal placement strategy based on the dynamic service replica scaling decision in a relatively short time. The placement results of this round will guide the next round of iterative optimization.
[0123] 1. System model:
[0124] See also Figure 2 , assuming that there are N edge nodes in the edge computing system, that is, E = {e1, e2, ..., e N For each node, we use a vector containing its available capacity: e i =(α i , β i , γ i ), An application consists of a series of microservices, i.e. MS = {ms1, ms2, ..., ms k}, microservices k Available resource vector representation: ms k =(C k , M k , B k ), where C k , M k , B k Represents microservice ms k The CPU, memory and bandwidth resource requirements of the microservice are met. There are multiple copies of the microservice to ensure that it is still available in the face of changing workload intensity. k Represents microservice ms k The number of copies of Represents microservice ms k The lth replica of a microservice is available. As long as one replica of each microservice is available, the application is available. Therefore, the goal of this application example is to dynamically create an appropriate number of microservice replicas while meeting edge resource and bandwidth constraints, and to find the optimal placement solution with the minimum average latency.
[0125] In an edge computing environment, edge nodes have limited heterogeneous resources. If business replicas are deployed on edge nodes with insufficient capacity or long communication distances, even with the automatic scaling mechanism, it may not be possible to meet the edge application's requirements for stable service quality and low latency. Therefore, the number of service replicas needs to be adjusted dynamically, which is a problem that the dynamic automatic scaling mechanism needs to solve. After determining the scalable number of current service replicas, how to reasonably place them on edge nodes is another problem that needs to be solved. Each edge application consists of a set of microservices, and different services have their own resource requirements and communication delay constraints. The application instance of this application needs to place service replicas based on the resource availability of the edge node and the feedback from the last round of service placement.
[0126] The application example of this application uses the matrix X=[x ijk ] w×n Represents microservice ms i The placement of the jth copy of: Placed at edge node e k , x ijk =1; otherwise x ijk = 0. Where w is the number of service replicas and n is the number of edge nodes that can be placed. k The total resource demand carried is:
[0127]
[0128] in, Represents microservice ms i Deployed in e k The number of replicas on the node, (C i , M i , B i ) represents microservice ms i CPU, memory, and bandwidth resource requirements.
[0129] Delay model: In edge scenarios, shorter delay means better QoS. Based on the queuing theory often used in existing work, we first define ξ i As ms i The latency, including processing time Waiting time in queue and network transmission time First, define As The expected value is inversely proportional to the microservice request processing rate:
[0130]
[0131] Among them, C i is assigned to msi Total CPU.
[0132] Then calculate Expected value That is, the request arrives from ms i The time it takes to start processing. Defined in ms i The average input rate at time t Refers to ms i The input load at time t, Δt refers to the fixed monitoring period.
[0133]
[0134] Finally, define The expected value at time t This contains the time the request waited in the output queue and the time it took to send it to its downstream neighbors in ms. j Similarly, define ms i Output rate Refers to ms i Output load at time t. The average processing rate of the output queue is the bandwidth between microservices.
[0135]
[0136] When the bandwidth is 1 / B ij When (t) is greater than the input rate of the queue, we can get Therefore, Eξ can be calculated i (t) and the total delay of the application Eξ(t):
[0137]
[0138] In this application example, the goal is to make proactive automatic scaling decisions while satisfying edge resource and bandwidth constraints, and to find the optimal service replica placement strategy to minimize task response time, namely:
[0139] minimize Eξ(t+1)
[0140] The corresponding constraints are described as follows:
[0141]
[0142] The goal of this method is to minimize the expected application delay Eξ(t+1) at time t+1 while satisfying the following constraints. The constraints include:
[0143] (C1) The number of elements with a value of 1 in the decision matrix cannot exceed the number of replicas;
[0144] (C2) indicates that the resource constraints of the edge nodes are satisfied;
[0145] (C3)ms i The average input rate is no greater than its average processing rate;
[0146] (C4)ms i The average output rate of is less than or equal to the bandwidth between two adjacent microservices.
[0147] 2. Dynamic Auto-Scaling Strategy: This application example designs a dynamic adaptive auto-scaling model to determine the optimal number of service replicas. This model takes into account the real-time workload intensity and performance of edge nodes. If high-load microservice replicas are placed on low-performance edge nodes, service availability will be low. In this case, this application example needs to re-optimize the number of replicas. The key step is to reasonably classify microservices based on workload intensity and edge node performance. The specific implementation process of the dynamic adaptive auto-scaling model is as follows:
[0148] 1) Microservice workload prediction
[0149] The request is passed from the first microservice of the edge application to the last microservice, and the input request of the upstream microservice arrives at the downstream at a certain time interval. The workload prediction model is based on the pipeline processing of the stream application. Therefore, when the ratio of the input data to the output data of the upstream microservice is known, the number of input requests of the downstream microservice can be obtained in advance. Here, the workload can be evaluated based on the number of requests. The window time t is defined as the pipeline processing time slot of the edge application, which is also the monitoring period. According to the pipeline theory, the microservice ms is first calculated. i Upstream neighbor microservice ms j The output load at time t
[0150]
[0151] in, Represents the length of the input queue, also in ms j Input load at time t. Refers to the length of the output queue, rat j Refers to the ratio of output load to input load. Here C j (t) is assigned to ms j The total amount of CPU. Then you can calculate the microservice ms i Input load at time t+1:
[0152]
[0153] Here Θ i It is ms i The upstream microservice set, B ji (t) is the microservice ms i and ms j The bandwidth between. Define ms k Average workload at time t:
[0154]
[0155] According to the workload intensity of microservices, microservices can be divided into three categories: H 、M M 、M L , where M H is the set of microservices with the highest workload, M M For a set of microservices with medium workload, M L is the set of microservices with the lowest workload. A threshold μ is defined to measure the workload intensity of microservices, as shown below.
[0156]
[0157] 2) Edge node load assessment
[0158] The number of scalable service replicas is not only related to workload intensity, but also to the performance of the edge nodes where the replicas are deployed. Based on the usage of resources such as CPU, memory, and network, the service performance of the edge nodes is defined as follows:
[0159]
[0160] Among them U cpu , U mem , U net Represent the CPU, memory and network bandwidth utilization of edge nodes respectively, Ω cpu ,Ω mem ,Ω net Represents the proportion of different types of resources in edge nodes. cpu +Ω mem +Ω net =1. Then the load factor of the i-th edge node can be defined as:
[0161]
[0162] The edge node set is divided into three categories according to the load factor of the edge node: W H 、W M 、W L , the load intensity decreases in turn. Similarly, the threshold is defined To evaluate the edge node e i Load, ldavg Indicates the average load of all edge nodes.
[0163]
[0164] 3) Dynamic autoscaling strategy
[0165] Based on the above two steps, the application example of this application divides microservices and edge nodes into three categories according to workload intensity. When the service placement algorithm places a high-load microservice on an edge node with lower performance, the edge service may not be able to respond to users in a timely manner. In other words, the number of service replicas needs to be dynamically re-optimized to ensure service quality. From the perspective of improving resource utilization and ensuring service quality, it is only necessary to deal with the extreme matching of high-load / low-load edge nodes and high-load / low-load edge microservices. Assuming that the input microservice ms i The initial number of copies is w i , in a specific case, the number of target service replicas after scaling w′ i The optimization process is as follows:
[0166]
[0167] Among them, σ1 and σ2 represent the coefficients that affect the microservice load and edge node performance, σ1+σ2=1. The application example of this application only needs to handle the automatic scaling of service replicas under four extreme mapping conditions, namely, extremely high or extremely low microservice load and extremely high or extremely low edge node load. Because only in these four cases can the determined number of service replicas to be scaled be obtained based on the inequality of dividing the load level. In other cases, the number of service replicas remains w i .
[0168] 3. Dynamic Adaptive Service Placement Mechanism
[0169] 1) Adaptive discrete binary particle swarm optimization algorithm ADBPSO:
[0170] The placement of service replicas is a discrete problem, so the solution matrix X i The value of any element in can only be 0 or 1. Therefore, this application example designs an adaptive discrete binary particle swarm optimization algorithm ADBPSO, which has better search ability and robustness. In ADBPSO, an improved inertia weight adaptive strategy is proposed, which can dynamically adjust the inertia weight according to the state of the particle. At the same time, in order to ensure that the service replicas and edge nodes are in the solution matrix X i In this application example, a distance calculation method based on binary operators is designed to improve the iterative update strategy of particle velocity and position.
[0171] The microservice replica placement problem is actually a mapping between replicas and edge nodes, so a w×n matrix (replica placement matrix) is used to represent a feasible solution, where w is the dynamic scaling strategy obtained by the optimized service replica and n is the number of available edge nodes.
[0172]
[0173] Indicates whether the j-th service replica is placed on the k-th edge node: If the service replica j is placed on the edge node k, otherwise
[0174] Similarly, the velocity variable is also represented by the same w×n matrix (velocity variable matrix). i Each element in The value of represents the probability percentage of placing the k-th service replica on the j-th edge node, and the probability range is [0, 100]. The larger the value, the more service copies The more likely it is to be mapped to the edge node k, the faster the particle will move in this direction.
[0175] Adaptive Inertia Weight:
[0176] In the particle swarm algorithm, the inertia weight is an important coefficient that affects the search space of the algorithm. When the inertia weight is significant, the global search capability of the algorithm is improved. On the contrary, it is more suitable for local search. In order to avoid premature convergence of the algorithm and speed up the convergence, an adaptive inertia weight method is proposed to dynamically adjust the inertia weight according to the state of the particle. The size of the inertia weight is closely related to the fitness of the particle. The larger the fitness value, the more likely it is to find the global optimal solution. The opposite value of the task average response delay Eξ(t) is set as the fitness value f of the particle, because we hope that the delay is as small as possible. The formula of the adaptive weight coefficient (inertia weight) is as follows:
[0177]
[0178] Where f is the current fitness value of the particle, f avg and f max Represent the average fitness value and maximum fitness value of the particles in the population, respectively. Changes in the particle fitness value will cause changes in the inertia weight. In other words, particles can improve their global search ability or local search ability based on their own state. In order to improve the search accuracy, the social cognition factor c1 and the individual cognition factor c2 are linearly changed as follows:
[0179]
[0180] In the above formula, g is the number of iterations of the current particle evolution. The c1 function increases with the number of particle iterations. Larger group cognition accelerates convergence in the later stages. As the number of particle iterations increases, the individual cognition coefficient gradually decreases. In the initial stage, the random search coefficient of individual particles is large, which is more likely to find the individual optimal value.
[0181] Distance update based on binary operators:
[0182] Since service replica placement is a discrete binary problem, it is necessary to satisfy that there is only one element with a value of 1 in each row of the corresponding matrix between the microservice replica and the edge node. The application example of this application proposes a distance calculation method based on binary operators. The method includes two binary operators for calculating the distance between two particles and updating the position of the particles according to the given distance. Operators PD and PU are defined, and PD(x, y) represents the binary distance between x and y. By comparing each row of vectors x and y bit by bit, a vector consisting of the bit distances of the row vectors with signs is obtained as the distance between the two particles. For example:
[0183] PD([0,0,1,0;1,0,0,0],[1,0,0,0;0,1,0,0])=[2,-1].
[0184] PU(x, y) represents moving particle x by distance y.
[0185] For example, PU([0, 0, 1, 0], 1) = [0, 0, 0, 1], so the ADBPSO algorithm update formula can be obtained:
[0186]
[0187] Whether the id-th service replica is placed on the k-th edge node at time t+1.
[0188] 2) Dynamic Adaptive Service Placement Algorithm:
[0189] Based on the ADBPSO model, this application example proposes a dynamic adaptive service placement (DASP) method to solve the service replica placement problem. DASP combines dynamic automatic scaling strategies to place service replicas in an iterative manner. The dynamic adaptive service placement algorithm process is as follows: Figure 3 shown.
[0190] In Algorithm 1( Figure 3 In Algorithm 1), the population is first initialized according to the particle encoding rule. During the solution process, it is first determined whether all constraints are met. If so, the number of scaled replicas is adjusted through a dynamic automatic scaling strategy and the placement matrix is reinitialized. Evaluate the fitness value of each particle and adaptively adjust the particle's inertia weight. In the next iteration, the application example of this application updates the particle's velocity and position based on the improved binary operator distance calculation rule. Then compare the current particle's fitness value with the historical pbest and historical gbest, and update it, continuing the next iteration until the maximum number of iterations is reached or the fitness difference between the two generations of optimal particles is less than the threshold. Finally, the optimal service replica placement solution X with the minimum latency in the edge computing environment is obtained. * .
[0191] Based on this, the application example of this application studies the joint optimization problem of dynamic automatic scaling and adaptive service placement, models the edge computing architecture and microservice-based edge applications as a graph model, and abstracts the delay model of the edge application microservice chain in the edge computing scenario, and defines the resource constraints and bandwidth limitations within the cluster. The problem is defined as the task delay minimization problem that meets the resource and bandwidth constraints to ensure the service quality of edge applications under dynamic load fluctuations.
[0192] In addition, the dynamic adaptive scaling model is one of the key technical points of the application example of this application. The application example of this application designs a multi-stage automatic expansion model based on microservice workload prediction and edge node performance evaluation to dynamically create an appropriate number of service replicas. First, the load intensity of edge microservices is predicted and classified according to queuing theory, and then the real-time load of edge nodes is evaluated, the load factor of the node is defined to identify the availability of the node and classify it, and finally, based on the above steps, the number of service replicas is dynamically optimized to determine the optimal number of service replicas. This model takes into account the real-time load intensity and performance of edge nodes. For the special mapping situations between four extremely high / low load intensity microservices and extremely high / low load intensity edge nodes, a dynamic replica adjustment strategy is implemented to obtain the optimal number of replica scaling.
[0193] This application example proposes a dynamic adaptive service placement (DASP) method, which uses the adaptive discrete binary particle swarm optimization (ADBPSO) algorithm to iteratively place each service replica. In ADBPSO, this application example designs an iterative update strategy based on binary operators to calculate the discrete particle distance, and proposes an adaptive inertia weight method to improve the performance of the algorithm. DASP can determine the optimal placement strategy with the lowest current latency based on dynamic service replica scaling decisions in a short period of time. The placement results of the current round will guide the iterative optimization of the next round.
[0194] In summary, the application example of this application studies the joint optimization problem of dynamic automatic scaling and adaptive service placement, and defines it as the problem of minimizing task delay under the conditions of resource and bandwidth constraints. First, the application example of this application designs a multi-stage automatic scaling model based on load prediction and edge node performance evaluation to dynamically create an appropriate number of service replicas. Secondly, a dynamic adaptive service placement (DASP) method is proposed, which uses the adaptive discrete binary particle swarm optimization (ADBPSO) algorithm to iteratively place each service replica. DASP can determine the current optimal placement strategy based on dynamic service replica scaling decisions in a relatively short time. The placement results of this round will guide the next round of iterative optimization. Under the condition of satisfying edge resource and bandwidth constraints, automatic scaling decisions are made and the optimal service replica placement strategy is found to minimize task delay while ensuring service quality.
[0195] Based on the above content, the present application also provides a dynamic expansion and placement device for edge computing services for implementing the dynamic expansion and placement method of edge computing services provided in one or more embodiments of the present application. The specific implementation of the dynamic expansion and placement device for edge computing services can be a server. In a specific example, see Figure 4 The dynamic expansion and placement device of the edge computing service specifically includes the following contents:
[0196] The multi-stage automatic expansion module 10 is used to automatically expand the number of microservice copies according to the current workload intensity prediction results of each microservice corresponding to each application in the edge computing platform and the current work performance evaluation results of each edge node in response to the target data processing request, so as to determine the scaled optimized number of microservice copies.
[0197] The dynamic adaptive service placement module 20 is used to adopt a preset adaptive discrete binary particle swarm optimization algorithm to obtain a mapping relationship between each microservice replica and each available edge node according to the scaled optimization number of the microservice replicas and the currently available number of edge nodes, so as to place each microservice replica on the corresponding edge node.
[0198] The embodiment of the dynamic expansion and placement device of the edge computing service provided in this application can be specifically used to execute the processing flow of the embodiment of the dynamic expansion and placement method of the edge computing service in the above-mentioned embodiment. Its functions will not be repeated here, and you can refer to the detailed description of the embodiment of the dynamic expansion and placement method of the edge computing service in the above-mentioned embodiment.
[0199] From the above description, it can be seen that the dynamic expansion and placement device of the edge computing service provided in the embodiment of the present application solves the joint optimization problem of integrated automatic scaling and service placement by determining the number of service copies and iteratively placing them in the optimal position. In view of the characteristics of edge load imbalance, unreliable network status, limited and heterogeneous node resources, and diverse service requirements in the edge environment, it can improve the reliability and effectiveness of the automatic expansion of edge computing services under the conditions of unbalanced edge load and unreliable network status in the edge environment, and can also improve the accuracy and reliability of service placement of edge computing services, and can effectively improve the efficiency of dynamic expansion of edge computing services, so that when the edge computing service faces the situation of exceeding the maximum carrying capacity of the existing cluster, it can reliably and efficiently adjust the scale of the cluster to improve the carrying capacity of the cluster, thereby ensuring the user experience and the stability of the system service; at the same time, when the cluster load is very low, it can minimize the waste of resources caused by idle servers to ensure the stability and availability of edge services.
[0200] The embodiment of the present invention also provides a computer device, such as Figure 5 As shown, the computer device may include a processor 81, a memory 82 and an image acquisition device 83, wherein the processor 81 and the memory 82 may be connected via a bus or other means. Figure 5 The image acquisition device 83 can be connected to the processor 81 and the memory 82 via a wired or wireless manner.
[0201] The processor 81 may be a central processing unit (CPU). The processor 81 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0202] The memory 82 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the program instructions / modules corresponding to the method for shielding keys of a vehicle-mounted display device in an embodiment of the present invention (for example, Figure 5The processor 81 executes the non-transitory software programs, instructions, and modules stored in the memory 82 to perform various functional applications and data processing of the processor, thereby implementing the image color correction method in the above-mentioned method embodiment.
[0203] The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created by the processor 81, etc. In addition, the memory 82 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 82 may optionally include a memory remotely located relative to the processor 81, and these remote memories may be connected to the processor 81 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0204] The one or more modules are stored in the memory 82 and when executed by the processor 81, perform the following steps: Figure 1-Figure 3 Dynamic expansion and placement method of edge computing services in the illustrated embodiment.
[0205] In some embodiments of the present disclosure, a user device may include a processor, a memory, and a transceiver unit, which may include a receiver and a transmitter. The processor, memory, receiver, and transmitter may be connected through a bus system. The memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to control the transceiver unit to send and receive signals.
[0206] As an implementation method, the functions of the receiver and transmitter in the present invention can be implemented by a transceiver circuit or a dedicated transceiver chip, and the processor can be implemented by a dedicated processing chip, a processing circuit or a general chip.
[0207] As another implementation, a general-purpose computer can be used to implement the authentication device and authentication server provided in the embodiments of the present invention. Specifically, the program code for implementing the functions of the processor, receiver, and transmitter is stored in a memory, and the general-purpose processor executes the code in the memory to implement the functions of the processor, receiver, and transmitter.
[0208] The embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the art.
[0209] It should be understood by those skilled in the art that the various exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is specifically performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of this application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0210] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0211] In this application, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or replace features of other embodiments.
[0212] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations to the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A method for dynamic expansion and placement of edge computing services, characterized in that: include: Based on the target data processing request for the edge computing platform, the workload intensity of each microservice corresponding to each application in the edge computing platform is predicted to obtain the current workload intensity prediction results of each microservice; and, performing a work performance evaluation on each edge node in the edge computing platform according to the target data processing request to obtain a current work performance evaluation result of each edge node; the workload intensity prediction result includes at least three categories of results from strong to weak, and the work performance evaluation result includes at least three categories of results from strong to weak; Selecting the microservices with the highest and lowest workload intensity prediction results from among the microservices as target microservices; and selecting the edge nodes with the highest and lowest strengths of the work performance evaluation results from among the edge nodes as target edge nodes; According to the target microservice and the target edge node, automatically expand the initial number of copies of each target microservice using a multi-stage automatic expansion model to determine the scaled optimized number of copies of each microservice; Get the adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm; and, obtaining linear changes of social cognitive factors and individual cognitive factors corresponding to respective currently available microservice replicas according to the scaled optimized number of the microservice replicas; Based on the linear changes of the adaptive weight coefficients, social cognitive factors, and individual cognitive factors of each currently available microservice replica, a preset dynamic adaptive service placement method and an update formula of the adaptive discrete binary particle swarm optimization algorithm are used to obtain an optimal service replica placement solution with minimum latency. The dynamic adaptive service placement method is used to combine a dynamic automatic scaling strategy to iteratively place service replicas. Obtaining a mapping relationship between each of the microservice replicas and each available edge node according to the optimal service replica placement scheme, so as to place each of the microservice replicas on the corresponding edge node; According to the target microservice and the target edge node, the multi-stage automatic expansion model is used to automatically expand the initial number of copies of each target microservice to determine the scaled optimized number w′ of each microservice copy. i ,include: σ1 and σ2 represent the coefficients that affect the microservice load and edge node performance, σ1+σ2=1; w i Indicates the initial number of replicas of the target microservice; Represents the length of the input queue; Indicates the average workload of the target microservice; represents the load factor of the jth target edge node; ld avg represents the average workload of all target edge nodes; μ represents the threshold used to measure the workload intensity of the target microservice; Indicates the threshold used to evaluate the load of the target edge node; ms i W represents microservices; H 、W M 、W L represents the set of edge nodes whose load intensity decreases in sequence according to the load factor of the target edge node; e j represents the j-th target edge node.
2. The method for dynamic expansion and placement of edge computing services according to claim 1, wherein: The method of performing workload intensity prediction on each microservice corresponding to each application in the edge computing platform according to the target data processing request for the edge computing platform to obtain the current workload intensity prediction results of each microservice includes: Based on pipeline theory, the load groups corresponding to the respective microservices and the average workload of the respective microservices are obtained, wherein the load groups include: the output load and input load of the upstream microservice of the current microservice in the current monitoring cycle, and the output load and input load of the current microservice in the next monitoring cycle; According to the load groups corresponding to each of the microservices and the average workload of each of the microservices, a preset workload intensity prediction model is used to predict the workload intensity of each of the microservices to obtain the current workload intensity prediction results of each of the microservices.
3. The method for dynamic expansion and placement of edge computing services according to claim 2, wherein: The performing work performance evaluation on each edge node in the edge computing platform according to the target data processing request to obtain a current work performance evaluation result of each edge node includes: Determine the service performance corresponding to each edge node according to the CPU, memory and network bandwidth utilization of each edge node in the edge computing platform; Determine the load factor of each edge node based on the input load of the upstream microservice corresponding to each microservice in the current monitoring cycle and the service performance corresponding to each edge node; According to the load factor of each edge node, a preset work performance evaluation model is used to evaluate the work performance of each edge node respectively, so as to obtain the current work performance evaluation result of each edge node.
4. The method for dynamic expansion and placement of edge computing services according to claim 1, wherein: The step of obtaining the adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm comprises: Determine the total delay of each microservice in each application based on a preset delay model; Setting the fitness value of the particle according to the total delay; An adaptive weight coefficient of the adaptive discrete binary particle swarm optimization algorithm is obtained based on the fitness value, the average fitness value of the particles, and the maximum fitness value.
5. A dynamic expansion and placement device for edge computing services, characterized in that: include: A multi-stage automatic expansion module is used to predict the workload intensity of each microservice corresponding to each application in the edge computing platform based on the target data processing request for the edge computing platform, so as to obtain the current workload intensity prediction results of each microservice; and, performing a work performance evaluation on each edge node in the edge computing platform according to the target data processing request to obtain a current work performance evaluation result of each edge node; the workload intensity prediction result includes at least three categories of results from strong to weak, and the work performance evaluation result includes at least three categories of results from strong to weak; Selecting the microservices with the highest and lowest workload intensity prediction results from among the microservices as target microservices; and selecting the edge nodes with the highest and lowest strengths of the work performance evaluation results from among the edge nodes as target edge nodes; According to the target microservice and the target edge node, automatically expand the initial number of copies of each target microservice using a multi-stage automatic expansion model to determine the scaled optimized number of copies of each microservice; a dynamic adaptive service placement module, configured to obtain an adaptive weight coefficient of an adaptive discrete binary particle swarm optimization algorithm; and to obtain linear changes in social cognitive factors and individual cognitive factors corresponding to each of the currently available microservice replicas according to the scaled optimized number of the microservice replicas; Based on the linear changes of the adaptive weight coefficients, social cognitive factors, and individual cognitive factors of each currently available microservice replica, a preset dynamic adaptive service placement method and an update formula of the adaptive discrete binary particle swarm optimization algorithm are used to obtain an optimal service replica placement plan with minimal latency. The dynamic adaptive service placement method is used to combine a dynamic automatic scaling strategy to iteratively place service replicas. According to the optimal service replica placement plan, a mapping relationship between each microservice replica and each available edge node is obtained to place each microservice replica on the corresponding edge node. According to the target microservice and the target edge node, the multi-stage automatic expansion model is used to automatically expand the initial number of copies of each target microservice to determine the scaled optimized number w′ of each microservice copy. i ,include: σ1 and σ2 represent the coefficients that affect the microservice load and edge node performance, σ1+σ2=1; w i Indicates the initial number of replicas of the target microservice; Represents the length of the input queue; Indicates the average workload of the target microservice; represents the load factor of the jth target edge node; ld avg represents the average workload of all target edge nodes; μ represents the threshold used to measure the workload intensity of the target microservice; Indicates the threshold used to evaluate the load of the target edge node; ms i W represents microservices; H 、W M 、W L represents the set of edge nodes whose load intensity decreases in sequence according to the load factor of the target edge node; e j represents the j-th target edge node.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the dynamic expansion and placement method of the edge computing service described in any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for dynamically expanding and placing edge computing services described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Micro-service dynamic scaling and migration method and device
CN112988398A
Calculation task copy distribution method for edge network application environment
CN113157431A