Heterogeneous computing and resource allocation method for wireless edge artificial intelligence
Optimizing heterogeneous computing resource allocation for artificial intelligence tasks through multi-agent depth deterministic strategy gradient algorithm, solving the problems of low computing delay and resource utilization in edge environments, and achieving more efficient resource utilization and task completion speed.
Patent Information
- Application Number
- CN202411142993.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-08-20
AI Technical Summary
The existing technology is difficult to effectively schedule and allocate AI tasks in edge environments, resulting in low computing latency and resource utilization, which cannot meet the real-time requirements of computing-intensive and latency-sensitive AI applications.
The multi-agent deep deterministic strategy gradient algorithm is used to allocate heterogeneous computing resources. Through the iterative decision of the agent, the task transmission delay, calculation delay, and energy consumption are calculated, and the policy network and target network update parameters are optimized to optimize resources. Assign a policy.
It improves resource utilization, reduces task execution latency, achieves lower latency and higher resource utilization, and meets the computing needs of multi-type tasks.
Smart Images

Figure CN119166331A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed edge computing network technology, and in particular to a multiple resource allocation method for jointly optimizing AI task computing offloading in an edge environment. Background Art
[0002] With the rapid development of artificial intelligence technology and the widespread popularity of edge devices, a large number of computationally intensive and delay-sensitive AI applications have emerged on the Internet. This has exacerbated the problem of network congestion to a certain extent. Due to the inherent time sensitivity of AI tasks, the traditional cloud-centric centralized scheduling model will be difficult to meet the real-time requirements of AI tasks. The emerging computing paradigm of mobile edge computing (MEC) provides an opportunity to solve this problem. In MEC, servers deployed closer to the edge devices of the base station can significantly reduce transmission delays and ensure timely and effective processing of AI tasks at the edge of the network. Efficient task scheduling and reasonable resource allocation play a vital role in distributed edge environments, effectively ensuring the quality of service (QoE).
[0003] However, due to the unique computational requirements of AI tasks, scheduling using a single computing resource often fails to meet these requirements, resulting in suboptimal results. Summary of the invention
[0004] The technical problems to be solved by the present invention are:
[0005] In order to avoid the shortcomings of the prior art, the present invention provides a heterogeneous computing and resource allocation method for wireless edge artificial intelligence, which is used to obtain the optimal computing delay of the task through reasonable and efficient task scheduling and resource allocation in the edge environment.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] A wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation, characterized in that an intelligent algorithm is used for iteration, and each edge server represents 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 size of resources required for the AI task, and the resources include CPU resources, GPU resources, and storage resources;
[0009] Obtaining an initial state of the edge environment according to the edge server information and the AI task information;
[0010] Inputting the initial state of the edge environment into an intelligent algorithm to obtain an intelligent agent action; the intelligent algorithm is an intelligent decision-making algorithm based on a multi-agent deep deterministic policy gradient algorithm;
[0011] According to the agent action, execute the corresponding action to obtain the next state and calculate the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption;
[0012] Obtaining an instant reward according to the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption;
[0013] Determine whether the number of training sets recorded in the buffer reaches the set buffer threshold, and choose whether to train the policy network and target network in the intelligent algorithm based on the judgment result: if the set buffer threshold is not 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 is as follows: the initial state of the edge environment is obtained according to the edge server information and the AI task information, specifically:
[0015] The distance between the edge device where AI task j is located and agent m is d j,m , the power of the task during the transmission process is At time t, the state of agent m is o m The solution of (t) is:
[0016]
[0017] Among them, R m,CPU and R m,GPU Represent the remaining CPU and GPU resources in agent m, respectively. They represent the CPU and GPU resources required for AI task j, It is the collection of all AI tasks;
[0018] Let t = 0, and get 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 is: the initial state of the edge environment is input into the intelligent algorithm to obtain the intelligent body action, specifically:
[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 offloaded to agent m, x j,m = 1 means task j is offloaded to agent m, otherwise x j,m =0; and They represent the minimum number of CPU and GPU resources allocated by agent m to AI task j; b j,m Represents the bandwidth allocated by agent m to task j.
[0023] A further technical solution of the present invention is as follows: In order to avoid the decision conflict problem that may occur when the intelligent agent makes a decision, an action mask processing needs to be performed before selecting an action; the action mask specifically includes:
[0024] Traverse the agents in the current environment one by one, obtain the actions corresponding to each agent through the actor network, and record the agent number and action set;
[0025] The output feature value corresponding to the task in conflict state is set to infinitesimal, and the probability of unloading decision of task to agent is obtained through SoftMax processing, so that the probability of unloading corresponding to the task in conflict state is 0.
[0026] A further technical solution of the present invention: The calculation formula of the task transmission delay is:
[0027]
[0028] in, and are the CPU resources and GPU resources required to process task j, respectively. The subscript j represents the index number of the AI task, m is the index number of the edge server, and b j,m Indicates the bandwidth allocated to the task, X = (x j,m ) is the uninstall decision, It represents the signal-to-noise ratio of the transmission channel, and its calculation formula is:
[0029]
[0030] in, It indicates the transmission power during the process of transmitting the processing task j to the intelligent agent m. The subscript j indicates the index number of the AI task. represents the channel gain of the task during transmission;
[0031] The calculation formula for the task calculation delay is:
[0032]
[0033] in, and Respectively represent the CPU cycles and GPU cycles required to process unit data, δ C and δ G Represents the smallest allocatable CPU and GPU units, respectively. and They represent the unit amount of CPU and GPU resources required to process AI task j respectively;
[0034] The calculation formula of the task transmission energy consumption is:
[0035]
[0036] in, represents the transmission power during the transmission of task j to agent m;
[0037] The calculation formula for calculating the energy consumption of the task is:
[0038]
[0039] where κ m represents the effective switching capacitance of edge server m.
[0040] A further technical solution of the present invention: the solution formula of the instant reward is:
[0041]
[0042] Among them, C m,CPU , C m,GPU They represent the total CPU resources and GPU resources of server m respectively; is the sum of the remaining CPU resources and GPU resources of server m; is the total time required to complete the tasks in agent m, where the total time required for each task includes the computation time and transmission time is the number of tasks completed by agent m; β1 and β2 represent the power ratios of resource utilization and average task completion time, respectively; represents the penalty factor, when hour when hour Indicates the penalty coefficient for exceeding the energy consumption limit.
[0043] A further technical solution of the present invention is as follows: the parameters of the intelligent algorithm are updated until the requirements are met, specifically:
[0044] Based on the training data extracted from the buffer, update the policy network parameters, target network parameters and the cumulative rewards of each agent within the maximum evaluation step number T of the intelligent algorithm;
[0045] The above steps are repeated until the set training round number threshold is met.
[0046] A further technical solution of the present invention is to update the strategy network parameters and target network parameters of the intelligent algorithm according to the training data extracted from the buffer, including:
[0047] Step 1: Use the 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 is as follows:
[0048]
[0049] Among them, N i express The number of times it is used for training, T represents the time step of the current episode, r i represents the reward value of experience, μ represents the weight parameter, The initial value is set to 1;
[0050] Each time a training sample is extracted, the ε-greedy strategy is adopted, and the solution for extracting samples is as follows:
[0051]
[0052] Step 2: Let θ i represents the strategy parameters of the ith agent, i.e., the actor network parameters; μ i represents the deterministic strategy of agent i, so a i =μ i (o i ) represents the action strategy obtained by agent i through the strategy network, let Represents the parameters of the critic network of the i-th agent; calculates the temporal difference target, and its solution is as follows:
[0053]
[0054] Where γ is the attenuation factor, μ′={μ′1,μ′2,...,μ′ n} represents the set of deterministic strategies for the target network; represents the critic network that has passed through the target network and judged the action value obtained by taking action a in the current state; r i represents the immediate reward of agent i;
[0055] Step 3: Calculate the loss value of the critic network. The loss value calculation expression of the critic network is as follows:
[0056]
[0057] Where y is the temporal difference target calculated in step 2, μ represents the set of all agent deterministic strategies, o is the set of all current agent states, represents the state space, o′ is the next state space, and a i is the action of agent i, a=(a i ) is the set of action spaces, It indicates that the action value obtained by taking action a in the current state is judged by the critic network;
[0058] Step 4: Update the actor network. The update solution for the actor network is as follows:
[0059]
[0060] Step 5: Update the parameters of the target network using soft update, and the update solution is:
[0061] θ′ i =τθ i +(1-τ)θ′ i
[0062]
[0063] Among them, θ′={θ1′, θ2′,..., θ′ M} is the strategy parameter of the target network, represents the critic network parameters of the target network, and τ is the soft update parameter.
[0064] A computer program product, characterized by comprising computer executable instructions, wherein the instructions are used to implement the above method when executed.
[0065] The beneficial effects of the present invention are:
[0066] The present invention provides a heterogeneous computing and resource allocation method for wireless edge artificial intelligence, which adopts heterogeneous computing and flexibly selects computing resources according to the characteristics and needs of the task, effectively meeting various types of tasks; the multi-agent reinforcement learning algorithm based on multi-resource objectives optimizes task scheduling and improves resource utilization.
[0067] 1. This paper proposes a fine-grained distributed resource allocation framework for multi-server edge networks. The framework introduces heterogeneous computing to accelerate task completion and improve overall system performance.
[0068] 2. The present invention formulates a comprehensive optimization problem to minimize task execution delay and maximize server utilization by jointly optimizing task scheduling decisions, CPU / GPU frequency, bandwidth and task allocation while adhering to energy constraints.
[0069] 3. This invention introduces a cluster task deployment mechanism, in which the central edge server in the cluster acts as an agent and is responsible for generating strategies within the cluster. Through the interaction of intelligent agents, global resource information sharing is achieved to achieve the optimal system strategy.
[0070] Simulation results show that compared with the baseline algorithm, the proposed method has lower latency, higher resource utilization and higher average reward. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0072] Figure 1 It is a schematic diagram of the overall process of the heterogeneous computing and resource allocation method of wireless edge artificial intelligence provided by an embodiment of the present invention.
[0073] Figure 2 It is a schematic diagram of a scenario in which the method of the present invention is applied.
[0074] Figure 3 It is a diagram of the training convergence of different intelligent agents.
[0075] Figure 4 Schematic diagram showing the comparison of reward trends obtained by different algorithms.
[0076] Figure 5 Schematic diagram showing the comparison of the total task completion time obtained by different algorithms.
[0077] Figure 6 Schematic diagram showing the comparison of edge server resource utilization of different algorithms under different numbers of agents.
[0078] Figure 7 Represents the flow chart of updating strategy network parameters and target network parameters. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0080] Embodiment 1:
[0081] The present invention provides a wireless edge heterogeneous computing and resource allocation method applied to artificial intelligence task allocation, comprising:
[0082] Step 1: Initialize the location information, resource status information, resource size (including CPU resources, GPU resources and storage resource size) and intelligent algorithm parameters of each edge server;
[0083] Step 2: Obtaining the initial state of the edge environment according to the edge server information and the AI task information;
[0084] Step 3: According to the initial state of the edge environment, the initial state is input into the actor network to obtain the agent action;
[0085] Step 4: According to the agent action, execute the corresponding action to obtain the next state o′(t) and calculate the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption;
[0086] Step 5: Obtaining an instant reward according to the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption;
[0087] Step 6: Determine whether the number of training sets recorded in the buffer reaches the set buffer threshold D r , choose whether to train the network (strategy network and target network in the intelligent algorithm). If the set buffer threshold is not reached, the training set data is stored in the buffer and the current state o(t) is updated to the next state o′(t). Otherwise, execute 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 rewards of each agent within the maximum evaluation step number T.
[0089] Step 8: Loop steps 2 to 7 until the set training round number 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, a single agent is represented by m, and there are a total of M agents in the environment.
[0091] In this embodiment, step 2 includes:
[0092] According to the edge server information and AI task information counted in step 1, the remaining resources of agent m are obtained. Where R m,CPU and R m,GPU They represent the remaining CPU and GPU resources in m respectively. The distance from the edge device where AI task j is located to m is d j,m , the power of the task during the transmission process is So we get the state o of agent m at time t. m The solution of (t) is:
[0093]
[0094] in, denote the CPU and GPU resources required for task j, respectively. is the set of all AI tasks. Let t = 0, and get the initial state of the edge environment o(0) = {o1(0), o2(0), ..., o M (0)}.
[0095] In this embodiment, step 3 includes:
[0096] Through the constructed neural network, the state obtained in step 2 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:
[0097]
[0098] where x j,m Indicates whether task j is offloaded to agent m, x j,m = 1 means task j is offloaded to agent m, otherwise x j,m =0. and They represent the minimum number of CPU and GPU resources allocated by agent m to AI task j. j,m Represents the bandwidth allocated by agent m to task j.
[0099] In order to avoid decision conflicts that may occur when the agent makes decisions, action mask processing is required before selecting an action.
[0100] In this embodiment, the action mask specifically includes:
[0101] Step 31: Traverse the agents in the current environment one by one, obtain the actions corresponding to each agent through the actor network, and record the agent number and action set;
[0102] Step 32: According to step 31, after the previous agent selects the action, the next agent needs to block the AI task that has been assigned to the edge server. Specifically, by setting the output feature value corresponding to the task in conflict to infinitesimal, and then obtaining the probability of unloading the task to the agent through SoftMax processing, the probability of unloading the task in conflict is 0.
[0103] In this embodiment, step 4 includes:
[0104] Given the uninstall 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 technology during the transmission process, so the transmission delay is obtained through the Shannon formula and the calculation formula of the transmission time. The solution is:
[0105]
[0106] in, and are the CPU resources and GPU resources required to process task j, respectively. The subscript j represents the index number of the AI task, m is the index number of the edge server, and b j,m Indicates the bandwidth allocated to the task, It represents the signal-to-noise ratio of the transmission channel, and its calculation formula is:
[0107]
[0108] in, It indicates the transmission power during the process of transmitting the processing task j to the intelligent agent m. The subscript j indicates the index number of the AI task. represents the channel gain of the task during transmission;
[0109] According to the expression of the above task transmission time, the solution of transmission energy consumption is further obtained as follows:
[0110]
[0111] By calculating the time expression, we can get the calculation delay The solution is:
[0112]
[0113] in and Respectively represent the CPU cycles and GPU cycles required to process unit data, δ C and δ G Represents the smallest allocatable CPU and GPU units, respectively. and They represent the unit amount of CPU and GPU resources required to process AI task j respectively;
[0114] The solution to the computing energy consumption required to process AI task j is further obtained as:
[0115]
[0116] where κ m represents the effective switching capacitance of edge server m.
[0117] The total energy consumption to complete a single task j is further obtained as:
[0118]
[0119] The energy consumption constraint expression of each task is further obtained as:
[0120]
[0121] where e j,max Represents the maximum energy consumption constraint for completing each task.
[0122] In this embodiment, step 5 includes:
[0123] The solution for each agent’s immediate reward is:
[0124]
[0125] Among them, C m,CPU , C m,GPU They represent the total CPU resources and GPU resources of server m respectively; is the sum of the remaining CPU resources and GPU resources of server m; is the total time required to complete the tasks in agent m, where the total time required for each task includes the computation time and transmission time is the number of tasks completed by agent m; β1 and β2 represent the power ratios of resource utilization and average task completion time, respectively; represents the penalty factor, when hour when hour Indicates the penalty coefficient for exceeding the energy consumption limit.
[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 to training in order to accelerate the convergence speed and stabilize the convergence effect. Specifically, the i-th group of data in the buffer The probability of being a training sample The solution is as follows:
[0128]
[0129] Where N i express The number of times it is used for training, T represents the time step of the current episode, r i represents the reward value of experience, μ represents the weight parameter, The initial value is set to 1.
[0130] Each time a training sample is extracted, an ∈-greedy strategy is adopted, and the solution for extracting samples is as follows:
[0131]
[0132] Step 72: Let θ i represents the strategy parameters of the ith agent, i.e., the actor network parameters; μ i represents the deterministic strategy of agent i, so a i =μ i (o i ) represents the action strategy obtained by agent i through the strategy network, let Represents the parameters of the critic network of the i-th agent; calculates the temporal difference target, and its solution is as follows:
[0133]
[0134] where γ is the attenuation factor, μ′={μ′1,μ′2,...,μ′ n} represents the strategy parameters of the target network.
[0135] Step 73: Calculate the loss value of the critic network. The loss value calculation expression of the critic network is as follows:
[0136]
[0137] Where y is the temporal difference target calculated in step 72, μ represents the set of all agent deterministic strategies, o is the set of all current agent states, represents the state space, o′ is the next state space, and a i is the action of agent i, a=(a i ) is the set of action spaces, It indicates that the action value obtained by taking action a in the current state is judged by the critic network;
[0138] Step 74: Update the actor network parameters by minimizing the agent's policy gradient. The policy gradient is solved as follows:
[0139]
[0140] Step 75: Use soft update to update the parameters of the target network. The update solution is:
[0141] θ′ i =τθ i +(1-E)θ′ i
[0142]
[0143] Among them, θ′={θ′1, θ′2,..., θ′ M} is the strategy parameter of the target network, represents the critic network parameters of the target network, and τ is the soft update parameter.
[0144] The specific parameter update process is as follows Figure 7 shown.
[0145] Embodiment 2:
[0146] like Figure 1 As shown, the overall process of the heterogeneous computing and resource allocation method of wireless edge artificial intelligence provided by the present 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 capacity D r , attenuation factor and other intelligent algorithm related parameters;
[0148] Step 2: Initialize e=0;
[0149] Step 3: When e≤E max When , execute step4 to step6, otherwise end 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 of each agent r = 0, and initialize t = 0;
[0153] Step 7: When t≤T, set t=t+1 and initialize the agent index m=0, otherwise return to step 3;
[0154] Step 8: When m≤M, execute step 9 to step 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 rule introduced 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 performs action a i (t), obtain the corresponding reward r(t) and the next state o′(t);
[0158] Step 12: When d ≥ D r , execute Step 13 to Step 17, otherwise store {o(t), a(t), r(t, o′(t)} in the buffer, then set o(t) = o′(t) to update the current state, and return to Step 8;
[0159] Step 13: Obtain data samples of batch_size from the buffer through the priority sampling mechanism and ε-greedy strategy;
[0160] Step 14: Calculate the time series difference target 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 through soft update and return to step 8.
[0164] like Figure 2 The figure shows a scenario diagram for the application of the method of the present invention. There are multiple edge servers in the wireless edge scenario, and there are several edge devices near each edge server. Several AI tasks are generated on each device from time to time, and they have strict latency and energy consumption requirements. The resources of the terminal device are relatively scarce and cannot meet the needs of intelligent tasks, so the generated artificial intelligence 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 the present invention can realize efficient allocation of server resources, maximize the utilization of edge server resources while ensuring the energy consumption limit and other constraints of each AI task, minimize the overall completion time of the task and improve the resource utilization of the edge server.
[0165] The technical effects of the present invention are described in detail below in conjunction with simulation.
[0166] The present invention jointly optimizes the overall task completion time and the resource utilization of the edge server. In order to highlight the advantages of the proposed scheme, the experiment sets the following scheme: (1) By comparing the convergence graphs of each intelligent agent, the convergence of each intelligent agent during the training process can be seen. (2) The rewards set by the algorithm proposed in the present invention and the comparison algorithm change with the number of training rounds, from which the overall convergence and advantages of the scheme proposed in the present invention can be seen. (3) Comparison of the algorithm proposed in the present invention and the comparison algorithm in terms of task completion time. (4) Comparison of the algorithm proposed in the present invention and the comparison algorithm in terms of edge server resource utilization. Among them, 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 paper, we assume that there are four agents in the edge environment and compare the average rewards of the four agents in 8000 episodes. Figure 2 We can find that the four agents basically converged after 500 episodes. Due to the different remaining resources and geographical locations of different agents, they show different convergence trends.
[0168] exist Figure 4 In this paper, we compared the average reward of the proposed algorithm with the greedy algorithm and the random algorithm in 8000 episodes. Figure 4, we can see that the algorithm proposed in this paper can converge to a better reward value than the baseline algorithm. The greedy strategy schedules AI tasks to the corresponding servers according to the proximity principle. It evenly allocates computing resources and bandwidth resources on the corresponding servers to each task while ensuring that the resources required for each task are minimal, so the average reward obtained each time is not much different. The random strategy shows a large difference in average rewards for different initial decisions because the unloading decision and resource allocation strategy selected each time are random.
[0169] exist Figure 5 In the paper, we compared the total task completion time of different algorithms over 8000 episodes. At the beginning, due to the strong randomness of the reinforcement learning algorithm, the time required to complete the task is longer than that of the random algorithm and the greedy algorithm. However, as the number of training iterations increases, the reinforcement learning algorithm can make smarter decisions based on the global situation. The greedy algorithm adopts a fixed strategy each time, so the total task completion time obtained each time is not much different. The random strategy has a large dynamic change nature, so it fluctuates greatly.
[0170] exist Figure 6 In , we compared how the edge server resource utilization changes with the number of agents. Figure 6 We can find that the resource utilization rate of the algorithm proposed in this invention is basically maintained at about 90%, the resource utilization rate obtained by the greedy algorithm is basically maintained at about 70%, and the resource utilization rate obtained by the random algorithm fluctuates greatly, but is generally lower than the greedy algorithm and the algorithm proposed in this article.
[0171] The above description is only a specific implementation mode 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 substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation, It is characterized in that An intelligent algorithm is used for iteration, and each edge server represents 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 size of resources required for the AI task, and the resources include CPU resources, GPU resources, and storage resources; Obtaining an initial state of the 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 intelligent agent action; the intelligent algorithm is an intelligent decision-making algorithm based on a multi-agent deep deterministic policy gradient algorithm; According to the agent action, execute the corresponding action to obtain the next state and calculate the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption; Obtaining an instant reward according to the task transmission delay, task calculation delay, task transmission energy consumption and task calculation energy consumption; Determine whether the number of training sets recorded in the buffer reaches the set buffer threshold, and choose whether to train the policy network and target network in the intelligent algorithm based on the judgment result: if the set buffer threshold is not 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. According to the wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation as described in claim 1, It is characterized in that The initial state of the edge environment is obtained according to the edge server information and the AI task information, specifically: The distance between the edge device where AI task j is located and agent m is d j,m , the power of the task during the transmission process is At time t, the state of agent m is o m The solution of (t) is: Among them, R m,CPU and R m,GPU Represent the remaining CPU and GPU resources in agent m, respectively. They represent the CPU and GPU resources required for AI task j, It is the collection of all AI tasks; Let t = 0, and get the initial state of the edge environment o(0) = {o 1 (0),o 2 (0),…,o M (0)}.
3. According to the wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation as described in claim 2, It is characterized in that The initial state of the edge environment is input into the intelligent algorithm to obtain the intelligent agent action, specifically: 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 offloaded to agent m, x j,m = 1 means task j is offloaded to agent m, otherwise x j,m =0; and They represent the minimum number of CPU and GPU resources allocated by agent m to AI task j; b j,m Represents the bandwidth allocated by agent m to task j.
4. According to claim 3, a wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation, It is characterized in that In order to avoid the decision conflict problem that may occur when the agent makes a decision, action mask processing needs to be performed before selecting an action; the action mask specifically includes: Traverse the agents in the current environment one by one, obtain the actions corresponding to each agent through the actor network, and record the agent number and action set; The output feature value corresponding to the task in conflict state is set to infinitesimal, and the probability of unloading decision of task to agent is obtained through SoftMax processing, so that the probability of unloading corresponding to the task in conflict state is 0.
5. According to the wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation as described in claim 1, It is characterized in that The calculation formula of the task transmission delay is: in, and are the CPU resources and GPU resources required to process task j, respectively. The subscript j represents the index number of the AI task, m is the index number of the edge server, and b j,m Indicates the bandwidth allocated to the task, X = (x j,m ) is the uninstall decision, It represents the signal-to-noise ratio of the transmission channel, and its calculation formula is: in, It indicates the transmission power during the process of transmitting the processing task j to the intelligent agent m. The subscript j indicates the index number of the AI task. represents the channel gain of the task during transmission; The calculation formula for the task calculation delay is: in, and Respectively represent the CPU cycles and GPU cycles required to process unit data, δ C and δ G Represents the smallest allocatable CPU and GPU units, respectively. and They represent the unit amount of CPU and GPU resources required to process AI task j respectively; The calculation formula of the task transmission energy consumption is: in, represents the transmission power during the transmission of processing task j to agent m; The calculation formula for calculating the energy consumption of the task is: where κ m represents the effective switching capacitance of edge server m.
6. According to the wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation as described in claim 1, It is characterized in that The solution of the instant reward is: Among them, C m,CPU , C M,GPU They represent the total CPU resources and GPU resources of server m respectively; is the sum of the remaining CPU resources and GPU resources of server m; is the total time required to complete the tasks in agent m, where the total time required for each task includes the computation time and transmission time The number of tasks completed by agent m; β 1 and β 2 The power proportions representing resource utilization and average task completion time, respectively; represents the penalty factor, when hour when hour θ represents the penalty coefficient for exceeding the energy consumption limit.
7. According to the wireless edge heterogeneous computing and resource allocation method for artificial intelligence task allocation as described in claim 1, It is characterized in that The parameters of the intelligent algorithm are updated until the requirements are met, specifically: Based on the training data extracted from the buffer, update the policy network parameters, target network parameters and the cumulative rewards of each agent within the maximum evaluation step number T of the intelligent algorithm; The steps of claim 1 are repeated until a set training round number threshold is met.
8. A computer program product, Features The invention comprises computer executable instructions, which are used to implement the method of claim 1 when being executed.
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
Method for realizing high-energy-efficiency calculation unloading through strategy gradient algorithm in multi-unmanned aerial vehicle assisted mobile edge calculation
CN117499867A
Satellite edge computing task unloading and resource allocation method based on deep reinforcement learning
CN118250750A
Online task dispatching and scheduling system and method thereof
US11206221B1
