Heterogeneous computing and resource allocation method for wireless edge artificial intelligence

By optimizing the resource allocation and task scheduling of edge servers through a multi-agent deep deterministic policy gradient algorithm, the problem that cloud computing models cannot meet the real-time requirements of artificial intelligence tasks is solved, and task latency is reduced and resource utilization is improved.

CN119166331BActive Publication Date: 2026-04-07XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing centralized cloud computing models are insufficient to meet the real-time requirements of artificial intelligence tasks, and single computing resource scheduling cannot effectively meet the needs of computationally intensive and latency-sensitive tasks.

Method used

A multi-agent deep deterministic policy gradient algorithm is adopted to iteratively optimize the resource allocation and task scheduling of edge servers. By combining CPU, GPU resources and bandwidth, the algorithm optimizes task offloading decisions, avoids decision conflicts, calculates task latency and energy consumption, and updates intelligent algorithm parameters to improve resource utilization.

Benefits of technology

It effectively reduces task execution delay, improves resource utilization, achieves optimal system strategy, and meets the computing needs of different types of tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166331B_ABST
    Figure CN119166331B_ABST
Patent Text Reader

Abstract

The application relates to a wireless edge artificial intelligence heterogeneous computing and resource allocation method, which comprises the following steps: obtaining edge server information and AI task information; obtaining an initial state of an edge environment according to the edge server information and the AI task information; inputting the initial state of the edge environment into an intelligent algorithm to obtain an agent action; according to the agent action, performing a corresponding action to obtain a next state and calculating a task transmission time delay, a task calculation time delay, a task transmission energy consumption and a task calculation energy consumption; according to the task transmission time delay, the task calculation time delay, the task transmission energy consumption and the task calculation energy consumption, obtaining an instant reward; and according to the instant reward and the next state, updating parameters of the intelligent algorithm until a requirement is met. According to a specific research scene, an optimization problem is formulated to jointly optimize unloading decisions of various agents and resource allocation conditions so that optimal overall task processing time delay is obtained under the premise of meeting relevant constraints.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of distributed edge computing network technology, and in particular to a multi-resource allocation method for jointly optimizing the offloading of AI task computation in an edge environment. Background Technology

[0002] With the rapid development of artificial intelligence (AI) technology and the widespread adoption of edge devices, a large number of computationally intensive and latency-sensitive AI applications have emerged on the internet. This has exacerbated network congestion to some extent. Due to the inherent time sensitivity of AI tasks, traditional cloud-centric centralized scheduling models struggle to meet the real-time requirements of AI tasks. The emerging computing paradigm of Mobile Edge Computing (MEC) offers an opportunity to solve this problem. In MEC, servers deployed closer to base station edge devices can significantly reduce transmission latency, ensuring timely and efficient processing of AI tasks at the network edge. Efficient task scheduling and rational resource allocation play a crucial role in distributed edge environments, effectively guaranteeing Quality of Service (QoE).

[0003] However, due to the unique computational requirements of artificial intelligence tasks, scheduling using a single computing resource often fails to meet these requirements, leading to suboptimal results. Summary of the Invention

[0004] The technical problem to be solved by this invention is:

[0005] To avoid the shortcomings of existing technologies, this invention provides a heterogeneous computing and resource allocation method for wireless edge artificial intelligence, which is used to obtain the optimal computing latency of tasks in edge environments through reasonable and efficient task scheduling and resource allocation.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0007] A wireless edge heterogeneous computing and resource allocation method for artificial intelligence task assignment, characterized by employing an intelligent algorithm for iteration, with each edge server representing an intelligent agent; comprising:

[0008] Obtain edge server information and AI task information; the edge server information includes location information and resource status information; the AI ​​task information includes the resource size required for the AI ​​task, and the resources include CPU resources, GPU resources and storage resources;

[0009] The initial state of the edge environment is obtained based on the edge server information and the AI ​​task information;

