A matrix-vector multiplication encoding computation allocation method based on multi-agent deep reinforcement learning

By using rateless code coding and MA-DDPG algorithm to optimize task allocation in the multi-agent network, the problem of slow nodes and dynamic adaptability in the multi-agent network is solved, efficient computing task processing and resource utilization are achieved, and the computational cost is reduced. cost.

CN114554458BActive Publication Date: 2024-10-29HARBIN INST OF TECH SHENZHEN GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210047279.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2024-10-29
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

There are slow node phenomena and dynamic adaptability problems in multi-agent networks, which lead to increased computing task delays and reduced service quality. Existing coding strategies such as replication and erasure coding have problems with low storage efficiency and wasted computing results.

Method used

Using a distributed coding calculation method based on rateless codes, and optimizing task allocation, flight trajectories and computing resources through the multi-agent-deep deterministic policy gradient (MA-DDPG) algorithm, a matrix of multi-UAV and multi-edge base stations is constructed - Vector multiplication task offloading system model realizes task encoding, offloading and distributed computing.

Benefits of technology

It reduces the impact of slow nodes on the processing of computing tasks, reduces the processing cost of computing services, achieves efficient processing of UAV computing tasks, and improves the dynamic adaptability of the system and the utilization of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114554458B_ABST
    Figure CN114554458B_ABST
Patent Text Reader

Abstract

The present invention provides a matrix-vector multiplication coding calculation allocation method based on multi-agent deep reinforcement learning, comprising the following steps: Step 1: Construct a matrix-vector calculation task offloading system model of multi-agent multi-edge base stations; Step 2: Divide the workflow of the system model into three steps: task coding, task offloading, and distributed computing; Step 3: Establish an optimization problem of minimizing the system cost; Step 4: Determine the quadruple <state s, action a, reward r, transition probability p> of the deep reinforcement learning algorithm, and solve the optimization problem through the multi-agent deep deterministic policy gradient (MA-DDPG) algorithm to obtain parameters such as the optimal task allocation amount, agent flight trajectory, transmission bandwidth, and computing resources. The beneficial effects of the present invention are as follows: The present invention not only takes into account the heterogeneity of the computing capabilities of edge base stations and the parameters of slow nodes, but also considers the limited bandwidth resources of the communication between agents (unmanned aerial vehicles) and edge base stations, and reduces the impact of slow nodes (Stragglers) on the processing delay of distributed computing tasks through rateless code-based distributed coding calculation, thereby reducing the processing cost of matrix-vector multiplication calculation tasks.< / state s, action a, reward r, transition probability p>
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a matrix-vector multiplication coding calculation allocation method based on multi-agent deep reinforcement learning. Background Art

[0002] As a common intelligent entity, drones have the advantages of small size, easy deployment, and strong flexibility. They are widely used in emergency services such as emergency rescue and monitoring. In completing the above applications, drones often need to be equipped with artificial intelligence algorithms for path planning and object recognition, and use machine learning or image processing technologies to analyze and predict the collected data. This process involves a large number of matrix vector multiplication (MVM) operations. For example, in the training of convolutional neural networks, it includes a large number of gradient descent operations and the update of millions of parameters of the neural network model. The matrix multiplication dimension reaches 10 5 *10 5 .

[0003] The computing power of the agent is limited, which limits the service quality it can provide to computing business users. Due to factors such as node heterogeneity and hardware failure, the computing resources of the agent will lead to the existence of slow nodes in the multi-agent network. Since computing tasks are distributed to multiple working nodes for processing and waiting for the return of all computing results, the computing speed of some nodes is too slow, which increases the overall task processing delay and reduces the service quality.

[0004] Coding computing is an effective method to accelerate distributed computing by reducing the impact of slow node latency through redundancy strategies. Currently, there are two main coding schemes commonly used in distributed coding computing: one is the replication strategy, and the other is the erasure coding strategy. In the replication strategy, the master node divides the computing task into data blocks, copies them into multiple copies, and then sends them to different nodes for calculation. When a node has a computing delay, the calculation results can be obtained from the node with faster computing speed. This fault-tolerant strategy copies the stored data into multiple copies, which has low storage efficiency, greatly increases storage overhead, and does not significantly improve computing latency.

