AI for UAV-Assisted IoT Applications: A Comprehensive Review

With the rapid development of the Internet of Things (IoT), there are a dramatically increasing number of devices, leading to the fact that only using terrestrial infrastructure can hardly provide high-quality services to all devices. Due to their flexibility, maneuverability, and economy, unmanned aerial vehicles (UAVs) are widely used to improve the performance of IoT networks. UAVs can not only provide wireless access to IoT devices in the absence of a terrestrial network but can also perform rich IoT services and applications, such as video surveillance, cargo transportation, pesticide spraying, and so forth. However, due to the high complexity, dynamics, and heterogeneity of the UAV-assisted IoT networks, growing attention has focused on using artificial intelligence (AI)-based methods to optimize, schedule, and orchestrate UAV-assisted IoT networks. In this article, we comprehensively analyze the impact of applying advanced AI architectures, models, and methods to different aspects of UAV-assisted IoT networks, including key IoT technologies, tasks, and applications. In addition, this article also explores challenges and discusses potential research directions of AI-enabled UAV-assisted IoT networks.

. AI algorithms and classification. Fig. 1 depicts the main categories of AI algorithms and their classifications. AI can be divided into two categories: 1) machine learning (ML) and 2) nonmachine learning (non-ML) [15]. ML involves training models using data analysis to make predictions about unknown data. This category includes deep learning (DL) algorithms based on neural networks (NNs), clustering algorithms, such as K-means, decision trees, support vector machine, and linear regression and logistic regression algorithms for prediction. DL algorithms, in particular, incorporate models of deep NNs (DNNs) like convolutional NNs (CNNs), recurrent NNs (RNNs), and generative adversarial networks (GANs), as well as reinforcement learning (RL) and deep RL (DRL) algorithms that enable adaptation to dynamic environments and real-time decision making, such as Q-learning, deep Q-learning (DQN), deep deterministic policy gradient (DDPG), etc. [16]. Non-ML algorithms include early algorithms and expert systems based on semiotics and inference systems as well as heuristic algorithms, such as genetic algorithms (GAs), greedy algorithms, ant colony optimization (ACO) algorithms, etc. However, the application of AI requires adequate computing resources, which are lacking in UAVs.
Developed from cloud computing, mobile-edge computing (MEC) brings computing and storage resources to the edge of the network, enabling IoT data to be processed at the edge of the network. MEC not only effectively relieves the pressure on the core network but also meets the needs of computing-intensive and delay-sensitive IoT devices, bringing support for computing resources for the development of IoT [17]. However, in remote areas with incomplete network construction and post-disaster areas with damaged terrestrial network facilities, IoT services still face the huge challenge of not having access to networks. One possible solution is to combine MEC and UAV technology. By leveraging the computing resources provided by MEC servers, UAVs can execute AI algorithms that enhance their performance and increase their ability to provide services. With their flexibility, UAVs can also bring MEC services to areas lacking terrestrial networks [18]. The potential of UAV technology in conjunction with MEC architectures has been explored in recent research [19]. In particular, two approaches have been investigated: UAV-assisted and UAV-enabled MEC architectures. The UAV-assisted MEC architecture involves the offloading of data to remote MEC servers for processing, thus mitigating the limited computing resources of the UAV. On the other hand, the UAV-enabled MEC architecture is equipped with a MEC server, allowing tasks to be executed on the UAV itself. While both approaches effectively address the issue of limited computing resources, the UAV-enabled MEC architecture incurs an additional energy burden due to the energy consumption of the MEC server.
UAV-assisted and UAV-enabled MEC architectures represent a promising solution to address IoT service stagnation in areas lacking terrestrial networks and network congestion. By enabling the execution of AI algorithms on both types of architectures, UAVs can become more intelligent, ultimately improving the efficiency and quality of the services they provide. The joint use of UAVs, AI, and MEC for IoT is an area of great potential. However, the practical implementation of this approach is not without challenges. The energy consumption limitations of UAVs, the dynamic environments in which they operate, and the complexity of converging AI technologies all pose significant obstacles. To fully leverage the potential of UAVs in MEC architectures, careful attention must be paid to optimizing energy consumption, designing effective control mechanisms, and developing new approaches based on AI that are suitable for the unique challenges of UAV-based systems.
There have been numerous reviews on UAVs, IoT, and AI, which are summarized in Table I. Literature [20] provided a comprehensive survey of UAV communication and related issues and investigated the potential of UAVs to provide IoT services. In addition to the application of UAVs in the 5G and IoT domains, literature [21] also focused on security issues and promising solutions associated with the inclusion of UAVs in the IoT system. Similarly, literature [22] summarized the main technologies of UAVs and the applications and challenges of UAV-assisted IoT. However, the three aforementioned literature paid no attention to the use of AI in UAV-assisted IoT, instead solely concentrating on the application scenarios and associated issues of UAVs in IoT. Literature [23] investigated the challenges faced when using nonterrestrial networks to provide services for IoT and analyzed the benefits of enabling AI techniques. Nonetheless, it did not provide a comprehensive overview of the application scenarios for UAV-assisted IoT. Literature [24] detailed the application of ML techniques for physical layer, resource management, and network management in UAV-based communication. Literature [25] investigated the application of AI to UAV network localization, dynamic trajectory design, and resource allocation. Literature [14] deeply analyzed the ML, RL, and federated learning (FL) for UAV network enhancement and future research directions. However, none of the three literature mentioned above examined the UAV and AI applications in IoT. In [26], the application of AI in UAV communication was discussed in depth, with a focus on UAV communication protocols, technologies, and architectures, as well as UAV-assisted IoT application scenarios. However, the literature did not analyze the tasks involved in UAV-assisted IoT, nor did it explore the corresponding AI solutions. In contrast, literature [19] offered insight into the use of UAV-enabled MEC in IoT and the application of ML to address various constraints, such as latency, task offloading, energy requirements, and security. Nevertheless, this literature neglected the role of AI in UAV. Our investigation differs from the aforementioned literature in that we conduct a comprehensive examination of the application of AI in both UAV and UAV-assisted IoT scenarios, including the associated problems and solutions.
The structure of this review is presented in Fig. 2. Section II delves into the research challenges and key AI technologies for UAV-assisted IoT. In Section III, we explore the issues that arise in UAV communication networks and the use of AI in both UAVs and UAV communication networks. Section IV outlines the various application scenarios for UAV-assisted IoT, and we examine the application of AI in this domain. In Section V, we summarize the significant challenges related to UAV-assisted IoT, along with the AI-based solutions that address them. Section VI analyzes the challenges and potential solutions when applying AI to UAV and UAV-assisted IoT. Finally, in Section VII, we conclude this review.

