Asynchronous service deployment method and device for edge cloud network

By adopting the collaborative work of microservice orchestration and layer cache update conditions in the edge cloud network, the total layer loading time function is built and the service utility is optimized, which solves the problem of resource limitation of edge cloud networks and achieves the balance between service performance and resource utilization.

CN119814568AActive Publication Date: 2025-04-11BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202510301125.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-04-11
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

When edge cloud networks are resource-constrained, how can they efficiently utilize resources to balance service performance and resource utilization?

Method used

Through the collaborative work of microservice orchestration and layer cache update conditions, container mirroring technology is used to build a total layer loading time function that varies with time slots of the target microservice deployed on the node, and optimize it based on the service utility function to determine the deployment strategy to maximize service utility.

Benefits of technology

It effectively balances service performance and resource utilization, and realizes efficient microservice deployment and resource management in edge cloud networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814568A_ABST
    Figure CN119814568A_ABST
Patent Text Reader

Abstract

The invention provides an asynchronous service deployment method and device for an edge cloud network, and the method comprises the steps: checking whether a current time slot meets a layer cache updating condition or not in response to a deployment request for a target micro service received in the current time slot; if not, for any deployable node, scheduling the scheduling information of any required mirror image layer and the data access rate between the nodes from any other node according to the mirror image layer required by the target micro-service, the memory space of the corresponding mirror image layer and the micro-service deployment information under the current time slot; and constructing a total layer loading time function that the target micro-service is deployed on the node and changes along with the time slot, so as to construct a service utility function that corresponds to the node and changes along with the time slot in combination with profit information and starting cost of the node, thereby determining a deployment strategy of the target micro-service, and starting the target micro-service based on a mirror image layer required by the target micro-service. The method effectively balances the service performance and the resource utilization rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of edge cloud network technology, and more specifically, to an asynchronous service deployment method and device for an edge cloud network. Background Art

[0002] With the explosive growth of service requests at the edge of the network, edge cloud has gradually become an important platform for supporting low-latency and high-computing demand applications. Compared with traditional remote central clouds that often cannot meet real-time requirements, edge cloud provides services through geographically distributed nodes, significantly reducing data transmission latency and improving response speed. However, edge cloud networks face the challenge of limited resources, so how to use resources efficiently is crucial. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide an asynchronous service deployment method and device for an edge cloud network, which effectively balances service performance and resource utilization through the coordinated work of microservice orchestration and cache update of layer cache update conditions.

[0004] In a first aspect, a method for asynchronous service deployment of an edge cloud network is provided, wherein the edge cloud network includes a plurality of nodes using container image technology, and the method may include: In response to a deployment request for a target microservice received in a current time slot, checking whether the current time slot satisfies a layer cache update condition; If not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, a total layer loading time function of the target microservice deployed on the node that changes with time slots is constructed; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling state; Based on the obtained profit information, startup cost and total layer loading time of the node that varies with time slots, a service utility function corresponding to the node that varies with time slots is constructed; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; With the goal of maximizing service utility, the service utility function corresponding to the corresponding node is optimized, the deployment strategy of the target microservice is determined, and the target microservice is started based on the image layer required by the target microservice m. The deployment strategy includes the target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

[0005] In one possible implementation, the method further includes: If yes, for any deployable node, obtain the scheduling information of each image layer on the node in each time slot during the historical time period; Processing the scheduling information of each time slot in the historical time period, determining the layer age of each image layer corresponding to the next time slot of the corresponding time slot and the expiration value of the corresponding layer age; When the expiration value of any image layer is greater than the configured layer age expiration value, the corresponding image layer is deleted on the node to update the current layer cache state of the node; wherein the configured layer age expiration value is determined based on the layer age of the corresponding image layer in continuous time slots.

[0006] In one possible implementation, the method further includes: For any deployable node, if the same image layer is deleted on the node in each of two consecutive historical time periods, the configured layer age expiration value is increased by the preset offset.

[0007] In a possible implementation, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, a total layer loading time function of the target microservice deployed on the node that changes with time slots is constructed, including: Based on any image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of any required image layer scheduled from any other deployable node, and the data access rate between the node and the other nodes, determine the layer loading time function that varies with time slots for scheduling the image layer from the other node to the node; Based on all the image layers required by the target microservice and the layer loading time function that varies with time slots by scheduling the corresponding image layers from any other node n′ to the node, a total layer loading time function that varies with time slots is constructed.

[0008] In a possible implementation, the microservice deployment information is represented as:

[0009] in, Microservice deployment information that indicates whether the target microservice m is deployed on node n at time slot t. Indicates whether the current layer cache status of image layer l is cached on node n in time slot t, Indicates whether the target microservice m mirrors the layer inclusion status of layer l at time slot t. Indicates whether node n caches the current layer cache status of image layer l in time slot t. Indicates whether the slave node is in time slot t Scheduling information dispatched to node n, if , is 0, and N is the total number of nodes.