[0005] There are two main types of erasure codes for current distributed coding computing, one is the maximum distance separable code (MDS code) strategy, and the other is the rateless code (rateless code) strategy. Among them, the (n,k) MDS code strategy is to divide the computing task into k parts evenly and obtain n subtasks through encoding, and restore the computing result of the original task by obtaining k settlement results. This fault-tolerant strategy can tolerate the delay effect of nk slow nodes on the computing task, but it causes the waste of the computing results obtained by these slow nodes. The rateless code reduces the impact of slow nodes through redundancy. Compared with the MDS code, the rateless code reduces the delay effect of slow nodes due to its special encoding and decoding method, while also making full use of the settlement results of slow nodes, and will not cause waste of computing results. Summary of the invention

[0006] The present invention provides a matrix-vector multiplication coding calculation allocation method based on multi-agent deep reinforcement learning, comprising the following steps:

[0007] Step 1: Build a matrix-vector multiplication task offloading system model for multiple intelligent agents (drones) and multiple edge base stations;

[0008] Step 2: Divide the workflow of the system model into the following three steps:

[0009] Step 1: Task encoding: encode the computing task according to the rules of rateless code;

[0010] Step 2: Task unloading: UAVs fly to their respective unloading points and unload tasks according to the proportion of task allocation;

[0011] Step 3: Distributed computing. After receiving the task offloaded by the intelligent agent, the edge base station performs distributed coding calculations according to the proportion of computing resources allocated. After the calculation is completed, the calculation results are returned to the intelligent agent.

[0012] Step 3: Establish an optimization problem to minimize system cost;

[0013] Step 4: Determine the four-tuple <state S, action A, reward R, transition probability P> of the deep reinforcement learning algorithm, solve the optimization problem through the multi-agent-deep deterministic policy gradient (MA-DDPG) algorithm, and obtain the optimal task allocation, agent flight trajectory, transmission bandwidth, computing resources and other parameters.

[0014] The beneficial effects of the present invention are as follows: the present invention studies the computational offloading problem of multi-agent (UAV) multi-edge base stations, not only taking into account the heterogeneity of edge base station computing power and slow node parameters, but also taking into account the limited bandwidth resources for communication between UAVs and edge base stations, and reducing the processing impact of slow nodes on computing tasks through distributed coding calculations with rateless codes, thereby reducing the processing cost of computing services and achieving efficient processing of UAV computing tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a system model diagram for offloading computing tasks from multiple drones to multiple base stations;

[0016] Figure 2 It is the flowchart of the deep reinforcement learning MA-DDPG algorithm;

[0017] Figure 3 This is the relationship between the number of iterations and the return under the MA-DDPG algorithm;

[0018] Figure 4 It is the relationship between the number of iterations and the return of the flight unloading and in-situ unloading schemes;

[0019] Figure 5 It is a graph of the number of iterations and rewards using the MDS code and the rateless scheme;

[0020] Figure 6 It is the system index and algorithm performance diagram under different numbers of drones;

[0021] Figure 7 It is the system index and algorithm performance diagram under different numbers of base stations;

[0022] Figure 8 It is a graph of the relationship between the number of iterations and the return under different batch sampling sizes. DETAILED DESCRIPTION

[0023] There are two key issues in the computational allocation problem in intelligent collaborative networks. First, there is the phenomenon of slow nodes in multi-agent networks. The reason is that the node capacity is limited and temporary failures are prone to occur, which causes the computing task to wait for the slowest node to complete the processing, resulting in an increase in the overall delay; second, the dynamic adaptability problem of the multi-agent network. Due to the mobility of the agents, the traditional optimization algorithm cannot adapt to the changes in the environment, and unreasonable MVM task allocation will also lead to a decrease in system performance. In order to solve the above problems, the present invention aims to reduce the weighted cost of latency-energy consumption, uses coding computing technology to solve the slow node problem, and adopts the MA-DDPG deep reinforcement learning algorithm to make the task allocation scheme highly adaptable to the dynamic environment of the multi-agent network.