II. CHALLENGES OF APPLYING AI TO UAV-ASSISTED IOT
Despite the widespread use of UAVs in providing services for IoT, there remain numerous challenges in their application [27]. For instance, the limited energy consumption of UAVs significantly restricts their employment in IoT. Furthermore, the expansion of IoT devices, their heterogeneity, and the rise in service demand all present new difficulties for UAV communication networks. UAVs must enhance their communication capabilities, network management capabilities, scheduling strategies, automation, and intelligence to effectively deal with massive machine communication services, improve coverage, and complete tasks efficiently. Additionally, interference and network security issues resulting from communication between UAVs and massive IoT devices cannot be ignored. In the following sections, we will analyze the challenges faced by UAVs and summarize the existing solutions.
1) UAV Collision Avoidance: Due to the uncertain nature of the flight environment, UAVs are at risk of colliding with various physical entities during flight. Therefore, it is necessary to ensure UAV collision avoidance to ensure successful mission performance. UAV obstacle avoidance involves two main steps: sensing obstacles through sensors and using the sensed environmental information to avoid obstacles. Additionally, UAV swarms can avoid internal collisions by planning their flight trajectories. Therefore, addressing the challenges of efficient environment perception, obstacle avoidance algorithms, and cluster flight trajectory planning is critical to ensuring UAV obstacle avoidance. Improving environment perception relies on the selection and performance of sensors, such as cameras, infrared, radar, LIDAR, and sonar.
Results from experiments conducted in [28] on the application of different sensors in UAV collision avoidance showed that the selection of sensors should be based on the complexity of the scene and the computational power of the UAV. Blindly increasing the number of sensors will add unnecessary computational overhead to the UAV. Passive collision avoidance strategies require accurate and timely identification of dynamic obstacles with high complexity, which presents a challenge for UAV dynamic obstacle avoidance, while planned collision avoidance strategies can plan collision-free paths with low algorithmic complexity through advance trajectory planning. Literature [29] proposed a low-time complexity method that employs sampling to identify potential collisions and select the shortest collision-free path using a closed-loop simulation system for UAVs. The proposed path planning method generates collision-free paths by adding collision-free trajectories to optional paths and then selecting the shortest path as the generated path, which is a typical method of collision-free path planning. Furthermore, in [30], a collision-free trajectory planning method in multi-UAV 3-D space was proposed, which solved the problem by iterative optimization. However, the trajectory optimization efficiency of this method was low for large UAV swarms. 2) UAV Network and Energy Control: Efficient control is essential to providing good service and improving the efficiency of UAV swarms. Inefficient control can lead to decreased network coverage, communication rates, service duration, and even network outages. Solving the network and energy control problems of UAV clusters is challenging due to the large search space and low search efficiency, which often requires mathematical optimization. For instance, literature [31] proposed an optimization algorithm based on linear state-space approximation and sequential convex optimization techniques to maximize the energy efficiency of UAVs by optimizing their flight trajectory. Literature [32] maximized the minimum throughput of all ground users in downlink communication by optimizing multiuser communication scheduling and association, as well as UAV trajectory and power control, and solved the formulated mixed-integer nonconvex optimization problem by alternating user scheduling and association, UAV trajectory, and transmitting power in each iteration. However, these algorithms are only applicable to simple scenarios and cannot adapt to the dynamic environment during UAV flight. Therefore, developing more robust and adaptive control schemes is still a challenge for UAV swarms to operate efficiently in complex and dynamic environments. 3) UAV Security and Privacy: Security and privacy are also important issues for UAVs. Since the UAV is exposed to the air and controlled by wireless communication, it needs to face not only the risk of loss of control and damage caused by communication attacks and interference but also the risk of data theft caused by insecure communication protocols such as Wi-Fi. The main challenge in solving these problems is the additional communication overhead associated with the use of more secure protocols. Attacks on GPS sensors are the more common means of attacking UAVs, and vision-based navigation methods can be used instead of GPS, such as visual simulated localization and mapping (SLAM) and visual odometry (VO) [33].
Using blockchain technology to store data in a public blockchain based on Ethernet is also an important way to ensure the security and privacy of UAV network data [34]. The complexity and dynamics of the UAV working environment in reality, however, are frequently ignored in the above works, and the traditional optimization algorithms used can only make decisions and schedule instructions for a given environment, which cannot handle the dynamic environment nor meet the various service demands of the IoT. Since AI can effectively extract features and dynamics of the environment, this enables AI-based network optimization algorithms to make decisions quickly and logically with high performance. As a result, compared to traditional optimization algorithms, AI-based algorithms are better suited for UAVs. In the following, we will discuss key AI technologies for UAV-assisted IoT.
1) Deep Neural Networks for UAV: DL mimics the human mind's thought processes and utilizes multilayer NNs to process and learn features from data. Through the use of backpropagation algorithms to update the internal parameters of the NNs and learn the complex structures within the data, DL has been widely used in fields, such as speech recognition, computer vision, and natural language processing [35]. For instance, CNNs specialize in image, video, and audio processing. DL's robust image analysis capabilities can enhance UAVs' ability to handle tasks related to image data, such as collision avoidance and target detection [36]. Literature [37] used CNNs to analyze the number of crops in photographs captured by UAVs, achieving state-of-the-art performance in counting and geolocating plants in UAV images of multiple crop types. Literature [38] employed CNN models to detect obstacles during UAV flight and generated optimal collision avoidance paths based on the detection results. In addition, DL is also utilized for UAV network optimization and anomaly detection. For example, Literature [39] proposed a recursive NN UAV position prediction method based on long short-term memory (LSTM). Based on the predicted position, the predicted angle between the UAV and the base station can be determined to improve the UAV-tobase station communication rate in the next time slot. Furthermore, literature [40] employed a multilayer perceptron and LSTM method to improve the localization accuracy of the UAV, thus maximizing the overall system performance and user throughput. 2) Reinforcement Learning for UAV: RL is a type of ML that enables agents to learn the optimal actions to take in an environment by trial and error and continuous exploration. RL algorithms, such as Q-learning and SARSA, are widely used in various applications, such as UAV path planning and anomaly detection. Unlike DL, RL offers powerful real-time decision-making capabilities. Literature [41] utilized object detection (OD) and DRL to enable collision-free autonomous UAV navigation supported by simple sensors. Specifically, OD provides accurate environmental observations for DQN to make optimal flight decisions. Literature [42] applied RL to detect UAV motor anomalies, which can prevent motor failures in UAVs. Furthermore, literature [43] employed RL to select the data portion, transmit power, channel, and time to be offloaded, as well as the edge nodes to connect, to enhance the offloading quality, such as bit error rate (BER) and anti-interference performance, while also ensuring system security and user privacy. Simulation results demonstrated the effectiveness of RLbased security solutions in protecting MEC systems from various types of intelligent attacks with low overhead. Additionally, literature [44] proposed a DRL-based control algorithm that jointly considered communication coverage, fairness, energy consumption, and connectivity of UAV cluster networks. This algorithm aimed to enhance the coverage and reduce the energy consumption of UAV cluster networks. Literature [45] proposed a distributed online decision algorithm based on multiagent DRL to solve the joint optimization problem of task offloading, resource allocation, and UAV maneuvering for multiple UAVs. This study demonstrated the feasibility of decentralized DRL technology for designing self-organized IoT networks. 3) Federated Learning for UAV: FL trains ML models in a decentralized manner. The FL training process shares the training model instead of the original data, which protects the privacy and security of users while also reducing training complexity. This makes it suitable for UAV networks with limited computational resources.
Additionally, the FL model-sharing approach overcomes the issue of data imbalance and allows the algorithm to be trained in the absence of data. FL provides a promising solution that not only safeguards the security and privacy of UAV data but also overcomes the problem of limited UAV computational resources, making it widely applicable. In [46], FL was used to train the image classification capability of UAVs, which reduced the communication cost between UAVs and data centers and achieved higher classification accuracy with lower communication costs without relying on perfect channel state information (CSI). Literature [47] proposed an FL-based content cache location algorithm that utilized an asynchronous weight update method to avoid redundant learning migration in federation learning. This algorithm no longer requires explicit sharing of users' reports and content preferences, protecting user privacy.
To secure the flying ad-hoc network (FANET), literature [48] proposed a defense strategy for interference attacks based on FL and RL. The proposed strategy not only overcame the problem of data imbalance among different nodes, but the experimental results also demonstrated that the defense architecture, combining RL and FL in the absence of a model, outperformed the distributed approach. Notably, integrating AI into UAV-assisted IoT introduces additional challenges. First, the disparity between the constrained computational and energy capabilities of UAVs and the computational resources required by AI significantly limits the application of AI to UAVs. Second, the reliability of AI algorithms can be compromised in extreme cases, particularly with respect to security, privacy, and robustness, thus hindering their real-world application and development. In Section VI, we will conduct a detailed analysis of potential solutions and future trends aimed at addressing these challenges.

III. AI-ENABLED KEY TECHNOLOGY FOR UAV
There are some essential technologies to achieve high performance in UAV-assisted networks, such as communication technologies, networking and routing technologies, and UAV collision avoidance technologies. Communication technologies ensure the channel quality of directly linked devices, such as the UAV-to-UAV link and the UAV-to-infrastructure link. Networking and routing technologies are used to decrease the delay caused by the multihop relay. Collision avoidance technology enables UAVs to fly without colliding, thus reducing the failure caused by UAV damage. The basic functions of AI are data analysis and data prediction. With continuous development, AI has been widely used in target detection, image recognition, speech recognition, natural language processing, intelligent control, and autonomous driving and has achieved great success in industrial, medical, and robotics fields. Applying AI to UAVs can improve UAV communication quality through data analysis and prediction capability, perceive the environment through graphics processing capability, and make UAVs intelligent and autonomous through intelligent control capability.

