A mobile edge computing method based on container image layered caching and service migration combined optimization

By leveraging a container image layering structure and real-time information-driven service migration decisions in mobile edge computing, combined with a multi-slope ski rental model and an alternating iterative optimization algorithm, the coupling problem between service migration and cache optimization is solved, improving resource utilization, reducing system overhead, and optimizing the user service experience.

CN122285261APending Publication Date: 2026-06-26BEIHANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2026-02-27
Publication Date
2026-06-26

Smart Images

  • Figure CN122285261A_ABST
    Figure CN122285261A_ABST
Patent Text Reader

Abstract

This invention discloses a mobile edge computing method based on joint optimization of container image layered caching and service migration, belonging to the field of mobile edge computing technology. This method leverages the shared characteristics of image layers to cache the image layer, reducing redundant storage and image retrieval overhead. Simultaneously, it dynamically adjusts the caching strategy in conjunction with service migration decisions, jointly optimizing service migration and caching decisions to reduce bandwidth consumption and improve storage resource utilization. This method can effectively optimize resource allocation in mobile edge computing systems, reduce system overhead, and has wide applications in smart cities, the Internet of Things, and large-scale data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mobile edge computing technology, and more particularly, to a mobile edge computing method based on joint optimization of container image layered caching and service migration. Background Technology

[0002] Mobile Edge Computing (MEC), initially proposed by the European Telecommunications Standards Institute (ETSI) in 2014, is an emerging computing paradigm aimed at migrating cloud computing capabilities to the network edge. With the booming development of compute-intensive and latency-sensitive services, mobile edge computing has gradually become a new and highly promising computing paradigm. The concept of mobile edge computing is derived from cloud computing. In a cloud computing architecture, abundant computing and storage resources are deployed on a central cloud server, and end users can access the services they need through 4G / 5G networks or Wi-Fi. However, while cloud computing solves the problem of limited terminal device resources, the long communication latency between users and cloud servers cannot meet the needs of latency-sensitive applications (such as real-time video analytics and virtual reality), making it difficult to guarantee the quality of service for users. To address this low-latency challenge of real-time applications, the concept of centralized cloud computing has been expanded, leading to mobile edge computing. In an MEC architecture, computing and storage resources are deployed at the network edge (e.g., base stations and Wi-Fi access points) closer to the user. Figure 1 This paper presents a scenario where service migration and service caching decisions occur in a mobile edge computing environment. The decision variable for the service migration strategy is which node executes each user's request. This decision needs to comprehensively consider factors such as the cost of migrating services, the communication latency gains from choosing the nearest node, and the changes in computation latency caused by the change in service node. The decision variable for the service caching strategy is which types of services each node pre-caches to provide services to as many users as possible and facilitate seamless switching.

[0003] While edge computing provides mobile users with lower-latency computing services, the conflict between user mobility and limited node resources presents new challenges to the overall system performance. When a user moves within the edge system, their local access base station also changes. If service migration is not performed and the previous service node continues to provide services, the overhead of service node switching can be avoided, and backhaul links between nodes allow users to communicate with their original service node from their local node to transmit service data and receive service results. However, this multi-hop communication significantly increases latency, severely impacting the quality of service delivery. To mitigate this negative impact as much as possible, services should be dynamically migrated to better locations as users move—this is the service migration problem caused by user mobility.

[0004] In an ideal scenario with sufficient node resources, each node deploys all services that users may request, and each node has enough computing power to support a large number of user requests. In this case, it is only necessary to migrate the services to the local node after the user moves. However, in real scenarios, the number of services that each node can deploy is limited, and the process of pulling and loading services for users on demand is very time-consuming. Usually, the service time for a request is in the millisecond range, while the time for pulling and loading services is from several seconds to tens of seconds, which is the service caching problem caused by limited node resources. At the same time, in real scenarios, user demand patterns are non-stationary and unknown, and the computing power of nodes is difficult to support too many users requesting services at the same time. The aggregation of requests will lead to increased computing latency, thereby affecting service quality. Therefore, service placement decisions need to be considered dynamically to balance system load and obtain good overall system performance. The service caching problem can be broken down into the following sub-problems: (1) Which services need to be cached? Service caching has both overhead and benefits. The overhead includes the rental cost of edge server resources and the amount of bandwidth used for downloading services. The benefits are mainly to reduce the latency perceived by users and the traffic in the backhaul network. (2) Where to cache service instances? Some recent work suggests that users in the same location may request similar services in the near future. Services should be placed based on geographic location or user interests. (3) When should the service caching configuration be reconsidered? That is, the timing of service placement decisions. Summary of the Invention

[0005] Existing mobile edge computing (MEC) technologies also have shortcomings in considering the coupling between service migration and caching optimization. They often overlook the spatial coupling of multi-user service migration decisions or the coupling of caching decisions over long time scales. To address these technical issues, this invention, based on the layered characteristics of container images, focuses on the service migration and caching optimization problems in mobile edge computing environments, providing detailed descriptions from both single-user and multi-user scenarios.

[0006] For single-user scenarios in mobile edge computing, this invention proposes a service migration mechanism based on real-time mobility information. Due to the unpredictability of user movement in real-world mobile edge computing scenarios, this mechanism balances the user's service migration overhead with operational overhead, modeling the single-user service migration decision as an integer programming problem, and proposing a dynamic migration decision algorithm based on a multi-slope ski rental model. This algorithm dynamically acquires the user's location information and network conditions, adjusting the service migration strategy in real time, thus improving the system's adaptability and flexibility. Theoretical performance analysis verifies that the proposed algorithm is competitive with the offline optimal solution. Simulation results show that the algorithm reduces the total user overhead by at least 38.9% compared to the offline solution.

[0007] For multi-user scenarios in mobile edge computing, this invention optimizes service migration by addressing edge caching issues, proposing a coupling mechanism between edge caching and service migration based on a layered container image structure. Unlike traditional caching mechanisms, this invention considers that the hierarchical structure of container images allows multiple users to reuse a single image layer, thus proposing caching on an image layer-by-image basis. However, the strong spatiotemporal coupling between service migration and caching decisions increases the problem complexity. Therefore, this invention models the service migration and edge caching coupling optimization problem as a multivariate integer programming problem, proposing a dynamic migration and adaptive caching algorithm based on the alternating iterative optimization approach. This algorithm dynamically adjusts the image layer caching strategy according to user needs and jointly optimizes user service migration, reducing bandwidth consumption and optimizing storage resource utilization.

[0008] This involves how to efficiently manage service migration and cache optimization in edge computing environments. Mobile edge computing (MEC) refers to pushing computing, storage, and network resources to the network edge to provide services closer to users, thereby reducing latency, improving service response speed, and alleviating the computing burden on the cloud. With the proliferation of the Internet of Things (IoT) and smart devices, MEC has become a key technology for improving computing efficiency, optimizing network resource allocation, and meeting real-time demands.

[0009] The present invention provides a mobile edge computing method based on joint optimization of container image layered caching and service migration, comprising the following steps:

[0010] Step 1: Edge computing environment status collection;

[0011] Used to collect status information on compute offloading, service migration, edge caching, and resource allocation in mobile edge computing environments.

[0012] Step 2: Service migration mechanism based on real-time mobile information;

[0013] Service migration processing of real-time mobile information is performed based on edge computing environment status information; (1) Service migration decision variables and optimization objectives are set; (2) Communication overhead, operating resource overhead and service migration bandwidth overhead are calculated respectively to obtain the service migration problem formulation as follows: (3) Set the service migration constraint to minimize the total service migration cost.

