Task unloading and micro-service hierarchical deployment method with dependency relationship in wireless edge network

By adopting alternating optimization algorithms of greedy algorithms and deep reinforcement learning in wireless edge networks, we optimize the task offload path and cache and resource allocation of the microservice layer, solving the problems of strong task dependence and unreasonable resource allocation, and achieving effective optimization of delay and energy consumption.

CN119521311APending Publication Date: 2025-02-25ZHEJIANG UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411615491.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In wireless edge networks, task dependence is strong and the microservice hierarchy is complex. The existing task offloading and microservice deployment strategies fail to fully consider the sharing characteristics of task dependence and microservice hierarchy, resulting in unreasonable resource allocation and increasing system delay and energy consumption.

Method used

An alternating optimization algorithm (GRAO) based on greedy algorithm and deep reinforcement learning is proposed. The task offload path is determined through greedy algorithms, and the cache and resource allocation strategies of the microservice layer are optimized through deep reinforcement learning, dynamically adapting to complex network environments and optimizing resource utilization.

Benefits of technology

It effectively reduces task processing delay, reduces system energy consumption, and significantly improves user experience quality. It is suitable for latency-sensitive and computing-intensive edge computing application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119521311A_ABST
    Figure CN119521311A_ABST
Patent Text Reader

Abstract

A task unloading and micro-service hierarchical deployment optimization method with a dependency relationship in a wireless edge network comprises the following steps that a system is composed of a plurality of base stations, an edge server and user equipment, and the user equipment generates an application program containing a plurality of micro-service tasks with the dependency relationship, and the task is unloaded to the edge server for processing. Task unloading and resource allocation are optimized in each time slot, and the micro-service layer cache adopts a multi-time-slot updating strategy. A system performance problem is modeled as an optimization problem by jointly optimizing user application program access, a micro-service layer caching strategy, a task unloading decision and computing resource allocation. Firstly, an unloading path of a task is determined by using a greedy algorithm, and then a resource allocation and caching strategy is trained by using a deep reinforcement learning model. The problems of complex task unloading and cache updating in a multi-time-slot scene are solved through an alternate optimization algorithm, a trained model is deployed to an edge server, and minimization of long-term average time delay of a system and effective control over energy consumption are achieved. According to the method, the system resource utilization rate can be effectively improved, time delay is reduced, and the requirements of delay-sensitive applications are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless edge computing and 5G Internet of Things technology, and in particular to an optimization method for computing offloading and microservice hierarchical deployment with task dependencies in wireless edge networks. The method is based on the sharing characteristics of the microservice hierarchical structure, combined with the dependencies between tasks, and under energy consumption constraints, by formulating a near-optimal joint microservice hierarchical cache, task offloading, and computing resource allocation strategy to minimize the long-term average delay of the system, which is suitable for delay-sensitive and computing-intensive application scenarios, and realizes efficient management and optimization of edge computing resources. Background Art

[0002] With the rapid development of the Internet of Things and 5G technologies, intelligent applications such as augmented reality (AR), real-time video processing, and intelligent transportation systems have gradually become an indispensable part of users' daily lives. These applications usually have strict requirements on computing resources and low latency, and are typical delay-sensitive and computationally intensive tasks. When processing such tasks, traditional cloud computing architectures often have difficulty meeting real-time requirements due to bandwidth and network latency limitations. Edge computing, as an emerging computing paradigm that sinks computing resources to the edge of the network, can effectively reduce data transmission latency and improve system response speed.

[0003] However, the resources of edge computing nodes are limited, and user tasks usually have complex dependencies, which makes it impossible to effectively utilize existing computing resources. In addition, as a lightweight deployment method, microservice architecture allows applications to be divided into multiple service units according to their functions, but the existing task offloading and microservice deployment strategies fail to fully consider the shared characteristics of task dependencies and microservice hierarchical structures, resulting in unreasonable resource allocation and increased system latency and energy consumption. How to reasonably allocate computing resources and optimize task offloading strategies to improve system performance under limited edge resource conditions by combining task dependencies and microservice hierarchical structures has become a very worthy research issue. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present invention provides an optimization method for task offloading and microservice hierarchical deployment with dependencies in a wireless edge network environment from the perspective of edge computing. The method fully considers the dependencies of tasks in the application, the caching mechanism of the microservice hierarchical structure, and the dynamic allocation of computing resources. On this basis, a model close to the actual network environment is constructed to minimize the long-term average delay of the system and ensure that the system energy consumption does not exceed the preset energy consumption constraint. To this end, the method needs to consider the user's access in each time slot, the decision task offloading path and the allocation scheme of computing resources, and optimize the multi-slot update strategy of the microservice layer cache. Then, the present invention proposes an alternating optimization algorithm (GRAO) based on greedy algorithm and deep reinforcement learning. The algorithm first determines the task offloading path through a greedy algorithm, and then optimizes the cache and resource allocation strategy of the microservice layer through deep reinforcement learning. The method can gradually approach the optimal solution through iterative optimization in a dynamic network environment, thereby minimizing the delay of the edge computing system and effectively controlling the energy consumption.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] A method for offloading tasks with dependencies and deploying microservices at the level of a wireless edge network comprises the following steps:

[0007] Step 1: Deploy N base stations BS in a network area, using Represents a set of BSs, each of which covers a certain service range and is connected to an edge server via a wired connection. Each BS communicates with its neighbor BSs via wireless communication;

[0008] Step 2: The system is divided into T time slots, with K types of microservices and L layers of microservices. and represents the set of time slots, microservices, and microservice layers. Each edge server n can cache at most microservice layers that do not exceed its cache capacity S n , the deployment collection of the microservice layer is used Indicates that It means that edge server n deploys service layer l in time slot t;

[0009] Step 3: In any time slot t, the application generated by the user will be transmitted to the BS with the nearest physical distance through the wireless network, using the binary variable Indicates dynamic access point selection, where the application contains multiple microservice tasks And there are dependencies between tasks, where The microservice type that represents the task, Indicates the size of the task, Indicates the number of CPU cycles required to complete the task;

[0010] Step 4: After receiving the task, BSn needs to determine whether the service layer it deploys can meet the layer service requirements of the microservice. If it does, it will calculate itself. If there is no corresponding layer service, it will transfer the task to the adjacent base station. If there are multiple adjacent base stations that meet the requirements, the one with the largest computing resource f will be selected. t,n,m (f t,n,m represents the computing resources allocated by BS n to user m in time slot t); if the neighboring base station does not have the corresponding service, the task needs to be uploaded to the cloud;

[0011] Step 5: Calculate the three types of delays generated during the calculation process: First, the update delay generated when the base station switches the cache microservice layer in multiple time slots. where r n represents the download speed of the base station. Second, when base station n does not deploy the layer service required by the task, the transmission delay of base station n to base station n′ or the cloud to transmit task data j∈{1,…,J m}.,in represents the jth task G of user m m,j Whether it is offloaded by base station n to other base stations or the cloud, r nn′ Indicates the transmission rate between base stations or between base stations and the cloud. Indicates whether microservice k contains layer l. The third is the single-task computing latency after the task starts computing according to the transmission decision and computing resource allocation.

[0012] j∈{1,…,J m}, because there are dependencies between tasks, the next task must wait for the previous task to be completed and needs the result after the task is completed. In this way, each task has a start time and an end time, and the end time of each task is composed of the start time and the completion time of the task. The start time of each task is Indicates the completion time of the task, and the delay of the dependent task to deliver the result is The completion delay of all tasks is So the overall system delay

[0013] Step 6: Calculate the three types of energy consumption generated during the calculation process: First, the update energy loss generated when the base station switches the cache microservice layer in multiple time slots. Here γ represents the energy consumption coefficient, x represents the interval of multiple time slots, and the second is the single task transmission energy consumption generated during the unloading task. j∈{1,…,J m}, where p nn′ represents the transmission power between base stations, the total transmission energy consumption is The third is the single-task computing energy consumption generated when the base station calculates the task. κ n represents the calculation energy consumption coefficient of base station n, then the total energy consumption is calculated The total energy consumption is E(t) = E tr (t)+E c (t)+E switch (t).

[0014] Step 7: Taking the user application access in each time slot, the hierarchical deployment strategy of all BSs, the computing resource allocation and the task transmission offloading as the optimization variables, minimizing the total delay while keeping the energy consumption not exceeding Q as the optimization goal, the mathematical model is established as follows:

[0015]

[0016] Constraint ① is the long-term average energy consumption constraint;

[0017] Step 8: After analysis, the problem can be decoupled into two sub-problems, and the mathematical model is:

[0018]

[0019] The constraint is still ①;

[0020] Step 9: Optimize variable α in the original problem P t Our strategy is to select the base station closest to the user and then fix β t ,f t and γ t Get the question and question A greedy algorithm is used to solve the problem. That is, when multiple base stations can match the layers required by the microservice tasks and the CPU size is allocated, a greedy algorithm is used to find the task offloading strategy that achieves the minimum application completion time.