A. AI for UAV Communication Technologies
UAVs offer high levels of flexibility, ease of deployment, top-down coverage, and immunity to natural disasters. These benefits make UAVs an attractive complement to ground networks for providing additional communication resources. UAVs are also considered to be an essential component of 6G networks [49]. Based on the size, flight altitude, and distance, UAVs can be classified as small, medium, or large. In UAV communication, two critical metrics are battery capacity and communication distance. Large UAVs generally have a larger battery capacity, which allows them to fly longer distances and perform more tasks. Moreover, large UAVs are often designed for specific scenarios, such as military UAVs or the Facebook Aquila UAV, which provides communication services. On the other hand, small UAVs have smaller battery capacities that must be carefully considered during use.
In UAV communication networks, two types of wireless communication links are typically employed: air-to-ground (A2G) and air-to-air (A2A) links. The A2G link refers to the communication link from the UAV to the ground equipment, which includes both UAV-to-ground base station links and UAV-to-ground user links. The A2A link, on the other hand, refers to the communication links between UAVs themselves. The UAV communication channel model takes into account both the large-scale fading caused by path loss and the smallscale fading caused by multipath interference. Compared to the A2A channel, the A2G channel tends to experience larger shadow fading and small-scale fading [50]. Additionally, given the high mobility of UAVs, attention must be paid to Doppler spread as well as the effects of aircraft shadowing [51]. Equipped with communication protocols, UAVs can communicate with both ground users and other UAVs. Currently, commonly used communication protocols in UAVs include Bluetooth, ZigBee, LoRaWAN, WiMAX, Wi-Fi, 4G, 5G, and 6G. Each of these protocols possesses unique performance characteristics in terms of data rate, delay, energy consumption, transmission distance, and so on. Low-power wireless communication technologies, such as Bluetooth, ZigBee, and LoRaWAN, offer distinct advantages. Bluetooth offers the highest data rate and lowest latency, making it suitable for applications that require real-time communication. ZigBee, on the other hand, boasts the lowest energy consumption, which is ideal for battery-operated devices. Finally, LoRaWAN offers the longest communication distance, making it suitable for use in remote and hard-to-reach locations. Wi-Fi is a widely used wireless technology based on the IEEE 802.11 standard, which encompasses two distinct modes of operation: 1) the infrastructure mode and 2) the ad-hoc mode [52]. As such, Wi-Fi can be employed for both A2A and A2G communication. While typical Wi-Fi coverage is limited to 100 m, it is possible to extend the range up to 500 m by using a directional enhanced antenna and an automatic tracking communication platform [53]. As the most widely used mobile technology, 4G offers high speed and low latency with a guaranteed long range of service. However, as the signal frequency increases, 5G loses the ability to propagate signals over long distances while gaining improved performance in terms of data rate, bandwidth, and latency, and further increases the energy consumption of devices. 6G aims to provide a globally ubiquitous network service, which is not only an iteration of communication technologies but also a heterogeneous convergence of multiple networks and intelligent control of all networks. Specific information about these communication technologies can be found in Table II. Considering the engineering requirements for data rate, delay, and energy consumption, as well as the energy-constrained characteristics of UAVs, the appropriate A2A and A2G communication technologies should be selected by combining the engineering requirements and the characteristics of each communication technology.
In practical applications, there are often multiple signals in the air, with varying degrees of interference between them. Besides, issues, such as energy constraints, network parameter selection, and network attacks, can also have an impact on UAV communication quality. There has been a lot of research on AI to improve network performance. AI can solve the signal interference problem well and also reduce network energy consumption, guarantee network security, and improve network performance. The application of AI in wireless communication technology is shown in Fig. 3. In the following, we will introduce in detail the application cases of AI in communication technologies to promote UAV communication.
Bluetooth and ZigBee are low-power, low-cost, short-range wireless communication technologies based on IEEE 802.15.1 and 802.15.4, respectively. Both technologies can provide lowto-medium data rate services for A2A and A2G links for ranges between 10 and 100 m [54]. The shared frequency bands between Bluetooth, ZigBee, Wi-Fi, and other signals cause unavoidable interference. To mitigate interference, a supervised learning-based channel quality evaluation algorithm had been proposed in [55] to predict channel quality. Gated recursive units were used to extract interference information on each channel and identify the top 20 channels for data transmission based on the past received signal strength metrics of the channel. Additionally, a novel loss function combining classification loss and ranking loss has been proposed to improve NN performance. Experimental results demonstrated that the proposed network is lightweight and resource-friendly, and the proposed method outperformed channel selection schemes such as Mask 19. The length of the connection interval (CI) and the number of packets transmitted per CI affect the energy efficiency and QoS of Bluetooth. A larger CI corresponds to a longer network lifetime but may negatively affect the QoS specified as packet delay. A higher number of packets transmitted per CI corresponds to a higher QoS, but it consumes more energy, reducing the network lifetime. To extend the network lifetime with guaranteed QoS, a Q-learning-based Bluetooth scheduling algorithm has been proposed in [56] to dynamically adjust the length of Bluetooth CI and the number of packets transmitted per CI. The reward function was designed so that the scheduling algorithm learns to satisfy both energy efficiency and quality of service requirements. Numerical results showed that the method greatly outperformed random and fixed action schemes in terms of network lifetime while also ensuring QoS and stability. For ZigBee, it is also important to achieve similar interference cancellation as Bluetooth to ensure that ZigBee is protected from interference attacks. To decode ZigBee signals in the presence of interference, literature [57] proposed the use of an NN as a linear spatial filter to suppress interference. The NN training is accelerated using the inherent relationship of its weights, guaranteeing ZigBee communication even when the interference signal is 20 dB stronger than the ZigBee signal.
LoRaWAN is another low-power, low-data rate, and longrange communication technology that can transmit signals over several kilometers [58]. It is suitable for both A2A and A2G communications. As a low-power wide-area network (LPWAN), low power consumption and high connectivity are essential for LoRaWAN. The choice of transmission parameters is decisive for network energy consumption. In order to reduce energy consumption and improve the performance of LoRa networks, transmission power values need to be automatically adjusted according to network requirements and link conditions. According to [59], an EXP3-based transmission parameter selection algorithm was proposed to choose the optimal propagation factor and transmission power, which can significantly reduce the energy consumption of the network. Packet conflicts arising from a large number of devices accessing the network can deteriorate network communication performance. To address this issue, literature [60] proposed a LoRaWAN channel selection method based on lightweight decentralized RL. This method selects the appropriate channel based on acknowledgment information, which can effectively avoid conflicts between LoRa devices with low computational complexity. Similarly, literature [61] proposes and evaluates a LoRaWAN physical-layer transmission parameter assignment algorithm based on double DQN to select the spreading factor and power, which can ensure fewer conflicts and better performance.
The optimal parameters for Wi-Fi link configuration depend on several factors, including the perceived channel quality, channel noise, and external interference. To maximize link layer performance, literature [62] proposed using a DNN-based Gaussian process regression to predict link layer throughput and a model-predictive control-based approach to find the link configuration parameters that optimize overall link layer performance. Compared to high-throughput adaptation mechanisms, DNN-based methods can significantly enhance link-layer performance. In addition, DNNs were also utilized to control the contention window of the WiFi 6 system in [63], where DNNs were trained with data generated from the WiFi 6 simulation system. By using loss functions, the model's accuracy in predicting the system's throughput, latency, and retransmission rate was improved, and the model was then employed to determine the optimal configuration of CW under various network conditions based on the prediction results. This DNN-based Wi-Fi control strategy achieves noteworthy improvements in system throughput, average transmission delay, and packet retransmission rate. To improve the efficiency of downlink MU-MIMO-OFDMA transmission in 802.11ax networks, literature [64] proposed a DL-based channel detection (DLCS) and DL-based resource allocation (DLRA) approach. DLCS employs the compression capability of DNN to compress the frequency-domain CSI during the feedback process. Then, based on the limited CSI, the AP infers CSI over all frequencies using well-trained DNNs, reducing the channel sounding overhead of the 802.11 protocol. Furthermore, the AP uses the uplink channel to train the DNN for the downlink channel, which makes the training process easy to implement. DLRA uses DNNs to solve the mixed-integer power allocation problem to improve system throughput and enable APs to obtain near-optimal solutions in polynomial time. The coexistence of long-term evolution (LTE) and Wi-Fi can severely degrade Wi-Fi performance. To protect Wi-Fi communication, literature [65] proposed a CNNbased distributed spectrum management framework. In this approach, CNN is used to identify the signatures of each technology and report the spectrum occupation of each channel, and then avoid them by changing the Wi-Fi operating center frequency based on the detected harmful wireless networks, which can improve Wi-Fi performance. Utilizing the ability to cope with large-scale data, DL is shown to improve the performance of intrusion detection systems (IDSs) [66]. In [67], a fully unsupervised intrusion detection method based on K-means was proposed to detect attacks without a priori information about the data labels. In this method, a stacked autoencoder is used to capture complex information in lower dimensional features than the original features, thereby enhancing the clustering effect of the K-means algorithm. The clustering results of K-means have only two classes that represent benign and malicious data. The method was capable of classifying simulated attacks in Wi-Fi networks with a detection rate of 92%.
LTE provides secure, reliable, and wide coverage for A2G communications relying on cellular networks [68]. With LTE advanced (LTE-A), the average throughput of both uplink and downlink is further increased [69]. However, the overlap of frequency bands between LTE, Wi-Fi, and NB-IoT can create interference between them, reducing the communication capability of LTE. To eliminate narrowband interference, an iterative sparse learning algorithm called sparse cross-entropy minimization (SCEM) was proposed in [70], which outperformed sparse Bayesian learning-based methods. Nevertheless, handover can impact network quality and must be considered due to the dependence on the cellular network. In [71], a supervised learning approach based on NN was employed to predict the optimal cell handover and improve the Quality of Experience (QoE). Predicting the data rate of LTE links is crucial for network management and resource allocation, but long-term observation of wireless links can result in energy waste. To address this issue, an artificial NN (ANN)-based algorithm was proposed in [72] to predict the data rate of LTE links and avoid congestion while saving energy.
WiMAX is a cost-effective broadband wireless access technology based on the IEEE 802.16 standard, which covers longer distances than Wi-Fi [73]. WiMAX can provide A2G communications, capable of handling high-quality voice and video streams and providing a high user experience [74]. The research on AI in WiMAX is mainly focused on two aspects: 1) channel prediction and 2) bandwidth allocation. Accurate prediction of wireless channel quality is important to improve network performance. Literature [75] proposed an encoderdecoder-based sequence-to-sequence DL model that predicts the future channel quality based on the past channel quality. Experimental results demonstrated that the RL-based model outperformed the auto-regression model and the linear regression model in terms of prediction accuracy. Fair bandwidth allocation for different types of traffic with limited bandwidth is important to ensure the quality of service for applications in WiMAX networks. In [76], an RL-based algorithm was proposed to learn the traffic demand in the network and make an efficient bandwidth allocation to meet the QoS requirements of the application.
5G is committed to providing ubiquitous connectivity and meeting the increased demand for services, such as data rate, bandwidth, latency, and other metrics [77]. UAVs, due to their highly flexible and easy-to-deploy nature, as well as their robust line-of-sight connectivity links, can be used as a complement to ground networks to extend coverage or as relays to collaborate with ground network communications. Therefore, UAVs are expected to play a key role in achieving ubiquitous connectivity in 5G [78]. Unlike other communication technologies, 5G can serve a wider range of applications when used with UAVs. However, the complexity of the network architecture and the diversity of service requirements make it difficult to optimize the 5G network with traditional approaches. As a solution, AI, with its powerful processing capacity and the ability to interact with the environment, is expected to be an important method to improve 5G performance [79]. AI has been widely used in the physical-layer optimization of 5G networks to improve network performance. Key technologies, such as nonorthogonal multiple access (NOMA), massive multiple-input-multiple-output (MIMO), and millimeter wave (mmWave), can significantly improve 5G performance, and the feasibility of using DL to enhance these technologies has been discussed in [80] and [81]. Good performance can be obtained in scenarios, such as channel estimation, coding and decoding, and massive MIMO. In [82], ANN was used for CSI estimation, which improves network throughput and saves uplink energy by making accurate CSI predictions. Similarly, literature [83] integrated CNN and LSTM networks to predict CSI with high accuracy using historical data. Specifically, the raw data are first preprocessed and converted into CSI information images. Then, the CSI information images were fed into the CNN network to extract representative frequency vectors. Finally, the state representative vectors were fed into the LSTM network, and the predicted state vectors were output. The integration of AI into radio resource allocation techniques is an important area of research for optimizing the physical layer of 5G networks. To meet the diverse service requirements, literature [84] used NNs to jointly optimize the power and bandwidth resource allocation and thus minimize the total power consumption of the base station, where a cascading structure of NN was proposed to meet the QoS requirements that the fully connected NN cannot guarantee. The first NN layer is used for optimal bandwidth allocation, and the second NN layer outputs the transmit power required to meet the QoS requirements for a given bandwidth allocation. Simulation results demonstrated that cascaded NN outperformed fully connected NN in terms of QoS guarantees. A Q-learning-based power and resource allocation algorithm was proposed in [85], which aims to improve the latency and reliability of URLLC users and the throughput of eMBB users when considering heterogeneous traffic with different QoS requirements. This algorithm achieves a significant improvement in throughput for eMBB users and a slight decrease in latency for URLLC users. To deal with congestion in ultradense networks, Zhou et al. [86] used deep LSTM learning techniques to locally predict the traffic load of UDN base stations and execute appropriate action policies based on the prediction results to mitigate congestion intelligently. Simulation results showed that the scheme outperformed the conventional approach in terms of packet loss rate and throughput. In response to the increasing traffic load, Alawe et al. [87] proposed request prediction methods based on DNN and LSTM, respectively, trained on mobile network traffic data sets to predict the rate of additional user requests, reducing the delay in deploying virtual network functions (VNFs). Simulation results confirmed that both DNN and LSTM-based solutions are more effective than thresholdbased solutions in terms of latency when responding to traffic variations. Moreover, the growing number of IoT devices has increased the pressure on cyber-security. To counter network attacks, Lam and Abbas [88] used CNN to detect anomalous network traffic and create a more proactive, end-to-end defense for 5G networks. Network traffic is converted into images that can be analyzed by CNN for training, and the method identifies benign traffic with 100% accuracy and anomalous traffic with a 96.4% detection rate.