[0024] Deep reinforcement learning can reduce system costs by simultaneously optimizing the action selection, i.e., computational allocation, of multiple drones until convergence. The trained network model is adaptable and can achieve good results in different environments.

[0025] The present invention discloses a matrix-vector multiplication coding calculation allocation method based on multi-agent deep reinforcement learning, taking a multi-agent network with multiple drones and multiple base stations as an example, comprising:

[0026] Step 1: Build a system model for task offloading of multiple agents (drones) and multiple base stations;

[0027] Step 2: Divide the workflow of the system model into three steps:

[0028] Step 1: Task encoding: encode the computing task according to the rules of rateless code;

[0029] Step 2: Task unloading: UAVs fly to their respective unloading points and unload tasks according to the proportion of task allocation;

[0030] Step 3: Distributed computing. After the edge base station receives the task offloaded by the intelligent agent, it performs distributed coding calculations according to the proportion of computing resources allocated, and transmits the calculation results back to the intelligent agent after the calculation is completed.

[0031] Step 3: Establish an optimization problem to minimize system cost.

[0032] Step 4: Determine the four-tuple <state S, action A, reward R, transition probability P> of the deep reinforcement learning algorithm, solve the optimization problem through the multi-agent-deep deterministic policy gradient (MA-DDPG) algorithm, and obtain the optimal task allocation, agent flight trajectory, transmission bandwidth, computing resources and other parameters.

[0033] Specifically:

[0034] Step 1:

[0035] System model such as Figure 1 As shown in Figure 2, the model consists of M UAVs and P base stations. The set of UAVs is represented by The set of base stations is represented as

[0036] Assuming that the transmission channel between the drone and the base station is line-of-sight, the initial coordinates of the mth drone are r m =[x m ,y m ,z m ], The three-dimensional coordinates of the pth BS are r p =[x p ,y p ,0], So the straight-line distance between the mth UAV and the pth BS can be expressed as:

[0037]

[0038] Then, the channel gain h m,p It can be expressed as:

[0039] h m,p =β0(d m,p ) -2

[0040] Where β0 represents the normalized channel gain;

[0041] Assuming that the total transmission bandwidth of the entire system M drones is B, and frequency division multiple access technology is used to ensure that multiple drones can perform tasks simultaneously, the bandwidth allocation matrix Ω can be expressed as:

[0042]

[0043] Among them, ω m,p represents the ratio of the channel bandwidth between the mth UAV and the pth ground base station, and satisfies

[0044] The channel transmission rate between the mth UAV and the pth ground base station can be expressed as:

[0045]

[0046] in, represents the unloaded power of the mth UAV, and N0 represents the noise power spectral density.

[0047] In step 1 of step 2, the UAV preprocesses the computing task according to the coding rule of the LT rateless code, and divides the computing task into multiple subtasks according to the proportion; the task of the mth UAV can be expressed as Where D m Represents the number of task bits, F m represents the workload, represents the tolerance time of the UAV task processing; assuming that the computing task of the UAV is represented in the form of matrix-vector multiplication, that is, y m =A m x, where The number of matrix rows to be calculated l m and the amount of data D m The relationship between can be expressed as:

[0048]

[0049] Where b is the number of bits required to compute an inner product of length k;

[0050] The drone encodes the task matrix, that is, m Perform rateless coding to obtain So the amount of data after encoding for the mth UAV computing task is D m It can be expressed as: D m =α m D m

[0051] The drone distributes the encoded matrix to the edge base stations in proportion, and its distribution matrix Γ can be expressed as:

[0052]

[0053] Among them, γ m,p represents the proportion of computing tasks assigned by the mth UAV to the pth edge base station, and satisfies

[0054] Therefore, the mission of the mth UAV can be expressed as A m =[A m,1 ; A m,2 ;…;A m,p ;…;A m,P ], sub-matrix A m,p The number of rows can be expressed as l m,p :l m,p =γ m,p α m ·l m .