[0014] Existing service migration research largely relies on predicting user movement, using predictive models (such as Markov models and neural networks) to anticipate user movement trajectories and request demands, assuming that user movement patterns and service requests are fixed. However, this static assumption is difficult to adapt to real-world dynamic network environments and user behavior, especially in complex network environments and rapidly changing user needs, where traditional methods exhibit poor predictive ability and adaptability. Therefore, how to dynamically adjust service migration strategies without relying on accurate prediction is a key challenge in current research. Addressing the limitations of existing research, this invention proposes a service migration mechanism based on real-time mobility information. Instead of relying on predicting user movement, it acquires user location information and network conditions in real time, dynamically adjusting service migration decisions. By updating user location and network conditions in real time, this mechanism can quickly respond to changes in user needs, avoiding the error accumulation problem of traditional prediction methods. By modeling service migration decisions as an integer programming problem and combining it with a multi-slope ski rental model, the dynamic migration decision algorithm proposed in this invention theoretically has lower computational complexity while providing good performance guarantees. It can effectively handle highly dynamic and uncertain edge computing environments, optimizing user service experience and system resource allocation.

[0015] Step 3: Service caching and migration coupling mechanism based on container fine-grained partitioning;

[0016] Based on the edge computing environment status information, service caching and migration coupling processing based on container fine-grained segmentation is performed; (1) Service caching decision variables and optimization objectives are set; (2) Image layer pull overhead, runtime resource overhead, service cache bandwidth overhead and invalid cache penalty overhead are calculated respectively to obtain the service caching problem statement as (3) Set the service cache constraint to minimize the total service cache overhead.

[0017] In existing research on service migration and caching optimization, most methods treat container images as a whole for caching, neglecting their layered structure. Container images typically consist of multiple layers, many of which can be shared by multiple services. This coarse-grained caching strategy often leads to redundant storage and significant bandwidth consumption. Furthermore, existing work is insufficient in considering the coupling between service migration and caching optimization; many studies either ignore the spatial coupling of multi-user service migration decisions or the long-term coupling of caching decisions. To overcome the limitations of existing methods, this invention proposes an edge caching and service migration coupling mechanism based on the layered structure of container images. This mechanism fully utilizes the layered characteristics of container images, reducing redundant storage and image fetching overhead.

[0018] Step 4: Design of dynamic migration and adaptive caching algorithms;

[0019] Decoupling the long-run optimization problem into a single-slot optimization problem is described as follows: The alternating iterative optimization algorithm is used to minimize the time slot within a single time slot. To obtain the optimal migration decision action and cache decision actions ,Right now .

[0020] This invention models the service migration and edge caching coupling optimization problem over a long time scale, and proposes a dynamic migration and adaptive caching algorithm based on the idea of ​​alternating iterative optimization. The mechanism proposed in this invention can significantly reduce unnecessary data transmission and storage, reduce the overall operating cost of the system, and improve the resource utilization efficiency of edge servers.

[0021] The technical advantages of the method of this invention are as follows:

[0022] (1) Caching by image layer: By caching container images by layer, different services can share the same image layer, thereby reducing redundant storage and bandwidth consumption, which is beneficial to improving the utilization efficiency of storage space.

[0023] (2) Coupling of service migration and caching decisions: The caching level and service migration decisions are dynamically adjusted by combining service migration and caching strategies. When network conditions, user needs and system status change, the migration and caching strategies are optimized in real time to reduce redundant fetching and storage overhead, which is conducive to improving the resource utilization of edge computing nodes. By coupling service migration and caching decisions, the utilization of computing and storage resources of edge computing nodes is effectively improved, and unnecessary data transmission and service migration are reduced.

[0024] (3) Alternating Iterative Optimization Algorithm: The alternating iterative optimization algorithm is used to jointly optimize service migration and caching decisions, improve the utilization efficiency of system resources, reduce unnecessary data transmission and storage, and optimize system overhead; by dynamically adjusting the caching strategy and service migration decisions, the overall overhead of the system is significantly reduced, including storage overhead, migration bandwidth overhead and communication overhead.

[0025] (4) To verify the performance advantages of the edge caching and service migration coupling mechanism proposed in this invention, a series of simulation experiments were conducted to test its performance. The experimental results show that the proposed coupling mechanism performs well in various scenarios, effectively reducing redundant caching, reducing image retrieval overhead, and optimizing the overall system performance. It shows significant advantages, especially under conditions of large-scale users and complex networks. Compared with the four offline solutions, it reduces the total system overhead by an average of 33.7%, 46.9%, 44.3%, and 57.2%. Attached Figure Description

[0026] Figure 1 This is a diagram illustrating a traditional edge caching and service migration problem scenario.

[0027] Figure 2 Flowchart of the dynamic migration and adaptive caching algorithm of this invention.

[0028] Figure 3 This is a schematic diagram of a service migration scenario.

[0029] Figure 4 This is a framework diagram of the migration decision-making mechanism based on real-time mobile information of the present invention.

[0030] Figure 5 This is a performance comparison chart of service migration mechanisms based on real-time user mobility information.

[0031] Figure 6 This is a schematic diagram of the working framework of the edge caching and service migration coupling mechanism of the present invention. Detailed Implementation

[0032] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. The examples of the parameters listed are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

[0033] Existing service migration and caching optimization methods mostly employ coarse-grained caching strategies, treating container images as a whole for caching. This leads to wasted storage resources and redundant fetching overhead. Service migration and caching optimization are often not effectively coupled; caching strategies and migration decisions are often optimized independently, failing to fully consider their mutual influence. The layered structure of container images is not fully utilized, resulting in unoptimized shared characteristics between image layers, further exacerbating the waste of storage and network resources. This invention, through the rational utilization of the container image layered structure, significantly improves storage and bandwidth utilization efficiency in edge computing environments. Furthermore, by dynamically adjusting service migration and caching decisions, it optimizes system resource allocation, demonstrating significant performance advantages and application value.

[0034] This invention designs a real-time information-driven service migration decision-making mechanism. Existing service migration research largely relies on predicting user movement, using predictive models (such as Markov models and neural networks) to forecast user movement trajectories and request needs in advance, assuming that user movement patterns and service requests are fixed. However, this static assumption is difficult to adapt to real-world dynamic network environments and user behavior, especially in complex network environments and rapidly changing user needs, where traditional methods exhibit poor predictive ability and adaptability. Therefore, how to dynamically adjust service migration strategies without relying on accurate prediction is a key challenge in current research. To address the limitations of existing research, this invention proposes a service migration mechanism based on real-time movement information. Instead of relying on predicting user movement, it acquires user location information and network conditions in real time, dynamically adjusting service migration decisions. By updating user location and network conditions in real time, this mechanism can quickly respond to changes in user needs, avoiding the error accumulation problem of traditional prediction methods. By modeling service migration decisions as an integer programming problem and combining it with a multi-slope ski rental model, the dynamic migration decision algorithm proposed in this invention has theoretically lower computational complexity while providing better performance guarantees. It can effectively handle highly dynamic and uncertain edge computing environments, optimize user service experience and system resource allocation.

[0035] This invention designs a service migration and edge caching coupling mechanism based on fine-grained container partitioning. Existing research on service migration and caching optimization mostly treats container images as a whole for caching, neglecting their layered structure. Container images typically consist of multiple layers, many of which can be shared by multiple services. This coarse-grained caching strategy often leads to redundant storage and significant bandwidth consumption. Furthermore, existing work is insufficient in considering the coupling between service migration and caching optimization; many studies either ignore the spatial coupling of multi-user service migration decisions or the coupling of caching decisions over long time scales. To overcome the limitations of existing methods, this invention proposes an edge caching and service migration coupling mechanism based on the layered structure of container images. This mechanism fully utilizes the layered characteristics of container images, reducing redundant storage and image retrieval overhead. By modeling the service migration and edge caching coupling optimization problem over long time scales and proposing a dynamic migration and adaptive caching algorithm based on the alternating iterative optimization approach, the proposed mechanism can significantly reduce unnecessary data transmission and storage, lower the overall system operating cost, and improve the resource utilization efficiency of edge servers.

[0036] See Figure 2 As shown, the mobile edge computing method based on container image layered caching and service migration joint optimization of the present invention has the following steps:

[0037] In this invention Figure 2 The detailed decision-making process of dynamic migration and adaptive caching algorithms is demonstrated. Specifically, the system can update the cache and migration decisions according to two strategies: (1) Simultaneous update of cache and migration decisions: When the cache update condition is triggered, the system updates the cache and migration strategies simultaneously. This strategy is adjusted in real time under factors such as user movement and changes in network conditions to ensure the coordination of cache and migration decisions; (2) Update of migration decisions only: In this case, the cache state remains unchanged, and the system only updates the service migration strategy. Usually, when the cache meets the current needs, the system will choose to adjust the migration decision to optimize resource usage.

[0038] Step 1: Edge computing environment status collection;

[0039] The environment for Mobile Edge Computing (MEC) involves multiple technical aspects. The mobile edge computing environment information collected in this invention includes at least: computation offloading, service migration, edge caching, and resource allocation.

[0040] (1) Computation Offloading: Computation offloading is one of the core technologies of mobile edge computing. It refers to the process by which users transmit computing tasks from their terminal devices to edge servers via wireless networks to reduce the computing load on local devices, reduce power consumption, and improve execution efficiency. Computation offloading can be divided into two categories: binary offloading and partial offloading. Binary offloading means that users can completely offload the entire computing task to the edge server for execution, which is suitable for terminal devices with weak computing capabilities, such as smart wearable devices. Partial offloading allows users to offload part of the computing task to the edge server for execution, while the other part is executed locally. This method is more flexible and efficient and is suitable for computationally intensive or real-time tasks. Achieving efficient computation offloading requires consideration of multiple factors, such as the transmission quality of the wireless link, the computing load and power consumption of the edge server, task execution latency, and data privacy and security issues.

[0041] (2) Service Migration: Service migration aims to ensure service continuity for mobile users by dynamically adjusting the edge nodes where the service is located to achieve stable service quality and optimized user experience. There are many technical challenges in service migration, such as migration strategy design, migration decisions need to take into account changes in user location, changes in network quality, and network and computing overhead caused by migration in real time; migration trigger mechanism design, effective migration trigger mechanisms need to be designed, such as predictive models based on user movement or data-driven models based on real-time measurements, to ensure timely and efficient completion of migration; technical implementation of service state migration, service migration is not only data migration, but also includes real-time migration of service running state (such as virtual machine or container state), involving issues such as data consistency and minimizing service interruption time. Currently widely used service migration methods include pre-copy migration and lazy migration.

[0042] (3) Edge caching: Edge caching is a technology that utilizes the storage resources of edge servers to pre-cache frequently requested data or service content on network edge nodes. It can effectively reduce data transmission latency and core network congestion, reduce duplicate data transmission, and improve the response speed and experience quality of user requests. Common edge caching strategies include: content popularity-aware strategies, which pre-cache popular data based on historical data access frequency and prediction models; and collaborative caching strategies, which distribute content collaboratively among multiple edge nodes to achieve efficient utilization of cache space. However, the effectiveness of caching is affected by factors such as cache replacement algorithms, storage capacity limitations, user mobility, and content update frequency.

[0043] (4) Resource Allocation: Resource allocation achieves efficient matching and dynamic adjustment between user demand and resource supply by efficiently scheduling the computing, storage, and network resources of edge nodes. Resource allocation methods typically involve the following aspects: computing resource management, i.e., dynamic allocation of server CPU and memory resources based on user task characteristics and load status; storage resource allocation, i.e., optimizing the storage space allocation of edge servers according to caching strategies to maximize cache hit rate and space utilization; and network resource scheduling, i.e., rationally allocating bandwidth resources according to the bandwidth and latency requirements of different user applications to achieve network traffic optimization and load balancing. The technical methods for implementing resource allocation mainly include optimization theory (such as convex optimization and integer optimization), reinforcement learning, game theory, and other advanced methods.

[0044] Step 2: Service migration mechanism based on real-time mobile information;

[0045] Key design considerations for service migration mechanisms based on real-time mobility information include: First, the latency of data transmission required for service migration, i.e., the latency of transferring the service application from the original service node to the new service node. Second, the runtime latency for users to continue receiving services from the current service node, including potentially long communication and computation latency. Communication latency refers to the latency of users uploading input requests, while computation latency is determined by the total computing power and current load of the service node. Third, the runtime latency for users to receive services from the new service node, also including communication and computation latency. In summary, given the uncertainty of future user mobility, it is necessary to weigh the immediate costs (migration latency caused by the migration action) against potential future costs (the difference between the runtime latency of maintaining the current service node and the runtime latency of the new node). The technical challenges to be addressed are: first, the highly random nature of user mobility necessitates the design of online strategies based on real-time information; and second, the heterogeneity of nodes and the large decision-making space. Therefore, it is necessary to first provide specific mathematical representations of the three metrics for measuring latency; second, it is necessary to consider the dynamic changes in system information and establish an optimization model by comprehensively weighing the conditions; finally, it is necessary to design an online optimization algorithm to make real-time decisions on the time and destination of user migration, thereby ultimately improving the quality of experience (QoE).

[0046] exist Figure 3In the service migration of the mobile edge computing scenario shown, the description and modeling of the service migration problem for which user mobility is unknown are presented. In the edge computing scenario, user equipment (UE) accesses a heterogeneous network composed of multiple distributed edge servers (Edge Nodes) through a wireless network. Each user service (such as AR / VR, real-time video analysis, etc.) needs to run on the edge node and interact with the user through a low-latency link. The system has the following characteristics: (1) The user's location changes dynamically over time (divided into discrete time slots t), the movement path and dwell time are unknown, and the system cannot rely on long-term prediction; (2) The edge nodes are deployed at base stations or access points, and the user communicates directly with the local node (the current service node); if the user moves to the coverage area of ​​other nodes, it needs to be transmitted through multi-hop relay, which leads to a significant increase in communication latency and overhead. (3) The computing resources (CPU, memory) and storage resources of the edge nodes are limited, and they cannot handle a large number of user requests at the same time. Resource competition will cause queuing delays and service quality degradation. Figure 3 For example, a user in the system will have two related edge servers: one is the local server, which by default is the node closest to the user's geographical location and is the first and last link in the communication between the user and the node; the other is the service node, which is actually run by the user service. Of course, the user service can also be executed by its local node, and the initial state of the system is that the user's service node is its local node. However, it is not a wise decision to have the user service always follow the user's local node during the user's subsequent movement, because the user's local node may not be suitable for providing services to the user: for example, in extreme cases, the node's storage resources may be insufficient to support the startup of new user services, or the high resource usage cost caused by the scarcity of node resources.

[0047] Against this backdrop, the main focus is on making informed migration decisions, specifically, when to delegate user services to other nodes during user migration. In this scenario, the service migration system incurs the following overheads: (1) Communication overhead: the communication overhead between the user's local node and the service node, primarily expressed as bandwidth cost (ignoring communication overhead between the user and the local node, and ignoring communication overhead when the local node is also the service node); (2) Operating resource overhead: the overhead incurred by the user service while running on the service node, expressed as the cost of using resources such as storage and computing; (3) Service migration bandwidth overhead: the overhead incurred during migration, expressed as the bandwidth cost of service transmission. Therefore, the optimization objective of the migration decision is to minimize the sum of the above overheads. The following will elaborate on the causes and quantitative basis of various overheads, starting from the physical mechanisms, resource characteristics, and actual system constraints, and will introduce the decision variables and optimization objectives in the model using mathematical symbols, as shown in Table 1.

[0048] Table 1 Physical meanings of mathematical symbols

[0049]

[0050] (1) Service migration decision variables and optimization objectives

[0051] This invention defines the decision variable as a binary 0-1 variable matrix. ,in , , indicating user In the time slot Is the time determined by the server? Providing services This decision variable actually indicates the user's service node in each time slot. In the model, another binary variable related to both the user and the node is... This represents the user's local node, which is the geographically closest node. This node will serve as the base point for communication between the user and the service node, and will be responsible for transmitting the input and output data of the service.

[0052] (2) Service migration communication overhead