B. AI for UAV Swarm Networking and Routing
A UAV swarm comprises multiple UAVs that expand network coverage and improve network stability compared to single UAV systems. Current wireless network architectures for UAV swarms can be classified into two types: 1) infrastructure-based networks (IBNs) and 2) ad-hocbased FANET networks [89]. These two UAV communication network architectures are illustrated in Fig. 4. The infrastructure-based UAV network architecture relies on ground infrastructure to provide relay services between UAVs and cannot provide direct communication between UAVs [26]. In contrast, the FANET architecture allows UAVs to communicate with each other directly or indirectly without the need for ground infrastructure. The topology of a FANET has a significant impact on communication efficiency. Common topologies include star, mesh, and multilayer networks. In a star network, all UAVs communicate with ground nodes or other UAVs through a specific UAV, which may lead to network congestion. Mesh networks, where nodes are interconnected, have greater flexibility and reliability compared to star networks. However, due to the presence of multiple routes, an efficient routing protocol is necessary to select the best path and adapt to changes in the network structure [90]. Considering the variable topology of UAV networks caused by the mobility of UAVs, signal interference among UAVs, and network management issues resulting from the energy limitations and resource differences of UAVs, real-time dynamic and efficient routing protocols and network management solutions are required to ensure the QoS in UAV networks. Traditional static routing protocols and network management solutions are not adequate. Conventional routing protocols for wireless networks include static routing protocols, proactive routing protocols, reactive routing protocols, hybrid routing protocols, location-based routing protocols, hierarchical routing protocols, and probabilistic routing protocols [91]. However, most of these traditional routing protocols are not suitable for UAV networks with high mobility because they were designed primarily for low-speed self-organizing networks with slow topology changes. In contrast, AI algorithms, especially ML algorithms, can make optimal decisions by learning about the environment, such as network topology, channel state, and other relevant information. AI-based routing protocols for UAV networks mainly include topology prediction-based routing protocols and adaptive learning-based routing protocols, which can address the dynamic nature of the network. Topology prediction-based routing protocols forecast the link and network topology states using ML techniques to produce better routing policies and increase the stability and throughput of the network. In addition to continuously learning about the environment, adaptive learning-based routing protocols learn to maximize key network performance parameters, including network congestion, throughput, energy consumption, network longevity, and fairness, to generate a routing policy that is suitable for the network's needs. Q-learning algorithm is frequently used in adaptive learning-based routing protocols. Examples include QoS-aware Q-routing, which can outperform ad-hoc routing algorithms while meeting QoS requirements, and Q-learning-based multiobjective optimized routing protocols, which can achieve higher packet arrival rates than the Q-learning-based routing algorithm while reducing energy consumption and communication delay [92], [93].
Indeed, efficient allocation of network resources is essential to optimizing the performance of UAV swarms. In addition to the dynamic nature of the network topology, it is necessary to consider the allocation of network resources based on the specific requirements of the scenario. For example, in order to maximize the spectrum resources available to the UAV swarm and prevent interference, literature [94] focused on the resource allocation problem of UAV swarm networks by identifying the ideal frequency band for each UAV. However, this approach did not consider the energy management issue of UAVs and did not dynamically arrange the spectrum resources according to demand, leading to a shorter operation cycle for the UAV swarm network. Therefore, in order to maximize energy efficiency and prolong the network lifetime, it is crucial to dynamically allocate spectrum resources based on the application requirements of the UAV swarm network, which can ensure that spectrum resources are used efficiently and effectively while also meeting the needs of the application. In addition, due to the high dynamic and complexity of UAV swarm service scenarios, using traditional algorithms to solve UAV swarm network problems takes a lot of time and cannot achieve real-time processing and decision making. The use of AI algorithms, especially ML algorithms, to solve network problems is a current research hotspot. AI algorithms are able to adapt to the dynamics and complexity of the UAV swarm environment and make real-time decisions. Digital twin and ML have become very popular topics in recent years. The effectiveness of the suggested approach is demonstrated by the intelligent network reconfiguration of UAV swarms in time-varying environments. In [95], a digital twin-based intelligent collaboration framework for UAV swarms was suggested to better learn the optimal decisions from the network environment by fusing digital twin techniques with RL techniques. Experiments demonstrated that the algorithm can select the optimal network model in different scenarios. In order to provide broadband wireless communication, mmWaves are introduced to UAV swarms, but this also creates issues with millimeter beam misalignment due to UAV movement and interference among UAV swarms. To manage spectrum resources and UAV energy consumption with improved flexibility and efficiency, a new resource management architecture was developed as a solution to this challenge in [96]. The effectiveness of the proposed spectrum management architecture was validated in five potential scenarios.

C. AI for UAV Collision Avoidance
Collision avoidance technology is a crucial issue that requires careful consideration during the flight of UAVs. UAVs must be able to avoid collisions not only with other UAVs but also with various obstacles, such as buildings, birds, and trees. Generally, UAV collision avoidance techniques involve two steps: 1) obstacle sensing and 2) collision avoidance [97]. The process of a UAV gathering information about obstacles is known as obstacle sensing. By using cooperative obstaclesensing techniques, UAVs can share information about their own conditions as well as information about the surrounding obstacles. However, current methods are only suitable for UAVs that use the same protocol and are unable to acquire information about obstacles in the surrounding environment.
To obtain information about obstacles in the surrounding environment, sensors can be used to sense the environment, and imaging and positioning techniques can be utilized to determine the location of obstacles.
For a swarm of UAVs, position information can be shared, and internal collisions can be avoided by planning the flight paths of each UAV within the swarm. For example, in [98], a formation flight control algorithm based on DRL was proposed for the navigation of a UAV swarm, which effectively reduced the collision probability. The collision rate of successfully formed UAVs was reduced to 3.4% without colliding with other UAVs. However, for UAVs outside of the swarm, since the flight trajectory of other UAVs cannot be known, the flight trajectory must be adjusted based on the real-time dynamic environment to avoid collisions. After obtaining information about the UAV trajectory and surrounding obstacles, it is possible to predict whether a collision will occur by using a collision prediction method. The collision avoidance algorithm then performs a collision avoidance operation, typically by devising a brand-new collision-free path. Numerous academic works have studied the collision avoidance and prediction of UAVs. In [97], collision prediction algorithms were classified into two main categories: 1) trajectory fitting methods and 2) ML-based methods. The trajectory fitting function often cannot achieve accurate prediction because the environment is too complex during UAV movement. Fortunately, ML algorithms can make more accurate trajectory predictions by extracting features. Among the ML algorithms, CNN excels at extracting features, while RNN and RL are capable of acquiring knowledge from past experiences, allowing for more accurate trajectory prediction. In [99], LSTM was employed to predict the motion of obstacles, and an uncertainty-aware multiagent dynamic collision avoidance algorithm based on nonlinear probabilistic velocity obstacles was proposed, which can avoid obstacles that the optimal reciprocal collision avoidance algorithm cannot avoid. In [41], OD and DRL were utilized to solve the problem of collision-free autonomous UAV navigation supported by simple sensors. OD is used to provide accurate environmental observations for DQN, and DQN is used to make optimal flying decisions. Compared to the algorithm using DRL alone, the integration of OD with DQN not only enables collision-free UAV flight but also reduces the flight distance. Literature [100] proposed a two-stage RL strategy to solve the UAV collision avoidance problem under imperfect perception. The first stage uses a supervised training method with a loss function to optimize the collision avoidance strategy, and the second stage uses a policy gradient to refine the collision avoidance strategy. This two-stage RL approach has increased performance in terms of success rate and trajectory length compared to conventional RL. In [101], UAVs were used to collect data from ground devices, and Q-learning was used to help UAVs avoid collisions without knowing the trajectories of other UAVs. This scheme allows the UAV to avoid collisions and can reduce the path length of the UAV when collecting data.
IV. UAV-ASSISTED IOT APPLICATION SCENARIOS Fig. 5 showcases a wide range of application scenarios where UAV-assisted IoT can be utilized. One such scenario involves UAVs being deployed for monitoring crop growth, spraying pesticides, and automating farms for smart agriculture. In times of natural disasters or emergencies, UAVs can provide emergency communication services, deliver supplies, and monitor the environment. UAVs can also play a crucial role in empowering smart cities by supporting video surveillance, smart transportation systems, and healthcare. On the modern battlefield, UAVs are of significant tactical importance, serving to provide communication services and reconnaissance in addition to specific military UAVs that are designed to perform military missions. By incorporating AI, UAVs can enhance the efficiency of various IoT tasks, making them more effective and reliable.

