An unmanned aerial vehicle assisted relay method for emergency scenarios
By combining distributed resource allocation and deep reinforcement learning, the FEMADDPG algorithm is used to train the drone's trajectory, solving the problem of communication infrastructure damage in disaster scenarios. This enables drones to provide computing offloading services to terminals in emergency scenarios, protecting privacy, optimizing trajectories, and reducing energy consumption and information age.
Patent Information
- Application Number
- CN202410080047.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-01-19
AI Technical Summary
In disaster scenarios, fixed communication infrastructure is destroyed, rendering services unavailable. Existing drone-assisted relay methods pose risks of privacy data leakage and are unsuitable for scenarios with uncertain user numbers. Centralized learning is also unsuitable, and the central server may not exist.
A distributed resource allocation method is adopted, combined with a deep reinforcement learning model, and the drone's trajectory is trained using the FEMADDPG algorithm. Federated learning is used to aggregate the model at ground base stations to protect user privacy and adapt to changes in the number of users.
This enables drones to provide computing offloading services to ground terminals in emergency scenarios, protect user data privacy, dynamically adjust behavior strategies to adapt to environmental changes, optimize drone movement trajectories, and reduce system information age and energy consumption.
Smart Images

Figure CN117792481B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of unmanned aerial vehicles (UAVs) and discloses a UAV-assisted relay method for emergency scenarios. Background Technology
[0002] In disaster scenarios, fixed communication infrastructure is often easily destroyed, leading to service disruptions. Therefore, there are situations where ground-based mobile edge computing servers cannot provide communication coverage to users within their service area. Drone-assisted relay has emerged as a promising solution. Drones can act as relays, assisting terminal devices in transmitting data or computing tasks to ground base stations, thus addressing the issue of ground base stations failing to provide communication coverage to rescue vehicles in emergency areas. Considering the system's complexity and high dynamism, its performance is highly dependent on the drone's location. Accurately planning the drone's trajectory to meet the task offloading needs of end users becomes a significant challenge.
[0003] Deep reinforcement learning combines neural network models from deep learning with reinforcement learning techniques for optimizing drone trajectories. However, in traditional centralized model training, the agent needs to upload local user privacy data (such as load status, computing power, and channel state information) to a central server, which may compromise user privacy. Furthermore, centralized learning is unsuitable for scenarios with an uncertain number of users, as the network model obtained through centralized learning is only applicable to a specific number of users; retraining is required when the number of users increases or decreases. Additionally, in disaster scenarios, the central server may be unavailable or damaged, making centralized learning unsuitable. Summary of the Invention
[0004] Purpose of the invention: To provide a drone-assisted relay method for emergency scenarios, in order to solve the above-mentioned problems existing in the prior art.
[0005] Technical solution: A drone-assisted relay method for emergency scenarios, comprising the following steps:
[0006] S1. Establish a drone-assisted relay network and construct a system model of drones as relay-assisted emergency terminals; the relay network includes drones, emergency terminals, and base stations;
[0007] S2. Based on the system model, construct the total system cost function, take minimizing the total system cost as the objective function of the system model, and establish an optimization problem based on the objective function;
[0008] S3. Based on the optimization problem, a deep reinforcement learning model is constructed using a distributed resource allocation method.
[0009] S4. Use the FEMADDPG algorithm to train the deep reinforcement learning model. Repeat this process until convergence. Execute the trained deep reinforcement learning model to obtain the final drone trajectory.
[0010] According to one aspect of this application, step S1 specifically comprises:
[0011] S11. Establish a drone-assisted relay network, collect drone data, and construct a drone motion model;
[0012] S12. The emergency terminal communicates with the base station through the relay network, collects communication data, and constructs a communication model with the UAV as the relay.
[0013] S13. Based on the communication model, construct an energy consumption model for UAVs acting as relays;
[0014] S14. Based on the motion model, communication model, and energy consumption model, a system model is formed for the UAV as a relay auxiliary emergency terminal.
[0015] According to one aspect of this application, step S2 specifically comprises:
[0016] S21. Based on the system model, calculate the age of the data information received by the base station and the total energy consumption of the UAV, and construct the total system cost function.
[0017] S22. Take minimizing the total system cost as the objective function of the system model, and construct the constraints of the system model based on the objective function;
[0018] S23. Based on the objective function and constraints, an optimization problem is formed.
[0019] According to one aspect of this application, step S3 specifically comprises:
[0020] S31. Based on the optimization problem, calculate the state information of the UAV, which is defined as the state of the UAV as a relay auxiliary emergency terminal; the state information includes the relative position of the UAV and the emergency terminal, the workload of the emergency terminal, and the age of the emergency terminal's data information.
[0021] S32. Based on the optimization problem, obtain the displacement coordinates of the UAV and define them as the actions of the UAV as a relay auxiliary emergency terminal.
[0022] S33. Based on the optimization problem, construct a reward function, calculate the cumulative discount reward based on the reward function, and define it as the reward for the UAV as a relay auxiliary emergency terminal;
[0023] S34. Based on the status, actions, and rewards of UAVs as relay auxiliary emergency terminals, a deep reinforcement learning model is constructed using a distributed resource allocation method.
[0024] According to one aspect of this application, step S4 specifically comprises:
[0025] S41. Build a neural network in each drone and send initial parameters to the neural network through a central server; the neural network includes an action network and an evaluation network.
[0026] S42. Obtain the current state of the emergency scenario, form actions based on the action network, execute the actions in the current state, and obtain rewards and the next state;
[0027] S43. Based on the current state, action, reward, and next state, form a quadruple and construct a memory replay pool;
[0028] S44. Randomly select quadruplets from the memory replay pool. Based on the selected quadruplets and the evaluation network, calculate the estimated target value. Based on the estimated target value, construct the loss function, minimize the loss function, and update the parameters of the evaluation network. Based on the estimated target value, use the policy gradient method to update the parameters of the action network.
[0029] S45. Send the updated parameters of the evaluation network and the action network of each UAV to the central server. Use federated learning to form global parameters. Distribute the global parameters to the neural network of each UAV. Repeat steps S42 to S45 and record the number of rounds until the preset total round threshold is reached to obtain the trained deep reinforcement learning model.
[0030] S46. Execute the trained deep reinforcement learning model to obtain the final drone trajectory.
[0031] According to one aspect of this application, step S1 specifically comprises:
[0032] Assuming M drones operate on the same plane at a height of H, the position of drone m in time slot n is represented as:
[0033] w m,n =[x m,n ,y m,n ]
[0034] Where M = {1, 2, ..., m, ... M} represents the drone, and the drone's working time is divided into N time slots, where N = {1, 2, ..., n, ... N} represents the time slot, and the length of each time slot is T0.
[0035] The movement constraints of the drone m within a time slot are:
[0036]
[0037] Where V max This indicates the maximum speed of the drone;
[0038] The positional constraints of the drone m are:
[0039]
[0040] Where D min This indicates the minimum safe distance between drones;
[0041] The connection status between UAV m and emergency terminal k in time slot n is as follows:
[0042]
[0043] Where K = {1, 2, ..., k, ... K} represents the emergency terminal, and the coverage range constraint of the drone is:
[0044]
[0045] Among them, D max Indicates the coverage area of the drone performing the collection mission, d k,m [n] represents the distance between the emergency terminal k and the drone m in time slot n, expressed as:
[0046]
[0047] Where c k,n =[x k,n ,y k,n [] indicates the position of emergency terminal k in time slot n;
[0048] The emergency terminal unloads the task onto only one drone in a time slot. The emergency terminal selects the drone closest to it to unload the task, which can be expressed by the formula:
[0049]
[0050]
[0051] Where sign(x) is the sign function, which has a value of 1 when x is greater than 0, and 0 otherwise;
[0052] The transmission rate from emergency terminal k to UAV m in time slot n is:
[0053]
[0054] Among them B m For the bandwidth allocated to drone m, p k For the transmission power of emergency terminal k, σ 2 For the power of additive white Gaussian noise, g m,k [n] represents the channel power gain of time slot n emergency terminal k and UAV m;
[0055] The transmission delay for emergency terminal k to transmit the task to drone m in time slot n is:
[0056]
[0057] Where c k [n] represents the amount of data that emergency terminal k needs to upload in time slot n;
[0058] The transmission rate from UAV m to the ground base station in time slot n is:
[0059]
[0060] Among them B m,0 For the transmission bandwidth allocated from the drone m to the base station, p m Let σ be the transmit power of the UAV m. 2 For the power of additive white Gaussian noise, g m,b [n] represents the channel power gain of time slot n, UAV m, and ground base station;
[0061] The transmission delay for UAV m to transmit the mission to the base station in time slot n is:
[0062]
[0063] Where c m uav [n] represents the amount of data that drone m needs to upload in time slot n;
[0064] The energy consumption of a drone mainly consists of motion energy consumption and the energy consumption of offloading the mission to a ground base station. The motion energy consumption of drone m in time slot n is:
[0065]
[0066] Where P m F [n] represents the flight power of UAV m in time slot n, and the energy consumption of UAV m in time slot n to offload the mission to the ground base station is:
[0067]
[0068] According to one aspect of this application, step S2 specifically comprises:
[0069] The age of the information of emergency terminal k collected at base station n+1 in time slot is represented as:
[0070]
[0071] Among them, s g [n] represents the index of the generation time slot of the data unloaded in time slot n, (ns g[n])T0 represents the waiting time from task creation to unloading;
[0072] The total energy consumption of UAV m in time slot n is:
[0073]
[0074] Define the total system cost function as follows:
[0075]
[0076] Where α and β are the system information age, respectively. Total drone energy consumption The weighting coefficients, α and β, are both non-negative numbers, used to adjust the ratio of system information age to total drone energy consumption, so that the two are in balance.
[0077] Total system cost C sum Minimization is the objective of optimization. The optimization problem can be expressed as minimizing the total system cost under the following constraints:
[0078] minC sum [N]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084] Among them, constraint C1 indicates that if the task of emergency terminal k is unloaded, it can only be unloaded to one drone; constraint C2 indicates that emergency terminal k selects the nearest drone to unload; constraint C3 indicates the coverage area of the emergency terminal unloaded to the drone in performing the collection task; constraint C4 indicates the safety constraint on the distance between drones; and constraint C5 indicates the constraint on the movement range of drones in each time slot.
[0085] According to one aspect of this application, step S3 specifically comprises:
[0086] The information age on emergency terminal k is:
[0087]
[0088] The state information of UAV m in time slot n is as follows:
[0089]
[0090] Among them, {d m,m' [n], m'≠m∈M} represents the relative positions of other drones.
[0091] The actions of UAV m in time slot n are as follows:
[0092]
[0093] in Let m be the displacement of the drone along the x-axis. Let m be the displacement of the drone along the y-axis.
[0094] Set the reward function as follows:
[0095] r n =CC sum [n]-r p
[0096] Where C is a constant used to adjust r n The value of r is made positive. p As punishment;
[0097] The reward is defined as a cumulative discount bonus, expressed as:
[0098]
[0099] in, This represents the discount factor.
[0100] According to one aspect of this application, it also includes:
[0101] S5. Evaluate the final drone trajectory and demonstrate its rationality.
[0102] According to one aspect of this application, step S5 specifically comprises:
[0103] S51. Obtain the final drone trajectory data and preprocess the final drone trajectory data, including removing outliers, filling in missing values, and normalizing.
[0104] S52. Based on the preprocessed final UAV trajectory data, calculate the UAV's motion performance indicators;
[0105] S53. Machine learning methods are used to score the motion performance indicators of the drone, and visualization methods are used to display and compare the motion trajectory of the drone.
[0106] Beneficial effects: This invention uses drones as relay nodes to provide computational offloading services for ground-based emergency terminals; it uses federated learning to allow agents to train models locally and aggregate them at ground base stations, protecting the privacy of user data; and it uses deep reinforcement learning to allow agents to dynamically adjust their behavioral strategies according to changes in the environment, thereby adapting to changes in the number of users. Attached Figure Description
[0107] Figure 1 This is a flowchart of the present invention.
[0108] Figure 2 This is a flowchart of step S1 of the present invention.
[0109] Figure 3 This is a flowchart of step S2 of the present invention.
[0110] Figure 4 This is a flowchart of step S3 of the present invention.
[0111] Figure 5 This is a flowchart of step S4 of the present invention.
[0112] Figure 6 This is a system model diagram of UAV-assisted relay in an embodiment of the present invention.
[0113] Figure 7 This is a framework diagram of the FEMADDPG UAV-assisted relay method according to an embodiment of the present invention.
[0114] Figure 8 This is a curve showing the change in FEMADPPG reward value during the training phase of an embodiment of the present invention.
[0115] Figure 9 The simulation results of comparing the information age of emergency rescue vehicle missions using multiple algorithms are shown in the figure provided in this embodiment of the invention. Detailed Implementation
[0116] like Figure 1 As shown, this invention proposes a drone-assisted relay method for emergency scenarios, with the following specific steps:
[0117] S1. Establish a drone-assisted relay network and construct a system model of drones as relay-assisted emergency terminals; the relay network includes drones, emergency terminals, and base stations;
[0118] like Figure 2 As shown, step S1 specifically involves:
[0119] S11. Establish a drone-assisted relay network, collect drone data, and construct a drone motion model;
[0120] S12. The emergency terminal communicates with the base station through the relay network, collects communication data, and constructs a communication model with the UAV as the relay.
[0121] S13. Based on the communication model, construct an energy consumption model for UAVs acting as relays;
[0122] S14. Based on the motion model, communication model, and energy consumption model, a system model is formed for the UAV as a relay auxiliary emergency terminal.
[0123] In a further embodiment, a system model is established whereby a drone acts as a relay to assist ground emergency rescue vehicles. Emergency rescue vehicles can be parked at fixed locations or travel along roads. The emergency rescue vehicles continuously generate computational tasks that need to be offloaded to a ground base station. Due to terrain or distance, the emergency rescue vehicles cannot directly transmit these tasks to the ground base station. The drone, equipped with sensors, perceives the location and task information of the emergency rescue vehicles within the emergency rescue area and acts as a relay to assist the ground emergency rescue vehicles in transmitting their computational tasks to the ground base station.
[0124] A total of M drones and K emergency rescue vehicles were deployed within the emergency rescue area following the disaster. Let M = {1, 2, ..., m, ... M} represent the drone set, and K = {1, 2, ..., k, ... K} represent the emergency rescue vehicles. The task sizes generated by emergency rescue vehicle k follow a Poisson distribution. When tasks are not collected, they are stored in the buffer of the emergency rescue vehicle. Each computational task has a timestamp recording its generation time. The drones' working time is divided into N time slots, represented by the set N = {1, 2, ..., n, ... N}. Each time slot has a length of T0, and the time slot length is less than 0.1s, assuming that the drones and emergency rescue vehicles remain in the same position within each time slot. Let c... k,n =[x k,n ,y k,n The emergency rescue vehicle k is located in time slot n.
[0125] Establish a motion model for the UAVs, assuming that M UAVs operate on the same plane at a height of H. The position of UAV m in time slot n is represented as:
[0126] w m,n =[x m,n ,y m,n ]
[0127] Where M = {1, 2, ..., m, ... M} represents the drone, and the drone's working time is divided into N time slots, where N = {1, 2, ..., n, ... N} represents the time slot, and the length of each time slot is T0.
[0128] The movement constraints of the drone m within a time slot are:
[0129]
[0130] Where V max This indicates the maximum speed of the drone;
[0131] To prevent collisions between drones moving in the same plane, the position constraints of drone m are as follows:
[0132]
[0133] Where D min This indicates the minimum safe distance between drones;
[0134] A communication model is established using drones as relays. The drones provide computational offloading services to terminal devices. Within each time slot, they can communicate with emergency rescue vehicles within their coverage area and collect tasks that need to be offloaded. After collection, all tasks are offloaded as a whole to the base station. The connection between drone m and emergency terminal k in time slot n is as follows:
[0135]
[0136] Where K = {1, 2, ..., k, ... K} represents the emergency terminal, if This indicates that time slot n represents the transmission of a task from emergency rescue vehicle k to drone m. This indicates that emergency rescue vehicle k in time slot n did not transmit the mission to drone m.
[0137] The coverage range constraints for drones are:
[0138]
[0139] Among them, D max Indicates the coverage area of the drone performing the collection mission, d k,m [n] represents the distance between the emergency terminal k and the drone m in time slot n, expressed as:
[0140]
[0141] Where c k,n =[x k,n ,y k,n [] indicates the position of emergency terminal k in time slot n;
[0142] The emergency terminal unloads the task onto only one drone in a time slot. The emergency terminal selects the drone closest to it to unload the task, which can be expressed by the formula:
[0143]
[0144]
[0145] Where sign(x) is the sign function, which has a value of 1 when x is greater than 0, and 0 otherwise;
[0146] The communication between emergency rescue vehicles and drones uses orthogonal frequency division multiplexing, so the transmission from different emergency rescue vehicles to drones is not interfered with. The transmission rate from emergency terminal k to drone m in time slot n is:
[0147]
[0148] Among them B m For the bandwidth allocated to drone m, p k For the transmission power of emergency terminal k, σ 2 For the power of additive white Gaussian noise, g m,k [n] represents the channel power gain of time slot n emergency terminal k and UAV m;
[0149] The transmission delay for emergency terminal k to transmit the task to drone m in time slot n is:
[0150]
[0151] Where c k [n] represents the amount of data that emergency terminal k needs to upload in time slot n;
[0152] Communication between emergency rescue vehicles and drones, and communication between drones and ground base stations, uses different frequency bands. Different drones communicate with ground base stations based on orthogonal frequency division multiplexing (OFDM) technology. The transmission rate from drone m to the ground base station in time slot n is:
[0153]
[0154] Among them B m,0 For the transmission bandwidth allocated from the drone m to the base station, p m Let σ be the transmit power of the UAV m. 2 For the power of additive white Gaussian noise, g m,b [n] represents the channel power gain of time slot n, UAV m, and ground base station;
[0155] The transmission delay for UAV m to transmit the mission to the base station in time slot n is:
[0156]
[0157] Where c m uav [n] represents the amount of data that drone m needs to upload in time slot n.
[0158] A drone energy consumption model is established for drones acting as relays. The drone's energy consumption mainly consists of motion energy consumption and energy consumption for offloading tasks to the ground base station. The motion energy consumption of drone m in time slot n is:
[0159]
[0160] Where P m F [n] represents the flight power of UAV m in time slot n, and the energy consumption of UAV m in time slot n to offload the mission to the ground base station is:
[0161]
[0162] S2. Based on the system model, construct the total system cost function, take minimizing the total system cost as the objective function of the system model, and establish an optimization problem based on the objective function;
[0163] like Figure 3 As shown, step S2 specifically involves:
[0164] S21. Based on the system model, calculate the age of the data information received by the base station and the total energy consumption of the UAV, and construct the total system cost function.
[0165] S22. Take minimizing the total system cost as the objective function of the system model, and construct the constraints of the system model based on the objective function;
[0166] S23. Based on the objective function and constraints, an optimization problem is formed.
[0167] In a further embodiment, the process from the generation of the emergency rescue vehicle's mission to its collection by the drone and final unloading to the base station ensures the freshness of the mission data and the energy consumption of the drone. The freshness age of the mission data arriving at the base station is determined by the delay in unloading the mission data from the emergency rescue vehicle after its generation, the delay in unloading the mission from the emergency rescue vehicle to the drone, and the delay in unloading the mission from the drone to the base station. The information age of the emergency terminal k collected at the base station in time slot n+1 is represented as follows:
[0168]
[0169] Among them, s g [n] represents the index of the generation time slot of the data unloaded in time slot n, (ns g [n])T0 represents the waiting time from task creation to unloading;
[0170] The total energy consumption of UAV m in time slot n is:
[0171]
[0172] Define the total system cost function as follows:
[0173]
[0174] Where α and β are the system information age, respectively. Total drone energy consumption The weighting coefficients, α and β, are both non-negative numbers, used to adjust the ratio of system information age to total drone energy consumption, so that the two are in balance.
[0175] Total system cost C sum Minimization is the objective of optimization. The optimization problem can be expressed as minimizing the total system cost under the following constraints:
[0176] minC sum [N]
[0177]
[0178]
[0179]
[0180]
[0181]
[0182] Among them, constraint C1 indicates that if the task of emergency terminal k is unloaded, it can only be unloaded to one drone; constraint C2 indicates that emergency terminal k selects the nearest drone to unload; constraint C3 indicates the coverage area of the emergency terminal unloaded to the drone in performing the collection task; constraint C4 indicates the safety constraint on the distance between drones; and constraint C5 indicates the constraint on the movement range of drones in each time slot.
[0183] S3. Based on the optimization problem, a deep reinforcement learning model is constructed using a distributed resource allocation method.
[0184] like Figure 4 As shown, step S3 specifically involves:
[0185] S31. Based on the optimization problem, calculate the state information of the UAV, which is defined as the state of the UAV as a relay auxiliary emergency terminal; the state information includes the relative position of the UAV and the emergency terminal, the workload of the emergency terminal, and the age of the emergency terminal's data information.
[0186] S32. Based on the optimization problem, obtain the displacement coordinates of the UAV and define them as the actions of the UAV as a relay auxiliary emergency terminal.
[0187] S33. Based on the optimization problem, construct a reward function, calculate the cumulative discount reward based on the reward function, and define it as the reward for the UAV as a relay auxiliary emergency terminal;
[0188] S34. Based on the status, actions, and rewards of UAVs as relay auxiliary emergency terminals, a deep reinforcement learning model is constructed using a distributed resource allocation method.
[0189] In a further embodiment, the drone is treated as an intelligent agent, and the state information Z of drone m in time slot n is defined. m n Including the relative positions of drone m and other drones {d m,m' [n], m'≠m∈M} and the relative positions of drone m and all emergency rescue vehicles {d k,m [n], k∈K}, the size of all emergency rescue vehicle missions {c k [n],k∈K} and the information age {Age} on emergency rescue vehicles k [n], k∈K}, Information age on emergency rescue vehicle k for:
[0190]
[0191] If the mission on the emergency vehicle is not collected by the drone in that time slot, the mission's information age increases linearly; conversely, if the mission on the emergency rescue vehicle is offloaded to the drone, the information age is reset to zero. The state information of drone m in time slot n is as follows:
[0192]
[0193] The motion of UAV m in time slot n is defined as the displacement of UAV m in the x-axis direction. and displacement in the y-axis direction Right now:
[0194]
[0195] The reward function allows each drone to understand the merits of its current decision, thereby continuously adjusting its decisions to maximize long-term rewards. To prevent drone collisions, a penalty r is applied if a drone's distance is less than a set minimum distance constraint. p Based on the total system cost defined above, the reward function is set as follows:
[0196] r n =CC sum [n]-r p
[0197] Where C is a constant used to adjust r n Make the value of a positive number;
[0198] To find the optimal strategy that maximizes overall returns, both current and future returns must be considered. Returns are defined as cumulative discount rewards, expressed as:
[0199]
[0200] in, Indicates the discount factor. This indicates a greater emphasis on future rewards, and This indicates a greater emphasis on current rewards.
[0201] S4. Use the FEMADDPG algorithm to train the deep reinforcement learning model. Repeat this process until convergence. Execute the trained deep reinforcement learning model to obtain the final drone trajectory.
[0202] like Figure 5 As shown, step S4 specifically involves:
[0203] S41. Build a neural network in each drone and send initial parameters to the neural network through a central server; the neural network includes an action network and an evaluation network.
[0204] S42. Obtain the current state of the emergency scenario, form actions based on the action network, execute the actions in the current state, and obtain rewards and the next state;
[0205] S43. Based on the current state, action, reward, and next state, form a quadruple and construct a memory replay pool;
[0206] S44. Randomly select quadruplets from the memory replay pool. Based on the selected quadruplets and the evaluation network, calculate the estimated target value. Based on the estimated target value, construct the loss function, minimize the loss function, and update the parameters of the evaluation network. Based on the estimated target value, use the policy gradient method to update the parameters of the action network.
[0207] S45. Send the updated parameters of the evaluation network and the action network of each UAV to the central server. Use federated learning to form global parameters. Distribute the global parameters to the neural network of each UAV. Repeat steps S42 to S45 and record the number of rounds until the preset total round threshold is reached to obtain the trained deep reinforcement learning model.
[0208] S46. Execute the trained deep reinforcement learning model to obtain the final drone trajectory.
[0209] In a further embodiment, the multi-agent deep reinforcement learning model is optimized using a resource scheduling algorithm combining federated learning and deep reinforcement learning, namely the FEMADDPG algorithm. The algorithm employs a client-server architecture, with the UAV acting as the client. In each time slot n, the UAV trains its own neural network based on local observation information, ensuring that the neural network model architecture of each UAV is identical and that the same reinforcement learning method is used for training. The UAV periodically uploads an updated parameter from its local training to a central server for aggregation. The UAV's action network uses policy gradients to update and optimize the action network parameters. Therefore, in each round of communication, the UAV needs to upload the action network parameters updated by the policy gradient and the number of training batches. The local action network parameter update formula is:
[0210]
[0211] In this system, the local action network is executed locally by each drone, and α is the learning rate. The gradient value calculated for UAV m in time slot n;
[0212] The update formula executed by the central server is as follows:
[0213]
[0214] Upload parameters from all drones participating in the training By performing a weighted average, a new weight parameter θ can be obtained. actor [n+1]. Where N is... m Let M be the number of training batches for drone m, M0 be the total number of training batches for all emergency rescue vehicles, and N be the number of training batches for all drones m. m / M0 represents the contribution of drone m to the global parameter update. The central server obtains the new global parameter θ. actor After [n+1], this parameter is broadcast to the environment. Drones that receive the new global parameter will then transmit the local parameter. Updated to θ actor [n+1], continue local training under the global model, and repeat the above process until training ends. The specific steps include the following:
[0215] Step 1: The central server issues the initial global action network model parameters θ. actor [n] and global evaluation network model parameters θ critic [n] is given to each drone;
[0216] Step 2: Initialize the drone's altitude and service radius, the arrival rate of the emergency rescue vehicle's mission size, and the number of training rounds e;
[0217] Step 3: Initialize the time step n in round e;
[0218] Step 4: Initialize the positions of emergency rescue vehicles and drones;
[0219] Step 5: Each emergency rescue vehicle observes the environment and obtains the current state Z. m n , will Z m n Input the agent's action network and add noise to obtain action A m n Action A m n Apply to the environment to obtain a reward r n and the next state Z m n+1 Calculate the reward R for n steps. t (n)k and the quadruple (Z m n A m n r n Z m n+1 Stored in the memory replay pool;
[0220] Step 6: Update the location of emergency rescue vehicles and drones, and the mission size and information age on the emergency rescue vehicles;
[0221] Step 7: Sample a batch of samples from the memory playback pool according to the sampling probability, and calculate the target value y. n Minimize the loss function to update the evaluation network parameters. Calculate policy gradients to update action network parameters
[0222] Step 8: When the number of training iterations reaches the target network update interval, based on the network parameters... and and update target network parameters and
[0223] Step 9: When the number of training rounds reaches the aggregation interval, all drones upload their local model parameters. and training batch N m The model parameters are aggregated by the central server, which then obtains the global model θ. actor [n] distributes the global model to all drones.
[0224] Step 9: Determine if n < N, where N is the total time steps in rounds e. If yes, n = n + 1, proceed to step 4; otherwise, proceed to step 10.
[0225] Step 10: Determine whether e < I, where I is the total number of training rounds. If yes, e = e + 1, proceed to step 3; otherwise, the optimization ends and the trained network model is obtained.
[0226] Step 11: Using the network model trained by the algorithm, input the state information Z observed by the agent at a certain moment. m n ;
[0227] Step 12: For each UAV m, output its optimal strategy in time slot n. Obtain the displacement of UAV m in the x-axis direction. and displacement in the y-axis direction
[0228] Further steps include step S5, evaluating the final drone trajectory and demonstrating its rationality. Specifically:
[0229] S51. Obtain the final drone trajectory data and preprocess the final drone trajectory data, including removing outliers, filling in missing values, and normalizing.
[0230] S52. Based on the preprocessed final UAV trajectory data, calculate the UAV's motion performance indicators;
[0231] S53. Machine learning methods are used to score the drone's motion performance indicators, and visualization methods are used to display and compare the drone's motion trajectory.
[0232] In a further embodiment, the final UAV trajectory data is preprocessed, including outlier removal, missing value imputation, and normalization, to improve data quality and usability. Then, the UAV trajectory data is analyzed, including calculating UAV motion performance metrics such as average speed, average acceleration, average jerk, and average energy consumption, as well as UAV communication performance metrics such as average signal-to-noise ratio, average bit error rate, average throughput, and average message latency. Finally, the UAV trajectory data is evaluated, including using statistical or machine learning methods to score or classify the UAV's motion and communication performance, and using visualization methods to display and compare the UAV trajectories.
[0233] This allows for effective verification of the final drone trajectory, demonstrating its rationality and providing a reference and basis for further optimization of the drone trajectory.
[0234] In a further embodiment, such as Figure 6As shown, for emergency rescue scenarios, a UAV-assisted relay network is constructed, consisting of emergency rescue vehicles, ground base stations, and UAVs. The UAVs act as relays, assisting the ground-based emergency rescue vehicles in transmitting computational tasks to the ground base stations. A total system cost function, incorporating system information age and UAV energy consumption, is constructed. With minimizing the total system cost as the optimization objective, a resource scheduling method combining federated learning and deep reinforcement learning is proposed, namely the Federated Multi-agent Deep Deterministic Policy Gradient (FEMADDPG) algorithm. Figure 7 As shown, the optimal trajectory of the drone can be obtained based on the trained model. The specific steps are as follows:
[0235] Step a: Deploy aerial drones as relay nodes in the system. The drones act as relays to assist ground emergency rescue vehicles in transmitting computing tasks to ground base stations, in response to situations where ground base stations cannot provide communication coverage for rescue vehicles in the emergency area.
[0236] Step b: Establish motion, communication, and energy consumption models for a ground base station, M drones, and K emergency rescue vehicles;
[0237] Step c: Construct a cost function that includes data on age and energy consumption, with the goal of minimizing the total cost of the system, and establish an optimization problem;
[0238] Step d: Using a distributed resource allocation method, construct a deep reinforcement learning model based on the optimization problem;
[0239] Step e: Optimize the multi-agent deep reinforcement learning model using a resource scheduling method that combines federated learning and deep reinforcement learning, namely the FEMADDPG algorithm.
[0240] Step f: Use the trained multi-agent deep reinforcement learning model to obtain the optimal drone trajectory;
[0241] Furthermore, such as Figure 8 As shown, the effectiveness of the FEMADDPG algorithm in fitting the optimal decision is demonstrated.
[0242] Furthermore, such as Figure 9As shown, the changes in the information age on randomly selected emergency rescue vehicles during the testing of three algorithm models are described. When the emergency rescue vehicle's mission is waiting for relay, the information age increases linearly. Once the mission is relayed, the information age on the emergency rescue vehicle is reset to zero, and it will only be updated again when a new mission is generated. It can be seen that under the FEMADDPG algorithm, the missions on the emergency rescue vehicle receive more relay services, and the missions are collected more frequently, thus keeping the information age at a low value.
[0243] This invention addresses the relay problem of UAV-assisted emergency terminals in emergency rescue scenarios. It proposes a resource scheduling algorithm combining federated learning and deep reinforcement learning, namely the Federated Multi-agent Deep Deterministic Policy Gradient (FEMADDPG) algorithm. By considering the system's information age and UAV energy consumption in the optimization objective function, it achieves significant improvements in model performance and generalization ability. The proposed method can plan the trajectories of multiple UAVs, outperforming baseline algorithms in reducing system information age and UAV energy consumption, while also improving data relay efficiency, effectively solving the trajectory optimization problem for UAV-assisted relay in emergency rescue scenarios. By using UAVs as relay nodes, it provides computational offloading services to ground-based emergency terminals; by using federated learning, agents train models locally and aggregate them at ground base stations, protecting user data privacy; and by using deep reinforcement learning, agents dynamically adjust their behavioral strategies according to environmental changes, thus adapting to changes in the number of users.
[0244] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A drone-assisted relay method for emergency scenarios, characterized in that, Includes the following steps: S1. Establish a drone-assisted relay network and construct a system model of drones as relay-assisted emergency terminals; the relay network includes drones, emergency terminals, and base stations; S2. Based on the system model, construct the total system cost function, take minimizing the total system cost as the objective function of the system model, and establish an optimization problem based on the objective function; S3. Based on the optimization problem, a deep reinforcement learning model is constructed using a distributed resource allocation method. S4. Use the FEMADDPG algorithm to train the deep reinforcement learning model. Repeat this process until convergence. Execute the trained deep reinforcement learning model to obtain the final drone trajectory. Step S1 is as follows: S11. Establish a drone-assisted relay network, collect drone data, and construct a drone motion model; S12. The emergency terminal communicates with the base station through the relay network, collects communication data, and constructs a communication model with the UAV as the relay. S13. Based on the communication model, construct an energy consumption model for UAVs acting as relays; S14. Based on the motion model, communication model, and energy consumption model, a system model is formed for the UAV as a relay auxiliary emergency terminal. Step S2 is as follows: For time slots Emergency terminals collected at base stations Information age is expressed as: in, Indicates time slot Index of the time slot for generating the unloaded data. This indicates the waiting time from task creation to unloading; In the time slot drones The total energy consumption is: Define the total system cost function as follows: in and The system information age Total drone energy consumption The weighting coefficients, and All are non-negative numbers, used to adjust the ratio of system information age to total drone energy consumption, so that the two are balanced; Total system cost Minimization is the objective of optimization. The optimization problem can be expressed as minimizing the total system cost under the following constraints: Among the constraints Indicates emergency terminal If a task is to be unloaded, it can only be unloaded onto one drone; constraints. Indicates emergency terminal Select the nearest drone to unload; constraints This indicates the coverage area of the emergency terminal unloaded onto the drone during the collection mission; constraints. Safety constraints indicating the distance between drones; constraints Specify the constraints on the movement range of the drone in each time slot; Step S4 is as follows: S41. Build a neural network in each drone and send initial parameters to the neural network through a central server; the neural network includes an action network and an evaluation network. S42. Obtain the current state of the emergency scenario, form actions based on the action network, execute the actions in the current state, and obtain rewards and the next state; S43. Based on the current state, action, reward, and next state, form a quadruple and construct a memory replay pool; S44. Randomly select quadruplets from the memory replay pool. Based on the selected quadruplets and the evaluation network, calculate the estimated target value. Based on the estimated target value, construct the loss function, minimize the loss function, and update the parameters of the evaluation network. Based on the estimated target value, use the policy gradient method to update the parameters of the action network. S45. Send the updated parameters of the evaluation network and the action network of each UAV to the central server. Use federated learning to form global parameters. Distribute the global parameters to the neural network of each UAV. Repeat steps S42 to S45 and record the number of rounds until the preset total round threshold is reached to obtain the trained deep reinforcement learning model. S46. Execute the trained deep reinforcement learning model to obtain the final drone trajectory.
2. The UAV-assisted relay method for emergency scenarios according to claim 1, characterized in that, Step S2 is as follows: S21. Based on the system model, calculate the age of the data information received by the base station and the total energy consumption of the UAV, and construct the total system cost function. S22. Take minimizing the total system cost as the objective function of the system model, and construct the constraints of the system model based on the objective function; S23. Based on the objective function and constraints, an optimization problem is formed.
3. The UAV-assisted relay method for emergency scenarios according to claim 2, characterized in that, Step S3 is as follows: S31. Based on the optimization problem, calculate the state information of the UAV and define it as the state of the UAV as a relay auxiliary emergency terminal. The status information includes the relative position of the drone and the emergency terminal, the workload of the emergency terminal, and the age of the emergency terminal's data information; S32. Based on the optimization problem, obtain the displacement coordinates of the UAV and define them as the actions of the UAV as a relay auxiliary emergency terminal. S33. Based on the optimization problem, construct a reward function, calculate the cumulative discount reward based on the reward function, and define it as the reward for the UAV as a relay auxiliary emergency terminal; S34. Based on the status, actions, and rewards of UAVs as relay auxiliary emergency terminals, a deep reinforcement learning model is constructed using a distributed resource allocation method.
4. The UAV-assisted relay method for emergency scenarios according to claim 1, characterized in that, Step S1 specifically involves: setting The drones operate on the same plane at a height of drones In the time slot The position is represented as: in } represents a drone, and the drone's working time is divided into Each time slot This represents a time slot, and the length of each time slot is... drones The movement constraint within a time slot is: in This indicates the maximum speed of the drone; drones The position constraints are: in This indicates the minimum safe distance between drones; In the time slot drones With emergency terminals The connection status is as follows: Where K = {1, 2, ..., k, ... K} represents the emergency terminal, and the coverage range constraint of the drone is: in, This indicates the coverage area where the drone performs its collection mission. Indicates in time slot Emergency Terminal and drones The distance is expressed as: in Indicates emergency terminal In the time slot Location; The emergency terminal unloads the task onto only one drone in a time slot. The emergency terminal selects the drone closest to it to unload the task, which can be expressed by the formula: in It is a sign function, when Its value is 1 when it is greater than 0, and 0 otherwise; In the time slot Emergency Terminal To drones The transmission rate is: in To be allocated to drones bandwidth, For emergency terminals The transmission power, The power of additive white Gaussian noise, Indicates time slot Emergency Terminal and drones Channel power gain; In the time slot Emergency Terminal Transmit the task to the drone The transmission delay is: in For emergency terminals In the time slot The amount of data to be uploaded; In the time slot drones The transmission rate to the ground base station is: in To be allocated to drones Transmission bandwidth to base station For drones The transmission power, The power of additive white Gaussian noise, Indicates time slot drones Channel power gain of ground base stations; In the time slot drones The transmission delay for transmitting the task to the base station is: in For drones In the time slot The amount of data to be uploaded; The energy consumption of a drone consists of kinetic energy consumption and the energy consumption of offloading the mission to a ground base station, within a time slot. drones The energy consumption of the motion is: in Indicates in time slot drones Flight power, in time slot drones The energy consumption of offloading the task to the ground base station is: 。 5. The UAV-assisted relay method for emergency scenarios according to claim 1, characterized in that, Step S3 specifically involves: The age information on emergency terminal k is: In the time slot drones The status information is: in, For the relative positions of other drones, in the time slot drones The action is: in For drones exist Displacement in the axial direction, For drones exist For displacement along the axis, the reward function is set as follows: in It is a constant used to adjust The value of is made positive. As punishment; The reward is defined as a cumulative discount bonus, expressed as: in, This represents the discount factor.
6. The UAV-assisted relay method for emergency scenarios according to claim 1, characterized in that, Also includes: S5. Evaluate the final drone trajectory and demonstrate its rationality.
7. The UAV-assisted relay method for emergency scenarios according to claim 6, characterized in that, Step S5 specifically involves: S51, obtaining the final drone trajectory data, and preprocessing the final drone trajectory data, including removing outliers, filling in missing values, and normalizing. S52. Based on the preprocessed final UAV trajectory data, calculate the UAV's motion performance indicators; S53. Machine learning methods are used to score the motion performance indicators of the drone, and visualization methods are used to display and compare the motion trajectory of the drone.
Citation Information
Patent Citations
Unmanned aerial vehicle network hovering position optimization method based on multi-agent deep reinforcement learning
CN111786713A
Method for maximizing multi-unmanned aerial vehicle architecture income
CN111884829A