[0010] In a possible implementation, with the goal of maximizing service utility, optimizing the service utility function corresponding to the corresponding node and determining the deployment information of the target microservice include: For any deployable node, obtain the layer age corresponding to the scheduling information of each image layer in each time slot during the historical time period and the scheduling strategy set corresponding to any image layer, where the scheduling strategy set includes the scheduling information of each image layer between the node and other nodes; Sorting the scheduling information in the scheduling strategy set in descending order of layer age, and selecting the first number of scheduling information that are at the front after sorting; If the first number of scheduling information satisfies the preset constraint condition and satisfies the first scheduling information that makes the service utility function output the maximum value, constructing a first scheduling set based on the first scheduling information; Selecting a second number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set; If the second number of scheduling information satisfies the preset constraint condition and satisfies the second scheduling information that makes the service utility function output the maximum value, constructing a second scheduling set based on the second scheduling information; Selecting a third number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set and the second scheduling set to construct a third scheduling set; Based on a preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility; the initial scheduling set is the union of the first scheduling set and the second scheduling set; The target scheduling information in the target scheduling set and the target microservice deployment information corresponding to the corresponding target scheduling information are determined as the deployment strategy of the target microservice.

[0011] In a possible implementation, the preset optimization processing method is a local search method for performing a swap operation; Based on a preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility, including: Using the scheduling information in the initial scheduling set as input data of the service utility function, and obtaining a first service utility output by the service utility function; For any scheduling information in the third scheduling set, the scheduling information is exchanged with a piece of scheduling information in the initial scheduling set that has not been exchanged, and the scheduling information in the exchanged initial scheduling set is used as input data of the service utility function to obtain a second service utility output by the service utility function; If the second service utility is greater than the first service utility, the exchanged initial scheduling set is used as a new initial scheduling set, and the execution step is returned to: the scheduling information in the initial scheduling set is used as input data of the service utility function, and the first service utility output by the service utility function is obtained, until all the scheduling information in the third scheduling set is traversed; The exchanged initial scheduling set corresponding to the maximum service utility output by the service utility function is used as the target scheduling set.

[0012] In a second aspect, an asynchronous service deployment device of an edge cloud network is provided, wherein the edge cloud network includes a plurality of nodes using container image technology, and the device may include: A checking unit, configured to, in response to a deployment request for a target microservice received in a current time slot, check whether the current time slot satisfies a layer cache update condition; A construction unit is used for, if not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, to construct a total layer loading time function of the target microservice deployed on the node that changes with time slots; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling state; And, based on the obtained profit information, startup cost and total layer loading time of the node that changes with time slots, a service utility function corresponding to the node that changes with time slots is established; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; A determination unit, configured to optimize the service utility function corresponding to the corresponding node with the goal of maximizing the service utility, and determine the deployment strategy of the target microservice; A startup unit is used to start the target microservice based on the image layer required by the target microservice, and the deployment strategy includes target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

[0013] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0015] In the asynchronous service deployment method of the edge cloud network provided by the present application, the edge cloud network includes multiple nodes using container image technology, including: responding to a deployment request for a target microservice received in the current time slot, checking whether the current time slot meets the layer cache update condition; if not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of any required image layer scheduled from any other deployable node, and the data access rate between the node and other nodes, construct a total layer loading time function of the target microservice deployed on the node that changes with the time slot; the microservice deployment information is based on the current layer cache state of the node, the table Whether the target microservice contains the layer inclusion status and scheduling status of the corresponding image layer is determined; based on the obtained node profit information, startup cost and total layer loading time that changes with time slots, the service utility function corresponding to the node that changes with time slots is constructed; the service utility function represents the service utility of the node in different time slots for any image layer in all image layers to deploy the target microservice under different scheduling information; with the goal of maximizing service utility, the service utility function corresponding to the corresponding node is optimized, the deployment strategy of the target microservice is determined, and the target microservice is started based on the image layer required by the target microservice. The deployment strategy includes the target microservice deployment information and target scheduling information corresponding to any image layer in all image layers. This method effectively balances service performance and resource utilization through the coordination of microservice orchestration at a short time scale (time slot) and cache update at a long time scale based on layer cache update conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 A schematic diagram of the architecture of an edge cloud network provided in an embodiment of the present application; Figure 2 A schematic diagram of a flow chart of an asynchronous service deployment method for an edge cloud network provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an asynchronous service deployment device for an edge cloud network provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Unless otherwise defined, the technical terms or scientific terms used in this application should be the usual meanings understood by people with general skills in the field to which the present invention belongs. The "first", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0019] 1. Microservice deployment in edge cloud networks The edge cloud network is mainly composed of edge nodes distributed in the user's proximity area - base stations, server links, network infrastructure and data centers, forming a distributed computing architecture. These nodes have certain computing, storage and network capabilities, and can provide services close to terminal devices, significantly reducing data transmission delays and improving service response speeds. The microservice architecture splits the application into multiple independent small services, each responsible for a single function and communicating through lightweight APIs. When this architecture is deployed in the edge cloud, it can achieve flexible distribution of services and dynamic scheduling based on node resources. At the same time, the independence of microservices supports on-demand expansion, facilitating rapid updates and fault isolation.

