An unmanned aerial vehicle task offloading optimization and microgrid scheduling fusion modeling method
By constructing a three-in-one collaborative system of "computing-energy-communication" and a dual-timescale model, the problem of independent operation of UAV task offloading and microgrid scheduling is solved, realizing the deep integration of task offloading and microgrid, improving the system's task completion rate and renewable energy consumption rate, and is applicable to scenarios such as power grid inspection and disaster emergency response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING QINGLING TECH CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the unmanned aerial vehicle (UAV) task offloading and microgrid scheduling have not formed an effective coordination, the differences across time scales have not been properly handled, the robustness of uncertainty handling is insufficient, the support for diverse UAV types and charging methods is inadequate, and the task priority and emergency response mechanisms are lacking, resulting in low overall system energy efficiency, poor task execution reliability, and low renewable energy consumption rate.
A three-in-one collaborative system of "computing-energy-communication" is constructed, which introduces opportunity constraints, adopts a dual time scale model, supports multiple types of equipment and charging methods, and achieves deep integration of task offloading and microgrid scheduling through collaborative solution by Actor-Critic neural network and dual time scale MPC.
It improves inspection efficiency and system performance, significantly increases task completion rate, renewable energy consumption rate and overall economic efficiency, and is suitable for scenarios such as power grid inspection, substation testing and disaster emergency response.
Smart Images