[0021] Step 10: Due to It is a long-term delay minimization problem, and the layer cache decision is updated in multiple time slots, which is different from the resource allocation strategy in each time slot. It is an NP-hard problem. The problem is solved by deep reinforcement learning method, and the state, action and reward are expressed as and The state space is the user task set of the current time slot. Fixed task offloading decisions Here i represents the iteration round, the action space is the decision variable of the current time slot, which is divided into two actions according to different time slot updates, and the reward is defined as the negative total system delay plus the penalty coefficient P for not meeting the constraint conditions;

[0022] Step 11: Iterate the optimization variables according to steps 9 and 10. If after each iteration, the objective function value satisfies the previous objective function value It is the best configuration under the current state, so as to carry out microservice layer deployment, resource allocation and task offloading, and finally perform task processing.

[0023] The beneficial effects of the present invention are mainly manifested in: combining greedy algorithms and deep reinforcement learning, a method for optimizing task offloading and microservice-level cache with dependencies in wireless edge networks is proposed. This method fully considers the dependencies between tasks and system energy consumption limitations through single-slot optimization of task offloading and resource allocation, combined with a multi-slot update strategy for the microservice layer cache. By optimizing task offloading through a greedy algorithm and optimizing the microservice layer cache update and resource allocation strategy through deep reinforcement learning, it can dynamically adapt to complex network environments and improve system resource utilization. The invention effectively reduces task processing delays, reduces system energy consumption, and significantly improves the quality of user experience. It is suitable for delay-sensitive and computationally intensive edge computing application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a system model diagram consisting of multiple users and multiple base stations of the present invention.

[0025] Figure 2 The present invention is a conceptual diagram of a method for offloading tasks with dependencies and deploying microservices at the hierarchical level in a wireless edge network. DETAILED DESCRIPTION

[0026] The present invention will be further described below in conjunction with the accompanying drawings.

[0027] Combination Figure 1 and Figure 2 , a method for task offloading and microservice hierarchical deployment with dependencies in a wireless edge network, comprising the following steps:

[0028] Step 1: Deploy N base stations BS in a network area, using Represents a set of BSs, each of which covers a certain service range and is connected to an edge server via a wired connection. Each BS communicates with its neighbor BSs via wireless communication;

[0029] Step 2: The system is divided into T time slots, with K types of microservices and L layers of microservices. and represents the set of time slots, microservices, and microservice layers. Each edge server n can cache at most microservice layers that do not exceed its cache capacity S n , the deployment collection of the microservice layer is used Indicates that It means that edge server n deploys service layer l in time slot t;

[0030] Step 3: In any time slot t, the application generated by the user will be transmitted to the BS with the nearest physical distance through the wireless network, using the binary variable Indicates dynamic access point selection, where the application contains multiple microservice tasks And there are dependencies between tasks, where The microservice type that represents the task, Indicates the size of the task, Indicates the number of CPU cycles required to complete the task;

[0031] Step 4: After receiving the task, BSn needs to determine whether the service layer it deploys can meet the layer service requirements of the microservice. If it does, it will calculate itself. If there is no corresponding layer service, it will transfer the task to the adjacent base station. If there are multiple adjacent base stations that meet the requirements, the one with the largest computing resource f will be selected. t,n,m (f t,n,m represents the computing resources allocated by BS n to user m in time slot t); if the neighboring base station does not have the corresponding service, the task needs to be uploaded to the cloud;

[0032] Step 5: Calculate the three types of delays generated during the calculation process: First, the update delay generated when the base station switches the cache microservice layer in multiple time slots. where r n represents the download speed of the base station. Second, when base station n does not deploy the layer service required by the task, the transmission delay of base station n to base station n′ or the cloud to transmit task data j∈{1,…,J m}.,in represents the jth task G of user m m,j Whether it is offloaded by base station n to other base stations or the cloud, r nn′ Indicates the transmission rate between base stations or between base stations and the cloud. Indicates whether microservice k contains layer l. The third is the single-task computing latency after the task starts computing according to the transmission decision and computing resource allocation.

[0033] j∈{1,…,J m}, because there are dependencies between tasks, the next task must wait for the previous task to be completed and needs the result after the task is completed. In this way, each task has a start time and an end time, and the end time of each task is composed of the start time and the completion time of the task. The start time of each task is Indicates the completion time of the task, and the delay of the dependent task to deliver the result is The completion delay of all tasks is So the overall system delay