[0020] However, in edge cloud networks, microservice deployment also faces problems such as resource coordination, service discovery, and communication delays. How to efficiently manage distributed microservices becomes the key, requiring reasonable scheduling and optimized resource allocation to ensure stable performance.

[0021] 2. Containerized Microservices Container technology is a lightweight solution based on operating system virtualization, with efficient resource utilization and fast startup features. Compared with traditional virtual machines, containers do not require a complete operating system, and each container shares the host kernel, which significantly reduces system overhead. Docker is the most popular container technology. By writing Dockerfile to build container images, applications and their dependencies are packaged as standardized units to achieve consistency in cross-platform deployment. Container images use a layered structure, including base images, dependency layers, application layers, and writable layers, making image storage and distribution more efficient. In addition, container orchestration tools such as Kubernetes provide automated deployment, scaling, load balancing, and container management capabilities, becoming a standard solution for containerized applications in production environments. The combination of container technology and microservice architecture is an important trend in current cloud native technology. Each microservice is deployed as an independent container, and services communicate through APIs to achieve modularity, flexible expansion, and high availability. The fast startup and resource isolation features of containers, combined with the orchestration capabilities of Kubernetes, can achieve automatic deployment and elastic scaling of services, provide a complete automation solution from development to operation and maintenance, and effectively improve development efficiency and operation and maintenance capabilities.

[0022] 3. Cache update strategy Cache update strategy is a key technology to optimize data access efficiency and improve system performance. It mainly solves the storage, replacement and expiration problems of data in the cache to maximize the data hit rate and reduce access latency within the limited cache space. In the cache system, commonly used update strategies include least recently used, least frequently used and first-in-first-out methods. Cache update strategy plays an important role in scenarios such as CDN networks, database caches, edge computing and IoT data management. By reasonably selecting and optimizing strategies, efficient data storage and access can be achieved under limited resource constraints, reducing latency, bandwidth consumption and improving system stability. With the continuous growth of data scale, how to dynamically optimize cache update strategy according to different application scenarios has become one of the key directions of current research.

[0023] In edge cloud networks, although layer sharing provides significant benefits, layer-aware microservices introduce additional complexity in service configuration in edge cloud networks. By implementing an effective caching strategy, frequently accessed layers can be stored locally, minimizing the reliance on remote registries. Effective service configuration requires complex microservice orchestration strategies to optimize layer distribution while reducing redundant transmission. In this context, service configuration in edge cloud networks poses significant challenges: 1) Complex issues in microservice orchestration: Container images use a layered structure, and the layer sharing mechanism enables computing nodes to schedule and cache the image layers of each microservice to achieve resource reuse, reduce network transmission costs and storage overhead, and thus improve deployment efficiency and service quality. However, the diversity of image layers required by different microservices makes deployment, scheduling, and caching extremely complex, mainly manifested in the following aspects: On the one hand, there are partial overlaps or completely independent characteristics between image layers. How to efficiently schedule and share these layers to reduce redundancy and optimize transmission costs is a complex decision-making problem; on the other hand, the computing, storage, and network resources of edge cloud network nodes are limited, and nodes cannot cache all image layers indefinitely. How to select the most suitable layer for caching under resource constraints to ensure the operation requirements of microservices further increases the complexity of the problem. In addition, due to the dynamic changes in user needs, microservices may need to be frequently migrated or redeployed, which leads to frequent scheduling and transmission of image layers, increases network latency and bandwidth consumption, and thus affects the user's quality of service (QoS). In this process, microservice orchestration needs to balance orchestration costs and service quality. Excessive pursuit of resource sharing and cache optimization will increase scheduling complexity, while ignoring layer sharing may lead to resource waste and reduced service quality. Therefore, how to efficiently schedule and cache image layers on edge cloud nodes to achieve optimal resource utilization and meet users' high service quality requirements in a dynamic environment has become a major challenge in microservice orchestration.

[0024] 2) Redundancy problem of container image layers: mainly reflected in repeated storage and resource waste between multiple image layers.

[0025] In container technology, images are usually composed of multiple read-only layers, each of which contains some modification information or supplementary information for the application or operating system. Although these layers can be reused and shared, reducing storage overhead, the redundancy problem between image layers becomes more prominent as the number of images increases and application requirements change. Redundancy is mainly reflected in two aspects: First, different container images may contain the same or similar layers, which may store duplicate data, resulting in a waste of storage space. Second, when the container image is updated, the old image layer may not be effectively cleaned up, especially when multiple containers use different versions of images, redundant layers may accumulate in the system, increasing the burden on the disk. For some image layers that are not frequently accessed, the redundancy problem is more serious, especially in resource-constrained environments, where this redundancy may lead to huge storage costs and performance bottlenecks.

