Edge computing collaborative task unloading method based on multi-agent reinforcement learning

Optimizing task offloading decisions in edge computing environments through multi-agent reinforcement learning solves the problem of collaborative offloading and resource allocation of multi-type tasks in edge computing environments, improves system utility and decision-making stability, and achieves optimal task offloading strategies. Reduced processing costs.

CN118585263APending Publication Date: 2024-09-03TONGJI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410687523.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In an edge computing environment, how to realize collaborative offloading and adaptive resource allocation of multiple types of computing tasks and improve system utility, especially in an environment where the number of users is growing and application requirements are different, is difficult to effectively solve with existing technology.

Method used

A method based on multi-agent reinforcement learning is used to provide users with offloading decisions in an edge computing environment through the decision-making network. Reinforcement learning is used to optimize the agent's decision-making network to achieve local and global collaborative optimization, training of action value functions and policy gradients. Adjust and optimize task processing delay and energy consumption to minimize task costs.

Benefits of technology

It improves the adaptability of user decision-making and the overall effectiveness of the system, avoids falling into local optimality, enhances the stability of the decision-making network, realizes an effective collaborative offloading strategy in changing environments, and reduces the average processing cost of computing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585263A
    Figure CN118585263A
Patent Text Reader

Abstract

The invention relates to an edge computing cooperative task unloading method based on multi-agent reinforcement learning, and the method comprises the steps: obtaining a self-adaptive unloading strategy in an edge computing environment containing multiple types of tasks for user equipment through a multi-agent reinforcement learning method, and improving the processing and adaptive capability of different types of tasks; the obtained optimal task unloading strategy selects a reasonable calculation mode and a proper edge server processing task for the calculation task of the user equipment, the average processing cost of the calculation tasks of all the user equipment in the system is minimized, and the overall utility of the edge calculation system is improved. In addition, by means of centralized training and distributed execution, the user equipment can make a collaborative unloading decision according to local observation after obtaining an optimal task unloading strategy; the distributed user equipment network model is helped to adjust the strategy gradient through the centralized training network model, and the stability of the unloading strategy in the changing environment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of edge computing task scheduling, and in particular to an edge computing collaborative task unloading method based on multi-agent reinforcement learning. Background Art

[0002] With the promotion of the fifth generation mobile communication technology (5G) and the rapid development of artificial intelligence technology, the number of terminals is experiencing explosive growth. Based on 5G technology, a large number of new applications have been implemented, such as tactile Internet, autonomous driving, smart medical care, etc. These applications are computationally intensive and latency sensitive, and have high requirements for the computing power and memory capacity of the device. However, due to their portability and mobility, mobile devices are limited in physical size, which limits their computing power, memory capacity, battery capacity and lifespan. It is difficult to meet the performance requirements of these new applications, which will seriously affect the service quality and user experience of the application.

[0003] Edge computing sinks computing resources and network services to the edge of mobile networks, helping mobile devices process data in real time closer to the mobile devices or data sources, thereby providing low-latency, high-bandwidth IT services and cloud computing functions, and providing a solution to the contradiction between dealing with new applications and the limited computing resources of wireless devices.

[0004] Although edge computing has the significant advantages of ultra-low latency and high-bandwidth network services, edge server resources are limited, load conditions are complex and changeable, and the requirements of different computing tasks are different. In an environment where the number of users is growing and application requirements vary, how to achieve collaborative offloading between users in an edge computing environment that includes multiple types of computing tasks, adaptively allocate communication and computing resources according to environmental changes, and improve system utility has become an urgent problem to be solved.

[0005] Reinforcement learning mainly studies how to select the best action through continuous interaction with the system environment, and is suitable for solving automatic control and decision-making problems in random dynamic environments. However, traditional reinforcement learning methods regard the interaction between each agent and the environment as independent of each other, ignoring the mutual influence between agents. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide an edge computing collaborative task offloading method based on multi-agent reinforcement learning. Through multi-agent reinforcement learning, users can obtain offloading decisions in an edge computing environment to solve the problems of users' adaptability in edge computing decisions and unsatisfactory collaborative effects between users.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] In one aspect of the present invention, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is provided, which is applied to an edge server. The method comprises the following steps:

[0009] In response to the computing task generated by the distributed user and the offloading decision made by the decision network, when the offloading decision is offloading computing, computing resources are allocated to the computing task, the calculated result is sent to the corresponding user, and the task processing delay and energy consumption information of the offloading computing is calculated. When the offloading decision is user-side computing, the task processing delay and energy consumption information of the user-side computing is obtained;

