## 5 Numerical Simulation  
To assess the effectiveness of the proposed algorithm, MATLAB 2020a was employed in this study for algorithm simulation. The simulation scenario in this study depicts a hotspot area served by a UAV, wherein mobile users are randomly dispersed within the square area of 200 \(\times\) 200 m. The hovering altitude \(h\) of the UAV is set at 100 m. The channel adopts a probabilistic model, and the total communication bandwidth \(B\) available to the UAV is uniformly divided into \(M\) subchannels, each catering to a pair of NOMA users. The simulation parameters are configured as shown in Table 1. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Numerical Value** & **Parameter** & **Numerical Value** \\ \hline UAV bandwidth \(B\) & 5 Mhz & \(\eta_{LoS}\) & 3 dB \\ \hline Transmission & 1 W & \(\eta_{NLoS}\) & 23 dB \\ power \(P_{trans}\) & 1 W & \(\eta_{NLoS}\) & 23 dB \\ \hline Time duration \(T\) & 60 s & Content size \(Q\) & 15 Mbit \\ \hline Carrier frequency \(f_{c}\) & 2 Ghz & Content numbers \(F\) & 20 \\ \hline Noise power \(\delta^{2}\) & \(-\)114 dBm & Charging power \(P_{charge}\) & 1 W \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameter simulation table. To assess the effectiveness of the algorithm of this paper, Figure 3 compares the proposed algorithm with the algorithm of [16], the algorithm for random pairing of users, the algorithm for selecting the center of the region, and the algorithm that uses an equal power distribution among NOMA pairs. In the figure, it can be seen that the UAV gain obtained with the algorithm of this paper is higher compared to [16]. This is because in the cache placement and pricing phase, [16] uses a pricing method with a fixed initial price and there is no dynamic game process between the file pricing and the cache content, so the gain obtained from the cache is less than the algorithm in this paper. Secondly, the algorithm [16] adopts the traditional best-near best-far [27] (BNBF) user pairing method, while in this paper, by adopting the simulated annealing-based user pairing method, it can make the user delay smaller, meaning better user power allocation, and consequently UAV charges the user for a longer duration of time. In addition, [16] does not perform UAV location optimization, while in this paper, the particle swarm optimization algorithm is used to optimize the UAV location to improve the channel conditions between the user and the UAV, and thus higher gains can be achieved. In Figure 3, it can be observed that for the algorithm employing average power allocation in NOMA (without power optimization) between pairs, UAV revenue exhibits an increasing trend followed by a decrease as the number of users increases. This trend stems from the growing number of user pairs with increasing users, consequently amplifying the disparities in channel characteristics among pairs. However, the power allocation in NOMA between pairs is uniformly distributed without optimizing the power between channels. This results in significant differences in user transmission rates between different pairs, thereby increasing the overall system transmission delay. Consequently, this diminishes the proportion of charging time in the total service cycle, leading to a reduction in UAV revenue. Figure 4 presents a comparative graph of the revenue of two content providers under the caching schemes of [16] and the caching schemes proposed in this paper. Compared to the caching scheme of [16], the overall revenue of the two content providers in the caching scheme proposed in this paper is generally increased. When the user count is high, there is a significant disparity in the revenue of the two content providers under the algorithm of [16], with one provider having higher revenue and the other having lower revenue. In contrast, under the caching scheme proposed in this paper, in such scenarios, the revenue of the two content providers is similar and relatively high, thus ensuring a more balanced and stable outcome.