[0026] Maintaining the latest status of container images and cleaning up redundant image layers is a resource-intensive process. Whenever an image is updated or deleted, all related containers must be rebuilt or resynchronized, which consumes a lot of computing and storage resources. Especially in large-scale containerized application scenarios, how to effectively manage and reduce the redundancy of image layers and optimize storage utilization is a key issue to improve system performance and reduce operating costs.

[0027] In order to solve the above technical problems, the present application embodiment provides an asynchronous service deployment method for an edge cloud network, such as Figure 1 As shown, the edge cloud network may include: multiple nodes, network infrastructure and data centers distributed in the vicinity of users. This architecture is a distributed computing architecture, and the asynchronous service deployment method can be applied to the network infrastructure. Among them, each node uses container image technology to achieve the reuse and sharing of image layers, reducing storage overhead.

[0028] The asynchronous service deployment method for the edge cloud network provided in the embodiment of the present application solves a dual-time-scale joint optimization problem, the goal of which is to maximize the service utility, that is, to maximize the profit of satisfying user service requests minus the cost of starting the microservice.

[0029] The goal is to solve the following key problems: i) how to perform complex hierarchical fine-grained microservice orchestration, including microservice deployment and layer scheduling; ii) how to timely prune long-unused layers cached in computing nodes. By solving these problems, this application mainly includes the following two processes: Microservice orchestration in short time scale (i.e., time slot). This application characterizes microservice orchestration as a microservice deployment and layer scheduling problem. Under the constraint of p-scalable system, this application converts microservice deployment and layer scheduling into submodule functions and performs a three-stage approximate algorithm solution.

[0030] Layer cache update for long time scales (i.e., time periods formed by continuous time slots). This application introduces the Age of Layer (AoL) to effectively update the cache layer. When a long time scale is reached, the update is determined based on the layer age value.

[0031] Assume there is a node set and microservices set , respectively and Index. The system deploys services based on time slots. Represents. A node can deploy corresponding microservices by calling the corresponding image layer on other nodes. The image layer consists of a collection Indicated by Index, each level l has storage size .set up Indicates whether microservice m contains image layer l. Only when all required layers are within the time threshold Microservice m can be successfully started on node n only when the internal resources are fully loaded to ensure QoS.

[0032] Microservice deployment variables , Indicates that microservice m is deployed on node n at time t; the scheduling variable of the image layer , Indicates that image layer l is from node at time t Schedule to n, where if , is 0, that is, the scheduling from node n to itself is not considered.

[0033] To facilitate microservice deployment, the image layer of a microservice can be cached on any computing node and shared with other nodes through layer scheduling. The cache strategy of the presentation layer refers to whether node n caches image layer l at the current moment. Caching image layers can speed up microservice deployment time, but it consumes storage resources. All image layers cached on the computing node are subject to their available storage resources. Constraints:

[0034] If the required layer l is not stored locally, it must be scheduled from another compute node. is the layer scheduling policy for time slot t. Layer l can be loaded onto node n only if n′ stores mirror layer l for each n, n′∈ , l∈ ,Right now:

[0035] In time slot t, only when every n∈ , m∈ and l∈ A microservice can be successfully deployed on a compute node only when all required layers of the microservice are fully loaded, i.e.:

[0036] If a compute node,caches the required layer, it does not need to schedule it from another node. Similarly, if a node schedules the required layer, it does not need to cache it. In addition, a compute node should only select one node (including itself) to schedule a layer. Therefore, for ∀n′,n,l,t:

[0037] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0038] Figure 2 A schematic diagram of a flow chart of an asynchronous service deployment method for an edge cloud network provided in an embodiment of the present application. Figure 2 As shown, the method may include: Step S210: In response to a deployment request for a target microservice received in the current time slot, check whether the current time slot t satisfies a layer cache update condition.

[0039] The layer cache update condition is the condition of reaching the update cycle.

[0040] In a specific implementation, if the current time slot t is within the update period or at the boundary moment of the update period, it indicates that the layer cache update condition is met, otherwise it is not met.

[0041] Step S220: for any deployable node, determine the total layer loading time corresponding to the node that varies with time slots according to the inspection result.

[0042] Among them, the deployable node can be a node with available resources, or a node that caches at least one image layer required by the target microservice m, which is not limited in this application.

[0043] (1) When the layer cache update condition is not met in the current time slot t, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity s1 of the corresponding image layer, the microservice deployment information, the scheduling information y of any required image layer scheduled from any other deployable node, and the data access rate between the node and other nodes , build the total layer loading time of the target microservice deployed on the node as time slot changes Function. The microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice m includes the corresponding image layer, and the scheduling state.

[0044] Specifically, based on any image layer required by the target microservice, the storage capacity s1 of the corresponding image layer, the microservice deployment information, the scheduling information of any required image layer from any other deployable node, and the data access rate between the node and other nodes , determine the time slot-varying layer loading time function of scheduling the image layer from other nodes n′ to node n;