[0055] In step 2 of step 2, a full offloading strategy is adopted for each drone, that is, the drone offloads all computing tasks to the ground base station; each drone first flies to its own unloading point, assuming that the coordinates of the unloading point of the mth drone are Therefore, the time delay of the mth UAV flying to the unloading point can be expressed as: where v m Represents the flight speed of the mth UAV;

[0056] After the UAV flies to the unloading point, it unloads the task to the ground base station through the corresponding line-of-sight transmission channel. Therefore, the transmission time for the mth UAV to unload the calculation task to the pth base station is It can be expressed as:

[0057]

[0058] After the drone has completed the computing task, it will hover in place, waiting for the ground base station to process and return the computing results.

[0059] In step 3 of step 2, after receiving the task unloaded by the UAV, the ground base station performs distributed computing; assuming that the total ground computing resources are f max ,For the computing tasks from different UAVs, different computing resources are allocated, and the allocation matrix Λ can be expressed as

[0060]

[0061] Among them, λ m,p represents the proportion of computing resources that the p-th base station uses to process the subtask from the m-th drone, that is,

[0062] Therefore, the time it takes for the p-th base station to process the computation task of a single inner product offloaded by the m-th UAV is

[0063]

[0064] where ρ n Calculate the number of cycles of the 1-bit task for the CPU of the nth BS;

[0065] Therefore, the p-th BS calculates the l offloaded by the m-th UAV mp The computation time of an inner product task is

[0066]

[0067] Since the computing task is encoded with LT rateless code, the mth UAV needs to receive l m The calculation result of the row can be considered as the calculation is completed. The calculation time of the p-th base station processing the subtask assigned by the m-th drone is It can be expressed as

[0068]

[0069] Where χ(t) is a counting function, which counts the number of rows of matrix multiplication tasks processed by each base station;

[0070] In step 3, the total delay of processing the computing task is divided into three parts: flight delay, unloading delay, and hovering delay; the task completion time of the mth UAV It can be expressed as:

[0071]

[0072] Correspondingly, the total energy consumption for processing computing tasks is also divided into four parts: flight energy consumption, unloading energy consumption, hovering energy consumption, and base station computing energy consumption, which can be expressed as

[0073]

[0074]

[0075]

[0076]

[0077] where w m represents the mass of the mth UAV, κ p represents the finite CPU switch capacitance of the pth base station. This parameter is only related to the CPU hardware;

[0078] Therefore, the total energy consumption of the system for the mth UAV to complete the computing task can be expressed as

[0079]

[0080] Therefore, the cost of the mth UAV to complete the computing task can be expressed as

[0081]

[0082] Among them, η is the cost compromise coefficient, and it satisfies 0<η<1, σ is the balance factor of delay energy consumption;

[0083] The evaluation index of the system is defined as the normalized cost of the system processing computing tasks, so the following optimization problem is obtained:

[0084]

[0085]

[0086]

[0087]

[0088]

[0089]

[0090]

[0091] This problem minimizes the normalized cost by optimizing the unloading point of the UAV, the channel bandwidth allocation, the UAV computing task allocation, and the ground base station computing resource allocation; where C1 represents the sum of the channel bandwidth resource allocation ratio is 1, C2 represents the sum of the computing task allocation ratio of each UAV is 1, C3 represents the sum of the ground computing resource allocation ratio is 1, and C4 represents the UAV receives l mThe task is considered completed, C5 means that the drone computing task must be completed within the tolerance time, and C6 means that the energy loss of the drone operation does not exceed the total energy of the drone battery.

[0092] In step 4, in the system model, the deep reinforcement learning four-tuple <state S, action A, reward R, transition probability P> can be defined as

[0093]

[0094]

[0095]

[0096] P = p[s t+1 ,r t ∣s t ,a t ]

[0097] The intelligent agents are drones and edge base stations, and the actions represent the drone's flight path selection, channel bandwidth allocation, computing task allocation, and computing resource allocation; the states include channel transmission rate, drone flight time and flight energy consumption, drone unloading time and unloading energy consumption, ground computing time and computing energy consumption, and drone hovering energy consumption while waiting for the calculation results to be returned; the return is negatively correlated with the normalized cost of the system.