[0053] Communication overhead: In edge computing scenarios, users need to interact with service nodes in real time to transmit input data (such as sensor information) and receive output results (such as rendered AR images). When the service node is inconsistent with the user's currently connected local node, user data needs to undergo multi-hop transmission between the local node and the remote service node. The communication overhead is borne by the user. The bandwidth consumption per time slot of a service is determined by the unit bandwidth price between local nodes and service nodes. Bandwidth consumption is often determined by the service type; for example, a 4K video stream requires 20 Mbps bandwidth, while an IoT sensor might only need 10 Kbps. This parameter can be obtained through service profiles or historical monitoring data. The resource costs of inter-node links typically include fiber optic leasing fees, equipment power consumption, etc., and are positively correlated with the physical distance between nodes. Specifically, the definition... For users The bandwidth consumption of each time slot communication for the service is defined. For nodes and The communication overhead per unit bandwidth resource. Additionally, by enumerating the user's local node and service node, the user's... In the time slot The resulting communication overhead is Therefore, the total communication overhead for all users across all time slots in the service migration system is... .

[0054] (3) Service operation overhead

[0055] Service operation overhead: When user services run on edge servers, they will occupy the computing and storage resources of that node. Since the resources of edge servers are often limited, when multiple services compete for the resources of the same node, the following problems will occur: (1) Queuing delay: When CPU resources are insufficient, tasks need to queue for scheduling (such as Kubernetes Pod queuing), increasing service response time; (2) Performance degradation: High-load nodes may experience problems such as CPU overheating and frequency reduction, and storage I / O bottlenecks, further slowing down service execution efficiency. Therefore, this part of the overhead needs to be considered in the optimization objectives. The service’s CPU / storage requirements can be determined through offline analysis (such as code performance profiling) or online monitoring (such as Prometheus metrics). Specifically, this study considers these two types of resources on each edge node: CPU computing resources and storage resources, in a vector Indicates at node The overhead of using unit CPU resources and unit storage resources, in vector... Indicates user The number of resources required for each time slot of the service can be obtained from the user. In the time slot The resulting service operation overhead is Therefore, the total service operation overhead incurred by all users across all time slots in the service migration system is... .

[0056] (4) Service migration bandwidth overhead

[0057] Service migration bandwidth overhead: Service migration requires the complete transfer of the service's runtime state (such as database connections and memory data) from the original node to the new node. Migrating data will consume inter-node link bandwidth. The resulting bandwidth overhead mainly depends on the amount of data being migrated and the unit bandwidth price between the original and destination service nodes. This model shares the same link cost model as communication overhead to ensure the comparability of migration and communication costs. Specifically, this is based on... Indicates user migration The amount of data that the service needs to transmit is still defined. For nodes and The communication overhead of using unit bandwidth resources, and the user is determined by enumeration. In the time slot Service nodes and time slots If the two service nodes are inconsistent, it means that a time slot is needed. Initial migration users The service can be provided by the migrating user. The bandwidth cost of service migration is calculated by multiplying the amount of data required for the service to be transmitted by the unit bandwidth overhead between the two nodes; if they are consistent, then the time slot... No user For service migration, the unit bandwidth overhead between the same node is zero, which can still be mathematically represented as described above, and the user's... In the time slot The resulting service migration bandwidth overhead is Therefore, the total service migration overhead for all users across all time slots in the service migration system is... .

[0058] The optimization objective of the service migration mechanism based on real-time mobility information is to minimize the total overhead in the edge computing network system, which includes three types of overhead as described above. Therefore, the service migration problem can be formulated as follows: Integer programming problem.

[0059] (5) Service migration constraints

[0060] First, this optimization problem is an integer programming problem, and the decision variable is a binary variable that needs to satisfy 0-1 constraints, i.e. Secondly, the decision variables must also satisfy the uniqueness constraint, that is, for each user, in any given time slot, there will be one and only one service node. Finally, it's also necessary to consider that each edge server has its own CPU and storage resources. The total resources required by all services running on each node must meet the node's resource limitations, in order to achieve vector efficiency. Indicates user The number of resources required for each time slot of the service, and then... Represents edge server Based on the CPU and storage resource capacity, the user's resource capacity can be determined to be less than or equal to the edge server's resource capacity. The optimization problem of service migration mechanism based on real-time mobile information ultimately aims to minimize the total service migration cost while satisfying service migration constraints. .

[0061] (6) Mapping from ski rental to service migration

[0062] The Ski Rental Problem describes a decision-making problem that weighs the costs of short-term rental against the costs of long-term purchase when the timeframe is unknown. Its core idea is a "rent or buy" problem, where skiers must decide during their trip when to stop renting skis (paying daily rental fees) and purchase them (paying a one-time buyout fee). If the number of ski days is less than a certain threshold, renting is better; otherwise, purchasing is better. However, since the number of ski days is unknown, a strategy must be designed to minimize the regret value (i.e., the ratio of actual cost to ideal cost) in the worst-case scenario.

[0063] In a classic ski rental problem, the daily rental fee for skis is known to be... The cost of a one-time buyout is Skiing days The variable is a random variable and is unknown at the time of decision-making. The decision variable in this problem is deciding whether to rent or buy skis at the beginning of each day. The objective function is to minimize the actual total cost and the pre-existing optimal cost (which is known). The competition ratio is the minimum cost at the time.

[0064] Algorithms for the classic ski rental problem are divided into deterministic solutions and randomized strategies. The deterministic solution, also known as the threshold method, involves consistently renting until the total rental cost equals the purchase cost (i.e., ...). If skiing hasn't ended by then, the option to buy is chosen. This option has a competition ratio of 2, meaning the worst-case cost doesn't exceed twice the oracle's optimal cost. The randomized option employs a randomized repeated doubling strategy, dynamically adjusting the purchase timing with a probability distribution to reduce the competition ratio to... .

[0065] In the service migration problem, the decision logic of the ski rental model can be compared as follows: (1) Rental: Keep the service running at the current node and continue to pay for communication and operation costs (equivalent to daily rental); (2) Purchase: Pay a one-time migration cost to migrate the service to a better node and enjoy lower operation costs thereafter (equivalent to buying out the skis); (3) Unknown ski days: The remaining time the user stays at the current local node is also unknown. The specific mapping relationship is as follows: As shown:

[0066] Table 2 Mapping Relationship Table

[0067]

[0068] Multi-Slope Ski Rental

[0069] Traditional ski rental models only consider a single rental or purchase option. However, in real-world edge computing scenarios involving service migration, users often have the option to migrate between multiple candidate nodes, each with different migration and subsequent operational costs. Therefore, this research extends the classic ski rental model to a multi-slope ski rental model, considering user... In other words, each "slope" corresponds to a candidate node. Its cost structure is as follows: rental costs Indicates that the service is on the node The resource overhead per time slot, communication loan overhead, and purchase cost. Indicates migration to node The one-time migration cost. The decision-making objective is to dynamically select when to migrate to which node in order to minimize the total long-term cost.

[0070] After mapping the original migration problem to the multi-slope ski rental model, solving this problem still faces the following key challenges: (1) Combinatorial explosion: the increase in the number of candidate nodes leads to an exponential increase in the decision space; (2) Dynamic environment: node load and link status change over time, requiring online adjustment of strategies; (3) Competition ratio analysis: it is necessary to prove the theoretical performance guarantee of the algorithm under unknown connection duration.

[0071] (7) Service migration decision algorithm design

[0072] In the scenario of service migration based on real-time mobile information, this invention has summarized that the problem is essentially a trade-off between immediate costs and potential future costs. Immediate costs refer to the bandwidth costs incurred in fetching services due to migration, while potential future costs refer to the high operating costs that would be incurred in the future due to longer communication distances or higher resource usage prices if migration were not pursued. This type of trade-off problem can be solved using a ski rental model, which provides a framework for making dynamic decisions about renting or buying services when the decision window size is unknown.

[0073] Specifically, the present invention will The decision span is divided into multiple smaller decision windows. The division is based on the following: whenever a user's local node changes, the current decision instance ends and a new decision window begins. Within each decision window, the decision time span is unknown (because the time the user maintains the current local node connection is unknown), while the cost of migrating or not migrating is certain. Other non-migration costs of continuing to run the service on the current service node are certain, and there are no migration costs. The migration costs of migrating to other nodes and the costs of continuing to run the service on other nodes are also certain.