[0045] in, represents the layer loading time function of scheduling image layer l from other nodes n′ to node n for the target microservice m, which varies with time slots. is the data access rate between computing nodes n′ and n.

[0046] Based on all the image layers required by the target microservice m and the layer loading time function that varies with time slots by scheduling the corresponding image layers from any other node n′ to the node n, a total layer loading time function that varies with time slots (expressed as the startup time of the microservice m) is constructed.

[0047]

[0048] in, Expressed as a function of total layer loading time over time slots.

[0049] (2) When the current time slot t meets the layer cache update condition, for any deployable node, obtain the scheduling information y of each image layer on the node in each time slot in the historical time period; process the scheduling information of each time slot in the historical time period, and determine the layer age of each image layer corresponding to the next time slot of the corresponding time slot and the expiration value of the corresponding layer age; specifically: The layer cache update of image layer l is performed at each long time scale, and the layer age of layer l stored on node n′ is is defined as:

[0050] in, positive integer, Represented as time slot The number of times image layer l is scheduled from computing node n′ is: is the ratio of the long time scale to the short time scale. It is worth noting that At each short time scale t (i.e., each time slot t), it is updated as:

[0051] in, The maximum upper limit of ,make sure , so there is .

[0052] The expiration value of layer l on node n′ at time slot t is expressed as , which is defined as:

[0053] in, is any time slot from time slot 1 to time slot t.

[0054] When the layer age of any image layer is greater than the configured layer age expiration value, the corresponding image layer is deleted on the node to update the current layer cache state of the node; wherein the configured layer age expiration value is determined based on the layer age of the corresponding image layer in consecutive time slots. For example, if the value If a threshold A is exceeded, layer l will be Otherwise, layer l will remain at this node. The layer age is reset to zero and the accumulation starts again.

[0055] Furthermore, for any deployable node, if the same image layer is deleted on the node in each of two consecutive historical time periods, the configured layer age expiration value will be increased by a preset offset, that is, if layer l is deleted twice in the past two consecutive large time scales, the threshold will be increased by an offset ∆A, and the threshold will be adjusted to the A+∆A empirical value to avoid setting unreasonable thresholds.

[0056] The above embodiment of the present application realizes the regular deletion of storage resources through the strategy of long-term cache update, which can effectively save storage resources. It should be noted that the cache status of the node In each short time scale, the cache will be increased. Due to the scheduling of the image layer, new cache content will be added to each node at each time. In the long time scale, a regular cleanup will be performed through the definition method of layer age. In this way, the unlimited expansion of the cache is suppressed and the impact on the service deployment performance in the entire network is avoided to the greatest extent. Experimental verification shows that using this method of regular cache updates can save storage resources without affecting the services provided by the computing network.

[0057] Step S230: Based on the obtained profit information, startup cost and total layer loading time of the node that varies with time slots, a service utility function corresponding to the node that varies with time slots is constructed.

[0058] Among them, the service utility function represents the service utility of the node in different time slots for deploying the target microservice m under different scheduling information for any image layer in all image layers.

[0059] At time slot t, the utility of computing node n serving the request of microservice m is: .

[0060] in, is the profit of completing microservice m, is the startup time of microservice m node n, defined as .also, is the profit coefficient of node n, is the cost factor for the startup time.

[0061] The maximum value of the service utility function corresponding to the node that changes with time slots is the optimization problem of maximizing the overall utility, which is defined as:

[0062] Converts to:

[0063] It can be converted to:

[0064] It can be converted to:

[0065] Step S240: Optimize the service utility function corresponding to the corresponding node with the goal of maximizing the service utility, determine the deployment strategy of the target microservice, and start the target microservice based on the image layer required by the target microservice.

[0066] The deployment strategy may include target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

[0067] The utility maximization problem can be transformed into a set function optimization problem. Considering that a microservice can be deployed on a computing node only when all required layers are fully loaded, the variable representation can be obtained:

[0068] That is, you can use express .

[0069] Therefore, the utility maximization problem can be transformed into a set function optimization problem of the layer scheduling strategy for time slot t.

[0070] definition is the scheduling strategy set, that is, the set of all scheduling strategies. Each element in the scheduling strategy set The only corresponding , represents the scheduling from computing node n′ to layer l of n, that is, a scheduling information.

[0071] Will is considered as a set of feasible scheduling strategies. Therefore, if ,but =1; otherwise =0. For , define f( ):= , To cache the updated layer cache state for the layer, the problem can be restated as:

[0072]

[0073]

[0074]

[0075]

[0076]

[0077]

[0078] in: , is the indicator function.