[0098] The multi-agent-deep deterministic policy gradient (MA-DDPG) algorithm includes an environment and an agent. Each agent includes an actor network, a critic network and an experience replay pool. Each network includes two DQNs, namely an evaluation network and a target network. The Q function of each network, i.e., the action-value function, is defined in the state s t Next a t The expected value obtained after taking an action and continuing to execute the strategy μ is defined by the Bellman equation:

[0099] Q μ (s t ,a t )=E[r(s t ,a t )+γQ μ (s t+1 ,μ(s t+1 ))]

[0100] The definition of the Q function is a recursive expression that simulates the Bellman equation expression through a function; in DDPG, a convolutional neural network is used to simulate the Q function. This network is called the Q network, and its parameter is θ Q; Measure the performance of a strategy μ: Use a criterion function J to measure, which can be expressed as

[0101] J β (μ) = ∫ S ρ β (s)Q μ (s,μ(s))ds

[0102] Among them, s is the state of the environment, which is generated based on the behavior strategy of the agent, and their distribution function is ρ β (s), Q μ (s,μ(s)) is the Q value that can be generated if the action is selected according to the μ strategy in each state;

[0103] Therefore, the optimal behavior strategy μ can be considered as the criterion function J β The maximum likelihood estimate of (μ) can be expressed as

[0104]

[0105] In addition, the LOSS function of the network is defined as the mean square error, which is the sum of the squares of the difference between the predicted value and the target value. It is the most commonly used error in the regression loss function, so the LOSS function can be expressed as

[0106]

[0107] The policy gradient of the policy network is ρ in state s β (s) under the probability distribution ▽ a Q·▽ θμ The expected value of μ can be expressed as

[0108]

[0109] In addition, the target network is updated according to the evaluation network using a soft update method. The update method is as follows

[0110] θ Q′ ←τθ Q +(1-τ)θ Q′

[0111] θ μ′ ←τθ μ +(1-τ)θ μ′

[0112] Among them, τ is taken as 0.001.

[0113] The above optimization problem can be solved by Algorithm 4-1. The specific algorithm flow is as follows

[0114] Algorithm Table 4-1. MA-DDPG

[0115]

[0116]

[0117] like Figure 3 As shown in the figure, the algorithm converges after 300 iterations, and the convergence speed is very impressive. In addition, the reward for the drone's task processing is increased from 0.73 to 0.86, which means that the system normalized cost is reduced by 0.12, that is, the cost of the system to process a 1-bit task is reduced by 0.12, an increase of about 17%.

[0118] like Figure 4 As shown in the figure, under the in-situ unloading scheme, only 100 iterations are needed to reach convergence, but the reward after convergence is stable at around 0.77. This is because the drone, as an intelligent agent, chooses in-situ unloading, which will reduce the action selection scheme. The fewer action selections, the fewer convergence times will inevitably be. However, compared with the flight unloading scheme, the reward is about 0.08 less, which is about 17% lower. For deep reinforcement learning, the difference between 100 and 300 convergences is actually not that big. In general, drone flight unloading is better than in-situ unloading.

[0119] like Figure 5 As shown in the figure, by comparing the coding calculation schemes of MDS code and rateless code, it can be seen that the convergence speed of the two is almost the same, but the reported convergence of MDS code is 0.80, which is smaller than the convergence value of rateless code 0.86. This is because rateless code utilizes the calculation results of slow nodes, while MDS code does not utilize the calculation results of slow nodes. Therefore, this model using rateless code for task processing design is significantly better than the MDS code scheme.

[0120] In order to ensure the fairness of the comparison, we set the ground resources and spectrum resources to increase accordingly as the proficiency of the drone increases. Figure 6 As shown in the figure, when the number of drones is 3, the MA-DDPG algorithm achieves good performance under this system model. It not only converges quickly in about 300 iterations, but also ensures that the weighted normalized cost of delay-energy consumption is small. When the number of drones is 5, the weighted normalized cost of delay-energy consumption remains stable compared to when the number is 3, with almost no change. In addition, due to the geometric increase in the number of agents, the action selection and corresponding strategies increase exponentially, so the number of convergence iterations increases to about 500, but we think this is an acceptable number of iterations. When the number of drones is 10, the system normalized cost and the corresponding delay energy consumption double, and the number of convergence iterations increases sharply to about 1900. Therefore, we can think that the MA-DDPG algorithm is suitable for drone agents in the single digit order of magnitude, and the performance will become very poor beyond this order of magnitude.

