# Blockchain-Based UAV-Assisted Mobile Edge Computing for Dual Game Resource Allocation
## 5 Conclusions  
In this paper, a two-stage optimization algorithm (DSO algorithm) based on the combination of a Stackelberg game and an auction mechanism is proposed for the problem of resource allocation among servers, drones, and users, and blockchain technology is introduced to enhance the security and transparency of the resource transaction process. The algorithm first optimizes the resource pricing and allocation between the server and the UAV through the Stackelberg game, and then further optimizes the resource transaction between the UAV and the user through the auction mechanism, which realizes the collaborative optimization between multiple levels and multiple subjects. In order to verify the superiority of the DSO algorithm, we designed and carried out a series of comparative experiments from the key indexes such as user utility function, utility function optimization effect and algorithm convergence speed. The experimental results show that the DSO algorithm significantly outperforms the traditional resource allocation algorithm in several performance metrics. Specifically, the experimental data on the change in utility function over time show that the DSO algorithm is able to achieve higher utility values with fewer iterations and maintain the stability of the results in a dynamic environment. Meanwhile, the comparison results of convergence speed show that the DSO algorithm converges significantly faster than other baseline algorithms, and exhibits significant advantages in resource allocation efficiency and computational complexity. This indicates that the DSO algorithm not only allocates resources more efficiently, but also realizes the global optimal solution more quickly in complex environments, thus effectively improving the response speed and service quality of the system. In future research on UAV-assisted MEC security frameworks, possible directions of work include achieving adaptive resource allocation through machine learning to improve the system's dynamic adaptive capability; using blockchain technology to solve scalability issues, optimizing the consensus mechanism and combining with second-layer solutions to improve throughput; enhancing privacy protection and security, such as combining differential privacy and quantum cryptography algorithms; optimizing network slicing and load balancing to improve resource scheduling efficiency; and research on multi-UAV collaboration and group intelligence to improve computational task scheduling and air-ground collaboration to ensure efficient system operation and anti-attack capability. These directions will provide the UAV-assisted MEC framework with enhanced performance, security, and scalability, and promote its extensive development in practical applications. Despite the significant theoretical advantages of the proposed UAV-assisted MEC security framework, its practical implementation faces many challenges. First, the combination of machine learning and blockchain requires a large amount of computational resources and efficient algorithm design, which may lead to an increase in system complexity and computational burden; second, the enhancement of privacy protection and security may affect the system's responsiveness and energy efficiency, especially in large-scale UAV collaboration environments; furthermore, the dynamic optimization of network slicing and load balancing requires highly accurate real-time monitoring and scheduling, which in a multi-user, dynamic environments may be difficult to achieve. Nevertheless, with the development of 5G and future 6G networks and the advancement of intelligent algorithms, the proposed approach has great potential to provide solutions for efficient and secure edge computing in real-world applications such as drone swarm collaboration, smart cities, disaster relief, and telemedicine. Conceptualization, Y.T. and S.P. ; methodology, Y.T. ; software, Y.T. and X.Z. ; validation, Y.T. and X.Z. ; formal analysis, Z.W. ; investigation, Y.T. ; resources, Y.T. ; data curation, X.Z.