[0010] The initial state of the edge environment is input into the intelligent algorithm to obtain the agent's actions; the intelligent algorithm is an intelligent decision-making algorithm based on the multi-agent deep deterministic policy gradient algorithm.

[0011] Based on the agent's actions, execute the corresponding actions to obtain the next state and calculate the task transmission latency, task computation latency, task transmission energy consumption, and task computation energy consumption.

[0012] Based on the task transmission latency, task computation latency, task transmission energy consumption, and task computation energy consumption, an instant reward is obtained.

[0013] Determine whether the number of training sets recorded in the buffer has reached the set buffer threshold. Based on the determination result, decide whether to train the policy network and target network in the intelligent algorithm: if the set buffer threshold has not been reached, store the training set data in the buffer and update the current state o(t) to the next state o′(t); otherwise, update the parameters of the intelligent algorithm according to the instant reward and the next state until the requirements are met.

[0014] A further technical solution of the present invention: the initial state of the edge environment obtained based on the edge server information and the AI ​​task information specifically includes:

[0015] The distance from the edge device where AI task j is located to the intelligent agent m is d. j,m The power of the task during transmission is At time t, the state o of agent m m The solution to (t) is:

[0016]

[0017] Among them, R m,CPU and R m,GPU These represent the remaining CPU and GPU resources in agent m, respectively. These represent the CPU and GPU resources required for AI task j, respectively. For the collection of all AI tasks;

[0018] Let t = 0, then we obtain the initial state of the edge environment o(0) = {o1(0), o2(0), ..., o M (0)}.

[0019] A further technical solution of the present invention: the step of inputting the initial state of the edge environment into the intelligent algorithm to obtain the agent's action specifically includes:

[0020] The initial state of the edge environment is input into the actor network in the policy network, and the actor network will output a set of action decisions 'a'. m(t), which represents the action decision output by agent m at time t, and its solution is:

[0021]

[0022] Where x j,m Indicates whether task j is unloaded onto agent m, x j,m =1 indicates that task j is unloaded onto agent m; otherwise, x j,m =0; and b represents the minimum number of CPU and GPU resources allocated by agent m to AI task j, respectively; j,m This represents the bandwidth allocated by agent m to task j.

[0023] A further technical solution of the present invention: To avoid decision-making conflicts that may occur when the agent makes decisions, action masking is required before selecting an action; the action mask specifically includes:

[0024] Iterate through the agents in the current environment, obtain the actions corresponding to each agent through the actor network, and record the agent's number and action set;

[0025] The output feature value corresponding to the task in conflict is set to infinitesimal, and the unloading decision probability of the task to the agent is obtained by SoftMax processing, so that the unloading probability of the task in conflict is 0.

[0026] A further technical solution of the present invention: the calculation formula for the task transmission delay:

[0027]