[0010] In response to the completion of the computing task, the task cost of the computing task is calculated based on the task processing delay and energy consumption information, and the local optimization of the decision network of the intelligent agent is realized through reinforcement learning with the goal of minimizing the task cost, and experience samples are generated and stored in a preset experience replay pool;

[0011] In response to reaching a preset training cycle, a batch of experience samples are extracted from the experience replay pool to train a local action value function with the goal of minimizing the total loss of each agent's action value;

[0012] In response to the completion of the training of the action value function, the action value function value of each intelligent agent on the user side is calculated respectively, and the policy gradient of the intelligent agent decision network is adjusted by transferring the action value function value to achieve global collaborative optimization of the intelligent agent's decision network.

[0013] As a preferred technical solution, the process of generating experience samples includes:

[0014] An experience sample is generated based on the computing task, the offloading decision, the task cost and local observation information at the next moment.

[0015] As a preferred technical solution, the total loss L of the action value of each agent is:

[0016]

[0017]

[0018] Among them, θ n is a trainable parameter, |B| is the size of the sample set B randomly selected from the experience replay pool, is the action value function value of the i-th sample in state s, when the decision network μ makes an unloading decision a, is the action value function value under the decision network μ′ represented by the delay parameter θ′, rn is the immediate reward for reinforcement learning, and γ is the discount.

[0019] As a preferred technical solution, the calculation process of the task processing delay includes:

[0020] When the uninstall decision is calculated on the user side:

[0021]

[0022]

[0023] When the offload decision is to offload calculations:

[0024]

[0025]

[0026] in, are local computing latency, local computing energy consumption, offload computing latency, and offload computing energy consumption, respectively. n represents the computing power of the user device, k n is the CPU energy efficiency coefficient of the user device, f n is the CPU cycle frequency of the user device, c o is the coefficient, D n,t is the number of bits offloaded, B is the bandwidth allocated to the user equipment, and P n is the user's transmission power, h nm is the channel gain between user n and edge server m.

[0027] As a preferred technical solution, the calculation process of the task cost of the calculation task is as follows:

[0028] The task cost of the task is calculated based on the task processing delay and energy consumption information, and the transmission delay, energy consumption and reliability calculated based on the computing task.

[0029] As a preferred technical solution, the transmission delay, energy consumption and reliability are calculated using the following formula:

[0030]

[0031]

[0032]

[0033] in, η n,t They are transmission delay, transmission energy consumption, reliability, and D n,t is the number of bits offloaded, B is the bandwidth allocated to the user equipment, and Pn is the user's transmission power, h nm is the channel gain between user n and edge server m, N0 is the noise power in the channel, They represent local computing latency and offload computing latency respectively.

[0034] As a preferred technical solution, the process of allocating computing resources includes:

[0035] Computing resources are allocated based on the weights of users on the same edge server.

[0036] As a preferred technical solution, the computing task includes transmission delay and energy consumption information and local information observed by the user as the state of the agent, and the local information includes channel status, remaining energy of the device, offloading decision type, and the amount of task data to be processed by the edge server.

[0037] Another aspect of the present invention provides an electronic device, comprising: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the aforementioned edge computing collaborative task offloading method based on multi-agent reinforcement learning.

[0038] Another aspect of the present invention provides a computer-readable storage medium comprising one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the aforementioned edge computing collaborative task offloading method based on multi-agent reinforcement learning.

[0039] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0040] (1) Improve the adaptability of user decisions and improve the overall utility of edge computing: Through the multi-agent reinforcement learning method, users can obtain adaptive offloading decisions in the edge computing environment, improve the processing and adaptability of different types of tasks, and obtain the optimal task offloading decision to select a reasonable computing method and a suitable edge server for the computing task of the user device to implement task processing, minimize the average processing cost of the computing tasks of all user devices in the system, and improve the overall utility of the edge computing system.

[0041] (2) Strong decision-making network stability: Through centralized training and distributed execution, user devices can make collaborative offloading decisions based on local observations after obtaining the optimal task offloading strategy. The centralized training network model helps the distributed user device network model to adjust the strategy gradient. The task offloading strategy of the user device can effectively respond to changes in the number of user devices and changes in the weight of user devices, thereby improving the stability of the offloading strategy in a changing environment.

[0042] (3) Avoid falling into local optimality: With the goal of minimizing task cost, the centralized training network model optimizes the action value function by minimizing the loss function. Each user device network model optimizes the decision network based on the action value made by the centralized training network model to achieve the effect of collaborative offloading among users, so as to avoid falling into local optimality. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 Schematic diagram of edge computing system in the embodiment;

[0044] Figure 2 This is a schematic diagram of the edge computing system architecture in the embodiment;