A. Agriculture
Food is an essential component of people's lives, and according to a recent survey by Van Dijk et al., the global demand for food is expected to increase by 35%-56% by 2050 compared to 2010 [102]. To meet this rising demand, there is a need to develop agricultural technology to drive an increase in food production. Furthermore, the use of IoT can enable realtime monitoring and management of arable land, ushering in a new paradigm for agricultural development [103]. By using sensors to obtain environmental information, such as images and temperatures, and then analyzing this data and making immediate decisions through big data or AI methods, applying IoT and AI to agriculture can increase productivity and yields while also reducing costs. This provides support for smart and precision farming. However, the high cost of constructing terrestrial networks and the limited network services due to fixed terrestrial network equipment severely limit the application and development of IoT in agriculture. In contrast, UAVs offer a more economical and flexible means of deployment, data collection, and providing high-quality network services on demand compared to expensive terrestrial and satellite networks. UAVs are typically used in agriculture for crop monitoring, drug spraying, and other tasks. Specifically, they perform data collection, network provisioning, and specialized agricultural tasks. To perform data collection, the UAV first collects information from ground sensors or through sensors equipped on the UAV. The data is then transferred to a computing center or processed on the UAV and analyzed by algorithms to help make informed decisions. AI algorithms can be leveraged for flight control, data processing, and decision-making processes in UAVs, resulting in accelerated data processing and instantaneous decision-making. DL techniques, particularly CNN, possess exceptional image processing capabilities. The combination of DL and UAVs can effectively enhance their utilization in smart agriculture, enabling them to perform tasks, such as vegetation identification, classification, and segmentation, crop counting and yield prediction, crop mapping, weed detection, and the detection of crop diseases and nutrient deficiencies [104]. Furthermore, UAVs can be utilized for spraying pesticides, leading to reduced labor costs and the realization of agricultural automation. AI can also aid in devising UAV operation strategies to enhance their efficiency. To enable UAVs to gather farm data in a cost-effective and efficient manner for further analysis and decision making, Ardakani and Cheshmehzangi [105] utilized Q-learning to plan UAV trajectories in intelligent farm remote sensing. This approach ensures that data is collected with the least amount of energy consumption and time delay. However, in future research, more practical models will need to be explored.

B. Disaster and Emergency
Natural disasters, such as earthquakes, often lead to infrastructure damage, including houses and roads. The unavailability of communication facilities can create significant inconvenience for rescue operations. However, unlike groundbased networks, UAVs are resilient to most natural disasters and can be easily deployed to provide communication services in disaster-stricken areas. Furthermore, UAVs can be equipped with sensors to gather site conditions and environmental information, aiding in disaster situation analysis and facilitating rescue missions. Despite their advantages, UAVs have limited energy and need to ensure energy efficiency to extend their service time while providing communication services and performing special tasks. Additionally, UAVs operate in a dynamic environment that traditional algorithms may struggle to handle. Utilizing AI to optimize resource allocation for UAVs can adapt well to the dynamic environment, provide autonomy to UAVs, and enhance UAV automation, improving their efficiency in performing tasks and energy efficiency. To improve UAV efficiency and energy efficiency while performing tasks, literature [106] explored a scenario where a multimission UAV performs various tasks, such as material transportation and communication services in a post-disaster area. The study employed greedy and insertion algorithms to plan the mission. Both heuristic algorithms effectively reduced the planning time for the UAV compared to the optimal algorithm while maintaining high performance, enabling quick responses to unexpected situations. Furthermore, UAVs can also be utilized for airdrops of supplies in disaster areas and forest fire fighting. It is crucial to note that ground communication facilities may suffer damage due to disasters, making communication services essential for post-disaster reconstruction efforts. UAVs can serve as flying base stations to provide communication services in disaster areas. For instance, literature [107] explored an emergency communication system that used UAVs as flying base stations to assist ultradense networks. They proposed a DQN-based resource allocation scheme to maximize the system's energy efficiency while ensuring user communication quality to handle system emergencies when communication resources are insufficient. To expand network coverage, multiple UAVs often form UAV swarms to provide communication services to disaster areas. However, ground users, such as escapees and rescuers, are typically mobile, necessitating the UAV swarm network to adapt its network structure to the ground personnel's activities to provide as many services as possible. In [108], a mobility model was proposed for simulating the movement of victims in disaster situations. The study then combined Jaccard distance and simulated annealing algorithms to deploy UAV swarm networks that avoid network disconnections while increasing the number of users served.

C. Smart City
Although there is no precise definition of "smart city," it can be considered an urban optimization solution that utilizes advanced information and communication technologies, IoT technologies, big data, and AI to empower cities, thereby facilitating city management and providing convenience to citizens [109], [110]. Typical smart city application scenarios include smart transportation systems, smart city monitoring, smart healthcare, smart grid, smart education, and others [111]. The implementation of smart cities is crucial for achieving energy savings, reducing emissions, protecting the environment, and promoting sustainable urban development. UAVs have many applications in smart cities, including collecting sensor information, transporting goods, and monitoring the city. The following are three scenarios that demonstrate the use of UAVs in smart cities: 1) urban surveillance; 2) intelligent transportation systems (ITSs); and 3) healthcare.
1) Surveillance: As urban populations continue to grow, cities must invest more resources in enhancing urban security to protect the living standards of their citizens. In addition to placing security personnel on guard, major cities have deployed advanced video surveillance systems to monitor abnormal situations [112]. However, security personnel is unable to provide real-time monitoring, and the labor cost is relatively high. Although video surveillance systems can offer real-time monitoring, effectively identifying various hazardous situations from a fixed perspective remains challenging. UAVs are highly flexible and capable of tracking and monitoring targets in an automated manner. UAVs can be deployed quickly and can effectively respond to unexpected situations, as well as compensate for the blind spots of the video surveillance system. Combining UAVs with video surveillance systems can further enhance urban security.
Accurately identifying and tracking anomalies requires UAVs to have image recognition technology, which is often implemented using AI algorithms. CNN and OpenCV are widely used models in the field of image recognition and have demonstrated good performance. AI can also preprocess image data to reduce redundant data for transmission and enable UAV path planning and resource management, improving surveillance and energy efficiency. However, computationally intensive tasks, such as data processing, can impose a significant energy and computational burden on UAVs. The combination of UAVs and MEC offers a solution to this dilemma. Data processing tasks can be performed by either transmitting data from the UAV to a remote server or performing the processing on a UAV equipped with a MEC server. Literature [113] investigated whether image processing should be performed locally or offloaded to the MEC server when using a cluster of UAVs for crowd monitoring and facial recognition. Experimental results showed that offloading image processing tasks to the MEC server can reduce energy consumption and processing time by more than 100 times. Most surveillance systems rely on a single data source for target localization, and the use of multi-UAV sensor networks is uncommon but has enormous potential. Literature [114] presented a novel multi-UAV surveillance system for multitarget identification and tracking that includes a video image-based moving target identification algorithm, a group intelligence optimization-based collaborative UAV task assignment algorithm, and an ML and data fusion-based localization model. The ML algorithm is used to extract the topology of the data based on the multisource data collected by UAVs and sensors to establish a mapping between the data and the environment. The target's location is estimated using mapping based on the target's relevant data. Finally, pigeon-inspired optimization is used to coordinate multiple UAVs, taking energy constraints into account to determine which UAV is assigned to perform the localization and tracking tasks. The system has been proven to have high positioning and tracking accuracy. In [115], UAVs were employed for crime prediction. These UAVs are divided into three categories: 1) sensing UAVs; 2) computational analysis UAVs; and 3) deterrence UAVs. Sensing UAVs gather information from sensors, such as images and sounds, and transmit it to computational UAVs. Subsequently, well-trained ML models are utilized by computational UAVs to predict potential crimes. Finally, depending on the prediction results, deterrence UAVs are dispatched to the relevant areas for surveillance. The experiments demonstrated that when the deterrence range is set at 1280 m, a total of 20 UAVs can effectively prevent almost all crimes. In [116], a UAV swarm was utilized to develop a dependable surveillance system. The researchers proposed a collaborative, model-free, multiagent DRL-based path planning algorithm to optimize energy consumption and maximize the number of users that could be monitored. The algorithm achieved this objective by determining the optimal trajectory within the surveillance area, reducing overlapping and shadowed regions, and expanding UAV coverage. Simulation experiments confirmed that the proposed algorithm surpassed existing algorithms in terms of surveillance coverage, user support capacity, and computational cost.
2) Intelligent Transportation Systems: ITSs constitute a crucial aspect of smart cities. As information and communication technology, autonomous driving technology, and connected vehicle technology advance, ITSs are also progressing and moving toward the automation of transportation systems [117]. Despite technological advancements in traffic systems, human resources, such as traffic police, are still required to be present on site, resulting in lengthy response times. However, UAVs can be rapidly and flexibly deployed to assist with various ITS automation scenarios. For instance, UAVs can collect road data for ITS decision making and scheduling, offer immediate responses to emergency situations, such as traffic accidents, deliver on-site information, and act as flying base stations to provide communication services for vehicles and roadside units [118].
When examining UAV-assisted vehicular networking, throughput and latency are typically utilized as key performance metrics. However, these traditional metrics are inadequate for reflecting the freshness of information, which is crucial for enabling services, such as autonomous driving and accident prevention. To enhance the timeliness of UAV-assisted road information collection for telematics, literature [119] introduced the concept of Age of Information (AoI) to ensure the information's freshness and use the DDPG algorithm to plan the UAV trajectory, ensuring freshness with minimal throughput constraints. Simulation results showed that the DDPG-based UAVs' trajectory and scheduling policy achieved the lowest expected weighted AoI and average age compared to fixed and random trajectory approaches and static UAV placement methods. Routing protocols are essential for high-speed data transmission. To ensure secure and efficient routing for UAV-assisted vehicular ad-hoc networks, literature [120] used an ACO algorithm to improve the routing algorithm of FANET to supplement disconnected FANET links with UAVs, thereby reducing the end-to-end delay and routing overhead. However, the protocol is vulnerable to attacks by malicious UAVs and still requires appropriate security protocols to ensure route security. To improve energy efficiency when UAVs are used as flying base stations, literature [121] employed heuristic algorithms to determine the location and altitude of UAVs to avoid overlapping coverage of multiple UAVs and equalization of coverage and transmit power of a single UAV. However, the network switching problem due to vehicle movement was not considered. UAVs can serve as flying base stations and provide content services to vehicles on roadways where communication infrastructure is lacking. However, their limited storage and battery capacity necessitate rational trajectory planning and content caching to serve as many vehicles as possible while minimizing energy consumption. In a recent study [122], the PPO-Clip algorithm was utilized to control the UAV's trajectory and maximize its energy efficiency by maintaining as many downlinks as possible with minimal energy consumption. The UAV can acquire content from and provide content to the vehicle. Nonetheless, the study's scenario assumptions only considered the one-way driving process of a road section and did not account for the continuity of UAV services. Therefore, further advancements in scenario assumptions are necessary.
3) Healthcare: UAVs have various applications in the healthcare field, such as gathering human health information and transporting medical supplies. In a study by Ullah et al. [123], UAVs were proposed to monitor the body area network (BAN). The study also considered a specific scenario in which a link was established with the driver through a vehicle network to monitor their physical condition and prevent accidents. Furthermore, with the emergence of the COVID-19 pandemic, UAVs have been employed to collect samples and deliver medical supplies, which not only conserves human resources but also mitigates the risk of infection [124]. When UAVs are utilized in healthcare services to share medical data, there is a significant risk of data leakage [125]. However, the emerging blockchain technology provides a promising solution to this challenge of data security and privacy [126], [127]. The utilization of cryptographic techniques, including hash functions and public-key encryption, enables blockchain to secure shared data, guarantee the authenticity of stored information, and enhance the security and transparency of UAVs. This could potentially address several issues faced by UAVs in healthcare, including coordination, security, collision avoidance, privacy, decision making, and signal interference [128].