Figure CN122114471A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of unmanned aerial vehicle (UAV) task offloading, mobile edge computing, deep reinforcement learning and microgrid energy management technology. Specifically, it relates to a fusion modeling method for UAV task offloading optimization and microgrid scheduling, which is applicable to UAV task execution and energy security in microgrid environments that include new energy sources and hybrid energy storage. Background Technology
[0002] With the rapid development of unmanned aerial vehicle (UAV) technology, UAVs are increasingly widely used in scenarios such as power grid inspection, transmission line monitoring, substation equipment testing, disaster emergency response, and remote logistics delivery. Due to their high mobility, wide coverage, and fast response speed, UAVs have become an important tool for improving the intelligent operation and maintenance level of power grids. However, UAV mission execution is highly dependent on computing resources and energy supply. On the one hand, complex inspection tasks (such as image recognition and fault diagnosis) generate a large amount of computing demand. Offloading these tasks through mobile edge computing (MEC) can significantly reduce onboard computing energy consumption and extend flight time. On the other hand, continuous operation of UAVs requires reliable energy support, especially in remote areas or areas without power grid coverage. Microgrids based on new energy sources such as photovoltaics and wind power have become ideal energy supply solutions.
[0003] Existing technologies have made progress in the fields of unmanned aerial vehicle (UAV) task offloading and microgrid scheduling. For example, some studies have proposed task offloading strategies based on deep reinforcement learning to optimize computational resource allocation and communication latency; other studies have developed robust optimization or stochastic programming methods to improve energy utilization efficiency, addressing the volatility of renewable energy sources in microgrids. However, these methods are mostly independent optimizations, with the task offloading side focusing on minimizing computational latency and energy consumption, and the microgrid scheduling side focusing on economy and power balance, lacking deep integration, leading to the following prominent problems:
[0004] (1) The task offloading and microgrid scheduling have not formed an effective coordination. As an emerging controllable load, the computing load of UAVs can participate in the peak shaving and valley filling of microgrids and improve the consumption of renewable energy. However, the existing technology has not established a two-way interactive mechanism of "computing-energy-communication", resulting in the siloing of resource utilization.
[0005] (2) Differences across time scales have not been properly addressed. Task offloading decisions are usually completed in seconds (involving real-time trajectory adjustment and offloading ratio), while microgrid scheduling is mostly in minutes or longer cycles (involving energy storage charging and discharging and new energy prediction). A single time scale model cannot take into account both rapid response and global planning.
[0006] (3) Insufficient robustness in handling uncertainty. The energy consumption of UAV inspection is significantly affected by weather (wind speed, solar radiation, temperature). The output of new energy sources has strong randomness. Traditional deterministic or simple stochastic models are complex to model and have a heavy computational burden, making it difficult to guarantee the reliability of task completion under high confidence levels.
[0007] (4) Insufficient support for diverse drone types and charging methods. Existing solutions are mostly designed for single-battery drones, ignoring the differences between heterogeneous models such as hydrogen fuel cell drones and hybrid electric drones; the charging methods are limited to single wired charging or simple wireless charging, without integrating battery quick swap (BS) and wireless fast charging (WFC), which limits the applicability of long-term inspection and emergency scenarios.
[0008] (5) Lack of task priority and emergency response mechanisms. High-priority tasks (such as sudden fault diagnosis) require priority to ensure computing and energy resources, but existing methods do not introduce task classification, resulting in delays or insufficient power supply for emergency tasks.
[0009] The aforementioned shortcomings result in low overall system energy efficiency, poor task execution reliability, and low renewable energy absorption rate, making it difficult to meet the needs of complex power grid inspection scenarios. Therefore, there is an urgent need for a fusion modeling method that integrates UAV task offloading optimization and microgrid scheduling. This method should address uncertainties by introducing opportunity constraints, achieve cross-scale collaboration through a dual-time-scale scheduling model, and support various UAV types and charging methods, thereby improving system robustness, economy, and inspection efficiency. Summary of the Invention
[0010] The core problem this invention aims to solve is how to achieve efficient utilization of computing resources, reliable energy supply, high renewable energy absorption rate, and overall system economy and stability in a microgrid environment where renewable energy output fluctuates significantly and drone mission energy consumption is significantly affected by weather uncertainties. This can be achieved through deep integration of drone mission offloading and microgrid scheduling, ensuring the reliability of high-priority inspection tasks while simultaneously achieving efficient utilization of computing resources, reliable energy supply, high renewable energy absorption rate, and overall system economy and stability. Traditional mission offloading methods often focus on minimizing computational latency and airborne energy consumption, while microgrid scheduling methods often focus on power balance and economic optimization. When operating independently, these methods struggle to handle differences across time scales and fail to effectively address uncertainties, heterogeneous drone types, and diverse charging needs, leading to delays in emergency tasks, energy waste, and low inspection reliability.
[0011] To address this, this invention proposes a fusion modeling method for unmanned aerial vehicle (UAV) task offloading optimization and microgrid scheduling. By constructing a three-in-one collaborative system of "computing-energy-communication", introducing opportunity constraints, adopting a dual-time-scale model, and supporting multiple types of equipment and charging methods, it achieves bidirectional coupling and cross-scale collaboration, thereby improving inspection efficiency and system performance.
[0012] A fusion modeling method for UAV mission offloading optimization and microgrid scheduling includes the following steps:
[0013] S1. Collect basic data and initialize the bidirectional coupling mechanism of "computing-energy-communication";
[0014] S2. Construct a layered architecture of "cloud-edge-device", deploy dual time-scale scheduling rules and establish a closed loop of information interaction;
[0015] S3. Collect relevant data, introduce opportunity constraints to handle uncertainty, and transform it into a deterministic equivalent form;
[0016] S4. Prioritize inspection tasks and perform local, edge, or cloud unloading according to priority;
[0017] S5. Equipped with multiple types of drones, featuring battery replacement and wireless fast charging systems to meet mission requirements;
[0018] S6. Establish a joint optimization model with the objective of minimizing the weighted total cost, incorporating core constraints;
[0019] S7. Use an Actor-Critic neural network and dual-timescale MPC to solve the problem, output the optimized action and train the network;
[0020] S8. Determine if the inspection task is completed. If completed, terminate; otherwise, update the data and return to S2 iteration.
[0021] Furthermore, step S1 includes the following sub-steps:
[0022] S1.1 Full-Dimensional Data Collection;
[0023] Historical and forecasted power output data for the microgrid side; capacity, charge / discharge efficiency, initial state of charge, base load curve, grid purchase and sale electricity price standard, and interactive power limit for the hybrid energy storage system; data on the UAV side including collection type, quantity, remaining power, and flight and computing energy consumption characteristics; inspection task list on the mission side, including computational load, deadline, and work area; and data on the communication side including channel quality and bandwidth limit.
[0024] S1.2 Initializes the "computing-energy-communication" bidirectional coupling mechanism;
[0025] The load power calculation model is as follows, shifting the load offloading direction to the microgrid:
[0026]
[0027] In the formula, N represents the total computing load power of the edge server at time t; N is the total number of drone nodes. Let represent the unloading ratio of drone i at time t, with a value range of [0,1], where 0 indicates no unloading and 1 indicates full unloading; The edge computing frequency assigned to drone i; The energy consumption coefficient of the edge server;
[0028] The charging load power model is as follows:
[0029]
[0030] In the formula, The total charging load power of all drones at time t; This represents the charging status of drone i at time t, with a value of 0 or 1, where 0 indicates not charging and 1 indicates charging. The charging power for drone i;
[0031] From the microgrid to the task offloading direction, the real-time available power of the microgrid serves as the upper bound of the energy constraint for the task offloading layer:
[0032]
[0033] In the formula, Let t be the real-time available power of the microgrid that can be used for task offloading, and t be the upper limit of the energy constraint for task offloading; Let t be the power generation capacity of the photovoltaic (PV) system. Let t be the power generation capacity of the wind turbine at time t; The maximum discharge power of the energy storage system at time t; Let t be the base load power of the microgrid.
[0034] Furthermore, step S2 includes the following sub-steps:
[0035] S2.1 constructs a layered architecture of "cloud-edge-device";
[0036] The terminal layer consists of various types of drones, the edge layer deploys MEC servers, wireless fast charging platforms and battery swapping stations, and the cloud layer deploys central servers.
[0037] End-layer drones every The edge layer reports status information, and the edge layer MEC server aggregates the status of multiple drones every [time period]. The cloud reports edge computing resource utilization, task queue length, and communication bandwidth utilization every [period]. The updated Actor-Critic network parameters, long-term MPC optimization results, and new energy output prediction curves are sent to the edge layer.
[0038] The status information reported by the drone includes its location coordinates, remaining battery power, current mission ID, and channel quality indicators.
[0039] S2.2 Deploys dual-time-scale scheduling rules;
[0040] Short timescale decision cycle =1 second, adapted for drone flight control and real-time unloading;
[0041] Long-term decision cycle =15 minutes, adaptable to microgrid energy storage dispatch and economic optimization;
[0042] The two time scales are coupled through state prediction and constraint propagation: the calculated load curve accumulated in the short time scale serves as the load prediction input for the long time scale, and the available energy storage capacity output in the long time scale serves as the energy constraint boundary for the short time scale.
[0043] Furthermore, step S3 includes the following sub-steps:
[0044] S3.1 Uncertainty Data Acquisition;
[0045] The weather side collects real-time monitoring data and historical fluctuation patterns of wind speed, solar radiation, and temperature; the task side compiles records of energy consumption deviations and flight path deviations from past inspection missions; and the computing side organizes load fluctuation data of other applications on the edge server.
[0046] S3.2 Based on the data collected in step S3.1, a probability distribution model is established to transform chance constraints into deterministic constraints;
[0047] Establish energy opportunity constraints to ensure that, at a given confidence level Under these conditions, the total energy consumption of the drone will not exceed the sum of the energy available from the microgrid and the drone's own remaining power:
[0048]
[0049] In the formula, For drone i at time t, random weather factors Impact on flight power; Let be the communication transmission power of UAV i at time t; Let be the locally computed power of UAV i at time t; To unload decision variables, This indicates that the task is offloaded to the edge or cloud. This indicates that the task is computed locally; Indicates the time step; The power that the microgrid can supply to the UAV system at time t; The charging power of drone i at time t; Let $\frac{i}{i}$ be the remaining battery power of drone $i$ at time $t$.
[0050] Establish computational resource opportunity constraints to ensure that, at a given confidence level, the total computational cost of tasks offloaded to the edge does not exceed the available computational resources of the edge servers:
[0051]
[0052] In the formula, Let be the computational cost of task i at time t; Let be the computation frequency of the edge server at time t; The percentage of edge server load occupied by other applications.
[0053] Furthermore, in step S4, the task priority is divided into P1, P2, and P3 levels, using a priority weight vector. To achieve differentiated allocation, a preemptive scheduling mechanism and a dynamic adjustment strategy based on urgency indicators are adopted.
[0054] Furthermore, step S5 includes the following sub-steps:
[0055] S5.1 configures heterogeneous drone clusters according to the needs of inspection scenarios;
[0056] Battery-powered drones are used for short-distance, high-frequency inspections, hydrogen fuel cell drones are used for long-distance, long-duration operations, and hybrid electric drones are suitable for emergency inspections in complex terrains.
[0057] S5.2 establishes dedicated energy consumption models for different models;
[0058] Battery-powered drones calculate the total energy consumption of flight, computing, and communication; hydrogen fuel cell drones distinguish between the steady-state power consumption of fuel cells and the transient power consumption of auxiliary lithium batteries.
[0059] S5.3 is equipped with a charging support system;
[0060] The battery swapping station calculates the pre-charge battery demand based on the number of drones, mission frequency, and single battery endurance, and adopts a priority queue charging strategy to charge the battery with the lowest state of charge first.
[0061] The wireless fast charging platform is deployed in inspection hotspots, and power transmission is optimized considering the distance attenuation effect. By calculating the comprehensive cost of flight distance and charging time, the optimal charging platform is matched for the drone.
[0062] The drone dynamically selects the charging method based on the remaining battery power and mission requirements: when the remaining battery power is below 20%, it prioritizes battery replacement; when the remaining battery power is between 20% and 40% and the mission is urgent, it selects wireless fast charging; and when the battery power is sufficient, it completes charging and replenishment during mission intervals.
[0063] Furthermore, in step S6, the overall objective function of the joint optimization model is to minimize the overall system operating cost, which includes four parts: UAV energy consumption cost, microgrid operating cost, task delay penalty, and constraint violation penalty.
[0064]
[0065] In the formula, This is a weighting coefficient for the energy consumption cost of drones; Let i be the flight energy consumption of the drone at time t; Let be the computational energy consumption of UAV i at time t; The energy consumption for charging drone i at time t; This is the weighting coefficient for microgrid operating costs; The generation cost of the microgrid at time t includes the operation and maintenance cost of new energy sources and the depreciation cost of energy storage. This represents the cost of purchasing and selling electricity between the microgrid and the main grid at time t, which is positive when purchasing electricity and negative when selling electricity. This is the delay penalty weighting coefficient; The actual completion delay of task i at time t; The maximum allowable delay for task i; To constrain the penalty weighting coefficient for violations; Let t be the constraint violation amount at time t.
[0066] Furthermore, in step S7, the Actor-Critic neural network includes an input layer, two hidden layers, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses the Tanh activation function. The dual-timescale MPC achieves global optimization through a rolling optimization mechanism, and the two work together through information transmission.
[0067] Furthermore, in step S8, the conditions for determining task completion include: the task is fully executed and the result is returned; the task completion rate is ≥95%; the drone returns safely and the remaining battery power meets the safety margin.
[0068] If the task is not completed, perform a full update operation: update system status data, including drone location, battery level, task progress, energy storage charge status, and actual output of new energy sources; update environmental data, collect the latest weather parameters and correct the prediction model; update network parameters, store the latest operational experience in the replay buffer, and complete the Actor-Critic neural network training; update the prediction model, and correct the new energy output and load prediction model based on the actual operational errors.
[0069] After the update is complete, return to S2 to re-execute the dual-timescale scheduling until the task is completed or the maximum number of iterations is reached.
[0070] Beneficial effects:
[0071] This invention effectively solves the problem of independent operation of task offloading and microgrid scheduling through a multi-dimensional collaborative mechanism, taking into account both real-time response and global planning. It can be widely used in scenarios such as power grid inspection, substation detection, and disaster emergency response, significantly improving the system's task completion rate, renewable energy consumption rate, and overall economic efficiency.
[0072] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0073] Figure 1 This is a flowchart of a fusion modeling method for unmanned aerial vehicle (UAV) mission offloading optimization and microgrid scheduling according to the present invention;
[0074] Figure 2 Modeling a fusion of UAV mission offloading optimization and microgrid scheduling. Detailed Implementation
[0075] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.
[0076] The proposed modeling method for integrating UAV mission offloading optimization and microgrid scheduling, as described in this invention, Figure 1 As shown, the core is to construct a three-in-one collaborative system of "computing-energy-communication," achieving deep coupling between efficient UAV mission execution and the economical and stable operation of microgrids through layered architecture deployment, dual-time-scale scheduling, uncertainty-robust control, and priority resource allocation. The implementation of this framework must follow a complete process of "data acquisition-architecture building-constraint modeling-policy execution-collaborative solving-iterative optimization," as follows... Figure 2 As shown, the specific steps are as follows:
[0077] S1. Collect basic data and initialize the bidirectional coupling mechanism of "computing-energy-communication";
[0078] S1.1 Full-Dimensional Data Collection;
[0079] First, comprehensive data collection must be completed. On the microgrid side, historical and predicted power output data for new energy sources such as photovoltaics and wind power need to be obtained, along with parameters such as capacity, charge and discharge efficiency, and initial state of charge of hybrid energy storage systems, as well as base load curves, grid purchase and sale electricity price standards, and interactive power limits. On the drone side, data on drone type, quantity, remaining power, and flight and computing energy consumption characteristics need to be collected. On the task side, a clear inspection task list needs to be defined, including information such as computational load, deadline, and work area. On the communication side, data on channel quality and bandwidth limits need to be collected.
[0080] S1.2 Based on the above data, initialize the "computing-energy-communication" bidirectional coupling mechanism;
[0081] On the one hand, a mapping is established between the computing load and charging load of drones and the scheduling needs of microgrids. The computing load is determined based on the task offloading ratio and the allocation of edge computing resources, while the charging load is calculated based on the charging status and charging power of drones. On the other hand, the real-time available power of the microgrid is used as the energy constraint for task offloading. Combined with electricity price signals, economic incentives are formed. During periods of high renewable energy output, more tasks are encouraged to be offloaded, while during periods of low electricity prices, computing-intensive tasks are guided to shift to the edge or cloud. A two-way closed-loop feedback is achieved through state sharing and constraint transmission.
[0082] The load power calculation model is as follows, shifting the load offloading direction to the microgrid:
[0083]
[0084] In the formula, N represents the total computing load power of the edge server at time t; N is the total number of drone nodes. Let represent the unloading ratio of drone i at time t, with a value range of [0,1], where 0 indicates no unloading and 1 indicates full unloading; The edge computing frequency assigned to drone i; The energy consumption coefficient of the edge server;
[0085] The charging load power model is as follows:
[0086]
[0087] In the formula, The total charging load power of all drones at time t; This represents the charging status of drone i at time t, with a value of 0 or 1, where 0 indicates not charging and 1 indicates charging. The charging power for drone i;
[0088] From the microgrid to the task offloading direction, the real-time available power of the microgrid serves as the upper bound of the energy constraint for the task offloading layer:
[0089]
[0090] In the formula, Let t be the real-time available power of the microgrid that can be used for task offloading, and t be the upper limit of the energy constraint for task offloading; Let t be the power generation capacity of the photovoltaic (PV) system. Let t be the power generation capacity of the wind turbine at time t; The maximum discharge power of the energy storage system at time t; Let t be the base load power of the microgrid.
[0091] when When the levels are high, the system incentivizes more tasks to be offloaded to the edge to absorb renewable energy; electricity price signals As an economic incentive for offloading decisions, periods of low electricity prices guide the migration of computationally intensive tasks to the edge or cloud. Two-way coupling achieves closed-loop feedback through state sharing and constraint propagation, ensuring that task offloading decisions and microgrid scheduling are coordinated at the energy supply and demand level.
[0092] S2. Construct a layered architecture of "cloud-edge-device", deploy dual time-scale scheduling rules and establish a closed loop of information interaction;
[0093] S2.1 constructs a layered architecture of "cloud-edge-device";
[0094] like Figure 2 As shown, a three-tier hardware architecture is constructed: the edge layer consists of various types of drones, integrating a status monitoring module to collect information such as location, battery level, and mission progress in real time; the edge layer deploys mobile edge computing (MEC) servers, a wireless fast charging platform, and battery swapping stations, responsible for data aggregation and real-time decision-making; and the cloud layer deploys a central server to undertake global optimization and model training tasks.
[0095] Establish a standardized information exchange mechanism: Every second, the edge layer drone reports status data to the edge layer, including location coordinates, remaining battery power, current task ID, and channel quality; every 5 seconds, the edge layer summarizes information such as computing resource utilization and task queue length and reports it to the cloud layer; every 15 minutes, the cloud layer sends updated network parameters, optimization plans, and new energy prediction curves to the edge layer.
[0096] S2.2 Deploys dual-time-scale scheduling rules;
[0097] Short-term timescales (1-second cycle) focus on real-time unloading decisions, charging selection, and trajectory adjustments for drones, adapting to second-level response requirements. Long-term timescales (15-minute cycle) emphasize microgrid energy storage charging and discharging planning and grid power purchase and sale planning, meeting overall economic optimization goals. Cross-scale coupling is achieved through data interaction. The calculated load curve at the short-term timescale is processed by moving average and used as the input for load forecasting at the long-term timescale. The available energy storage capacity output at the long-term timescale is converted into the energy constraint boundary at the short-term timescale through linear interpolation.
[0098] S3. Collect relevant data, introduce opportunity constraints to handle uncertainty, and transform it into a deterministic equivalent form;
[0099] S3.1 Uncertainty Data Acquisition;
[0100] Specialized data collection is conducted to address uncertainties in system operation. The weather side collects real-time monitoring data and historical fluctuation patterns of wind speed, solar radiation, and temperature; the task side compiles records of energy consumption deviations and flight path deviations from past inspection missions; and the computing side organizes load fluctuation data from other applications on the edge server.
[0101] S3.2 Based on the data collected in step S3.1, a probability distribution model is established to transform chance constraints into deterministic constraints: For energy uncertainty, typical weather scenarios are generated through scenario analysis to ensure that, at a 95% confidence level, the total energy consumption of the drone does not exceed the sum of the microgrid's power supply and its own remaining power; For computing resource uncertainty, conservative constraints are set based on the historical peak load of the edge server to avoid server overload caused by unloading tasks, and the robustness and economy of the system are balanced by reasonably adjusting the confidence level.
[0102] Because the energy consumption of drones in daily inspection missions is affected by factors such as weather changes and flight path deviations during actual operation, there is a certain degree of uncertainty. To address the uncertainty of drone flight energy consumption due to weather conditions, an energy opportunity constraint is established to ensure energy consumption within a given confidence level. Under these conditions, the total energy consumption of the drone will not exceed the sum of the energy available from the microgrid and the drone's own remaining power:
[0103]
[0104] In the formula, For drone i at time t, random weather factors Impact on flight power; Let be the communication transmission power of UAV i at time t; Let be the locally computed power of UAV i at time t; To unload decision variables, This indicates that the task is offloaded to the edge or cloud. This indicates that the task is computed locally; Indicates the time step; The power that the microgrid can supply to the UAV system at time t; The charging power of drone i at time t; Let be the remaining battery power of drone i at time t. This opportunity constraint ensures that, given a confidence level, the microgrid system can meet the energy requirements of the drone's daily inspection tasks with a high probability, thereby avoiding inspection task interruptions due to insufficient energy.
[0105] To address the uncertainty of edge computing resources, a computing resource opportunity constraint is established to ensure that, at a given confidence level, the total computational load of tasks offloaded to the edge does not exceed the available computing resources of the edge server.
[0106]
[0107] In the formula, Let be the computational cost of task i at time t; Let be the computation frequency of the edge server at time t; This sets the percentage of edge server load that other applications consume. This constraint ensures that the total execution time of offloading tasks does not exceed the time step. To avoid overloading edge servers.
[0108] S4. Prioritize inspection tasks and perform local, edge, or cloud unloading according to priority;
[0109] Based on the urgency and importance of the tasks, inspection tasks are divided into three levels: P1 (sudden fault diagnosis, urgent hidden danger investigation), P2 (routine equipment inspection), and P3 (environmental data collection), with priority weight vectors set, and P1 having the highest weight. A priority scheduling mechanism is established: edge server resource allocation aims to "maximize the weighted task completion rate," strictly adhering to the total computing resource limit, task deadline constraints, and minimum resource guarantee requirements. A preemptive scheduling strategy is implemented: when a P1 task arrives and edge resources are full, the preemption benefit is calculated. If the benefit is positive, the current low-priority task is interrupted, its progress is recorded, and it is re-added to the queue, with resources prioritized for allocation to high-priority tasks. Simultaneously, a task urgency index is set; when the ratio of the remaining time to the required execution time is less than 1.2, the task priority is automatically increased. Differentiated offloading is performed based on priority: P1 level tasks are given priority in edge computing resources, and are offloaded to the cloud when resources are insufficient; P2 level tasks are dynamically balanced between edge and local computing, taking into account latency and energy consumption; P3 level tasks prioritize local computing, and are offloaded to the edge only when local resources are insufficient.
[0110] In step S4, the mathematical model for task priority scheduling introduces a priority weight vector. Achieve differentiated resource allocation. The edge server computing resource allocation optimization problem is to maximize the weighted task completion rate, with constraints including a limit on the total amount of computing resources. Task deadline constraints Minimum resource guarantee The preemptive scheduling mechanism is implemented through a dynamic priority queue: when a high-priority task arrives, if the edge resources are already full, the system calculates the preemption benefit. If the reward is positive, the current low-priority task is interrupted, resources are allocated to high-priority tasks, and the interrupted task is re-added to the queue with its progress recorded. A dynamic task deadline adjustment mechanism defines an urgency index. ,when When the priority is less than 1.2, the task priority is increased by one level to ensure that tasks close to the deadline are completed first.
[0111] S5. Equipped with multiple types of drones, featuring battery replacement and wireless fast charging systems to meet mission requirements;
[0112] Heterogeneous drone swarms are configured according to the needs of inspection scenarios: battery-powered drones are used for short-distance, high-frequency inspections; hydrogen fuel cell drones are used for long-distance, long-duration operations; and hybrid electric drones are suitable for emergency inspections in complex terrain. Dedicated energy consumption models are established for different models. Battery-powered drones calculate the total energy consumption for flight, computing, and communication; hydrogen fuel cell drones differentiate between the steady-state power of the fuel cell and the transient power consumption of the auxiliary lithium battery. A supporting charging support system is constructed: battery swapping stations calculate the pre-charge battery demand based on the number of drones, mission frequency, and single-battery endurance, employing a priority queue charging strategy to charge batteries with the lowest state of charge. Wireless fast charging platforms are deployed in inspection hotspots, optimizing power transmission considering distance attenuation effects. By calculating the combined cost of flight distance and charging time, the optimal charging platform is matched for each drone. Drones dynamically select charging methods based on remaining battery power and mission requirements: battery swapping is prioritized when remaining battery power is below 20%; wireless fast charging is selected when remaining battery power is between 20% and 40% and the mission is urgent; and charging is completed during mission intervals when battery power is sufficient.
[0113] The total energy consumption of battery-powered drones includes flight energy consumption, local computing energy consumption, and communication energy consumption. The flight power model considers hovering power, induced power, and shape drag power. The energy consumption model for hydrogen fuel cell drones is as follows: The fuel cell provides steady-state power, while the auxiliary lithium battery provides transient power. The inventory management model for the battery swapping system is: pre-charged battery demand. The battery charging schedule employs a priority queue, prioritizing the charging of the battery with the lowest SOC. The power transfer model of the wireless fast charging system considers distance attenuation effects, and the charging platform selection strategy is achieved by solving an optimal matching problem, with the objective of minimizing the total cost of the drone flying to the charging platform.
[0114] S6. Establish a joint optimization model with the objective of minimizing the weighted total cost, incorporating core constraints;
[0115] A joint optimization model is established with the goal of minimizing the overall system operating cost. The total cost encompasses four parts: UAV energy consumption cost, microgrid operating cost, task latency penalty, and constraint violation penalty. Weighting coefficients are set to emphasize different objectives in different scenarios: increasing the latency penalty weight in emergency scenarios and increasing the microgrid cost weight in economic operation scenarios. Core constraints are configured: power balance constraint requires that the sum of photovoltaic, wind power output, grid interaction power, and energy storage discharge power equals the sum of base load, UAV charging power, edge computing power, and line losses; energy storage constraint limits the state of charge to the 20%-80% range, and charging and discharging power does not exceed the equipment's rated value; computing resource constraint ensures that the total allocated frequency of edge servers does not exceed the rated capacity; UAV constraints set an upper limit on flight speed and a safety margin for remaining power.
[0116] In step S6, the overall objective function of the joint optimization model is to minimize the overall system operating cost, which includes four parts: UAV energy consumption cost, microgrid operating cost, task delay penalty, and constraint violation penalty.
[0117]
[0118] In the formula, This is a weighting coefficient for the energy consumption cost of drones; Let i be the flight energy consumption of the drone at time t; Let be the computational energy consumption of UAV i at time t; The energy consumption for charging drone i at time t; This is the weighting coefficient for microgrid operating costs; The generation cost of the microgrid at time t includes the operation and maintenance cost of new energy sources and the depreciation cost of energy storage. This represents the cost of purchasing and selling electricity between the microgrid and the main grid at time t, which is positive when purchasing electricity and negative when selling electricity. This is the delay penalty weighting coefficient; The actual completion delay of task i at time t; The maximum allowable delay for task i; To constrain the penalty weighting coefficient for violations; Let t be the constraint violation quantity (including power balance violation, SOC overrun, etc.).
[0119] The power balance constraint of the microgrid is strictly satisfied at every time step t:
[0120]
[0121] In the formula, Photovoltaic power generation capacity, For wind power, This represents the power exchange between the power grid and the grid (positive for purchasing electricity and negative for selling electricity). The discharge power of energy storage unit i The number of energy storage units. Based on base load power, The charging power of drone i, For edge computing server power, This refers to line loss power.
[0122] S7. Use an Actor-Critic neural network and dual-timescale MPC to solve the problem, output the optimized action and train the network;
[0123] A joint optimization problem is solved using an Actor-Critic deep reinforcement learning network and dual-timescale model predictive control. The Actor-Critic network handles real-time decision-making on short timescales, including second-level responses such as UAV unloading decisions, charging scheduling, and trajectory adjustments. The model predictive control handles global optimization on long timescales, including minute-level planning such as microgrid energy storage scheduling and grid power purchase and sale plans. The Actor network's input layer receives state information including UAV position, remaining battery power, task queue, microgrid power, and energy storage state of charge, and uses two hidden layers, each containing 256 neurons and employing the ReLU activation function. The output layer uses the Tanh activation function to normalize actions and map them to actual action ranges such as unloading ratio, charging power, and flight speed. The Critic network includes state input branches and action input branches, and the output Q-value, i.e., the state-action value function, is output after the two branches are fused. The Critic network uses the mean squared error of the temporal difference error as the loss function and is trained using sampling through an empirical replay buffer. The target network updates parameters using a soft update method to improve training stability. The Actor network employs a deterministic policy gradient method to update parameters, optimizing the policy along the direction of increasing Q-value to maximize cumulative rewards. The reward function comprehensively considers energy consumption, latency, cost, and constraint violations, with weight coefficients dynamically adjusted according to the scenario after normalization. The dual-timescale model predictive control optimizes the microgrid's energy storage charging and discharging power and grid power purchase and sale power on a long-term scale, aiming to minimize operating costs within the prediction time domain. Constraints include power balance, dynamic energy storage state of charge, charging and discharging power limits, grid power purchase and sale upper limits, and mutual exclusion constraints. A rolling optimization mechanism solves the optimization problem and executes the decision for the first time step in each control cycle. In the next control cycle, it updates the state and prediction data based on actual operating data and re-solves the problem to form a closed-loop feedback. Dual-timescale collaboration is achieved through information transmission: the calculated load curve output from the short-term scale is converted into the long-term load prediction input through moving average filtering; the available energy storage capacity and grid power purchase plan output from the long-term scale are converted into the energy constraint boundary of the short-term scale through linear interpolation.
[0124] S8. Determine whether the inspection task is completed. If it is completed, terminate the process; otherwise, update the data and return to the S2 iteration.
[0125] The conditions for task completion include all inspection tasks have been executed and results returned, the task completion rate reaches a set threshold (e.g., 95%), all drones safely return to the base station, and remaining power meets the safety margin. Statistical report calculation indicators include total energy consumption, average latency, total cost, task completion rate, and renewable energy consumption rate. If a task is not completed, the system performs status updates and parameter adjustments. This includes updating system status data such as the drone's current location, remaining power, task queue, energy storage state of charge, and actual renewable energy output; updating environmental data by collecting the latest wind speed, solar radiation, and temperature measurements and correcting prediction model parameters; updating network parameters by storing the latest empirical tuples in the replay buffer and performing Actor-Critic network training; and updating the model prediction and control prediction model by correcting the renewable energy output prediction model and load prediction model based on actual operating data and prediction errors. The system then returns to step S2 for iteration, re-executing dual-timescale scheduling based on the updated status data until all tasks are completed or the maximum number of iterations is reached. After iteration terminates, the system outputs the final scheduling scheme and performance indicators, completing one full scheduling cycle.
[0126] This framework effectively solves the problem of independent operation of task offloading and microgrid scheduling through a multi-dimensional collaborative mechanism, taking into account both real-time response and global planning. It can be widely used in scenarios such as power grid inspection, substation detection, and disaster emergency response, significantly improving the system's task completion rate, renewable energy consumption rate, and overall economic efficiency.
[0127] It is hereby declared that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A fusion modeling method for unmanned aerial vehicle (UAV) task offloading optimization and microgrid scheduling, characterized in that, Includes the following steps: S1. Collect basic data and initialize the "computing-energy-communication" bidirectional coupling mechanism; S2. Construct a layered architecture of "cloud-edge-device", deploy dual time-scale scheduling rules and establish a closed loop of information interaction; S3. Collect relevant data, introduce opportunity constraints to handle uncertainty, and transform it into a deterministic equivalent form; S4. Prioritize inspection tasks and perform local, edge, or cloud unloading according to priority; S5. Equipped with multiple types of drones, featuring battery replacement and wireless fast charging systems to meet mission requirements; S6. Establish a joint optimization model with the objective of minimizing the weighted total cost, incorporating core constraints; S7. Use an Actor-Critic neural network and dual-timescale MPC to solve the problem, output the optimized action and train the network; S8. Determine if the inspection task is completed. If completed, terminate; otherwise, update the data and return to S2 iteration.
2. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 1, characterized in that, Step S1 includes the following sub-steps: S1.1 Full-Dimensional Data Collection; Historical and forecasted power output data for the microgrid side; capacity, charge and discharge efficiency, initial state of charge, base load curve, grid purchase and sale electricity price standard and interactive power limit for the hybrid energy storage system; data collection type, quantity, remaining power, and flight and computing energy consumption characteristics for the UAV side; inspection task list for the mission side, including computational load, deadline, and work area. Data such as channel quality and bandwidth limit on the communication side; S1.2 Initializes the "computing-energy-communication" bidirectional coupling mechanism; The load power calculation model is as follows, shifting the load offloading direction to the microgrid: In the formula, N represents the total computing load power of the edge server at time t; N is the total number of drone nodes. Let represent the unloading ratio of drone i at time t, with a value range of [0,1], where 0 indicates no unloading and 1 indicates full unloading; The edge computing frequency assigned to drone i; The energy consumption coefficient of the edge server; The charging load power model is as follows: In the formula, The total charging load power of all drones at time t; This represents the charging status of drone i at time t, with a value of 0 or 1, where 0 indicates not charging and 1 indicates charging. The charging power for drone i; From the microgrid to the task offloading direction, the real-time available power of the microgrid serves as the upper bound of the energy constraint for the task offloading layer: In the formula, Let t be the real-time available power of the microgrid that can be used for task offloading, and t be the upper limit of the energy constraint for task offloading; Let t be the power generation capacity of the photovoltaic (PV) system. Let t be the power generation capacity of the wind turbine; The maximum discharge power of the energy storage system at time t; Let t be the base load power of the microgrid.
3. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 2, characterized in that, Step S2 includes the following sub-steps: S2.1 constructs a layered architecture of "cloud-edge-device"; The terminal layer consists of various types of drones, the edge layer deploys MEC servers, wireless fast charging platforms and battery swapping stations, and the cloud layer deploys central servers. End-layer drones every The edge layer reports status information, and the edge layer MEC server aggregates the status of multiple drones every [time period]. The cloud reports edge computing resource utilization, task queue length, and communication bandwidth utilization every [period]. The updated Actor-Critic network parameters, long-term MPC optimization results, and new energy output prediction curves are sent to the edge layer. The status information reported by the drone includes its location coordinates, remaining battery power, current mission ID, and channel quality indicators. S2.2 Deploys dual-time-scale scheduling rules; Short timescale decision cycle =1 second, adapted for drone flight control and real-time unloading; Long-term decision cycle =15 minutes, adaptable to microgrid energy storage dispatch and economic optimization; The two time scales are coupled through state prediction and constraint propagation: the calculated load curve accumulated in the short time scale serves as the load prediction input for the long time scale, and the available energy storage capacity output in the long time scale serves as the energy constraint boundary for the short time scale.
4. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 3, characterized in that, Step S3 includes the following sub-steps: S3.1 Uncertainty Data Acquisition; The weather side collects real-time monitoring data and historical fluctuation patterns of wind speed, solar radiation, and temperature; the task side compiles records of energy consumption deviations and flight path deviations from past inspection missions; and the computing side organizes load fluctuation data of other applications on the edge server. S3.2 Based on the data collected in step S3.1, a probability distribution model is established to transform chance constraints into deterministic constraints; Establish energy opportunity constraints to ensure that, at a given confidence level Under these conditions, the total energy consumption of the drone will not exceed the sum of the energy available from the microgrid and the drone's own remaining power: In the formula, For drone i at time t, random weather factors Impact on flight power; Let be the communication transmission power of UAV i at time t; Let be the locally computed power of UAV i at time t; To unload decision variables, This indicates that the task is offloaded to the edge or cloud. This indicates that the task is computed locally; Indicates the time step; The power that the microgrid can supply to the UAV system at time t; The charging power of drone i at time t; Let $\frac{i}{i}$ be the remaining battery power of drone $i$ at time $t$. Establish computational resource opportunity constraints to ensure that, at a given confidence level, the total computational cost of tasks offloaded to the edge does not exceed the available computational resources of the edge servers: In the formula, Let be the computational cost of task i at time t; Let be the computation frequency of the edge server at time t; The percentage of edge server load occupied by other applications.
5. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 4, characterized in that: In step S4, task priorities are divided into P1, P2, and P3 levels, using a priority weight vector. To achieve differentiated allocation, a preemptive scheduling mechanism and a dynamic adjustment strategy based on urgency indicators are adopted.
6. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 5, characterized in that, Step S5 includes the following sub-steps: S5.1 configures heterogeneous drone clusters according to the needs of inspection scenarios; Battery-powered drones are used for short-distance, high-frequency inspections, hydrogen fuel cell drones are used for long-distance, long-duration operations, and hybrid electric drones are suitable for emergency inspections in complex terrains. S5.2 establishes dedicated energy consumption models for different models; Battery-powered drones calculate the total energy consumption of flight, computing, and communication; hydrogen fuel cell drones distinguish between the steady-state power consumption of fuel cells and the transient power consumption of auxiliary lithium batteries. S5.3 is equipped with a charging support system; The battery swapping station calculates the pre-charge battery demand based on the number of drones, mission frequency, and single battery endurance, and adopts a priority queue charging strategy to charge the battery with the lowest state of charge first. The wireless fast charging platform is deployed in inspection hotspots, and power transmission is optimized considering the distance attenuation effect. By calculating the comprehensive cost of flight distance and charging time, the optimal charging platform is matched for the drone. The drone dynamically selects the charging method based on the remaining battery power and mission requirements: when the remaining battery power is below 20%, it prioritizes battery replacement; when the remaining battery power is between 20% and 40% and the mission is urgent, it selects wireless fast charging; and when the battery power is sufficient, it completes charging and replenishment during mission intervals.
7. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 6, characterized in that, In step S6, the overall objective function of the joint optimization model is to minimize the overall system operating cost, which includes four parts: UAV energy consumption cost, microgrid operating cost, task delay penalty, and constraint violation penalty. In the formula, This is a weighting coefficient for the energy consumption cost of drones; Let i be the flight energy consumption of the drone at time t; Let be the computational energy consumption of UAV i at time t; The energy consumption for charging drone i at time t; This is the weighting coefficient for microgrid operating costs; The generation cost of the microgrid at time t includes the operation and maintenance cost of new energy sources and the depreciation cost of energy storage. This represents the cost of purchasing and selling electricity between the microgrid and the main grid at time t, which is positive when purchasing electricity and negative when selling electricity. This is the delay penalty weighting coefficient; The actual completion delay of task i at time t; The maximum allowable delay for task i; To constrain the penalty weighting coefficient for violations; Let t be the constraint violation amount at time t.
8. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 7, characterized in that, In step S7, the Actor-Critic neural network includes an input layer, two hidden layers, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses the Tanh activation function. The dual-timescale MPC achieves global optimization through a rolling optimization mechanism, and the two work together through information transmission.
9. The fusion modeling method for UAV mission offloading optimization and microgrid scheduling according to claim 8, characterized in that, In step S8, the task completion determination conditions include full task execution and result return, task completion rate ≥ 95%, and drone safe return with remaining battery power meeting the safety margin. If the task is not completed, perform a full update operation: update system status data, including drone location, battery level, task progress, energy storage charge status, and actual output of new energy sources; Update environmental data, collect the latest weather parameters and correct the prediction model; update network parameters, store the latest operational experience in the replay buffer, and complete the Actor-Critic neural network training; update the prediction model and correct the new energy output and load prediction model based on actual operational errors. After the update is complete, return to S2 to re-execute the dual-timescale scheduling until the task is completed or the maximum number of iterations is reached.