[0079] Furthermore, it can be proved that the function of the problem is monotonic and submodular under certain conditions. Submodularity is defined as satisfying that the marginal gain of the function gradually decreases as the set increases, and as the variable and The monotonicity and submodularity of the objective function are easy to prove. And the constraints of the problem are composed of multiple knapsack constraints and pseudo-matrix constraints, which together form a p-scalable system that needs to satisfy the definition: For an independent system , when a subset Add an element to form a feasible set When , the maximum size of the set of elements remaining outside the subset is p. The property of the p-scalable system is proved as follows: Constraints 1, 2, 4, and 5 each constitute a scalable system.

[0080] To determine p, assume Infinitely close to the collection , where | |= In this case, we need to calculate the minimum number of elements required to satisfy constraint 3. To add an element e⊆ \ +w to reach , you need to delete at most − elements. Therefore, in the worst case, +w removes the most − +4 elements.

[0081] In response to the above-mentioned set function maximization problem, this application designs a three-stage approximation algorithm for microservice orchestration in the algorithm. Specifically, in the first stage, the algorithm sorts all orchestration decision elements by layer age and initializes the subset that satisfies the basic constraints at the front of the sorted list. The algorithm calculates f( ),get ( )and In the second stage, we (i.e., U minus U1) randomly samples elements to initialize , and obtain ( )and In the third stage, we use a local search method based only on swap operations to find the updated basis ∪ .

[0082] In the specific implementation, in the first stage: Sort the scheduling information in the scheduling strategy set in descending order of layer age, and select the first number of scheduling information after sorting; If the first number of scheduling information satisfies the preset constraint condition and satisfies the first scheduling information that makes the service utility function output the maximum value, constructing a first scheduling set based on the first scheduling information; In the second stage: Selecting a second number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set; If the second number of scheduling information satisfies the preset constraint condition and satisfies the second scheduling information that makes the service utility function output the maximum value, constructing a second scheduling set based on the second scheduling information; In the third stage: Selecting a third number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set and the second scheduling set to construct a third scheduling set; Based on a preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility; wherein the initial scheduling set is the union of the first scheduling set and the second scheduling set; The target scheduling information in the target scheduling set and the target microservice deployment information corresponding to the corresponding target scheduling information are determined as the deployment strategy of the target microservice.

[0083] In some embodiments, the preset optimization processing method is a local search method for performing an exchange operation; based on the preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility, including: Using the scheduling information in the initial scheduling set as input data of the service utility function, and obtaining the first service utility output by the service utility function; For any scheduling information in the third scheduling set, the scheduling information is exchanged with a piece of scheduling information in the initial scheduling set that has not been exchanged, and the scheduling information in the exchanged initial scheduling set is used as input data of the service utility function to obtain a second service utility output by the service utility function; If the second service utility is greater than the first service utility, the exchanged initial scheduling set is used as a new initial scheduling set, and the execution step is returned to: the scheduling information in the initial scheduling set is used as input data of the service utility function, and the first service utility output by the service utility function is obtained, until all the scheduling information in the third scheduling set is traversed; The initial scheduling set after exchange corresponding to the maximum service utility output by the service utility function is taken as the target scheduling set.

[0084]

[0085] The asynchronous service deployment method provided in the embodiment of the present application realizes resource utility maximization optimization based on the dual time scale model. On the short time scale, a three-stage approximation algorithm is used for dynamic deployment of microservices and mirror layer scheduling. Through candidate solution set initialization, random sampling expansion and local search optimization (i.e., three-stage approximation algorithm), QoS constraints are met and scheduling efficiency is improved; on the long time scale, the layer age (AoL) definition is introduced, and cache updates are determined based on the usage frequency and cumulative expiration value of the mirror layer, and long-term unused layers are cleaned up to optimize storage resources. Specifically: (1) The dual-time scale model is used to solve the optimization problem of maximizing resource utility. Through the collaboration of short-time scale microservice orchestration and long-time scale cache update, the framework significantly reduces the microservice startup cost while meeting user service requests. The short-time scale model focuses on dynamic microservice deployment and image layer scheduling to ensure the realization of QoS requirements; the long-time scale model optimizes the utilization efficiency of storage resources through cache updates to avoid long-term unused image layers occupying storage space. The dual-time scale model effectively balances service performance and resource utilization, providing an innovative solution for dynamic service deployment in edge cloud scenarios.

[0086] (2) A three-stage approximate algorithm is used to efficiently solve the joint optimization problem of microservice deployment and layer scheduling. In the algorithm design, first, the candidate solution set is initialized based on the layer age sorting to screen out high-priority orchestration elements that meet the constraints; then, the candidate solution set is expanded by random sampling, and the deployment strategy is further optimized from the unselected elements; finally, the solution set is refined and updated using a local search method based on exchange operations to ensure that the service orchestration achieves maximum utility under QoS constraints. The design of the algorithm utilizes the monotonicity and submodularity of the objective function, and realizes efficient scheduling of computing node resources under multiple constraints, which is suitable for complex distributed edge cloud environments.