[0028] in, and These represent the CPU and GPU resources required to process task j, respectively. The subscript j indicates the index number of the AI ​​task, m is the index number of the edge server, and b... j,m This represents the bandwidth allocated to the task, X = (x j,m For the unloading decision, The signal-to-noise ratio (SNR) of a transmission channel is calculated using the following formula:

[0029]

[0030] in, This represents the transmission power during the process of transmitting task j to agent m, where the subscript j represents the index number of the AI ​​task. This represents the channel gain of the task during transmission;

[0031] The formula for calculating the task computation latency is as follows:

[0032]

[0033] in, and δ represents the CPU cycles and GPU cycles required to process a unit of data, respectively. C and δ G These represent the smallest allocatable CPU and GPU units, respectively. and These represent the unit amounts of CPU and GPU resources required to process AI task j, respectively.

[0034] The formula for calculating the energy consumption of task transmission is as follows:

[0035]

[0036] in, This represents the amount of power transmitted during the process of processing task j and transmitting it to agent m.

[0037] The formula for calculating the energy consumption of the task is as follows:

[0038]

[0039] Among them κ m This represents the effective switching capacitance of edge server m.

[0040] A further technical solution of the present invention: the formula for solving the instant reward is:

[0041]

[0042] Among them, C m,CPU C m,GPU These represent the total CPU and GPU resources of server m, respectively. This represents the total remaining CPU and GPU resources of server m. Let m be the total time required to complete the tasks processed by agent m, where the total time required for each task includes computation time. and transmission time Let β1 represent the number of tasks completed by agent m; β2 and β1 represent the power ratio of resource utilization and average task completion time, respectively. Represents the penalty factor, when hour when hour This represents the penalty coefficient for exceeding energy consumption limits.

[0043] A further technical solution of the present invention: the updating of the parameters of the intelligent algorithm until the requirements are met specifically includes:

[0044] Based on the training data extracted from the buffer, update the policy network parameters, target network parameters, and cumulative rewards of each agent within the maximum evaluation step number T of the intelligent algorithm.

[0045] Repeat the above steps until the set training round threshold is met.

[0046] A further technical solution of the present invention: updating the policy network parameters and target network parameters of the intelligent algorithm based on the training data extracted from the buffer, including:

[0047] Step 1: Use a priority sampling mechanism to collect training samples from the buffer; specifically, the i-th group of data in the buffer... The probability of being a training sample The solution formula is as follows:

[0048]

[0049] Where, N i express The number of times used for training, T represents the time step of the current episode, and r i The value represents the reward for experience, and μ represents the weight parameter. The initial value is set to 1;

[0050] An ε-greedy strategy is used each time training samples are drawn. The formula for calculating the sample drawing is as follows:

[0051]

[0052] Step 2: Let θ i μ represents the policy parameters of the i-th agent, i.e., the actor network parameters; i Let a represent the deterministic policy of agent i, and then a i =μ i (o i Let ) represent the action policy obtained by agent i through the policy network, and let Let represent the parameters of the critic network for the i-th agent; the temporal difference objective is calculated as follows:

[0053]

[0054] Where γ is the attenuation factor, and μ′={μ′1,μ′2,...,μ′ n} represents the set of deterministic strategies for the target network; This represents the critical network that passes through the target network and evaluates the value of the action 'a' obtained by taking action 'a' in the current state; r i Represents the immediate reward for agent i;

[0055] Step 3: Calculate the loss value of the critic network. The expression for calculating the loss value of the critic network is as follows:

[0056]

[0057] Where y is the temporal difference objective calculated in step 2, μ represents the set of all agent deterministic policies, o is the set of all current agent states, represents the state space, o′ is the next state space, and a i For the action of agent i, a = (a i () is a set of action spaces. This indicates that the value of taking action 'a' in the current state is determined by the critic network.

[0058] Step 4: Update the actor network. The solution for updating the actor network is as follows:

[0059]

[0060] Step 5: Update the parameters of the target network using a soft update method. The update solution is as follows:

[0061] θ′ i =τθ i +(1-τ)θ′ i

[0062]

[0063] Among them, θ′={θ1′, θ2′,..., θ′ M} represents the policy parameters of the target network. This represents the critic network parameter of the target network, and τ is the soft update parameter.

[0064] A computer program product is characterized by including computer-executable instructions, which, when executed, are used to implement the above-described method.

[0065] The beneficial effects of this invention are as follows:

[0066] This invention provides a heterogeneous computing and resource allocation method for wireless edge artificial intelligence. It adopts heterogeneous computing and flexibly selects computing resources according to the characteristics and needs of the task, effectively meeting the needs of various types of tasks. The multi-agent reinforcement learning algorithm based on multiple resource objectives optimizes task scheduling and improves resource utilization.

[0067] 1. This invention proposes a fine-grained distributed resource allocation framework for multi-server edge networks. This framework introduces heterogeneous computing to accelerate task completion and improve overall system performance.

[0068] 2. This invention proposes a comprehensive optimization problem that, by jointly optimizing task scheduling decisions, CPU / GPU frequencies, bandwidth, and task allocation, minimizes task execution latency and maximizes server utilization while adhering to energy constraints.

[0069] 3. This invention introduces a cluster task deployment mechanism, in which a central edge server in the cluster acts as a proxy, responsible for generating cluster-wide policies. Through intelligent agent interaction, global resource information sharing is achieved, realizing the optimal system policy.

[0070] Simulation results show that, compared with the baseline algorithm, the method proposed in this invention has lower latency, higher resource utilization, and higher average reward. Attached Figure Description

[0071] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0072] Figure 1 This is a schematic diagram of the overall process of the heterogeneous computing and resource allocation method for wireless edge artificial intelligence provided in this embodiment of the invention.

[0073] Figure 2 This is a schematic diagram of a scenario in which the method of the present invention is applied.

[0074] Figure 3 This is a schematic diagram illustrating the training convergence of different intelligent agents.

[0075] Figure 4 This diagram illustrates a comparison of reward trends obtained by different algorithms.

[0076] Figure 5 This diagram illustrates a comparison of the total task completion times obtained by different algorithms.

[0077] Figure 6 This diagram illustrates a comparison of edge server resource utilization rates for different algorithms with varying numbers of agents.

[0078] Figure 7 This is a flowchart illustrating the process of updating the strategy network parameters and the target network parameters. Detailed Implementation

[0079] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0080] Example 1:

[0081] This invention provides a wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation, comprising:

[0082] Step 1: Initialize the location information, resource status information, resource size (including CPU resources, GPU resources and storage resources) required for each edge server's AI tasks generated by each user, and intelligent algorithm parameters;

[0083] Step 2: Obtain the initial state of the edge environment based on the edge server information and the AI ​​task information;

[0084] Step 3: Based on the initial state of the edge environment, input the initial state into the actor network to obtain the agent's actions;

[0085] Step 4: Based on the agent's actions, execute the corresponding actions to obtain the next state o′(t) and calculate the task transmission delay, task computation delay, task transmission energy consumption, and task computation energy consumption;

[0086] Step 5: Calculate the instant reward based on the task transmission delay, task computation delay, task transmission energy consumption, and task computation energy consumption;

[0087] Step 6: Determine whether the number of training set records in the buffer has reached the set buffer threshold D. r Choose whether to train the network (policy network and target network in the intelligent algorithm). If the set buffer threshold has not been reached, store the training set data in the buffer and update the current state o(t) to the next state o′(t). Otherwise, proceed to step 7.

[0088] Step 7: Based on the training data of batch_size extracted from the buffer, update the policy network parameters, target network parameters, and the cumulative reward of each agent within the maximum evaluation step number T.

[0089] Step 8: Repeat steps 2 through 7 until the set training round threshold is met.

[0090] In this embodiment, the method is an iterative algorithm, wherein steps 1 to 8 are an intelligent decision-making algorithm based on a multi-agent deep deterministic policy gradient algorithm, with an iteration index of e and an iteration threshold of E. max Each edge server represents an agent, and a single agent is represented by m. There are a total of M agents in the environment.

[0091] In this embodiment, step 2 includes:

[0092] Based on the edge server information and AI task information collected in step 1, the remaining resources of agent m are obtained. Where R m,CPU and R m,GPU Let represent the remaining CPU and GPU resources in m, respectively. The distance d from the edge device where AI task j is located to m is d. j,m The power of the task during transmission is Therefore, at time t, the state o of agent m is obtained. m The solution to (t) is:

[0093]

[0094] in, These represent the CPU and GPU resources required for task j, respectively. Let t = 0, then we obtain the initial state of the edge environment: o(0) = {o1(0), o2(0), ..., o...} M (0)}.

[0095] In this embodiment, step 3 includes:

[0096] By constructing a neural network, the state obtained in step 2 is input into the actor network within the policy network. The actor network will then output a set of action decisions a. m (t), which represents the action decision output by agent m at time t, and its solution is:

[0097]

[0098] Where x j,m Indicates whether task j is unloaded onto agent m, x j,m =1 indicates that task j is unloaded onto agent m; otherwise, x j,m =0. and ... j,m This represents the bandwidth allocated by agent m to task j.