D. Military
UAVs have become an integral component of modern warfare, offering a wide range of capabilities that make them essential to military technology. These capabilities include the ability to establish temporary communication networks, detect the battlefield through sensors, employ advanced AI algorithms for target identification, and even function as weapons to execute military missions [129], [130]. The battlefield is a highly dynamic and hazardous environment, and UAVs must continually adjust their trajectories to ensure their safety. To achieve fast path planning, literature [131] proposed utilizing a GA implemented in parallel on a graphics processing unit to generate a trajectory by moving the UAV's trajectory points in 3-D space, which minimizes fuel consumption while significantly reducing path planning time. Another critical issue to consider is how to protect UAVs during military conflicts. During missions, UAVs continuously send encrypted location information to ground-based stations. If this information is leaked, it can pose a severe threat to the UAVs. Literature [132] proposed the use of UAVs to collect encrypted messages sent by enemy UAVs within line of sight and their fuzzy location information, and then utilized NNs to learn the correspondence between plaintexts and ciphertexts to crack the plaintexts. When the number of opposing UAVs is higher, the amount of data that can be collected is larger, which allows for training a more accurate NN model. Therefore, it is advisable to avoid deploying military UAVs in large numbers in small areas to minimize the risks.

V. TASKS AND METHODS IN AI-ENABLED UAV-ASSISTED IOT
In the preceding section, we provided a thorough explanation of the scenarios for IoT applications and specific examples of their usage. In these scenarios, UAVs are primarily responsible for data collection and network service provision. In the subsequent sections, we will delineate the challenges that UAVs may encounter while performing these tasks, the crucial metrics that must be addressed, and the associated AI solutions, all in the context of relevant literature.