[0034] Step 6: Calculate the three types of energy consumption generated during the calculation process: First, the update energy loss generated when the base station switches the cache microservice layer in multiple time slots. Here γ represents the energy consumption coefficient, x represents the interval of multiple time slots, and the second is the single task transmission energy consumption generated during the unloading task. j∈{1,…,J m}, where p nn′ represents the transmission power between base stations, the total transmission energy consumption is The third is the single-task computing energy consumption generated when the base station calculates the task. κ n represents the calculation energy consumption coefficient of base station n, then the total energy consumption is calculated The total energy consumption is E(t) = E tr (t)+E c (t)+E switch (t).

[0035] Step 7: Taking the user application access in each time slot, the hierarchical deployment strategy of all BSs, the computing resource allocation and the task transmission offloading as the optimization variables, minimizing the total delay while keeping the energy consumption not exceeding Q as the optimization goal, the mathematical model is established as follows:

[0036]

[0037] Constraint ① is the long-term average energy consumption constraint;

[0038] Step 8: After analysis, the problem can be decoupled into two sub-problems, and the mathematical model is:

[0039]

[0040] The constraint is still ①;

[0041] Step 9: Original Question The optimization variable α in t Our strategy is to select the base station closest to the user and then fix β t ,f t and γ t Get the question and question A greedy algorithm is used to solve the problem. That is, when multiple base stations can match the layers required by the microservice tasks and the CPU size is allocated, a greedy algorithm is used to find the task offloading strategy that achieves the minimum application completion time.

[0042] Step 10: Due to It is a long-term delay minimization problem, and the layer cache decision is updated in multiple time slots, which is different from the resource allocation strategy in each time slot. It is an NP-hard problem. The problem is solved by deep reinforcement learning method, and the state, action and reward are expressed as and The state space is the user task set of the current time slot. Fixed task offloading decisions Here i represents the iteration round, the action space is the decision variable of the current time slot, which is divided into two actions according to different time slot updates, and the reward is defined as the negative total system delay plus the penalty coefficient P for not meeting the constraint conditions;

[0043] Step 11: Iterate the optimization variables according to steps 9 and 10. If after each iteration, the objective function value satisfies the previous objective function value It is the best configuration under the current state, so as to carry out microservice layer deployment, resource allocation and task offloading, and finally perform task processing.

[0044] For example Figure 1 The task offloading and microservice level deployment scenario with dependencies in the wireless edge network is shown to illustrate the specific implementation scheme of the present invention.

[0045] First, the system consists of multiple base stations and edge servers. Each base station is equipped with limited computing resources and storage space, and is connected to a cloud server with unlimited computing and storage capabilities. The user device generates an application in each time slot and offloads the application to the nearest base station. Each application consists of multiple microservice tasks, which have dependencies and must be executed in sequence. The base station can cache part of the microservice layer. If the base station cannot cache the layer required by a microservice task, the task will be offloaded to the neighboring base station or cloud server for processing.

[0046] Secondly, when the base station receives a user task, it will process it according to the currently cached microservice layer. If the neighboring base station has not deployed the required microservice layer, the task will be offloaded to the cloud server for processing. Since the cloud server has unlimited computing power but high transmission latency, the base station needs to balance the task offloading path and cache layer update.

[0047] Thirdly, the present invention takes the energy and storage capacity of the base station as the constraints, the task offloading decision of each time slot, the computing resources and the multi-time slot microservice cache layer decision as the optimization variables, and the minimization of the long-term average delay of the system as the optimization goal to construct the optimization problem Minimize task processing latency while ensuring that system energy consumption does not exceed established limits.

[0048] Then, for this optimization problem, the present invention proposes an alternating optimization algorithm based on greedy algorithm and deep reinforcement learning. In each time slot, the resource allocation and microservice layer cache strategy are first fixed to use the greedy algorithm to determine the task unloading path, and then the unloading path is fixed, and the microservice layer cache and resource allocation are optimized through the deep reinforcement learning module. In this way, the overall performance of the system is gradually improved through alternating iterations, the system latency is reduced, and the energy consumption is effectively controlled.

[0049] Finally, resource allocation, microservice layer cache update and task offloading are alternately optimized in each time slot, so that the system can gradually approach the optimal decision in a dynamic environment, significantly reduce system latency and effectively control energy consumption.

[0050] The present invention aims at scenarios with strong task dependency and limited service cache capacity in wireless edge networks. It can help the base station formulate reasonable task offloading, resource allocation and microservice layer cache strategies in each time slot when user task requirements change dynamically, thereby effectively reducing the system latency and improving the user experience quality under energy consumption constraints.