[0045] Figure 3 It is a flow chart of the edge computing collaborative task offloading method of multi-agent reinforcement learning in the embodiment;

[0046] Figure 4 Schematic diagram of the task offloading strategy training framework in the embodiment. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0048] Example 1

[0049] In response to the defects of traditional reinforcement learning in complex edge computing of multi-user and multi-type tasks, this embodiment provides an edge computing collaborative task offloading method based on multi-agent reinforcement learning with high stability and flexible adaptability to multi-type task edge computing scenarios, which is applied to edge computing systems.

[0050] See also Figure 1 A schematic diagram of an edge computing system, which includes multiple wireless devices as user devices and multiple wireless access points that establish wireless connections with the wireless devices. The wireless access points are connected to edge servers via wires, and the edge servers are used to process computing tasks after being offloaded by the wireless devices.

[0051] In this method, the user device selects the task calculation method and the edge server providing the service according to the remaining energy, task type, channel status and edge server load. The system allocates the same bandwidth B to the user devices that choose to offload the calculation. Within the time range T, the task sequence of the user device is parameterized as (e.g. 0.5, depending on the type of task). Different user devices process different types of tasks. The number of energy units received by the user device from the environment satisfies the parameter λ e The user device stores the received energy in the battery for local computing or offloading computing. Each edge server maintains a task queue for receiving computing tasks offloaded by the user device. The user device interacts with the edge computing environment in 1s time slots, obtains local observations, and selects offloading actions to process tasks according to the offloading strategy.

[0052] like Figure 2 As shown, the constructed multi-user and multi-server edge computing model containing multi-type tasks includes: a local computing model, a task offloading model and an edge server computing model, and the corresponding multi-agent reinforcement learning model includes: a state space, an action space, a reward function and a training method, wherein the training method includes a loss function, an action value function and a parameter adjustment function.

[0053] See also Figure 3 The flowchart of the edge computing collaborative task offloading method based on multi-agent reinforcement learning in the embodiment is as follows:

[0054] Step S1: Establish Figure 1 The edge computing system shown corresponds to a multi-user and multi-server edge computing model containing multiple types of tasks, and the system parameters of the edge computing model are set.

[0055] The sets of user devices and edge servers are denoted as N = {1,2,…,n,…,|N|} and M = {1,2,…,m,…,|M|} respectively; different user devices generate different task types, and the set of task types is denoted as K = {1,2,…,k,…,|K|}.

[0056] Set the system parameters of the edge computing model, including: task arrival parameters Energy receiving parameter λ e 、CPU cycle frequency f of user equipment n 、CPU energy efficiency coefficient k n and the transmission power P n , CPU cycle frequency f of edge server m , the bandwidth B allocated by the system to the user device, initialize the network parameters θ of the centralized training network and the distributed user decision network n , parameter θ n ′ as well as the reward discount factor γ, the training period δ and the sample size |B|.

[0057] Step S2: The user device obtains local observations, including: channel status, remaining energy of the device, task type, and data volume of the task to be processed by the edge server. The local observations serve as state functions in reinforcement learning.

[0058] Step S3: Based on the local observation of the user, the decision network is used to make an offloading decision, including local calculation (i.e., local calculation on the user side) and offloading calculation (i.e., calculation on the edge server), and the processing delay, transmission delay and energy consumption of the task are calculated according to the calculation method to generate a computing task. The decision network is used as a policy function in reinforcement learning. Preferably, the decision network is deployed locally on the user device.

[0059] When the offloading decision is local computing, the processing latency and energy consumption of local computing are calculated as follows:

[0060]

[0061]

[0062] Among them, F n represents the computing power of the user device, k n is the CPU energy efficiency coefficient of the user device, f n is the CPU cycle frequency of the user equipment, and the energy constraint is

[0063] When the offloading decision is to offload computing, the edge server m that provides computing services is selected according to the offloading action made by the decision network. The corresponding transmission delay and energy consumption are calculated as follows:

[0064]

[0065]

[0066] Among them, c o D n,t is the number of bits offloaded, r is the data rate, B is the bandwidth allocated to the user equipment by the system, and P n is the transmit power of the user equipment, h nm is the channel gain between user device n and edge server m, N0 is the noise power in the channel, and the energy constraint is

[0067] After receiving the computing task offloaded by the user device, the edge server puts it into the task queue, allocates computing resources to process the task according to the weight of the user device that selects the edge server, transmits the calculation result back to the user device, and calculates the task processing delay. The calculation method is as follows:

[0068]

[0069] Among them, ω n is the weight of user device n, S m (t) is the set of user devices, f m is the CPU cycle frequency of the edge server;