[0099] To avoid potential decision conflicts when the agent makes decisions, action masking is required before selecting an action.

[0100] In this embodiment, the action mask specifically includes:

[0101] Step 31: Iterate through the agents in the current environment, obtain the actions corresponding to each agent through the actor network, and record the agent's number and action set;

[0102] Step 32: According to step 31, after the previous agent selects an action, the next agent needs to block the AI ​​tasks that have been assigned to the edge server. Specifically, by setting the output feature value corresponding to the task in a conflict state to infinitesimal, and then using SoftMax processing to obtain the unloading decision probability of the task to the agent, the unloading probability corresponding to the task in a conflict state is 0.

[0103] In this embodiment, step 4 includes:

[0104] Given the unloading decision X = (x j,m And the resource size required to process task j. We assume that the task uses Orthogonal Frequency Division Multiple Access (OFDMA) technology during transmission. Therefore, using Shannon's formula and the formula for calculating transmission time, we obtain the transmission delay. The solution formula is:

[0105]

[0106] in, and These represent the CPU and GPU resources required to process task j, respectively. The subscript j indicates the index number of the AI ​​task, m is the index number of the edge server, and b... j,m This represents the bandwidth allocated to the task. The signal-to-noise ratio (SNR) of a transmission channel is calculated using the following formula:

[0107]

[0108] in, This represents the transmission power during the process of transmitting task j to agent m, where the subscript j represents the index number of the AI ​​task. This represents the channel gain of the task during transmission;

[0109] Based on the above expression for task transmission time, the solution for transmission energy consumption is further obtained as follows:

[0110]

[0111] The computational delay is obtained by calculating the time expression. The solution formula is:

[0112]

[0113] in and δ represents the CPU cycles and GPU cycles required to process a unit of data, respectively. C and δ G These represent the smallest allocatable CPU and GPU units, respectively. and These represent the unit amounts of CPU and GPU resources required to process AI task j, respectively.

[0114] The further solution for the computational energy consumption required to process AI task j is:

[0115]

[0116] Among them κ m This represents the effective switching capacitance of edge server m.

[0117] The total energy consumption for completing a single task j is further calculated as follows:

[0118]

[0119] The energy consumption constraint expression for each task is further obtained as follows:

[0120]

[0121] Where e j,max This represents the maximum energy consumption constraint for completing each task.

[0122] In this embodiment, step 5 includes:

[0123] The formula for calculating the immediate reward for each agent is:

[0124]

[0125] Among them, C m,CPU C m,GPU These represent the total CPU and GPU resources of server m, respectively. This represents the total remaining CPU and GPU resources of server m. Let m be the total time required to complete the tasks processed by agent m, where the total time required for each task includes computation time. and transmission time Let β1 represent the number of tasks completed by agent m; β2 and β1 represent the power ratio of resource utilization and average task completion time, respectively. Represents the penalty factor, when hour when hour This represents the penalty coefficient for exceeding energy consumption limits.

[0126] In this embodiment, step 7 includes:

[0127] Step 71: Collect training samples from the buffer. A priority sampling mechanism is used to select samples from the buffer that are more beneficial for training, thereby accelerating convergence and stabilizing the convergence effect. Specifically, the i-th group of data in the buffer... The probability of being a training sample The solution formula is as follows:

[0128]

[0129] Where N i express The number of times used for training, T represents the time step of the current episode, and r i The value represents the reward for experience, and μ represents the weight parameter. The initial value is set to 1.

[0130] Each time training samples are drawn, an ∈-greedy strategy is adopted, and the solution for drawing samples is as follows:

[0131]

[0132] Step 72: Let θ i μ represents the policy parameters of the i-th agent, i.e., the actor network parameters; i Let a represent the deterministic policy of agent i, and then a i =μ i (o i Let ) represent the action policy obtained by agent i through the policy network, and let Let represent the parameters of the critic network for the i-th agent; the temporal difference objective is calculated as follows:

[0133]

[0134] Where γ is the attenuation factor, and μ′={μ′1,μ′2,...,μ′ n} represents the policy parameters of the target network.

[0135] Step 73: Calculate the loss value of the critic network. The expression for calculating the loss value of the critic network is as follows:

[0136]

[0137] Where y is the temporal differential objective calculated in step 72, μ represents the set of deterministic policies of all agents, o is the set of current states of all agents, represents the state space, o′ is the next state space, and a i For the action of agent i, a = (a i () is a set of action spaces. This indicates that the value of taking action 'a' in the current state is determined by the critic network.

[0138] Step 74: Update the actor network parameters by minimizing the agent's policy gradient. The expression for solving the policy gradient is as follows:

[0139]

[0140] Step 75: Optimize the network parameters using a soft update method. The update solution is as follows:

[0141] θ′ i =τθ i +(1-E)θ′ i

[0142]

[0143] Among them, θ′={θ′1, θ′2,..., θ′ M} represents the policy parameters of the target network. This represents the critic network parameter of the target network, and τ is the soft update parameter.

[0144] The specific parameter update process is as follows: Figure 7 As shown.

[0145] Example 2:

[0146] like Figure 1 As shown, the overall process of the heterogeneous computing and resource allocation method for wireless edge artificial intelligence provided by this invention includes the following steps:

[0147] Step 1: Set the maximum number of iterations E max Maximum number of evaluation steps T, number of agents M, maximum buffer storage size D r Parameters related to intelligent algorithms, such as attenuation factor;

[0148] Step 2: Initialize e = 0;

[0149] Step 3: When e≤E max If the condition is met, proceed from step 4 to step 6; otherwise, terminate the algorithm.

[0150] Step 4: Let e ​​= e + 1 and initialize the random exploration process N;

[0151] Step 5: Initialize the environment state o (remaining resource information and location information of the edge server, intelligent task information generated by the edge device, etc.);

[0152] Step 6: Initialize the cumulative reward r = 0 for each agent, and initialize t = 0;

[0153] Step 7: When t≤T, let t=t+1 and initialize the agent subscript m=0; otherwise, return to step3.

[0154] Step 8: When m≤M, execute steps 9 to 11; otherwise, let r = r + r(t) to obtain the cumulative reward of each agent within the maximum evaluation step number T and return to step 7.

[0155] Step 9: Let m = m + 1 and perform action masking on the input action according to the action masking rules described in claim 5;

[0156] Step 10: For agent i, input the current joint action into the neural network and output action a. m (t);

[0157] Step 11: Agent i executes action a i (t), and obtain the corresponding reward r(t) and the next state o′(t);

[0158] Step 12: When d≥D r If the condition is met, execute Step 13 to Step 17; otherwise, store {o(t), a(t), r(t), o′(t)} in the buffer, then update the current state by setting o(t) = o′(t), and return to step 8.

[0159] Step 13: Obtain data samples of size batch_size from the buffer using a priority sampling mechanism and an ε-greedy strategy;

[0160] Step 14: Calculate the time-series difference objective y;

[0161] Step 15: Calculate the loss value of the critic network based on y and update the critic network parameters;

[0162] Step 16: Update actor network parameters;

[0163] Step 17: Update the target network parameters using a soft update and return to step 8.

[0164] like Figure 2 The diagram illustrates a scenario where the method of this invention is applied. In a wireless edge computing environment, there are multiple edge servers, each with several edge devices nearby. Each device generates several AI tasks intermittently, with strict latency and energy consumption requirements. Terminal devices have limited resources and cannot meet the demands of these intelligent tasks; therefore, all generated AI tasks need to be offloaded to nearby edge servers for processing. In a multi-server edge network scenario, the fine-grained distributed resource allocation intelligent algorithm proposed in this invention can achieve efficient allocation of server resources. While ensuring the energy consumption limits and other constraints of each AI task are met, it maximizes the utilization of edge server resources, minimizes the overall task completion time, and improves the resource utilization of edge servers.

[0165] The technical effects of the present invention will be described in detail below with reference to simulation.

[0166] This invention jointly optimizes the overall task completion time and edge server resource utilization. To highlight the advantages of the proposed scheme, the following experimental setup was set: (1) By comparing the convergence graphs of each agent, the convergence of each agent during the training process can be observed. (2) The changes in rewards set by the proposed algorithm and the comparison algorithm with the number of training rounds can be observed, thereby demonstrating the overall convergence and advantages of the proposed scheme. (3) Comparison of the proposed algorithm and the comparison algorithm in terms of task completion time. (4) Comparison of the proposed algorithm and the comparison algorithm in terms of edge server resource utilization. Wherein MRO-MARL is the algorithm proposed in this paper, Greedy represents the greedy algorithm, and Random represents the random algorithm.

[0167] exist Figure 3 In this study, we assume there are four agents in the edge environment and compare the average rewards of the four agents over 8000 episodes. Figure 2 We can see that the four agents converged after about 500 episodes. Due to the different remaining resources and geographical locations of the agents, they showed different convergence trends.

[0168] exist Figure 4 In this paper, we compare the average reward of the algorithm proposed in this invention with that of the greedy algorithm and the random algorithm over 8000 episodes. Figure 4We can see that the algorithm proposed in this paper converges to a better reward value compared to the baseline algorithm. The greedy strategy schedules AI tasks to appropriate servers based on the proximity principle. It evenly allocates computing and bandwidth resources on the appropriate servers to each task while minimizing the resources required, thus resulting in a small difference in average reward across different tasks. The stochastic strategy, on the other hand, exhibits a large difference in average reward for different initial decisions because the unloading decision and resource allocation strategy are randomized each time.

[0169] exist Figure 5 In our previous work, we compared the total task completion time of different algorithms over 8000 episodes. Initially, due to the strong randomness of reinforcement learning algorithms, the time required to complete the task was longer than that of random and greedy algorithms. However, as the number of training iterations increased, reinforcement learning algorithms could make more intelligent decisions based on the global situation. Greedy algorithms adopted a fixed strategy each time, so the total task completion time varied little from one iteration to the next. Random strategies have greater dynamic change characteristics, resulting in larger fluctuations.

[0170] exist Figure 6 In this study, we compared the changes in edge server resource utilization with the number of agents. Through... Figure 6 We can see that the resource utilization rate of the algorithm proposed in this invention is basically maintained at around 90%, the resource utilization rate of the greedy algorithm is basically maintained at around 70%, and the resource utilization rate of the random algorithm fluctuates greatly, but is lower than that of the greedy algorithm and the algorithm proposed in this paper.

[0171] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in the present invention, and such modifications or substitutions should all be covered within the scope of protection of the present invention.

Claims

1. A wireless edge heterogeneous computing and resource allocation method applied to artificial intelligence task allocation, characterized in that, Iterative processing using intelligent algorithms is employed, with each edge server representing an intelligent agent; including: Obtain edge server information and AI task information; the edge server information includes location information and resource status information; the AI ​​task information includes the resource size required for the AI ​​task, and the resources include CPU resources, GPU resources and storage resources; The initial state of the edge environment is obtained based on the edge server information and the AI ​​task information; The initial state of the edge environment is input into the intelligent algorithm to obtain the agent's actions; the intelligent algorithm is an intelligent decision-making algorithm based on the multi-agent deep deterministic policy gradient algorithm. Based on the agent's actions, execute the corresponding actions to obtain the next state and calculate the task transmission latency, task computation latency, task transmission energy consumption, and task computation energy consumption. Based on the task transmission latency, task computation latency, task transmission energy consumption, and task computation energy consumption, an instant reward is obtained. Determine whether the number of training sets recorded in the buffer has reached the set buffer threshold. Based on the determination result, decide whether to train the policy network and target network in the intelligent algorithm: if the set buffer threshold has not been reached, store the training set data in the buffer and update the current state o(t) to the next state o′(t); otherwise, update the parameters of the intelligent algorithm according to the instant reward and the next state until the requirements are met.

2. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 1, characterized in that, The initial state of the edge environment is obtained based on the edge server information and the AI ​​task information, specifically as follows: The distance from the edge device where AI task j is located to the intelligent agent m is d. j,m The power of the task during transmission is At time t, the state o of agent m is... m The solution to (t) is: Among them, R m,CPU and R m,GPU These represent the remaining CPU and GPU resources in agent m, respectively. These represent the CPU and GPU resources required for AI task j, respectively. For the collection of all AI tasks; Let t = 0, then we obtain the initial state of the edge environment o(0) = {o1(0), o2(0), ..., o M (0)}.

3. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 2, characterized in that, The process of inputting the initial state of the edge environment into the intelligent algorithm to obtain the agent's actions specifically involves: The initial state of the edge environment is input into the actor network in the policy network, and the actor network will output a set of action decisions 'a'. m (t), which represents the action decision output by agent m at time t, and its solution is: Where x j,m Indicates whether task j is unloaded onto agent m, x j,m =1 indicates that task j is unloaded onto agent m; otherwise, x j,m =0; and b represents the minimum number of CPU and GPU resources allocated by agent m to AI task j, respectively; j,m This represents the bandwidth allocated by agent m to task j.

4. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 3, characterized in that, To avoid potential decision conflicts during agent decision-making, action masking is required before selecting an action; the action mask specifically includes: Iterate through the agents in the current environment, obtain the actions corresponding to each agent through the actor network, and record the agent's number and action set; The output feature value corresponding to the task in conflict is set to infinitesimal, and the unloading decision probability of the task to the agent is obtained by SoftMax processing, so that the unloading probability of the task in conflict is 0.

5. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 1, characterized in that, The formula for calculating the task transmission delay is as follows: in, and These represent the CPU and GPU resources required to process task j, respectively. The subscript j indicates the index number of the AI ​​task, m is the index number of the edge server, and b... j,m This represents the bandwidth allocated to the task, X = (x j,m For the unloading decision, The signal-to-noise ratio (SNR) of a transmission channel is calculated using the following formula: in, This represents the transmission power during the process of transmitting task j to agent m, where the subscript j represents the index number of the AI ​​task. This represents the channel gain of the task during transmission; The formula for calculating the task computation latency is as follows: in, and δ represents the CPU cycles and GPU cycles required to process a unit of data, respectively. C and δ G These represent the smallest allocatable CPU and GPU units, respectively. and These represent the unit amounts of CPU and GPU resources required to process AI task j, respectively. The formula for calculating the energy consumption of task transmission is as follows: in, This represents the amount of power transmitted during the process of processing task j and transmitting it to agent m. The formula for calculating the energy consumption of the task is as follows: Among them κ m This represents the effective switching capacitance of edge server m.

6. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 1, characterized in that, The formula for solving the instant reward is: Among them, C m,CPU C M,GPU These represent the total CPU and GPU resources of server m, respectively. This represents the total remaining CPU and GPU resources of server m. Let m be the total time required to complete the tasks processed by agent m, where the total time required for each task includes computation time. and transmission time Let β1 represent the number of tasks completed by agent m; β2 and β1 represent the power ratio of resource utilization and average task completion time, respectively. Represents the penalty factor, when hour when hour θ represents the penalty coefficient for exceeding energy consumption limits.

7. The wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation according to claim 1, characterized in that, The process of updating the parameters of the intelligent algorithm until the requirements are met specifically involves: Based on the training data extracted from the buffer, update the policy network parameters, target network parameters, and cumulative rewards of each agent within the maximum evaluation step number T of the intelligent algorithm. Repeat the steps described in claim 1 until the set training round threshold is met.

8. A computer program product, characterized in that... It includes computer-executable instructions, which, when executed, are used to implement the method of claim 1.

Citation Information

Patent Citations

  • Resource allocation method based on multi-agent reinforcement learning in mobile edge computing system

    CN110418416A

  • Intelligent agent strategy learning method with privacy protection in mobile edge computing

    CN116546021A