[0121] like Figure 7 As shown, similar to Figure 6 We can observe that when the number of base stations as agents is equal to 4 and 10, the system indicators (delay, energy consumption, cost) and the number of convergence iterations still have stable performance. When the number of base stations is equal to 20, the corresponding system indicators and the number of convergence iterations increase exponentially. This is because the base station as an agent actually only has the action of computing resource allocation, and the action selection is relatively small. Therefore, compared with drones, MA-DDPG adapts to more base station agents and achieves stable performance. Therefore, we can believe that the MA-DDPG algorithm is suitable for the case of less than 20 base station agents, and the performance will become very poor when it exceeds this order of magnitude.

[0122] like Figure 8 As shown in the figure, we discuss the impact of the algorithm's own parameters on the reward. Mini-batch is mainly used to speed up convergence and save memory, but it will also cause the algorithm to fall into the local optimal solution and fail to obtain the global optimal solution. It can be seen that the larger the batch size, the slower the convergence speed, but the corresponding reward value is larger. When batch size = 64, the algorithm falls into the local optimal solution, which is caused by the small number of samples. When batch size = 256, it converges when the number of iterations reaches 800, but the reward value after convergence is the highest. When batch size = 256, it converges when the number of iterations reaches 300, but the reward value after convergence is also relatively high and close to the reward value after convergence when batch size = 256. Therefore, batch size in this model has a compromise between the number of iterations and the reward value after convergence.

[0123] Through simulation, we can see that the task processing method based on rateless code encoding calculation proposed by us is significantly better than MDS code, and the system cost is reduced by about 8%. It can also be seen that the system cost of flight unloading is also improved by about 17% compared with the in-situ unloading. At the same time, we comprehensively consider the impact of the number of two agents (drones and base stations) on system performance such as latency, energy consumption, cost, and algorithm indicators such as the number of convergence iterations, and discuss the number of agents applicable to the algorithm, which provides a reference for us to choose the number of agents in this scenario. Furthermore, we discuss the impact of the algorithm parameter batch size on system performance and algorithm performance, and explain that this parameter has a compromise in this system model.

[0124] Beneficial effects of the invention: The present invention studies the problem of computing offloading of multiple UAVs and multiple base stations, not only taking into account the heterogeneity of edge base station computing power and slow node parameters, but also taking into account the limited bandwidth resources for communication between UAVs and edge base stations. In addition, the distributed coding calculation of rateless codes reduces the processing impact of slow nodes on computing tasks, thereby reducing the processing cost of computing services and achieving efficient processing of UAV computing tasks.

[0125] Specifically:

[0126] 1. A distributed coding computing solution is applied to handle the computing tasks offloaded by drones and effectively reduce the impact of slow nodes and reduce computing latency. Different coding schemes are used, and the costs of these schemes in this scenario are discussed and compared.

[0127] 2. In order to ensure fairness, the present invention proposes the concept of normalized processing cost, which is used to measure the quality of task processing in the entire system.

[0128] 3. Deep reinforcement learning is used to jointly optimize the optimal unloading position of drones, communication bandwidth resource allocation, drone computing task allocation, and edge base station computing resource allocation. This not only better matches the computing power of edge base stations and the heterogeneity of slow node parameters, but also greatly reduces the normalized cost of system computing task processing.