[0070] Step S4: Calculate the task cost using the delay, energy consumption and system reliability obtained in step S3, take the negative value of the task cost as a reward, and perform local joint optimization on the decision network with the goal of minimizing the task cost to ensure delay, energy consumption and system reliability.

[0071] For different types of tasks (i.e. local computing or offloaded computing), the factors affecting latency, energy consumption, and reliability are different. The task cost is calculated as follows:

[0072]

[0073]

[0074]

[0075]

[0076] in, is the influencing factor of task type k, satisfying

[0077] Joint optimization is achieved through reinforcement learning. The basic elements of multi-agent reinforcement learning training include: local observation of user devices n , uninstall action a n , uninstall strategy μ n 、Instant Rewards n and the long-term reward R of the current state n , where the local observation of the user equipment is used as the state function:

[0078] o n =(h n,t ,e n,t ,k,q n,t-1 )

[0079] Among them, h n,t 、e n,t , k, q n,t-1 They are the channel status, the remaining energy of the device, the task type, and the data volume of the task to be processed by the edge server.

[0080] Uninstall action of user device:

[0081] a n =(x n ,yn ),x n ∈{0,1},y n ∈{0,1,…,k,…|K|}

[0082] Among them, x n The computing mode selected for the wireless device, x n =0 means local calculation, x n =1 means unloading calculation, y n Represents the edge server selected by the wireless device to provide computing services.

[0083] The immediate reward is the negative of the task cost:

[0084]

[0085] The long-term reward of the current state is the sum of the discounted rewards of subsequent states, calculated as follows:

[0086]

[0087] Here, γ is the discount factor.

[0088] Step S5: The local information obtained by the user device in steps S3-S4, the unloading action performed, the obtained task cost, and the local observation information at the next moment are stored in the experience replay pool as experience.

[0089] Step S6: Every training cycle δ, the network deployed on the edge server for centralized training randomly extracts a batch of samples from the experience replay pool for training, and calculates the action value (Q value) and target Q value y for evaluating the offloading decision of the distributed user device based on the samples. μ’ , calculated as follows:

[0090]

[0091]

[0092] Among them, θ n is the parameter of the neural network, μ' is the unloading strategy represented by the delay parameter θ';

[0093] The centrally trained network updates the action-value function by minimizing the loss function, which is calculated as follows:

[0094]

[0095] Among them, |B| is the size of the sample set B randomly drawn from the experience replay pool, θ n is the parameter of the neural network, μ' is the unloading strategy represented by the delay parameter θ', y μ’is the target Q value calculated based on the sample.

[0096] The user device uses the Q value given by the centralized trained network to calculate the policy gradient, update the network parameters, and achieve global optimization. After a period of training, the user device can achieve collaborative task offloading based only on its own local observations and network models. The calculation method of Q value and policy gradient is as follows:

[0097]

[0098]

[0099] Step S7: Repeat steps S2 to S6 until the maximum number of training times is reached.

[0100] like Figure 4 As shown, the centrally trained network uses samples extracted from the experience replay pool, that is, the experience of all agents, for training; by transferring the action value Q value, the centrally trained network evaluates the offloading action selected by the neural network of the distributed user device; the user device selects the offloading action based on the local observation and the offloading strategy of the distributed network, and uses the received Q value to train the decision network to obtain the optimal task offloading strategy for the user device and realize collaborative offloading between user devices.

[0101] This method has the following beneficial effects:

[0102] (1) Using reinforcement learning, user devices (agents) in the edge computing environment continuously interact with the system environment, learn from the interaction experience, optimize the unloading strategy with the goal of maximizing long-term cumulative rewards, and achieve adaptive task unloading in a changing environment. The interaction between each agent and the environment is regarded as an independent scheme, ignoring that the unloading decision of each user device in the edge computing environment will affect the unloading decision of other user devices. The multi-agent reinforcement learning method of this embodiment further considers the mutual influence of agent decisions, enabling agents to achieve adaptive collaborative task unloading in a complex edge computing environment containing multiple types of tasks, making the unloading strategy more stable in a non-stationary environment with multiple users.

[0103] (2) Through the multi-agent reinforcement learning method, an adaptive offloading strategy is obtained for user devices in an edge computing environment that includes multiple types of tasks, thereby improving the processing and adaptability of different types of tasks; the optimal task offloading strategy obtained selects a reasonable computing method and a suitable edge server to process the computing tasks of the user devices, thereby minimizing the average processing cost of the computing tasks of all user devices in the system and improving the overall utility of the edge computing system.