A. Data Collection
One important application scenario for UAVs is to collect sensor data and transmit it back to the data center for processing. The process of data collection has extremely stringent requirements for data timeliness, requiring close attention to the processes involved in generating, transmitting, and processing information to ensure the quality of service and the performance of the real-time network system [133]. Due to the requirements for time delay and the limitation of UAV energy, it is important to rationally plan the path and transmission scheduling of UAV [134]. During data collection, the UAV's flight path needs to be reasonably planned, taking into consideration factors, such as the age of the information, data collection efficiency, energy consumption, and other requirements. Compared to traditional optimization algorithms, AI algorithms, such as group intelligence-based algorithms and RL algorithms, can effectively handle dynamic environments and provide near-optimal solutions in real time for dynamically planning UAV paths. In the following article, we will review the literature on UAV data collection in terms of three metrics: 1) data collection timeliness; 2) data collection efficiency; and 3) energy consumption. Table III presents a summary of the optimization targets, performance metrics, and AI solutions for UAVs performing data collection.
The AoI is a metric that characterizes the freshness of information and can also be used to indicate the timeliness of information transmission. To reduce the weighted sum of the AoI of sensor information collected by UAV, a data collection algorithm based on DQN was proposed in [135]. The algorithm aimed to find the optimal flight trajectory of the UAV and the transmission scheduling of the sensor node (SN) while considering the energy constraint of the UAV during the optimization process. Simulation results demonstrated that the weighted sum of AoI decreases monotonically with the coverage radius of the SN and increases monotonically with the number of SNs. In [136], a more complex scenario was considered where the ground nodes have limited energy and the UAVs have to decide between charging the ground nodes and collecting data. The optimization of information and energy transfers is jointly considered in the trajectory planning process to minimize the average AoI of the system. To address this problem, a trajectory planning and scheduling scheme based on DQN was proposed. The DQN-based scheme was demonstrated to find the optimal solution in simulation experiments and achieved a significantly smaller average AoI compared to the energy-based and greedy schemes. A higher flight speed can reduce the flight time of UAVs and lower AoI at the cost of increased energy consumption. Additionally, the location where the UAV hovers plays a crucial role in determining the uplink transmission time and power consumption of data transmission. As a result, joint optimization of energy consumption, hovering location, and AoI is necessary to enhance the efficiency and quality of UAV-assisted data acquisition. To minimize the weighted sum of the average AoI, propulsion energy of the UAV, and transmission energy of the IoT devices, literature [137] proposed a TD3-based AoI-energy-aware UAV trajectory planning algorithm (TD3-AUTP) to jointly optimize the UAV's flight, hover position, and data collection bandwidth allocation. Simulation results demonstrated that the TD3-AUTP algorithm outperforms the DQN and actor-critic (AC) algorithms in terms of achievable AoI and energy efficiency. The process of sampling and queuing SNs has a significant impact on the age-optimal trajectory of UAVs, which has not been thoroughly investigated. Literature [138] investigated the age-optimal data collection problem for UAV-assisted IoT systems while considering the data sampling, queuing, and UAV-assisted relaying processes for SNs. To replace the updated packets in each SN buffer with newly sampled packets, a sampling replacement strategy was employed. Furthermore, a DQN-based trajectory planning algorithm was proposed to design age-optimal trajectories for UAVs by minimizing the weighted sum of AoI, packet loss rate, and UAV energy consumption. The experimental results demonstrated that this scheme can effectively reduce the AoI and packet loss rates compared to the greedy algorithm. The information gathered by UAVs through surveillance and remote sensing is highly time sensitive, and delays beyond acceptable limits for data collection and transmission can lead to mission failure. Therefore, it is crucial for UAVs to collect data promptly and deliver sensing data on time. Literature [139] considered a realistic data transfer scenario, encompassing the entire UAV mission from data collection to data offloading, and used a GA-based approach to determine UAV flight paths that satisfy time, energy, storage, and communication constraints. The proposed GA-based approach provides near-optimal solutions and has a significantly faster execution time than the brute-force approach. To ensure the timely delivery of data and prevent packet expiration or loss, literature [140] utilized Q-learning to plan the trajectory of the UAV to guarantee the AoI and deadline of the data, resulting in a reduction of expired data packets. In comparison to GA, Q-learning performed better in terms of time consumption. Moreover, in [141], the issue of collision avoidance during UAV data collection was taken into account, and a SARSA-based learning algorithm was proposed to minimize the average AoI of the sensor while accounting for the constraints of UAV energy and collision avoidance. The proposed algorithm was able to approximate the optimal policy under certain conditions.
The efficiency of data collection by UAVs is determined by both the amount of data collected and the duration of the collection. Specifically, the greater the amount of data collected per unit time, the higher the data collection efficiency. Optimizing UAV communication scheduling and trajectories is an important way to improve the data collection efficiency of wireless sensor networks (WSNs) [153]. To improve the efficiency of UAV data collection, literature [142] proposed a trajectory planning algorithm based on TD3 that minimizes the data collection time while satisfying throughput and motion constraints. Notably, the proposed algorithm accounts for realistic 3-D urban environments with imperfect CSI and achieves a shorter data acquisition time than the ACO-based approach. WSNs that use backscatter communication technology can be used to monitor the environment in remote areas without the need for maintenance or battery replacement. However, the transmission range of backscatter communication is limited. To address this issue, literature [143] proposed the use of multiple UAVs to assist in data collection and reduce UAV flight time under the constraint of UAV charging. First, a Gaussian mixture model clustering method was proposed to divide the backscatter SNs into clusters. Then, an option-based hierarchical DRL method was proposed to optimize multi-UAV trajectory, charging, and data collection. Single-agent deep option learning (SADOL) and multiagent deep option learning (MADOL) algorithms were proposed for deterministic and fuzzy boundary scenarios, respectively. The MADOL and SADOL algorithms' effectiveness was determined by comparing them to the MADDPG, DDPG, and DQN algorithms. Given the constraints of onboard power and flight time for UAVs, maximizing data collection from wireless network devices through the shortest flight path is essential to improving data collection efficiency. In [144], a DQN-based algorithm was proposed for finding the optimal trajectory and data collection in a specific coverage area while balancing data collection, trajectory, and convergence time. Dueling DQL was also employed to enhance the system's performance and convergence speed. The DRL-based algorithm achieves a performance level that is comparable to the optimal genie solution associated with perfect knowledge of the environment. The success rate of data collection is an important indicator in the process of collecting data. To address the problem of UAV data acquisition under dynamic scenarios, such as moving nodes, node additions, and deletions, a two-stage DRL framework was proposed in [145]. This framework plans UAV trajectories online using a DNN to model the dynamically changing environment in the first layer and a DQN to plan trajectories in the second layer. Experimental results demonstrated that this two-stage DRL framework can improve the data acquisition success rate. Determining collision-free trajectories in a scenario with multiple UAVs collecting data from distributed IoT nodes is a challenging task. Literature [152] addressed the collision avoidance problem in this scenario and proposed a dueling double-depth Q-network (D3QN)-based algorithm to learn decision strategies without prior knowledge of the environment. This algorithm can avoid collisions while maximizing the amount of collected data.
The transmission of large amounts of redundant data, inefficient data collection, and unreasonable allocation of UAV transmission power can result in excessive energy consumption. To address this issue, a matrix completion-based scheme for selecting sampling points and optimizing the trajectory of intelligent unmanned aerial vehicles (IUTO) was proposed in [146]. This scheme, called sampling points selection joint IUTO (SPS-IUTO), employed a matrix-based approach to select sampling points and an optimized ACO algorithm to optimize the UAV's trajectory. The SPS-IUTO solution achieved lower data redundancy and energy consumption. By using the proposed scheme, redundant data transmission is minimized, resulting in a more efficient data collection process and optimized energy consumption. In scenarios where IoT devices are deployed for continuous operation with limited memory and energy capacity, it is crucial to collect data in an energy-efficient manner at the right time. UAVs can enhance the energy efficiency of deployed IoT devices by targeting their trajectories at IoT devices that are far away from ground-based stations. To minimize the overall energy consumption of all devices during UAV data collection, literature [147] employed the SARSA algorithm to obtain the UAV trajectory, which solved the joint problems of UAV trajectory, device association, and transmit power allocation while also ensuring that each device meets a given data rate constraint. Compared to the particle swarm optimization (PSO) algorithm, the SARSA algorithm reduces the total energy consumption of the devices. To collect data in a massive machine-tomachine communications (mMTCs) scenario, it is essential to identify the optimal hovering position and flight strategy for UAVs within the cluster to minimize energy consumption. Literature [148] proposed a novel modeling technique based on the idea of an artificial energy map (AEM) to determine the UAV's hovering position by using a greedy learning clustering (GLC) approach to optimize the clustering of machine-type communication devices and the UAV's hovering strategies to minimize both transmission and hovering energy, and utilizing GAs to identify the flight strategy with the lowest energy consumption. Compared to the Kmeans principle, this scheme reduces the UAV's flight distance by 11% and its energy consumption by 25%. Overall, this approach presents a promising solution for minimizing energy consumption in mMTC data collection through efficient UAV placement optimization. Due to the energy constraints of UAVs and SNs, frequent communication with UAVs can quickly deplete the SNs' energy. Therefore, it is important to study energy conservation in UAV-assisted WSNs. Literature [149] utilized UAVs to access cluster heads in a specific order to address the data collection challenge in clustered WSNs and proposed a pointer network-A* (Ptr-A*)-based algorithm for planning UAV paths, which reduces the energy consumption of UAVs during the data collection process. Ptr-A* is a novel DRL technique that is similar in architecture to sequence-tosequence network models, but it uses an attention mechanism as a pointer to select the items of its input sequence as outputs. The proposed path planning algorithm can not only accelerate the training of small-scale clusters but can also be used to solve larger scale cluster problems. In agricultural monitoring, a vast amount of information from SNs needs to be collected. In [150], a hierarchical data collection scheme was proposed that integrates exact and greedy methods for UAVassisted agricultural sensor information collection. By dividing the nodes into different layers, the exact and greedy methods can be intelligently matched. The UAV paths were then planned using an ACO algorithm. ACO is a heuristic algorithm that simulates the behavior of ants in searching for food and finds the optimal solution or near-optimal solution to the problem by simulating the information exchange and the release and update of pheromones during the search process. It has better performance in path planning compared to the  simulated annealing algorithm and is closest to the optimal solution. Simulation results demonstrated that the proposed method can collect data more efficiently and plan paths for UAVs with a lower energy cost. Literature [151] also investigated the data collection problem for large-scale WSN nodes, but with multi-UAVs. The sensors are first clustered and subclustered using K-means, and then the UAV trajectories and numbers are planned using GA so that the data can be collected in the shortest time and at the lowest cost. This scheme is able to obtain optimized UAV numbers and trajectories and demonstrates the impact of clustering of SNs, the number and selection of cluster heads, and UAV trajectories and altitudes on data collection times.