[0129] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A matrix-vector multiplication coding calculation allocation method based on multi-agent deep reinforcement learning, characterized in that: The steps include: Step 1: Build a matrix-vector multiplication task offloading system model of multiple agents and multiple edge base stations, where the agent is a drone; Step 2: Divide the workflow of the system model into the following three steps: Step 1: Task encoding: encode the computing task according to the rules of rateless code; Step 2: Task unloading: UAVs fly to their respective unloading points and unload tasks according to the proportion of task allocation; Step 3: Distributed computing. After receiving the task offloaded by the intelligent agent, the edge base station performs distributed coding calculations according to the proportion of computing resources allocated. After the calculation is completed, the calculation results are returned to the intelligent agent. Step 3: Establish an optimization problem to minimize system cost; Step 4: Determine the four-tuple <state S, action A, reward R, transition probability P> of the deep reinforcement learning algorithm, solve the optimization problem through the multi-agent-deep deterministic policy gradient algorithm, and obtain the optimal task allocation, agent flight trajectory, transmission bandwidth, computing resources and other parameters; In step 1, the system model consists of M UAVs and P base stations, and the set of UAVs is represented as The set of base stations is represented as Assuming that the transmission channel between the drone and the base station is line-of-sight, the initial coordinates of the mth drone are The three-dimensional coordinates of the pth BS are r p =[x p ,y p ,0], So the straight-line distance between the mth UAV and the pth BS can be expressed as: Then, the channel gain h m,p It can be expressed as: h m,p =β0(d m,p ) -2 Where β0 represents the normalized channel gain; Assuming that the total transmission bandwidth of the entire system M drones is B, and frequency division multiple access technology is used to ensure that multiple drones can perform tasks simultaneously, the bandwidth allocation matrix Ω can be expressed as: Among them, ω m,p represents the ratio of the channel bandwidth between the mth UAV and the pth ground base station, and satisfies The channel transmission rate between the mth UAV and the pth ground base station can be expressed as: in, represents the unloaded power of the mth UAV, and N0 represents the noise power spectrum density; In step 1 of step 2, the UAV preprocesses the computing task according to the coding rule of the LT rateless code, and divides the computing task into multiple subtasks according to the proportion; the task of the mth UAV can be expressed as Where D m Represents the number of task bits, F m represents the workload, Represents the tolerance time of the UAV task processing; the computing task of the UAV is represented in the form of matrix-vector multiplication, that is, y m =A m x, where The number of matrix rows to be calculated l m and the amount of data D m The relationship between can be expressed as: Where b is the number of bits required to compute an inner product of length k; The drone encodes the task matrix, that is, m Perform rateless coding to obtain Therefore, the amount of data after encoding for the mth UAV computing task It can be expressed as: The drone distributes the encoded matrix to the edge base stations in proportion, and its distribution matrix Γ can be expressed as: Among them, γ m,p represents the proportion of computing tasks assigned by the mth UAV to the pth edge base station, and satisfies Therefore, the mission of the mth UAV can be expressed as Submatrix The number of rows can be expressed as l m,p :l m,p =γ m,p α m ·l m ; In step 2 of step 2, a full offloading strategy is adopted for each drone, that is, the drone offloads all computing tasks to the ground base station; each drone first flies to its own unloading point, assuming that the coordinates of the unloading point of the mth drone are Therefore, the time delay of the mth UAV flying to the unloading point can be expressed as: where v m Represents the flight speed of the mth UAV; After the UAV flies to the unloading point, it unloads the task to the ground base station through the corresponding line-of-sight transmission channel. Therefore, the transmission time for the mth UAV to unload the calculation task to the pth base station is It can be expressed as: After the drone has completed the computing task, it will hover in place and wait for the ground base station to process and return the computing results. In step 3 of step 2, after receiving the task unloaded by the UAV, the ground base station performs distributed computing; the total ground computing resources are f max ,For the computing tasks from different UAVs, different computing resources are allocated, and the allocation matrix Λ can be expressed as Among them, λ m,p represents the proportion of computing resources used by the p-th base station to process the subtask from the m-th drone, that is, Therefore, the time it takes for the p-th base station to process the computation task of a single inner product offloaded by the m-th UAV is where ρ n Calculate the number of cycles of the 1-bit task for the CPU of the nth BS; Therefore, the p-th BS calculates the l offloaded by the m-th UAV mp The computation time of an inner product task is Since the computing task is encoded with LT rateless code, the mth UAV needs to receive l m The calculation result of the row can be considered as the calculation is completed. The calculation time of the p-th base station processing the subtask assigned by the m-th drone is It can be expressed as Where X(t) is a counting function, that is, counting the number of rows of matrix multiplication tasks processed by each base station; In step 3, the total delay of processing the computing task is divided into three parts: flight delay, unloading delay, and hovering delay; the task completion time of the mth UAV It can be expressed as: Correspondingly, the total energy consumption for processing computing tasks is also divided into four parts: flight energy consumption, unloading energy consumption, hovering energy consumption, and base station computing energy consumption, which can be expressed as where w m represents the mass of the mth UAV, κ p represents the finite CPU switch capacitance of the pth base station. This parameter is only related to the CPU hardware; Therefore, the total energy consumption of the system for the mth UAV to complete the computing task can be expressed as Therefore, the cost of the mth UAV to complete the computing task can be expressed as Among them, η is the cost compromise coefficient, and it satisfies 0<η<1, σ is the balance factor of delay energy consumption; The evaluation index of the system is defined as the normalized cost of the system processing computing tasks, so the following optimization problem is obtained: This problem minimizes the normalized cost by optimizing the unloading point of the UAV, the channel bandwidth allocation, the UAV computing task allocation, and the ground base station computing resource allocation; where C1 represents the sum of the channel bandwidth resource allocation ratio is 1, C2 represents the sum of the computing task allocation ratio of each UAV is 1, C3 represents the sum of the ground computing resource allocation ratio is 1, and C4 represents the UAV receives l m The task is considered completed only when the drone reaches the tolerance time. C5 means that the drone computing task must be completed within the tolerance time. C6 means that the energy consumption of the drone operation does not exceed the total energy of the drone battery. In step 4, in the system model, the deep reinforcement learning four-tuple <state S, action A, reward R, transition probability P> can be defined as P=p[s t+1 ,r t ∣s t ,a t ] The intelligent agents are drones and edge base stations, and the actions represent the drone's flight path selection, channel bandwidth allocation, computing task allocation, and computing resource allocation; the states include channel transmission rate, drone flight time and flight energy consumption, drone unloading time and unloading energy consumption, ground computing time and computing energy consumption, and drone hovering energy consumption while waiting for the calculation results to be returned; the return is negatively correlated with the system normalized cost; The multi-agent-deep deterministic policy gradient algorithm includes an environment and an agent. Each agent includes an actor network, a judge network and an experience replay pool, wherein each network includes two DQNs, namely an evaluation network and a target network. The Q function of each network, i.e., the action-value function, is defined in the state s t Next a t The expected value obtained after taking an action and continuing to execute the strategy μ is defined by the Bellman equation: Q μ (s t ,a t )=E[r(s t ,a t )+γQ μ (s t+1 ,μ(s t+1 ))] The definition of the Q function is a recursive expression that simulates the Bellman equation expression through a function; in DDPG, a convolutional neural network is used to simulate the Q function. This network is called the Q network, and its parameter is θ Q ; Measure the performance of a strategy μ: Use a criterion function J to measure, which can be expressed as J β (μ)=∫ S ρ β (s)Q μ (s,μ(s))ds Among them, s is the state of the environment, which is generated based on the behavior strategy of the agent, and their distribution function is ρ β (s), Q μ (s,μ(s)) is the Q value that can be generated if the action is selected according to the μ strategy in each state; Therefore, the optimal behavior strategy μ can be considered as the criterion function J β The maximum likelihood estimate of (μ) can be expressed as In addition, the LOSS function of the network is defined as the mean square error, which is the sum of the squares of the difference between the predicted value and the target value. It is the most commonly used error in the regression loss function, so the LOSS function can be expressed as The policy gradient of the policy network is ρ in state s β (s) under the probability distribution The expected value of can be expressed as In addition, the target network is updated according to the evaluation network using a soft update method. The update method is as follows Among them, τ is taken as 0.001.

Citation Information

Patent Citations

  • Distributed computing method based on priority coding

    CN111858721A

  • Three-dimensional deployment and power distribution joint optimization method for flight base station of unmanned aerial vehicle

    CN113206701A