## 3 System Model and Problem Description
### Task Offloading Optimization for User Device  
Firstly, we discuss the \(\eta_{u}(t)\) optimization problem P3 of the task offloading rate of user equipment \(u\) in time slot \(t\) under the condition of a fixed UAV trajectory. This sub-problem corresponds to the constraint condition C6 in P1, and its expression is as follows:  
\[\text{P3}:\binom{max}{\eta_{u}(t)}f_{1}(\gamma)s.t.\text{ C6} \tag{23}\]  
where \(f_{1}(\gamma)\) is related to \(\gamma\).  
\[f_{1}(\gamma)=\sum_{t=1}^{N}\sum_{u=1}^{U}I_{u}(t)-\gamma\sum_{t=1}^{N}\sum_{u =1}^{U}\Big{(}E_{u}^{rec}(t)+E_{u}^{comp}(t)\Big{)} \tag{24}\]  
P3 is essentially a complex combinatorial optimization problem, and traditional mathematical programming methods are difficult to effectively solve. This paper proposes an optimization scheme based on the genetic algorithm (GA), which dynamically adjusts the offloading rate through a biomimetic evolution mechanism. The specific improvements are as follows:  
1. Design of fitness function Maximizing \(f_{1}(\gamma)\) requires balancing data processing and energy consumption costs, and when the UAV trajectory is fixed, the flight energy consumption \(E^{fly}(t)\) is pre-calculated by trajectory planning and treated as a constant term, so \(f_{1}(\gamma)\) can be directly used as the fitness function.
2. Encoding and population initialization Using a real number encoding strategy, chromosome individuals are represented by \(U^{\star}N\)-dimensional vectors, corresponding to the offloading rates of \(U\) user devices in \(N\) time slots. By using a balanced initialization strategy based on preset initial values \(\eta_{u}(t)\in(0,1)\) to generate an initial population, ensuring population diversity, the size of population \(N_{p1}\) needs to balance search efficiency and computational costs.
3. Genetic manipulation design Selection operation: Adopting a tournament selection strategy, randomly selecting \(k\) individuals from the population and retaining the one with the highest fitness to enter the next generation. This strategy can maintain selection pressure while avoiding excessive dependence on extreme fitness values in roulette wheel selection.  
Cross operation: Using arithmetic crossover to generate offspring individuals based on the characteristics of continuous variables. Let the individual parents be \(\eta_{1}\) and \(\eta_{2}\), the individual child be \(\eta^{\prime}\), generated by \(\eta\prime=\alpha_{1}\eta_{1}+(1-\alpha_{1})\eta_{2}\), where \(\alpha_{1}\in[0,1]\) is a random weight, to enhance global exploration ability.  
Mutation operation: Non-uniform Gaussian mutation is used. To the gene \(\eta_{u}(t)\), perturbation \(\eta_{u}(t)^{\prime}=\eta_{u}(t)+\text{N}(0,\sigma_{t}^{2})\) is applied, where \(\sigma_{t}\) is the mutation intensity parameter, followed by boundary repair (truncation when exceeded). The mutation rate \(P_{m}\) decreases adaptively with the number of iterations, encouraging diversity in the initial stage and strengthening the local search in the later stage.  
Constraint handling and computation acceleration  
Constraint C6 is guaranteed through a dual mechanism of direct restriction and post-mutation repair during the encoding stage. To reduce computational complexity, duplicate terms in the objective function can be precomputed and cached, and parallelized for fitness evaluation.