B. Network Service Provision
By offloading computing tasks to MEC servers, end devices can get high-quality services and reduce energy consumption [154]. UAVs can provide low-latency and dependable computing and processing capabilities to devices with limited resources by carrying MEC servers or connecting to MEC servers. UAV-assisted and UAV-enabled MEC architecture has been widely discussed and has attracted a lot of research in academia, and the architecture can be seen in Fig. 6 [19]. However, considering the limited energy of UAVs, computational offloading, data offloading, trajectory optimization, and resource allocation issues need to be addressed during service provision to improve energy efficiency and service quality. RL is widely used to enhance network performance by making real-time decisions based on the environment, which provides a solution to the challenges faced under the dynamic UAVassisted and enabled MEC architecture and further improves network performance. Table IV summarizes the optimization objectives, performance metrics, and AI methods for UAVs in providing network services.
When providing network services, UAV must consider how to improve the quality of its network services. The main metrics for evaluating UAV network services are QoS and service delay. The typical practice is to expand the service range of the UAV network, improve the QoS of users, and reduce the service latency of users through UAV trajectory planning, resource allocation, and computation offloading. Besides, it is necessary to pay attention to the fairness and throughput of the UAV communication system in the process of optimizing network services to avoid wasting resources. In [155], UAVs were equipped with computing resources to act as edge servers and collaborate with the ground base station to process the tasks of the ground devices. And a multiagent RL (MARL) algorithm was proposed for solving the joint optimization problem of computational allocation and resource allocation, thus reducing the task response time under the energy constraint of UAVs, where task allocation and bandwidth allocation are handled by two separate agents. Experimental results demonstrated that MARL can significantly reduce the response time of complex tasks and outperform single-agent RL. The MEC and UAV-assisted vehicular networks were considered in [156], where UAVs and base stations are equipped with MEC servers to provide services to ground vehicles. And an MADDPG-based scheme for managing multidimensional resources was proposed to cope with highly dynamic vehicle scenarios with latency-sensitive and computationally intensive applications. This scheme can support as many offload tasks as possible while meeting QoS and latency requirements. Literature [157] considered a UAVassisted MEC system where the UAV was equipped with MEC server and could provide offloading services to nearby user equipment (UE). The UE offloaded some of its computing tasks to the UAV, while the remaining tasks were executed locally. A DDPG-based algorithm was used to provide computational offloading decisions for single UAV-assisted multiuser scenarios. Experimental results demonstrated that the DDPG algorithm is easier to converge on and can achieve lower latency compared to the DQN algorithm. Literature [158] considered a computational offload scenario for a multi-UAV edge computing network, where tasks can be executed locally in the UAV or sent to the MEC server via the UAV. An intelligent task offloading algorithm (iTOA) based on deep Monte Carlo tree search (MCTS) is proposed to solve the computational offloading and computational and communication resource allocation problems, where MCTS decides the offloading action by simulating a decision trajectory and a split-depth NN is proposed to provide a priori probabilities for MCTS and thus accelerate the search convergence of MCTS. The iTOA algorithm improves the latency performance of the system compared to greedy search and game theory-based task offloading methods. When UAVs are utilized as flying base stations, they offer a flexible and adaptable means of service coverage through trajectory planning. In [159], a three-tiered edge computing system was employed. The first tier consists of sensors that generated data, the second tier involves UAVs carrying MEC servers for initial data processing, and the third tier includes an operations center responsible for the final processing of the data. By utilizing a combined scheme that plans the UAV path through DQN and then schedules the network through Lyapunov optimization, the data latency is significantly reduced.
Energy efficiency is an important concern for UAVs that provide network services. The UAVs' energy efficiency is positively correlated with their effective service time. In order to enhance their energy efficiency, we can reduce their energy consumption, improve their service efficiency, and extend their service time through trajectory planning, computational offloading, and power control techniques. Designing an efficient computational offload method for SAGIN is a challenging task, considering the dynamic channel conditions and coverage due to the high mobility of the airborne network, as well as the complex and dynamic network conditions and resources of the different network segments in SAGIN. In [160], a SAG-IoT network architecture was proposed where UAVs carry MEC servers, satellites are connected to cloud servers through a backbone network, and tasks generated by IoT devices can be executed locally or offloaded to UAVs and satellites. To address the joint edge server virtual machine computational resource allocation and task scheduling problem, the problem was formulated as a mixedinteger planning problem, and an efficient heuristic algorithm was proposed to solve it. Additionally, they proposed an AC-based RL approach to learn the best offloading scheme from dynamic SAGIN environments. The proposed heuristic algorithm achieves a performance very close to that of the brute-force approach. Moreover, compared with random and greedy algorithms, the AC-based task offloading scheme can achieve both low latency and low energy consumption. UAVs that employ a UAV-assisted MEC architecture need to consider the communication link issues from the UAV to the MEC server, which requires additional consideration for the allocation of communication resources. In [161], UAV is utilized to assist the user in completing computational tasks and establishing stable wireless communication between the user and the MEC server. This collaboration between the UAV and the MEC server enables the processing of tasks provided by the user. To address offload decisions and resource allocation in UAV-assisted MEC environments with multiple users and servers, a soft AC (SAC) algorithm was proposed to determine superior computational offloading policies in terms of latency, energy consumption, and task discards, effectively reducing the delay, energy consumption, and size of discarded tasks for the UAV-assisted MEC system. Literature [162] considered the economic issues in UAVassisted MEC systems and model UE, UAV cost, and UAV revenue. An MARL algorithm was proposed to jointly control power and resource allocation and make offloading decisions for users, which reduces the system's energy consumption while guaranteeing system performance, thus improving UAV revenue. Literature [163] considered a scenario where a lone UAV serves mobile ground users and is equipped with a MEC server and proposed a double deep Q-network (DDQN)based algorithm to optimize the UAV's trajectory, maximizing the system throughput while ensuring UAV energy and user QoS constraints. The performance of the DDQN algorithm is superior to that of the DQN algorithm. Similar to [163], literature [164] considered the use of a single UAV equipped with a MEC server to serve ground users and used an AC-based algorithm for controlling trajectories. The difference is that the goal of [164] was to minimize the energy consumption of all users.
In addition, the challenges of algorithm convergence and learning efficiency in large-scale scenarios must also be considered. Although the service capability of a single UAV is limited and cannot meet the needs of users in such scenarios, the use of multiple UAVs will lead to an exponential increase in the system state space and actions, also known as a "dimensional disaster." To meet the challenge of efficient scheduling of large-scale UAV-assisted MEC in dynamic environments, a hierarchical trajectory optimization and offload optimization (HT3O) algorithm was designed in [165] to reduce the complexity of the problem and improve the learning efficiency through alternate optimization, where the DDPG algorithm and the DQN algorithm were used for trajectory and offload optimization, respectively, and low problem complexity by alternating the execution of DDPG and DQN. The HT3O is capable of fast convergence and is effective in reducing the average task latency compared to ordinary RL algorithms. In [166], multiple UAVs were used to assist in the computation as well as to offload the tasks further to the edge cloud. To solve the dimensionality problem, a multiagent TD3 algorithm was proposed to jointly optimize the UAV trajectory, computational offloading, and communication resource allocation in dynamic MEC environments, thus reducing latency and energy consumption.

VI. OPEN ISSUE
AI not only enhances UAV network performance but also brings intelligence and decision-making capabilities to UAVs, which can give UAVs the autonomy to respond flexibly to realtime changes in the environment. Although there is a large literature on the use of AI to enhance UAV services, there are still some issues to consider when applying AI to UAVs and UAV-assisted IoT.

A. AI Training and Convergence Problems
The application of AI algorithms, especially RL algorithms in communication networks, has been heavily researched but requires a large amount of data for training to achieve good results. Unfortunately, training data is often difficult to obtain. Moreover, these collected data may also suffer from redundancy, label errors, and class imbalance, which severely affect the AI training results [24]. Data augmentation, which can generate new data based on existing data and avoid the problem of overfitting, is an important way to solve the problems of lack of training data and algorithm convergence. FL executes ML algorithms in a decentralized manner and updates model parameters through the interaction of local and global models. The distributed joint training method of FL can solve the problem of imbalanced training data. For example, a UAV with less training data can update the local model through the training results of other UAVs to ensure the effectiveness of training.
Additionally, in large-scale scenarios, AI algorithms are difficult to converge. Alternating iterative learning methods can be used to reduce the problem complexity and thus solve the convergence problem of AI algorithms in large-scale scenarios [165]. However, related research still needs to be improved to flexibly respond to various situations. The emerging graph NN (GNN) in recent years has made good progress in dealing with large-scale scenarios. By adopting a message-passing mechanism similar to distributed optimization algorithms, GNNs utilize graph architectures that significantly enhance data analysis while lowering the number of network parameters and reducing computational complexity [167]. In [168], a GNN-based method was proposed to solve the joint optimization problem of UAV location and relay path selection under large-scale networks, which is able to achieve the same performance in small-scale network scenarios with twice the time complexity of the violent search. Moreover, the method is scalable to adapt to dynamic environments and still converges quickly to the best performance in large-scale scenarios. In the future, GNN will be an important way to solve the convergence problem of AI algorithms in large-scale scenarios.

B. Resource and Energy-Constrained Issues for UAV
Since UAVs are energy constrained, the issue of energy conservation becomes more important when applying AI and MEC servers, which are energy-intensive algorithms and devices, to UAVs. In addition to using algorithms to perform other energy-saving operations, such as trajectory planning for UAVs, to improve the energy efficiency of UAVs. For example, in [147], energy consumption was reduced by optimizing the UAV trajectory and transmit power to improve the UAV data collection efficiency. In [160], resource allocation and task scheduling were jointly optimized to reduce energy consumption. We can also investigate lightweight AI algorithms, such as GNN or distributed learning algorithms that run on resource-constrained devices, to provide solutions for resource-constrained networks [23]. Literature [169] also proposed a dynamic NN (DyNN) that uses a knowledge base to select the network width, i.e., dynamically adjusts the model complexity according to the service demand, thus achieving a reasonable match between demand, resources, and performance. Some AI algorithms can also use DyNN to dynamically adjust the network width according to task demand, thus achieving energy savings. In addition, hardware performance improvements and software and hardware adaptations are important ways to allow AI algorithms to run on UAVs with limited resources and energy.

C. Security and Privacy Issues for AI and UAV
UAVs may be attacked by malicious devices during flight, such as hijacking and sabotage of UAVs, jamming UAV communications by faking identities, and eavesdropping on UAV communications. This not only affects the security of UAV communication but also interferes with UAV flight, leading to UAV collisions. In addition to the communication security issues regarding UAVs that have been discussed in Section II, data security and privacy issues are also important when training AI models. When training AI models, data needs to be collected from various nodes, which may lead to data leakage. FL builds global models by exchanging model parameters, which reduces the transmission of network data traffic and protects users' data privacy and security. FL has been used for UAV trajectory control, and network security, and is a good method to protect the safety of AI training [48], [170]. However, due to the existence of model data transfer during training, FL is still subject to attacks, e.g., by injecting anomalous data and thus affecting the training process of the model. Moreover, for FL, this attack also penetrates the entire network through the training process. The authentication mechanism of blockchain can be used to protect the privacy and security of data, which makes the integration of blockchain technology with FL's data privacy and security protecting scheme recently receive increasingly more attention [171]. Literature [172] introduced a blockchain-based FL architecture for UAVs that ensures privacy protection in FL. However, the convergence problem of FL is not guaranteed, and the data differences of different nodes and model update speed differences will have an impact on the convergence speed of FL. Although blockchain brings additional computation and storage overhead, it is still an important research direction for protecting AI and UAV data privacy and security in the future [173].

VII. CONCLUSION
The use of UAVs for communication services has become increasingly popular due to their low cost and quick reaction time, which has given rise to UAV-assisted IoT, a new development path for IoT that leverages communication technology. With the support of the powerful computing and storage capabilities of MEC and the processing and analysis capabilities of AI, UAVs are becoming more intelligent, autonomous, and capable of providing more services, thereby injecting new energy into the development of UAV-assisted IoT. This article provides a detailed introduction to UAV communication technology, IoT technology, and AI technology. We analyze the potential challenges, applications, and development directions of using AI to empower UAV-assisted IoT and comprehensively review UAV communication technology, networking technology, collision avoidance technology, and application scenarios of UAV-assisted IoT. It also summarizes the existing problems and their corresponding AI solutions. Finally, we explore the challenges and potential solutions when applying AI to UAVs and UAV-assisted IoT, including the constrained energy and computational resources of UAVs and the security and privacy issues of UAVs and AI. We analyze solutions to the resource-constrained problems of edge computing, including distributed AI that has been validated and applied, the integration of blockchain technology with FL that can solve the security and privacy issues of UAVs and AI, and lightweight AI as an important approach to solving the constrained resource problem in the future.