[0051] The contents described in the embodiments of this specification are merely enumerations of implementation forms of the inventive concept and are for illustrative purposes only. The protection scope of the present invention should not be considered to be limited to the specific forms described in this embodiment, and the protection scope of the present invention also extends to equivalent technical means that can be thought of by ordinary technicians in this field based on the inventive concept.

Claims

1. A method for offloading tasks with dependencies and deploying microservices at the level of a wireless edge network, characterized in that: The steps include: Step 1: Deploy N base stations BS in a network area, using Represents a set of BSs, each of which covers a certain service range and is connected to an edge server via a wired connection. Each BS communicates with its neighbor BSs via wireless communication; Step 2: The system is divided into T time slots, with K types of microservices and L layers of microservices. and represents the set of time slots, microservices, and microservice layers. Each edge server n can cache at most microservice layers that do not exceed its cache capacity S n , the deployment collection of the microservice layer is used Indicates that It means that edge server n deploys service layer l in time slot t; Step 3: In any time slot t, the application generated by the user will be transmitted to the BS with the nearest physical distance through the wireless network, using the binary variable Indicates dynamic access point selection, where the application contains multiple microservice tasks And there are dependencies between tasks, where The microservice type that represents the task, Indicates the size of the task, Indicates the number of CPU cycles required to complete the task; Step 4: After receiving the task, BSn needs to determine whether the service layer it deploys can meet the layer service requirements of the microservice. If it does, it will calculate itself. If there is no corresponding layer service, it will transfer the task to the adjacent base station. If there are multiple adjacent base stations that meet the requirements, the one with the largest computing resource f will be selected. t,n,m The base station, f t,n,m It represents the computing resources allocated by BS n to user m in time slot t; if the neighboring base station does not have the corresponding service, the task needs to be uploaded to the cloud; Step 5: Calculate the three types of delays generated during the calculation process: First, the update delay generated when the base station switches the cache microservice layer in multiple time slots. where r n represents the download speed of the base station. Second, when base station n does not deploy the layer service required by the task, the transmission delay of base station n to base station n′ or the cloud to transmit task data in represents the jth task G of user m m,j Whether it is offloaded by base station n to other base stations or the cloud, r nn′ Indicates the transmission rate between base stations or between base stations and the cloud. Indicates whether microservice k contains layer l. The third is the single task computing latency after the task starts computing according to the transmission decision and computing resource allocation. Because there are dependencies between tasks, each task has a start time and an end time, and the end time of each task is composed of the start time and the completion time of the task. The start time of each task is Indicates the completion time of the task, and the delay of the dependent task to deliver the result is The completion delay of all tasks is So the overall system delay Step 6: Calculate the three types of energy consumption generated during the calculation process: First, the update energy loss generated when the base station switches the cache microservice layer in multiple time slots. Here γ represents the energy consumption coefficient, x represents the interval of multiple time slots, and the second is the single task transmission energy consumption generated during the unloading task. where p nn ′ represents the transmission power between base stations, and the total transmission energy consumption is The third is the single-task computing energy consumption generated when the base station calculates the task. κ n represents the calculation energy consumption coefficient of base station n, then the total energy consumption is calculated The total energy consumption is E(t) = E tr (t)+E c (t)+E switch (t); Step 7: Taking the user application access in each time slot, the hierarchical deployment strategy of all BSs, the computing resource allocation and the task transmission offloading as the optimization variables, minimizing the total delay while keeping the energy consumption not exceeding Q as the optimization goal, the mathematical model is established as follows: st. Constraint ① is the long-term average energy consumption constraint; Step 8: Decouple the problem into two sub-problems. The mathematical model is: The constraint is still ①; Step 9: Original Question The optimization variable α in t Our strategy is to select the base station closest to the user and then fix β t , f t and γ t Get the question and question A greedy algorithm is used to solve the problem. That is, when multiple base stations can match the layers required by the microservice tasks and the CPU size is allocated, a greedy algorithm is used to find the task offloading strategy that achieves the minimum application completion time. Step 10: Solve the problem using deep reinforcement learning methods, and express the state, action, and reward as and The state space is the user task set of the current time slot. Fixed task offloading decisions Here i represents the iteration round, the action space is the decision variable of the current time slot, which is divided into two actions according to different time slot updates, and the reward is defined as the negative total system delay plus the penalty coefficient P for not meeting the constraint conditions; Step 11: Iterate the optimization variables according to steps 9 and 10. If after each iteration, the objective function value satisfies the previous objective function value It is the best configuration under the current state, so as to carry out microservice layer deployment, resource allocation and task offloading, and finally perform task processing.

Citation Information

Cited By

  • Elastic resource scheduling method and device for micro-service and electronic equipment

    CN120909746A