[0087] (3) A long-term cache update mechanism based on the definition of layer age is used to dynamically optimize the storage resource allocation of computing nodes. The layer age calculates the usage frequency and cumulative expiration value of the image layer as the basis for cache elimination, and introduces a threshold adjustment mechanism to prevent frequently used services from being accidentally deleted. When the layer age or cumulative expiration value exceeds the set threshold, the system will promptly clean up the image layers that have not been used for a long time, thereby freeing up storage space. Through this dynamic update strategy of information age, storage resources can be efficiently utilized, while avoiding the degradation of service performance caused by unreasonable cache updates in traditional methods, providing important support for resource optimization in edge cloud networks.

[0088] Corresponding to the above method, the embodiment of the present application also provides an asynchronous service deployment device for an edge cloud network, wherein the edge cloud network includes multiple nodes using container image technology, such as Figure 3 As shown, the device comprises: A checking unit 310 is configured to check, in response to a deployment request for a target microservice received in a current time slot, whether the current time slot satisfies a layer cache update condition; A construction unit 320 is used to, if not, for any deployable node, in the current time slot, construct a total layer loading time function of the target microservice deployed on the node that varies with time slots according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling state; And, based on the obtained profit information, startup cost and total layer loading time of the node that changes with time slots, a service utility function corresponding to the node that changes with time slots is established; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; The determination unit 330 is used to optimize the service utility function corresponding to the corresponding node with the goal of maximizing the service utility, and determine the deployment strategy of the target microservice; The starting unit 340 is used to start the target microservice based on the image layer required by the target microservice, and the deployment strategy includes the target microservice deployment information and target scheduling information corresponding to any image layer in all the image layers.

[0089] The functions of each functional unit of the asynchronous service deployment device for the edge cloud network provided in the above-mentioned embodiments of the present application can be realized through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in the asynchronous service deployment device for the edge cloud network provided in the embodiments of the present application will not be repeated here.

[0090] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 410 , a communication interface 420 , a memory 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other via the communication bus 440 .

[0091] Memory 430, for storing computer programs; The processor 410 is used to execute the program stored in the memory 430 to implement the following steps: In response to a deployment request for a target microservice received in a current time slot, checking whether the current time slot satisfies a layer cache update condition; If not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, a total layer loading time function of the target microservice deployed on the node that changes with time slots is constructed; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling state; Based on the obtained profit information, startup cost and total layer loading time of the node that changes with time slots, a service utility function corresponding to the node that changes with time slots is established; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; With the goal of maximizing service utility, the service utility function corresponding to the corresponding node is optimized, the deployment strategy of the target microservice is determined, and the target microservice is started based on the image layer required by the target microservice. The deployment strategy includes the target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

[0092] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0093] The communication interface is used for communication between the above electronic device and other devices.

[0094] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0095] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0096] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 2 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0097] In another embodiment provided in the present application, a computer-readable storage medium is also provided, which stores instructions. When the computer-readable storage medium is executed on a computer, the computer executes the asynchronous service deployment method of the edge cloud network described in any of the above embodiments.

[0098] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the asynchronous service deployment method for the edge cloud network described in any of the above embodiments.

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

[0100] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0101] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0102] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0103] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.

[0104] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. An asynchronous service deployment method for an edge cloud network, characterized in that: The edge cloud network includes a plurality of nodes using container image technology, and the method includes: In response to a deployment request for a target microservice received in a current time slot, checking whether the current time slot satisfies a layer cache update condition; If not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, a total layer loading time function of the target microservice deployed on the node that changes with time slots is constructed; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling information; Based on the obtained profit information, startup cost and total layer loading time of the node that varies with time slots, a service utility function corresponding to the node that varies with time slots is constructed; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; With the goal of maximizing service utility, the service utility function corresponding to the corresponding node is optimized, the deployment strategy of the target microservice is determined, and the target microservice is started based on the image layer required by the target microservice. The deployment strategy includes the target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

2. The method according to claim 1, characterized in that The method further comprises: If yes, for any deployable node, obtain the scheduling information of each image layer on the node in each time slot during the historical time period; Processing the scheduling information of each time slot in the historical time period, determining the layer age of each image layer corresponding to the next time slot of the corresponding time slot and the expiration value of the corresponding layer age; When the expiration value of any image layer is greater than the configured layer age expiration value, the corresponding image layer is deleted on the node to update the current layer cache state of the node; wherein the configured layer age expiration value is determined based on the layer age of the corresponding image layer in continuous time slots.

3. The method according to claim 2, characterized in that The method further comprises: For any deployable node, if the same image layer is deleted on the node in each of two consecutive historical time periods, the configured layer age expiration value is increased by the preset offset.

4. The method according to claim 1, characterized in that According to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, a total layer loading time function of the target microservice deployed on the node that changes with time slots is constructed, including: Based on any image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of any required image layer scheduled from any other deployable node, and the data access rate between the node and the other nodes, determine the layer loading time function that varies with time slots for scheduling the image layer from the other node to the node; Based on all the image layers required by the target microservice and the layer loading time function that varies with time slots by scheduling the corresponding image layers from any other node n′ to the node, a total layer loading time function that varies with time slots is constructed.