[0074] Similar to the classic multi-slope ski rental problem, this problem presents users with multiple options: maintaining their current service node or migrating to another node. Each of these options has different purchase costs and rental fees. Therefore, the original problem evolves into selecting the appropriate option for the user in each time slot, considering both the purchase cost and rental fees for each option, and the duration of the current decision window.

[0075] Formally express these option information: The system has a total of Each node (including the user's current service node) is for the user. In terms of nodes The corresponding service communication costs and service operation costs are available. This indicates that the cost of migrating from the current service node to each node is available. Indicate; command This represents the user's local node within this decision window. This represents the service node in the user's current decision window; the service operating cost can be expressed as... and .

[0076] It's important to note that not every node needs to be considered in the decision-making process. Some nodes may have higher migration, communication, and service operation costs than others, making them a disadvantageous option. This will be discussed further. Filter the following from the nodes There are 1 valid option that satisfies the relationship: and .

[0077] This invention designs a migration algorithm based on real-time mobility information, the main idea of ​​which is as follows: In the first... In a decision-making example to During the time slot, the service will be provided by the index […]. The edge servers run, that is, respectively in The time slot will migrate user services to the index […]. The edge server, the specific decision framework diagram of the algorithm is as follows Figure 4 As shown.

[0078] In this invention, based on Figure 4 The process steps of the migration decision algorithm based on real-time mobility information are as follows:

[0079] enter: Information related to each option ;

[0080] Then: Calculate The cost of offline optimal decision when the condition is known ; The function is a piecewise function, initialized for The function value corresponding to the first piecewise point ;make ,in , It is a range Random values ​​between; let , ;make , ;make for The node corresponding to the offline optimal solution at that time; initialization When the value is 0, the user's local node connection remains unchanged; at t+1, if a Make satisfy as well as and nodes There are enough resources for users Providing services involves migrating users. Service to node ; and remove the node from the decision options. Increment the time slots and rerun the decision algorithm.

[0081] Output: Migration decision actions for each time slot and .

[0082] (8) Performance analysis of service migration mechanism based on real-time mobile information

[0083] This paper will theoretically analyze the performance difference between the proposed migration decision algorithm based on real-time mobile information and the offline optimal solution. Specifically, the ratio of their overhead costs will be used as the metric. The overhead ratio of the proposed algorithm to the offline optimal algorithm is also known as the competition ratio.

[0084] The optimal offline solution specifically refers to the duration of time the connection is maintained on the current local node before the decision instance begins. The migration decision made under known circumstances depends on the duration the current local node maintains the connection. It is known and can be easily calculated. The first iteration of the algorithm occurs In other words, the duration for which a user maintains a connection with the current local node. The range of values ​​is within In the meantime, the optimal decision will always be to maintain the current initial node. Within the range of values, the proposed online algorithms will all maintain the same cost value as the offline optimal solution. Now consider... There must be a situation where one The value makes Therefore, the expected cost value obtained according to the proposed algorithm will satisfy... .

[0085] Furthermore, the competition ratio between the proposed algorithm and the offline optimal solution can be obtained as follows: In summary, the proposed migration decision algorithm based on real-time mobility information outperforms the offline optimal solution in the worst-case scenario. The competition ratio.

[0086] This simulation experiment is based on a A square simulation area was constructed, in which 10 edge servers were deployed. Edge nodes were evenly distributed throughout the simulation area to meet the service requests of dynamically moving users. Each node had varying CPU and storage resources; CPU capacity was randomly distributed between 1 GHz and 3.5 GHz, and storage capacity between 100 GB and 500 GB. Network communication conditions between nodes were also meticulously quantified, with the cost per unit bandwidth communication set between $0.002 and $0.004 / GB, reflecting the relatively low cost of data transmission between local edge nodes in a real network. The bandwidth consumed per time slot for user service communication was randomly generated between 50 MB and 200 MB, and the bandwidth required to migrate user services was randomly distributed between 5 GB and 50 GB.

[0087] The simulation experiments set up two baseline methods: distance-based migration (DBM) and node-based migration (NBM). The distance-based method determines service migration based on the physical distance between the user and the edge node. When the user is far from the current service node, the service will migrate to a node closer to the user. This method primarily optimizes the user's service communication overhead. The node-based migration method makes migration decisions based on the load of each edge node (such as CPU utilization, storage occupancy, etc.). If the load of an edge node is too high, the cost of using its resources will be higher than other nodes, so the service will be migrated to a node with a lower load. This method primarily optimizes the user's service runtime overhead.

[0088] This study compares the performance of three service migration methods—RUBM (Real-Time User Mobility Information-Based Service Migration), NBM (Node Load-Based Service Migration), and DBM (Distance-Based Service Migration)—in the same edge computing scenario, particularly focusing on their differences in total overhead, service communication overhead, service runtime overhead, and migration bandwidth overhead. Experimental results are as follows: Figure 5 As shown in the figure, the experimental results show that RUBM consistently has the lowest total overhead under all experimental conditions. In terms of service communication overhead, the DBM method performs best because it primarily bases migration decisions on the distance between users and nodes, thus effectively reducing communication burden. In terms of service operation overhead, the NBM method performs best. Since this method makes migration decisions based on node load, it effectively avoids overloaded nodes, thereby reducing computational overhead. However, in terms of migration bandwidth overhead, the RUBM method outperforms both NBM and DBM. Based on real-time user mobility information, the RUBM scheme effectively reduces the number of service migrations, significantly lowering migration bandwidth overhead. Overall, although RUBM's service communication and operation overheads are higher than DBM and NBM, respectively, it achieves a good balance between the two, making its total overhead more advantageous than the other two methods. Compared to the other two baseline schemes, the service migration mechanism based on real-time user mobility information reduces total overhead by 38.9% and 46.2%, respectively. This indicates that the RUBM method can effectively balance communication and computational overhead during service migration, avoiding excessive resource waste.

[0089] Step 3: Service caching and migration coupling mechanism based on container fine-grained partitioning;

[0090] This invention optimizes caching at a fine-grained level under the constraints of edge server caching resources, using container layers as units, to further improve cache reusability. The main challenges are: first, considering the temporal coupling of decisions, i.e., the impact of current decisions on future time-slot decisions, thus requiring the design of long-term optimization problems; second, the coupling between sub-problems, i.e., the service caching sub-problem affecting the service migration sub-problem; and third, after fine-grained partitioning of the cache unit, the strength of container layer reusability needs to be considered, as the decision space increases several times compared to the original container as a whole. First, a formalized description of user QoE metrics is needed, including computation latency, communication latency, and service fetch latency; second, a service caching and migration coupled optimization problem needs to be established with resource capacity as a constraint and minimizing system latency as the optimization objective; finally, this coupled optimization problem is an NP-hard integer programming problem, requiring the design of a low-complexity heuristic coupling algorithm to ultimately improve caching performance and user QoE.

[0091] Addressing the issues of service migration and caching mechanism optimization after edge caching, and considering the redundant storage and retrieval problems caused by excessively large cache granularity, this invention introduces research and discussion on container layering structures. Furthermore, it models the scenario and problems of edge caching and service migration coupling, and designs a dynamic migration and adaptive caching algorithm to solve this problem. Ultimately, it aims to optimize migration overhead, service communication overhead, and service operation overhead, and solves the redundant caching problem, effectively utilizing the limited storage resources of edge servers.

[0092] In the mobile edge computing scenario studied in this invention, there are multiple distributed edge servers. Each edge server is usually deployed near a wireless access node close to the user terminal, such as a 4G / 5G base station or a Wi-Fi hotspot. These edge servers provide computing, storage, and network resources and carry various services in a containerized manner to quickly respond to user task requests. In this scenario, the mobile terminal carried by the user will switch connections between different edge nodes as the user moves. To ensure that users can continuously obtain low-latency, high-quality services, the system needs to dynamically make decisions on service migration and service caching strategies: (1) Service migration decision, which determines which edge node provides services to each user in different time periods to optimize service response time and resource utilization; (2) Service caching decision, which determines which container images each edge node caches to quickly respond to user needs and reduce service startup latency and data transmission overhead.

[0093] Cloud servers cache all service container images required by users, while edge servers, due to resource constraints, can only cache a subset of service instances. Current service caching-based migration efforts cache services at the entire service level. However, this coarse-grained caching approach relies on predicting future user migrations, and the accuracy of these predictions significantly impacts caching effectiveness. Furthermore, coarse-grained caching is inefficient in resource utilization, resulting in poor reusability of the overall container. Therefore, a finer-grained caching approach is needed. Based on a container-level hierarchical storage structure, a service caching and migration coupling mechanism based on container layers is proposed. Specifically, this mechanism determines when edge servers should cache which container layers and when user services should be migrated to which server for execution.

[0094] Consider a deployment with a set of edge servers In mobile edge computing scenarios, there is a group of users The servers move randomly within this area. Each edge server is configured with a base station or wireless access point for communication with users, and servers can also communicate with each other via a stable wireless network. Each user sends a request for a specific type of service, and this request can be executed on any service node by loading a service image and creating a corresponding container. A service image consists of multiple image layers, and different services may share some image layers; therefore, the image layers contained in all services are defined as follows: .

[0095] In a discrete-time model, continuous time is divided into a set of time slots. Each edge server has a limited storage capacity for caching the image layer. To represent the server The cache capacity. Meanwhile, with To indicate in time slot Use server The price of computing resources per unit. Edge server. and The unit bandwidth price is The central cloud server hosts all image layers. Servers pull image layers from the cloud to their local machines for caching, while the cloud extends to edge servers. The unit bandwidth price is .

[0096] For any user ,by To represent users In the time slot The local node at that time. Different users request different services, and the task arrival rate varies across time slots, therefore... To represent users In the time slot Required computing resources (quantified in CPU cycles). Bandwidth generated per time slot for users to transmit input / output data to the server. This is used to represent the different image layers contained in the user services. To represent users Does the service image contain an image layer? Finally, the mirror layer. Data size To express.

[0097] This invention notes that the following overheads occur in a service caching system: First, there is the overhead of the service running on the server, including the overhead of computing resources and service bandwidth usage; second, there is the overhead of nodes pulling container layers from the cloud, quantified in terms of bandwidth usage; finally, nodes have limited storage resources, so it is desirable for the cached container layers to be as effective as possible, otherwise, in addition to wasting node resources, other container layers may not be able to be cached due to insufficient capacity, thus affecting overall performance; this consideration is also quantified in terms of overhead, namely, the storage usage penalty for unused cache.

[0098] The following section will elaborate on the causes and quantitative basis of various types of overheads, starting from their physical mechanisms, resource characteristics, and actual system constraints. It will also introduce the decision variables and optimization objectives in the model by substituting mathematical symbols, as shown in Table 3.

[0099] Table 3 Symbol Table for Service Migration and Edge Caching Mechanisms

[0100]

[0101] (A) Service caching decision variables and optimization objectives

[0102] This invention defines the service migration decision variable as a binary 0-1 variable. ,in , , indicating user In the time slot Is the time determined by the server? Providing services This decision variable actually indicates the user's service node in each time slot. In the model, another binary variable related to both the user and the node is... This represents the user's local node, i.e., the geographically closest node. This node will serve as the base point for communication between the user and the service node, undertaking the role of transmitting input and output data for the service. In addition, the decision variable for edge caching is defined here as a binary 0-1 variable. ,in , , indicating in time slot Time Edge Server Should image layers be cached? Then there is .

[0103] In the process of service caching, the following overheads need to be considered: (1) Image layer retrieval overhead, that is, the overhead of the node retrieval of the image layer from the central cloud, which is quantified in terms of bandwidth usage; (2) Computing resource usage overhead, that is, the overhead generated by the user service running on the node and occupying computing resources; (3) Communication bandwidth overhead, since the user's local node and the service node are often not the same node, the data interaction between the local node and the service node will inevitably generate network bandwidth usage and transmission delay, thus resulting in corresponding communication overhead; (4) Invalid cache occupation penalty, since the storage resources of the node are limited, this invention hopes that the cached image layer is as effective as possible, and this consideration is also quantified in terms of overhead.

[0104] (B) Mirror layer fetch overhead

[0105] Image layer fetch overhead: Image layer fetch overhead refers to the network transmission overhead incurred by edge nodes in order to provide services when the image layer is not cached locally and needs to fetch image layer data from a remote cloud data center.

[0106] Unlike traditional whole image pulls, the image layer pull overhead modeling proposed in this invention takes into account the layered structure of container images and utilizes the image cache state changes in each time slot. That is, when an image layer is not cached in the previous time slot but is cached in the current time slot, it is considered that an image layer pull action has occurred. Therefore, time slots At the node The overhead of pulling the mirror layer on the above is The reason for using To determine whether a mirror layer has occurred Pulling instead of using This is because the former can avoid when and That is, in time slots Time server The cache has a mirror layer In the time slot This refers to the operation that occurs after deducting fetch overhead, assuming this cache is cleared. Furthermore, in the formula... Represents the mirror layer The size of the data, Indicates cloud to edge server The price per unit bandwidth between [units].

[0107] Therefore, the image layer fetch overhead occurring on all nodes across all time slots within the service caching system is .

[0108] (C) Operating resource overhead

[0109] Operational resource overhead: In mobile edge computing (MEC) environments, edge servers typically have limited computing resources (such as CPU, GPU, and memory), while user computing tasks and service requests exhibit high diversity and dynamism. Therefore, rationally quantifying and modeling the overhead of computing resource usage is crucial for improving the overall system performance and resource utilization efficiency. Specifically, computing overhead refers to the cost of computing resources consumed by edge nodes to process user-submitted computing tasks or application service requests. When executing tasks, edge nodes need to utilize local computing resources (CPU, memory, etc.), and the use of these resources incurs corresponding energy consumption and resource usage costs, directly impacting the node's operational efficiency and economic costs.

[0110] In real-world scenarios, the level of computational overhead is closely related to several factors, including: (1) the intensity of task computation. Different tasks have significantly different computational complexity. For example, video stream processing, real-time face recognition, or vehicle detection tasks are computationally intensive and usually consume a lot of computational resources. Simple data queries or static web page requests are tasks with lower computational resource requirements. (2) the load of node resources. When a node already has a high computational load, processing new computational tasks will require more additional resources to maintain the quality of service (QoS). Therefore, the real-time load status will also affect the computational overhead. (3) the heterogeneity of computational resources. MEC nodes may be equipped with heterogeneous computational resources (a combination of CPU and GPU, etc.). Different types of resources have different efficiencies and costs in processing the same task. Therefore, the actual computational overhead is also related to the configuration of computational resources.

[0111] Specifically, in time slots Time user The computational resource overhead is Among them, using To represent users In the time slot The required computing resources (quantified in terms of CPU cycles) are To indicate in time slot Use server The price of computing resources per unit. Therefore, the computing resource overhead incurred by all users across all time slots within the service caching system is... .

[0112] (D) Service cache communication bandwidth overhead

[0113] Service caching communication bandwidth overhead: Communication overhead is a significant and non-negligible cost category in mobile edge computing (MEC) systems. In edge computing environments, data interaction between user local nodes and service nodes inevitably generates network bandwidth consumption and transmission latency, resulting in corresponding communication overhead. Accurately quantifying and optimizing communication overhead is crucial for improving overall system performance, reducing service response latency, and enhancing network resource utilization efficiency.

[0114] Specifically, communication overhead refers to the cost incurred by a user terminal in requesting or obtaining services from an edge server due to the network resources consumed during data transmission and interaction. Data transmission between the user and the edge server may involve data input for service requests (such as video streams to be processed or sensor data) and data output for service generation (such as returned calculation results or processed data streams), both of which will result in communication resource consumption and latency costs.

[0115] The size of communication overhead is affected by a combination of factors, including but not limited to: (1) the amount of data transmitted. The amount of data requested or generated by the user directly determines the bandwidth consumption required for transmission. Generally speaking, data-intensive services such as video analytics and augmented reality (AR) generate a large amount of data to be transmitted, resulting in higher communication costs; (2) the distance between the user and the edge node and the link quality. Since the edge nodes in mobile edge computing scenarios are usually distributed near base stations or hotspots, the distance between different user locations and the edge nodes will directly affect the quality of the data transmission link and the energy consumption.

[0116] Specifically, users Service in time slots The resulting communication bandwidth overhead is .

[0117] Therefore, the communication bandwidth overhead generated by all user services across all time slots in the service caching system is .

[0118] (E) Invalid cache penalty overhead

[0119] Invalid caching penalty overhead: Edge servers in mobile edge computing systems are typically deployed near base stations, hotspots, or network edge nodes. While these edge servers can effectively reduce latency and bandwidth consumption, their storage resources are often limited and valuable. Therefore, how to efficiently utilize these limited storage resources becomes one of the key challenges in system design.

[0120] Because edge servers have limited storage capacity, the selection of cached image layer resources is crucial when deploying containerized services. If an edge node caches a large number of unused container image layer resources, it not only wastes valuable node storage resources but may also prevent the node from caching other more urgently needed and useful image layers. This waste of resources will further affect the service quality and response speed of the edge node, and may even have a serious negative impact on the overall system performance.

[0121] To explicitly quantify and control this phenomenon, this invention proposes to constrain and optimize the resource occupation of unused cache in the form of a penalty cost, namely, the storage occupation penalty overhead for unused cache. The main functions of this penalty mechanism are reflected in the following two aspects: (1) Improving the effectiveness of cache resources: By penalizing cached but unused image layers, the optimization algorithm is encouraged to cache image layers that are actually frequently used by users, thereby improving the effective utilization rate of cache resources; (2) Optimizing overall system performance: Effectively avoids the inability to cache truly urgently needed image layers due to caching a large number of invalid resources, ensuring that more effective image layer resources can be cached and used first, thereby improving the overall service response efficiency and user experience.

[0122] To accurately define the penalty cost for unused cache, it is necessary to explicitly define whether a mirror layer is actually used. That is, a mirror layer is considered to be actually used when it is cached by a node and a user requests the corresponding mirror layer on that node. Specifically, this invention defines a binary variable... Indicates in time slot node Does any of the services listed above contain an image layer in its container image? , The value is determined by the parameter Values ​​and decision variables The value of is determined by , and its expression is . .

[0123] Then, we can use the formula To indicate in time slot Time node Is the image layer cached? and the mirror layer Whether it is actually used or not, the expression has a value of 1 if it is, and 0 otherwise. Therefore, in the time slot node The penalty cost for unused cache generated above is .in, Represents the mirror layer The size of the data, Indicates in time slot Use nodes The penalty overhead for unused cached resources is calculated by using the unit's storage resources as a cache. Therefore, the penalty overhead for unused cache across all nodes in all time slots within the service caching system is... .

[0124] The optimization objective of the container-layered edge caching and service migration coupling mechanism is to minimize the total overhead in the edge computing network system, which includes four types of overhead as described above. Therefore, the service caching problem can be formulated as the following integer programming problem: .

[0125] (F) Service caching constraints

[0126] First, this optimization problem is an integer programming problem, with both decision variables being binary variables that need to satisfy 0-1 constraints, i.e., we have and .

[0127] The above constraints ensure that the values ​​of the decision variables conform to the actual decision-making situation, thus ensuring the accuracy and rigor of the model definition.

[0128] Secondly, service migration decision variables must also satisfy the uniqueness constraint, meaning that for each user, in any given time slot, there will be exactly one service node. This requirement is to ensure the consistency of user service requests and avoid resource waste and conflicts. .

[0129] Furthermore, in the service caching modeling scenario, it is required that any user can only be served by the edge node that caches all the service image layers required by the service image of their request. This requirement ensures the minimization of service startup latency and avoids the situation where the startup latency increases due to temporarily pulling a large number of image layers during the service startup process.

[0130] Therefore, in the model for this scenario, the service migration decision variables and The following conditions must also be met: Constraints, that is, when the user The service includes a mirror layer hour( Only edge servers This layer is cached. ( Only then can the edge server provide services to users. ), otherwise if ,So It can only be 0, meaning it's an edge server. Unable to provide users Provide services. By adding this constraint to all users, edge servers, and mirror layers in the model, it can be guaranteed that services will only be provided when the edge node... The cache contains users Only when all the required image layers for the service are available can the node... For this user Provide services. This constraint is particularly important in actual deployments, ensuring the practical feasibility of service migration decisions.

[0131] Finally, it's necessary to consider that in real-world mobile edge computing scenarios, each edge server has its own unique storage capacity. Each edge server must cache all image layers of all running services. The total amount of data in these cached image layers must be less than or equal to the storage capacity limit of that node. Represents edge server Storage resource capacity, in order to Represents the mirror layer The amount of data, therefore, can be obtained .

[0132] In summary, the optimization problem of the coupling mechanism between edge caching and service migration based on container layering ultimately aims to minimize the total service caching overhead while satisfying service caching constraints. .

[0133] Step 4: Design of dynamic migration and adaptive caching algorithms;

[0134] Solving this long-run optimization problem requires comprehensive system information, such as the location of users in each time slot and the unit resource price. However, in real-world scenarios, obtaining this information in advance is extremely difficult. Therefore, this invention considers decoupling the long-run optimization problem into a single-time-slot optimization problem. While this time-slot-by-time optimization approach can address this challenge, it introduces another problem: it neglects the original problem. The temporal coupling of the mirror layer leads to frequent fetching of the mirror layer.

[0135] For example, when using a time-slot-by-time optimization problem-solving approach, edge servers Some mirrored layers on the time slot It was cleared because it was not used, but in the next time slot ,node Many users arriving nearby happened to need these image layers to assemble containers, and because the bandwidth and computational overhead of the service provided by this node was relatively small, it was ultimately decided to use the time slot. The initial fetching of these image layers resulted in an inefficient decision to first clear and then fetch. However, in the optimal offline solution, these image layers will be fetched in time slots. The data is retained because the storage penalty for retention is far lower than the pull overhead.

[0136] Considering the above problems, this invention decouples the initial long-term optimization problem into a set of single-slot optimization problems, designs a dynamic migration and adaptive caching algorithm to deal with the coupling between slots, and designs an alternating iterative algorithm to solve the single-slot optimization problem.

[0137] Specifically, here we define non-pull overhead. This is the sum of runtime overhead and invalid cache usage penalty, where runtime overhead is only related to the service migration decision variable. The cache penalty is related to two decision variables. and All are related, that is In addition, it occurs in time slots pull overhead Only with and The basic idea of ​​the proposed online delayed fetch algorithm is to postpone changes in cache state as much as possible to avoid frequent fetching, within time slots. At that time, with This invention uses the time slot representing the most recent cache state change. and Let represent the set of decision variables, therefore we have In the time slot The cache state remained unchanged.

[0138] The delayed fetch algorithm will check Has it been accumulated to [a certain level]? of If so, it will be minimized in that time slot. Simultaneously update service migration and edge caching decisions and Otherwise, only the service migration decision will be updated, while the cache state will remain unchanged. The update will also be based on minimizing the non-fetch overhead, except that the edge cache variables will be updated in this case. It is known, so we only need to minimize it. That's it. The specific process of the algorithm is shown below. To avoid frequent fetch operations, a parameter is introduced. To control the frequency of cache state changes, when When the value is large, the image layer fetching will be further delayed. This can be dynamically adjusted for different scenarios. To achieve optimal performance, the value should be set accordingly.

[0139] The specific Dynamic Migration and Adaptive Caching Decision (DMAC) algorithm flow is as follows:

[0140] Input: Number of time slots Number of edge servers Number of users Number of container image layers ,node Storage resource capacity Using nodes overhead of CPU computing resources ,node and Communication overhead per unit bandwidth resource On cloud servers and nodes Communication overhead per unit bandwidth resource ,node Penalty overhead for unused upper unit cache ,user The number of computing resources required for the service In the time slot Time distance users The nearest node ,user Bandwidth consumption used for service communication Mirror layer Data size ,user Does the service image contain an image layer? parameters ;

[0141] Output: Migration decision actions for all time slots and cache decision actions .

[0142] initialization , ;

[0143] Initialization using an alternating iterative optimization algorithm and ;

[0144] when ,and The alternating iterative optimization algorithm is used to update. and ;

[0145] when ,and Output the migration decision action for the current time slot. and cache decision actions And end the service cache;

[0146] when ,and ; It is known that by minimizing Seeking a solution ,Right now Repeatedly iterate and output the migration decision actions for all time slots. and cache decision actions .

[0147] The above algorithm requires alternating iterations to minimize within a single time slot. To obtain the optimal and ,Right now .

[0148] Solving this problem still presents some challenges. First, the single-slot joint optimization problem can still be reduced to a classic NP-hard problem, and therefore also has NP difficulty; second, With decision variables and All of these factors are relevant; this problem is a coupled decision problem, and this coupling further increases the complexity of the problem.

[0149] To address the above challenges, the proposed alternating iterative optimization algorithm first addresses the problem... The algorithm decomposes the problem into two subproblems, each optimizing the other's decision while fixing one of the decision variables. It iteratively calculates the optimal solutions to these two subproblems using an alternating optimization approach until the maximum number of iterations is reached or the newly generated solution is no longer superior to the current solution. Specifically, subproblem one, solving the optimal service migration decision, can be expressed as: given... In the case of finding The optimal solution, i.e. Subproblem two, which involves solving the optimal edge buffer decision, can be expressed as: given... In the case of finding The optimal solution, i.e. .

[0150] This invention incorporates the following into the process of the alternating iterative optimization algorithm: and The simplified representation of the process of solving these two subproblems is that, respectively, given... To obtain the result by minimizing the non-pull overhead. and known Optimize under the circumstances The solutions to these two subproblems are obtained through the Gurobi optimizer.

[0151] Alternating Iterative Optimization Algorithm

[0152] Input: Number of time slots Number of edge servers Number of users Number of container image layers ,node Storage resource capacity Using nodes overhead of CPU computing resources ,node and Communication overhead per unit bandwidth resource On cloud servers and nodes Communication overhead per unit bandwidth resource ,node Penalty overhead for unused upper unit cache ,user The number of computing resources required for the service In the time slot Time distance users The nearest node ,user Bandwidth consumption used for service communication Mirror layer Data size ,user Does the service image contain an image layer? parameters ;

[0153] Output: Single time slot Migration decision-making actions and cache decision actions .

[0154] Initialization: Randomly select a feasible service migration strategy. ;

[0155] initialization The value is the maximum integer value; initialize the precision parameter. ;

[0156] The number of iterations is less than the maximum number of iterations; solve separately. ; ; ;

[0157] if ; ; ; Update the service migration and edge caching decisions for that time slot. , .

[0158] The specific workflow based on the edge caching and service migration coupling mechanism is as follows: Figure 1 As shown. System status information includes user mobility status, node load, and network communication conditions. This information is fed into the DMAC algorithm as input. The algorithm analyzes the current state to determine whether the cache meets the user's needs and generates corresponding service migration and cache decisions based on real-time conditions.

[0159] Step 5: Simulation results and performance analysis of the method of the present invention;

[0160] This invention will theoretically verify that the proposed Dynamic Migration and Adaptive Caching (DMAC) algorithm, compared with the offline optimal algorithm, has the following advantages: The competition ratio is shown in the following proof.

[0161] First, it can be proven that the pull overhead and non-pull overhead during the entire decision cycle under this algorithm satisfy the following relationship: , where defined For the first step in the decision-making process If the cache state on the secondary node changes (the image layer fetch decision changes), then from the time slot... arrive During this time slot, the non-pull overhead generated by the system is at least the time slot. The pull overhead generated by the system times, that is .

[0162] Therefore, all non-pull overhead and the corresponding superimposed pull overhead generated throughout the entire decision-making cycle satisfy the following: Then there is Established, therefore have .

[0163] Secondly, if we take and Represent the original problem If the optimal solution is found offline, it can be proven that the total non-pull overhead for the entire decision-making cycle corresponding to the optimal solution has a definite upper bound, specifically that it is less than or equal to the offline optimal total overhead (pull overhead + non-pull overhead). times, that is ,in, The value is for the entire decision-making cycle. Within this context, the ratio of the maximum possible non-pull overhead to the minimum possible non-pull overhead within a single time slot due to different decisions is: Clearly, at any time slot within the entire decision-making cycle... The proposed DMAC algorithm generates a non-fetch overhead that is less than or equal to the non-fetch overhead of the offline optimal solution. times, that is .

[0164] Therefore, the non-fetch overhead generated by the DMAC algorithm throughout the entire decision-making cycle is less than or equal to the total non-fetch overhead corresponding to the offline optimal solution. Multiples are represented as .

[0165] The non-fetch overhead corresponding to the optimal offline solution must be less than or equal to the total overhead, i.e. .

[0166] The total overhead generated by the DMAC algorithm of this invention satisfies .

[0167] In conclusion, it can be proven that the DMAC scheme has advantages over the offline optimal scheme. The competition ratio.

[0168] This invention proposes an edge caching and service migration coupling mechanism based on a container layered structure. First, the theoretical basis and feasibility of layered cache container images in mobile edge computing systems are analyzed. Second, the scenario of this problem is modeled, quantifying the four types of overhead generated in the system. Finally, the edge caching and service migration decision coupling optimization problem is mathematically represented as an integer programming problem.

Claims

1. A mobile edge computing method based on joint optimization of container image layered caching and service migration, characterized in that... The steps are as follows: Step 1: Edge computing environment status collection; Used to collect status information on compute offloading, service migration, edge caching, and resource allocation in mobile edge computing environments; Step 2: Service migration mechanism based on real-time mobile information; Real-time mobile information service migration processing is performed based on edge computing environment status information. (1) Set the service migration decision variables and optimization objectives; (2) Calculate the communication overhead, operating resource overhead, and service migration bandwidth overhead respectively, and obtain the service migration problem formulation as follows: ; (3) Set the service migration constraint to minimize the total service migration cost; Step 3: Service caching and migration coupling mechanism based on container fine-grained partitioning; Based on the edge computing environment status information, service caching and migration coupling processing based on container fine-grained segmentation is performed; (1) Service caching decision variables and optimization objectives are set; (2) Image layer pull overhead, runtime resource overhead, service cache bandwidth overhead and invalid cache penalty overhead are calculated respectively to obtain the service caching problem statement as (3) Set the service cache constraint to minimize the total service cache overhead; Step 4: Design of dynamic migration and adaptive caching algorithms; Decoupling the long-run optimization problem into a single-slot optimization problem is described as follows: The alternating iterative optimization algorithm is used to minimize the time slot within a single time slot. To obtain the optimal migration decision action and cache decision actions ,Right now .

2. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The total communication overhead for all users across all time slots in the service migration system is .

3. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The total service operation overhead incurred by all users across all time slots in the service migration system is: .

4. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The total service migration overhead incurred by all users across all time slots in the service migration system is: .

5. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The image layer fetch overhead occurring across all time slots and nodes within the service caching system is: .

6. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The computational resource overhead generated by all users across all time slots within the service caching system is .

7. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The communication bandwidth overhead generated by all user services across all time slots within the service caching system is .

8. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The penalty cost for unused cache generated across all time slots and nodes within the service caching system is... .

9. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The optimization problem of service migration mechanisms based on real-time mobile information ultimately aims to minimize the total service migration cost while satisfying service migration constraints. .

10. The mobile edge computing method based on joint optimization of container image layered caching and service migration according to claim 1, characterized in that: The optimization problem of the coupling mechanism between edge caching and service migration based on container layering ultimately aims to minimize the total service caching overhead while satisfying service caching constraints. .