[0104] (3) Through centralized training and distributed execution, user devices can make collaborative offloading decisions based on local observations after obtaining the optimal task offloading strategy. By using a centralized training network model to help the distributed user device network model adjust the policy gradient, the task offloading strategy of the user device can effectively respond to changes in the number of user devices, changes in the weight of user devices, etc., thereby improving the stability of the offloading strategy in a changing environment.

[0105] Example 2

[0106] This embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the edge computing collaborative task offloading method for multi-agent reinforcement learning as described in Example 1.

[0107] Example 3

[0108] This embodiment provides a computer-readable storage medium, including one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the edge computing collaborative task offloading method for multi-agent reinforcement learning as described in Example 1.

[0109] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for edge computing collaborative task offloading based on multi-agent reinforcement learning, characterized in that: Applied to an edge server, the method comprises the following steps: In response to the computing task generated by the distributed user and the offloading decision made by the decision network, when the offloading decision is offloading computing, computing resources are allocated to the computing task, the calculated result is sent to the corresponding user, and the task processing delay and energy consumption information of the offloading computing is calculated. When the offloading decision is user-side computing, the task processing delay and energy consumption information of the user-side computing is obtained; In response to the completion of the computing task, the task cost of the computing task is calculated based on the task processing delay and energy consumption information, and the local optimization of the decision network of the intelligent agent is realized through reinforcement learning with the goal of minimizing the task cost, and experience samples are generated and stored in a preset experience replay pool; In response to reaching a preset training cycle, a batch of experience samples are extracted from the experience replay pool to train a local action value function with the goal of minimizing the total loss of each agent's action value; In response to the completion of the training of the action value function, the action value function value of each intelligent agent on the user side is calculated respectively, and the policy gradient of the intelligent agent decision network is adjusted by transferring the action value function value to achieve global collaborative optimization of the intelligent agent's decision network.

2. According to claim 1, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is characterized in that: The process of generating experience samples includes: An experience sample is generated based on the computing task, the offloading decision, the task cost and local information of observation at the next moment.

3. According to the edge computing collaborative task offloading method based on multi-agent reinforcement learning according to claim 1, it is characterized in that: The total loss L of the value of each agent's action is: Among them, θ n is a trainable parameter, |B| is the size of the sample set B randomly selected from the experience replay pool, is the action value function value of the i-th sample in state s, when the decision network μ makes an unloading decision a, is the action value function value under the decision network μ′ represented by the delay parameter θ′, r n is the immediate reward for reinforcement learning, and γ is the discount.

4. According to claim 1, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is characterized in that: The calculation process of the task processing delay includes: When the uninstall decision is calculated on the user side: When the offload decision is to offload calculations: in, are local computing latency, local computing energy consumption, offload computing latency, and offload computing energy consumption, respectively. n represents the computing power of the user device, k n is the CPU energy efficiency coefficient of the user device, f n is the CPU cycle frequency of the user device, c o is the coefficient, D n,t is the number of bits offloaded, B is the bandwidth allocated to the user equipment, and P n is the user's transmission power, h nm is the channel gain between user n and edge server m.

5. According to the edge computing collaborative task offloading method based on multi-agent reinforcement learning according to claim 1, it is characterized in that: The calculation process of the task cost of the calculation task is as follows: The task cost of the task is calculated based on the task processing delay and energy consumption information, and the transmission delay, energy consumption and reliability calculated based on the computing task.

6. According to claim 5, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is characterized in that: The transmission delay, energy consumption and reliability are calculated using the following formula: in, η n,t They are transmission delay, transmission energy consumption, reliability, and D n,t is the number of bits offloaded, B is the bandwidth allocated to the user equipment, and P n is the user's transmission power, h nm is the channel gain between user n and edge server m, N0 is the noise power in the channel, They represent local computing latency and offload computing latency respectively.

7. According to claim 1, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is characterized in that: The process of allocating computing resources includes: Computing resources are allocated based on the weights of users on the same edge server.

8. According to claim 1, a method for edge computing collaborative task offloading based on multi-agent reinforcement learning is characterized in that: The computing task includes transmission delay and energy consumption information and local information observed by the user as the state of the agent, and the local information includes channel status, remaining energy of the device, offloading decision type and the amount of task data to be processed by the edge server.

9. An electronic device, characterized in that: include: One or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the edge computing collaborative task offloading method based on multi-agent reinforcement learning as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: It includes one or more programs for execution by one or more processors of an electronic device, and the one or more programs include instructions for executing the edge computing collaborative task offloading method based on multi-agent reinforcement learning as described in any one of claims 1-8.

Citation Information

Cited By

  • Underwater Computing Task Offloading Method Based on Improved Deep Deterministic Policy Gradient

    CN119255300B