5. The method according to claim 1, characterized in that The microservice deployment information is represented as: in, Microservice deployment information that indicates whether the target microservice m is deployed on node n at time slot t. Indicates whether the current layer cache status of image layer l is cached on node n in time slot t, Indicates whether the target microservice m mirrors the layer inclusion status of layer l at time slot t. Indicates whether node n caches the current layer cache status of image layer l in time slot t. Indicates whether the slave node is in time slot t Scheduling information dispatched to node n, if , is 0, and N is the total number of nodes.

6. The method according to claim 2, characterized in that With the goal of maximizing service utility, the service utility function corresponding to the corresponding node is optimized to determine the deployment information of the target microservice, including: For any deployable node, obtain the layer age corresponding to the scheduling information of each image layer in each time slot during the historical time period and the scheduling strategy set corresponding to any image layer, where the scheduling strategy set includes the scheduling information of each image layer between the node and other nodes; Sorting the scheduling information in the scheduling strategy set in descending order of layer age, and selecting the first number of scheduling information that are at the front after sorting; If the first number of scheduling information satisfies the preset constraint condition and satisfies the first scheduling information that makes the service utility function output the maximum value, constructing a first scheduling set based on the first scheduling information; Selecting a second number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set; If the second number of scheduling information satisfies the preset constraint condition and satisfies the second scheduling information that makes the service utility function output the maximum value, constructing a second scheduling set based on the second scheduling information; Selecting a third number of scheduling information from other scheduling strategies in the scheduling strategy set except the first scheduling set and the second scheduling set to construct a third scheduling set; Based on a preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility; the initial scheduling set is the union of the first scheduling set and the second scheduling set; The target scheduling information in the target scheduling set and the target microservice deployment information corresponding to the corresponding target scheduling information are determined as the deployment strategy of the target microservice.

7. The method according to claim 6, characterized in that The preset optimization processing method is a local search method for performing a swap operation; Based on a preset optimization processing method, the initial scheduling set and the third scheduling set are processed to obtain a target scheduling set that satisfies the service utility function to maximize the service utility, including: Using the scheduling information in the initial scheduling set as input data of the service utility function, and obtaining a first service utility output by the service utility function; For any scheduling information in the third scheduling set, the scheduling information is exchanged with a piece of scheduling information in the initial scheduling set that has not been exchanged, and the scheduling information in the exchanged initial scheduling set is used as input data of the service utility function to obtain a second service utility output by the service utility function; If the second service utility is greater than the first service utility, the exchanged initial scheduling set is used as a new initial scheduling set, and the execution step is returned to: the scheduling information in the initial scheduling set is used as input data of the service utility function, and the first service utility output by the service utility function is obtained, until all the scheduling information in the third scheduling set is traversed; The exchanged initial scheduling set corresponding to the maximum service utility output by the service utility function is used as the target scheduling set.

8. An asynchronous service deployment device for an edge cloud network, characterized in that: The edge cloud network includes a plurality of nodes using container image technology, and the device includes: A checking unit, configured to check, in response to a deployment request for a target microservice received in a current time slot, whether the current time slot satisfies a layer cache update condition; A construction unit is used for, if not, for any deployable node, in the current time slot, according to the image layer required by the target microservice, the storage capacity of the corresponding image layer, the microservice deployment information, the scheduling information of scheduling any required image layer from any other deployable node, and the data access rate between the node and the other nodes, to construct a total layer loading time function of the target microservice deployed on the node that changes with time slots; wherein the microservice deployment information is determined based on the current layer cache state of the node, the layer inclusion state indicating whether the target microservice includes the corresponding image layer, and the scheduling state; And, based on the obtained profit information, startup cost and total layer loading time of the node that changes with time slots, a service utility function corresponding to the node that changes with time slots is established; the service utility function represents the service utility of the node in different time slots for deploying the target microservice under different scheduling information for any image layer in all image layers; A determination unit, configured to optimize the service utility function corresponding to the corresponding node with the goal of maximizing the service utility, and determine the deployment strategy of the target microservice; A startup unit is used to start the target microservice based on the image layer required by the target microservice, and the deployment strategy includes target microservice deployment information and target scheduling information corresponding to any image layer in all image layers.

9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Micro-service deployment method and device based on layer sharing in edge environment

    CN114615338A

  • Containerized micro-service intelligent collaborative arrangement method and device

    CN119248414A

  • Image pulling method and system, computer device, and readable storage medium

    WO2023045256A1

Cited By

  • Service configuration method and device for three-time-degree online learning

    CN120567929A

  • Three-dimensional online learning service configuration methods and devices

    CN120567929B

  • CDN edge node idle computing power collaborative scheduling method, system, device and medium

    CN122526841A

  • Methods, systems, equipment, and media for collaborative scheduling of idle computing power at CDN edge nodes.

    CN122526841B