Computing in the Sky: A Survey on Intelligent Ubiquitous Computing for UAV-Assisted 6G Networks and Industry 4.0/5.0

: Unmanned Aerial Vehicles (UAVs) are increasingly being used in a high-computation paradigm enabled with smart applications in the Beyond Fifth Generation (B5G) wireless communication networks. These networks have an avenue for generating a considerable amount of heterogeneous data by the expanding number of Internet of Things (IoT) devices in smart environments. However, storing and processing massive data with limited computational capability and energy availability at local nodes in the IoT network has been a signiﬁcant difﬁculty, mainly when deploying Artiﬁcial Intelligence (AI) techniques to extract discriminatory information from the massive amount of data for different tasks.Therefore, Mobile Edge Computing (MEC) has evolved as a promising computing paradigm leveraged with efﬁcient technology to improve the quality of services of edge devices and network performance better than cloud computing networks, addressing challenging problems of latency and computation-intensive ofﬂoading in a UAV-assisted framework. This paper provides a comprehensive review of intelligent UAV computing technology to enable 6G networks over smart environments. We highlight the utility of UAV computing and the critical role of Federated Learning (FL) in meeting the challenges related to energy, security, task ofﬂoading, and latency of IoT data in smart environments. We present the reader with an insight into UAV computing, advantages, applications, and challenges that can provide helpful guidance for future research.


Introduction
Recently, with the rapid development of the Internet of Everything (IoE), a massive range of new applications and services, such as Augmented Reality (AR), Virtual Reality (VR), e-health, and face recognition have emerged and interacted with each other [1]. These applications begin to place greater demands on computing power, network throughput, and latency in order to provide a better Quality of Service (QoS) [2] and satisfy the Quality of Experience (QoE) [3]. The significant computing workload and storage requirements, and UAV path in a UAV-enabled wireless powered collaborative computing scenario. A novel UAV computing was discussed in [19], with a reduced weighted total of all IoT device service delays and UAV energy consumption by optimizing UAV communication, position, and computing resource allocation and task splitting choices at the same time [20][21][22]. The authors of [23] presented how to reduce UAV computing energy consumption in the binary offloading mode.

Computing and processing
Augment and Virtual reality Monitoring environments Recognition and detection Machine Learning (ML) has demonstrated its power to provide intelligence to wireless networks, including IoT and UAV networks. However, traditional ML techniques are cloud-centric, requiring all data to be transmitted to a cloud data center and processed there, which may not be appropriate for UAV networks [24]. To begin with, the data created by each UAV may be unavailable owing to privacy risks since it may contain sensitive information (e.g., the identification and location of the UAV). Secondly, for real-time UAV applications, the delay encountered from providing raw data to obtaining a well-trained model may be unacceptable. Finally, sending large amounts of raw data such as images and videos to the cloud uses a lot of energy and bandwidth, which is inconvenient for UAV networks with limited power and bandwidth. As a result, it would be useful if ML model training could be performed directly inside the UAV networks without transferring data out to the cloud.
Recently, Federated Learning (FL), a decentralized ML approach [25,26], has been proposed to solve similar difficulties in which each participating user learns a model based on its local dataset. The local model modifications are then communicated to a parameter server so that a shared global model may be updated. Thus, the UAVs are fed the revised global model for the next round of local training. Local model changes are communicated back to the server in FL instead of the traditional case of sending back the training datasets to the cloud. As a result, training models may be shared while maintaining anonymity, and communication costs can be lowered. Because of these compelling benefits, researchers are increasingly focused on using FL in wireless communications [27][28][29][30][31]. FL was used in resource-constrained MEC [30], while it was also used in IoT applications [28]. Kang et al. [27] discussed a reputation-based worker selection approach for boosting FL's performance, using advanced blockchain-assisted techniques for secure reputation management. It was also used to solve intercell interference and scheduling issues in wireless networks [31]. Furthermore, the performance could be achieved when the signal to interference plus noise ratio was high enough. In the Ultra-Reliable Low-Latency Communication (URLLC) of vehicle networks, Samarakoon et al. [29] introduced FL for solving a combined resource allocation and power issue, proving that vehicular users' power consumption may be beneficially lowered.
The authors of [32] provided energy-efficient strategies for IoT devices regarding channel access schemes for computing offloading and resource management. However, UAV-assisted relaying was not taken into account. The authors of [33] studied ML and DLbased strategies in UAV-enabled MEC networks. However, the authors of [24] introduced Federated DL (FDL) for UAVs in wireless communication networks. Furthermore, the authors of [34] conducted a detailed assessment of computation offloading in UAV-enabled MEC, which was classified into partial, binary, and load relaying. Moreover, the authors of [35] discussed the data processing at the edge based on ML, which was a benefit and drawback in the context of UAVs. The authors of [36] introduced how edge AI will affect critical UAV technical applications and use. In comparison, the authors of [37] addressed where ML methods are applied to improve the network performance of UAVs. The authors of [38] discussed AI techniques related to enhancing Ground, Air, and Space (SAGIN) for remote areas. In Table 1, we provide a summary of related surveys.
Energy efficient UAV-enabled mobile edge computing for IoT devices: a review Using UAV-enabled MEC for energy-efficient resource management approaches in smart IoT device networks × × × [34] (2022) Survey on computation offloading in UAV-Enabled mobile edge computing Focusing on computation offloading in UAV-enabled MEC × × [35] (2019) Survey on machine learning techniques for UAV-based communications Discussing UAV-enabled MEC based on ML × × × [24] (2020) Installing terrestrial systems (i.e., BSs and APs) and utilizing MEC to provide computing tasks to everything in temporary events [39], disaster relief operations, and military operations [40] will not be cost-effective. However, a UAV can collect data and perform computing activities for everything that does not have direct access to BSs [41] due to its flexibility and computation capability. Furthermore, UAV computing can act as a relay station for everything beyond the BS's coverage area. Although UAV computing is a promising technology, it has several obstacles that must be overcome before being widely adopted. Firstly, a practical task offloading decision is necessary to decrease the energy consumption of smart things, UAVs, as well as latency. Secondly, because communication resources (i.e., bandwidth) are limited, an effective bandwidth allocation method at the UAV is required. Thirdly, efficient computing resource allocation techniques are required because the computing resources available in UAV computing are restricted. As a result, computing energy consumption at the UAV computing may grow due to the lack of appropriate allocation techniques, and offloaded device tasks may not be completed on time. We discuss various research related to UAV computing and their application and challenges. Therefore, the contribution of this paper is mainly focused on providing a comprehensive overview of the appropriate techniques that can be used to improve UAV computing performance in B5G networks for supporting services in smart and harsh environments. The contributions of this paper are summarized as follows: 1.
We introduce UAV computing and review the existing work about UAV computing.

2.
We discuss how FL plays a vital role in improving UAV computing for enabling B5G.

3.
We identify and discuss the application of UAV computing.
The rest of the paper is organized as follows. Section 2 discusses the FL Paradigm which can facilitate the creation of a global learning model by multiple participants without sharing local data with each other. In Section 3, we discuss how UAV's computing power can be used as a mobile edge computing infrastructure to support the data processing needs of resource-constrained IoT devices. In Section 4, we review literature on FL-assisted UAV edge computing, drawing special attention to the challenges that FL-empowered UAV computing faces. In Section 5, we analyze work on the collaboration of multi-UAV computing, highlighting various problems that must be addressed for the multi-UAV computing scenario. Geared with the fundamental knowledge provided by these sections, we review the application domains that can benefit from the use of UAV computing. Finally, we discuss challenges and opportunities of UAV computing in Section 7, followed by the conclusion.

Federated Learning
FL is a novel AI paradigm developed by Google in 2016 [26,42,43]. Multiple users work together to create a global learning model in FL, eliminating the requirement for data gathering and exchange with a central server. As a result, FL is a potential privacypreserving solution that has applications in a variety of technical fields and issues, including healthcare [44], intelligent radio access networks [44], IoT intrusion detection [45], and industrial IoT [46]. On the other hand, the traditional FL technique necessitates the presence of a central server, such as an MEC at the network edge [42]. As a result, accomplishing FL activities may be challenging, especially if the terrestrial communication infrastructure is down.
The FL concept has been widely developed, implemented, and utilized in various domains [25]. With the rise of big data [47] and cloud computing, most large-scale research has used distributed learning [48]. FL entails creating an ML model with data located at numerous sources, without the need of sharing data. The issue of data privacy is thereby resolved. This has proven a viable answer to this problem since it maintains user privacy while exchanging information and expertise [49]. Smart behaviors, for example, are presently available on mobile devices. Image classification is used by mobile phones and tablets to anticipate the categorization of images that have been evaluated several times [50]. FL is built on improving user experience through data and information processing. Furthermore, some insurance businesses are concerned about their data security, which they refuse to share with third parties [51]. Multiparty data may be used in the FL framework in this scenario since it overcomes the ML privacy challenge. Recent FL research advances have focused on statistical difficulties [49] and security concerns [52][53][54]. Data interaction among scattered mobile users, imbalanced data distribution, and communication costs in equipment reliability are all elements in this process. It can motivate researchers to keep overcoming problems such as data privacy, computing restrictions, and communication costs. In addition, the FL idea has been expanded to encompass additional cross-organizational collaborative learning programs.
The FL approach allows ML and DL models to be trained collaboratively for edge network optimization, although the performance of a complex edge network consisting of diverse devices with varied restrictions might be affected, which creates a difficulty in this area. As a result, research is underway to develop new frameworks and methodologies for FL. The authors of [55] provided an overview of FL and its applications in many fields in edge networks. The study in [56] used the Stackelberg game to investigate the inefficiency in model update transfer. In addition, the authors in [57] designed a learning-based incentive system for FL using a Stackelberg game formulation and Deep Reinforcement Learning (DRL).
FL solves fundamental issues such as access rights, access to heterogeneous data, privacy, and security by allowing several nodes to create a cooperative learning model without sharing data samples [58]. Traffic prediction and monitoring [59], healthcare [60], communication, IoT [61], transportation and autonomous vehicles [62,63], pharmaceutics, and medical AI are just a few of the areas where this distributed learning technology is being used. Furthermore, because FL users such as IoT devices and small sensors may not have adequate power budgets to engage actively in the FL procedure, it is vital to provide sustainable and energy-efficient solutions to improve the performance of FLenabled networks. For instance, in [64], an iterative approach for energy efficiency in FL is developed, with closed-form solutions obtained at each stage. Furthermore, in [65], developing technology in 6G wireless systems called Intelligent Reflecting Surface (IRS) is used to significantly lower FL users' energy usage compared with those who do not utilize IRS.

UAV Computing
MEC is an excellent way to solve time-constrained computing problems in mobile IoT devices with limited resources. To reduce latency and backhaul network congestion, the goal is to deliver cloud computing closer to users. This allows processing to be offloaded from centralized data centers to the edge of IoT devices, lowering communication latency and energy consumption, as well as improving real-time decision making and control. Because the IoT system uses many end devices, a huge amount of data is offloaded to the edge devices; this necessitates the development of methods to manage and use the data for various reasons, including self-monitoring, automaintenance, and prediction. Many ML solutions for data processing at the edge are limited because of the significant differences in processing capacity and memory between edge computing and centralized cloud servers.
Mobile Edge Computing has lately been examined as an extension of the edge notion. MEC may provide information technology and cloud-computing capabilities to a mobile network, ensuring ultra-low latency and high bandwidth for users [66]. UAVs with communication capabilities, processing, and storage can act as flying MEC at the periphery of the IoT systems. In this scenario, either partially or completely, resource-constrained IoT devices may transfer their computational tasks to MEC-mounted UAVs through LoS communication. Nonetheless, task prediction, UAV deployment, user association, joint resource allocation, and signal processing are hurdles that the system must overcome. For example, UAV cameras acquire a lot of visual data, which the system should evaluate in real time to allow for excellent decision making. Sending data from UAVs to a cloud server would inevitably cause delays. In addition, the deployment of a significant number of IoT devices, such as UAVs, would limit bandwidth, dependability, and security. As a result, processing data at the network edge would result in faster response times, more efficient processing, and reduced network stress. Many strategies for next-generation IoT applications rely on MEC, which is widely recognized as a critical technology.
Due to the availability of on-demand communication services and deployment flexibility, UAVs with computing capabilities have grown in popularity. The authors of [11] introduced UAVs to reduce the total of all users' maximum delays in each slot to the small-est possible value. The UAV's offloading task ratio, trajectory, and user scheduling factors were optimized. Furthermore, due to the battery technology limitations of mobile devices and UAVs, energy-efficient strategies have received much attention. In [15], the authors investigated how to reduce mobile customers' energy usage. The energy-efficient algorithms of UAVs, which have a substantial impact on the performance of the UAV-enabled MEC system, were not taken into account. The authors of [12] investigated minimizing the weighted aggregate energy consumption of the UAVs and users. The scheduling of computing resources, bandwidth allotment, and the UAV's trajectory were optimized in the minimization problem. The authors in [67] also studied the IoT devices' energy consumption minimization problem in a single UAV-assisted system with time-sensitive tasks. Interestingly, this study proposed the use of the UAV for both task computing and caching. The joint optimization considered the trajectory optimization, computing and communication resources allocated at the UAV, and task offloading decisions made at the IoT devices. UAV-assisted MECs for solving task offloading were discussed in detail by using different techniques [68][69][70][71][72][73][74].
In [75], a UAV-enabled wireless-powered MEC server was investigated to reduce the amount of energy required by the UAV. In a UAV-enabled wireless-powered MEC system, the weighted sum computation bits were maximized in the partial and binary offloading modes [13]. The UAV's energy consumption restriction, on the other hand, was not taken into account in [12,13,75]. The duration of the flight is affected by the UAV's energy consumption, which in turn affects the UAV-enabled MEC system performance. As a result, energy-efficient UAV-enabled MEC systems must be designed considering both the UAV's and mobile devices' energy usage.
UAVs have the features of high mobility and ease of deployment, allowing for the provision of on-demand communication services [76]. UAVs have recently gained interest in various applications, including delivery, agricultural, emergency response, and communication services [77]. A UAV computing with on-demand mobility may deliver computing services for mobile users better in some situations than fixed communication infrastructures. The advantages of a UAV computing are underlined in situations where fixed communication infrastructures cannot meet the computing requirements of ground users, such as sites far from communication facilities and places where natural catastrophes have damaged communication infrastructure. A UAV may fly to specific locations on demand to assist users with computational needs, such as monitoring equipment, to complete tasks. UAV computing can reduce the strain of computing in specific locations due to its on-demand mobility. UAVs can be equipped with lightweight CPUs to provide computing services. As a result, UAVs fly MEC servers in the sky, supplementing existing MEC servers on the ground with controlled mobility and high-quality communication connectivity.
UAVs can play various roles in offering edge computing services due to their mobility and ease of deployment. MEC designs with UAV capabilities can be categorized and assigned to a specific application situation. A UAV can function as an Edge Computing (EC) server, an IoT node, or a relay. Firstly, when UAVs transfer their computation to an MEC server, such as in [78,79], they may participate in the system as mobile devices. Secondly, the UAV can serve as the MEC for collecting task data of mobile end nodes to perform task computation. Thirdly, the UAV can be a relay or gateway between mobile end nodes and an MEC server, relaying task data of mobile nodes to the MEC server. A UAV-enabled MEC has been proposed in response to the disadvantages of terrestrial MEC networks [80,81], in which the edge server is installed on a UAV to allow computing offloading for users. Compared with standard terrestrial MEC networks, the UAV-enabled MEC network provided dependable LoS to users and was installed with variable mobility [82]. Furthermore, the terrestrial networks are damaged and destroyed during the disaster. Therefore, the terrestrial MEC network might be turned off (e.g., in [83]), and the UAV MEC will provide computing services to the users. Figure 2 demonstrates UAVs' deployment to support terrestrial computing and enable UAV computing for everything in the disaster area. The collaboration of multi-UAV and Search and Rescue (SAR) teams in B5G plays a vital role in improving safety and reducing the economic impacts of disaster [84,85]. Interestingly, the authors in [86] studied a combination of roles of a single UAV in terms of edge computing functions and focused on reducing the computational complexity of a UAV-aided MEC system. In this work, the mobile users/devices have the option to compute their own tasks, offload some task bits to the UAV for computing, or the UAV can offload tasks on the devices' behalf as a relay to the terrestrial AP for computing. However, there are still some serious challenges with UAV computing. Firstly, placing the edge computing on a UAV increases the strain on the UAV and the amount of energy consumed by the propulsion system. Secondly, a UAV's battery capacity is restricted, and a UAV's service time is reduced. This is intensified by the transferring of users' computing work to the UAV, which intensifies the UAV's computation-related energy consumption.
Furthermore, the relevance of selecting an energy-efficient UAV computing design while intending to extend the UAV's service duration is highlighted because computation-related energy consumption is more significant than communication-related energy consumption. Finally, adding an extra edge server to a UAV raises the production cost of the UAV. As a result, there is still much interest in discovering new cost-effective and energy-efficient UAV computing solutions. Figure 3a illustrates the importance of using UAVs as MEC servers on the board and flying to help everything, including users, sensors, robots, etc. The computing task is performed in a UAV with the help of intelligent techniques. Furthermore, the UAV serves as a central relay, as shown in Figure 3b. It is shown that the UAV is aiding the mobile users in offloading their computational responsibilities to a particular MEC server. Despite the significant advantages provided by the design of UAV-enabled MECs in achieving low-latency and high-reliability services for IoT devices in smart environments, UAV computing faces several challenges. These challenges include intra-UAV communication, UAV security, air data security, data storage, and management. Because of the system's mobility characteristics, which impede communication, coordination between UAVs and ground-based users requires significant improvement. The limited onboard battery capacity of UAVs is another critical restriction. As a result, developing practical resource and energy management systems are critical. Therefore, the multiple sources of variability in UAVs have prompted researchers to construct an incentive mechanism using a multidimensional contract theoretic approach [87]. The authors of [88] introduced the use of a matching problem to study the joint optimization of route planning and task assignment for UAVs from the energy efficiency perspective. Contract matching has been studied for resource allocation in vehicular fog computing in [89,90].
Due to memory capacity and energy consumption limitations, several parameters should be addressed before implementing any Artificial Intelligence (AI) approach to benefit from its resilience [91]. Even with limited computational capabilities, edge com-puting offers resources in a decentralized fashion, allowing for a speedier response to user requests than traditional cloud computing. Task scheduling, resource allocation, and offloading are just a few issues that significantly impact overall performance. Nonetheless, nonconvexity and complexity define the majority of the offered methods since they enable continuous learning in real-time inference and dynamic environments with minimal computing complexity. Over the last few decades, applying AI to networking problems has grown in popularity. Because of its capacity to interact with complicated surroundings and make judgments, ML has been widely applied in the networking area. A follow-me cloud controller collects information about the overall system status in most UAV-enabled MEC setups (i.e., MEC servers, UAVs, and users). This control unit is in charge of employing AI to manage offloading activities.
A cloudlet placed on a UAV for a UAV computing collaboration is shown in Figure 4. The UAV receives offloaded tasks from smart environments and returns the results after completing the task. Furthermore, if complicated processing needs exceed the capability of the onboard cloudlet, the UAV might send the acquired data to the nearest cloud center for other computing. The system might incorporate many UAVs that support deployed everything in smart environments, such as smartphones, sensors, people, cars, robots, etc. For example, resource allocation in DRL does not require labeled training data. As a result, it may improve the making of offloading decisions depending on the channel environment's various states. As a consequence, the energy bandwidth and calculations are reduced. By examining the instability of energy arrival, stochastic computation workloads offered by wireless users, and a time-varying channel state, a Markov Decision Process (MDP) approach was developed to minimize the latency, bandwidth, and energy consumption in UAV-assisted MEC [92].
Furthermore, the authors of [93] devised an optimization problem based on MDP to solve UAV path optimization in UAV-mounted MEC networks. The goal of the technique was to improve overall system QoS [11,94,95,[95][96][97], optimize long-term system rewards, and fulfill the QoS constraint, which included mobile users' computing duties. The use of Reinforcement Learning (RL) for QoS enhancement was studied in a multi-UAV MEC system to also achieve path planning and cost savings [98] with optimal locations [99,100].
The authors of [101] employed a semi-Markov process and DRL-based algorithms to handle the offloading choices and resource management rules of UAV-enabled MEC networks. A DL-based resource scheduling algorithm was proposed in [102] for hybrid MEC networks wherein the ground BSs, UAVs, and ground vehicles all have edge computing facilities to assist IoT devices with computing task offloading. In this work, the authors proposed an online algorithm for task offloading to minimize IoT devices' energy consumption. This is achieved through an optimization of the positions of the UAVs, the ground vehicles, user association, and resource allocation. The authors in [103] applied the AI techniques of FL and Reinforcement Learning for intelligent task offloading and computing resource allocation decisions in a UAV-NOMA MEC system. The development of next-generation communications would be aided by UAV-assisted MEC-based DL and DRL [104].
Moreover, the Deep Supervised Learning (DSL) technique reduces mobile users' computing and offloading overheads and costs in the MEC system [105]. This approach enables terrestrial users to achieve an appropriate offloading strategy that saves energy and improves processing performance. In UAV-enabled MEC networks, the authors of [106] employed RL and transfer learning algorithms to minimize latency and energy consumption. They demonstrated that combining transfer learning with RL may greatly improve system training performance when users operate dynamically. The authors of [107] applied AI approaches to UAV-NOMA-MEC networks. They presented an architecture built on FL and reinforcement learning. Furthermore, reference [108] discussed resource allocation and path design for drone-aided MEC.
In [109], the authors described a flying UAV-MEC platform, in which UAVs are equipped with computer resources and provide task-offloading services to users. The fundamental goal of the proposed design was to improve UAV aerial trajectory, user association, and resource allocation. The optimization problem was solved using the trajectory control approach, aided by an RL-based strategy. This strategy outperformed the outcomes of comparable benchmark approaches. Furthermore, by evaluating the user's mobility data to discover ideal initial UAV deployment sites [110], an ML-based innovative framework was created to optimize UAV trajectories. A multiagent Q-learningbased approach was used to handle the combined problem of UAV trajectories and power control to increase the sum rate and maintain the data rate needs of mobile users. A smart offloading technique based on deep Q-learning was presented in [111] to maximize performance in terms of the delay observed by users linked to the Flying Ad hoc Networks (FANET) to allow MEC in the B5G field.
The combined trajectory design in UAV computing networks is a crucial design difficulty in meeting computing task needs by mobile users. In this context, research efforts should focus on predicting mobile user movements and tracking the trajectory so that computing tasks may be offloaded promptly and computation results can be returned to consumers on time. When dealing with multi-UAV computing, trajectory design is more complicated. Another issue is the blockchain's interaction with UAVs. UAVs confront several hurdles as a stand-alone technology, including privacy concerns, air traffic violations, quantum assaults, ML, and algorithmic game-theory-based attacks [112].

Federated-Learning-Empowered UAV Computing
Recently, FL has emerged as a viable distributed ML paradigm to address the shortcomings of traditional cloud-centric ML, which relies on a single entity to aggregate continuous ML models. FL protects device privacy, improves perceived latency, and relieves bandwidth and energy strain by allowing numerous devices to train an ML model cooperatively without sending the raw data out. As a result, FL is more suited for wireless edge networks than cloud-centric ML [62]. FL allows wireless edge devices to simultaneously learn a shared ML model while maintaining all raw data on the device. Moreover, numerous FL paradigms, such as collaborative FL [113], multihop FL [114], and fog learning [115], have been discussed to better adapt to the features of wireless edge networks, such as multihop, while a first FL framework for UAV networks was presented in [116]. Figure 5 depicts an FL-powered UAV computing collaboration scenario.
Virtually all current FL paradigms are still centralized, which means that a single individual is responsible for ML model accumulation and fusion over the existing network, which can result in a single point of failure and is unsuitable with UAV networks with both unreliable links (or fluctuating links because of unpredictable UAV mobility) and nodes (due to node failures because of UAVs' drained-out on-board battery). They could run into a single point of failure problem, which is undesirable for UAV networks with unreliable nodes and connections because FL training would also have to end if the UAV ran out of energy or the wireless links among the UAVs failed due to UAV mobility, for example. It is worth mentioning that much research on decentralized ML exists, such as in [117], whereas the authors of [118] are more concerned with classical distributed ML than with FL, and they seldom explore how to apply decentralized FL to UAV networks. The authors of [119] addressed the issues with typical cloud-centric ML for UAV, such as privacy concerns, unacceptable latency, and resource load. To train a high-quality automated picture identification model, the authors of [120] developed an approach that depended on UAV swarms sharing ground-truth tagged data. Furthermore, they described a semisupervised FL (SSFL) for privacy-preserving UAV image identification. The proposed framework used Federated Mixing (FM) to enhance the naïve combination of FL and semisupervised learning methods. Below, we discuss related work on FL-empowered UAV computing.

WPC and EH:
UAVs can be used as an MEC server and an energy transmitter for terrestrial users [13,18]. The optimization of a UAV's trajectory is discussed to improve performance in terms of computing resources [13], whereas the authors in [18] optimized the total required energy by a single UAV in the UAV-assisted wireless-powered MEC system by jointly optimizing the UAV's transmit power, CPU frequencies, trajectory, and offloading amount. Several research papers suggest FL-based collaborative learning techniques, including UAVs. To the best of our knowledge, ref. [116] is the first work to suggest the use of FL for joint power allocation and scheduling of UAV swarms. With data privacy restrictions becoming more severe, FL adoption can help collaborative learning build successful AI models without requiring the transmission of potentially sensitive raw data to a cloud server. As a result, it is critical to think about how to construct an incentive mechanism for FL in UAV networks. Due to the lack of terrestrial connectivity and the battery limitations of FL users, conducting FL chores may be impossible. Therefore, the authors of [126] deployed UAVs and WPC for FL networks to overcome these difficulties. A UAV equipped with edge computing and WPC capabilities is deployed as an aerial energy source and an aerial server to conduct FL operations to allow sustainable FL solutions. Furthermore, the authors proposed an energy-efficient, combined approach for UAV placement, power control, transmission time, model accuracy, bandwidth allocation, and computing resources that aims to reduce the total energy consumption of the aerial server and users.

Channels propagation:
The authors of [127] presented an FL-assisted categorization strategy in which each UAV performs local training on locally obtained pictures to generate a local model. Subsequently, each UAV sends its locally acquired model over a fading wireless channel, which generates a global model, then sends it back to each UAV for the next round of local training. In addition, a Weighted Zero Forcing (WZF) transmit precoding (TPC) based on genuine, imperfect channel state information is employed at each UAV to further reduce the computational cost.
The authors of [128] developed UAV-assisted disaster relief networks based on blockchain and ML to accomplish safe and efficient data transfer. The authors initially described a lightweight blockchain-enabled collaborative aerial-ground networking architecture to ensure data transmission in a disaster, followed by a credit-based delegated proof-of-stake consensus protocol to improve consensus efficiency while encouraging UAVs to be honest. A new RL-based approach is designed to intelligently offload UAV computation missions to moving vehicles in the dynamic environment by using the idle processing resources of ground vehicles.

Reconfigurable Intelligent Surfaces (RIS):
Reconfigurable Intelligent Surfaces (RIS), also known as Intelligent Reflecting Surfaces (IRS), are programmable structures that can be used to engineer the wireless propagation environment to enhance network performance. In the context of UAV air-to-ground networking, the integration of RIS is being proposed to improve the communication security and performance [129,130].
Shang et al. [131] studied the UAV swarm-enabled ARIS (SARIS), including its motivations and competitive advantages over terrestrial RIS (TRIS) and ARIS, as well as its innovative wireless network applications. The authors focused on the beamforming design, SARIS channel estimate, and SARIS deployment and movement to solve the essential issues of developing the SARIS. With early numerical findings, the possible performance augmentation of SARIS was examined. To improve the performance of UAV-assisted air-ground networks, Pang et al. [129] proposed using RIS. The authors provided an overview of UAVs and RIS by describing the many uses of RIS and the compelling characteristics of UAVs and the advantages of combining them [129]. The authors next looked at two case studies in which the UAV trajectory, transmit beamforming, and RIS passive beamforming are all optimized together. The average attainable rate of the relaying network is maximized in the first case study by mounting the RIS on a UAV. The RIS is used in the second case study to aid UAV-ground communication while battling an adversary eavesdropper.
Privacy: UAVs-based service providers for data gathering and AI model training, also known as UAVs-as-a-Service (or Drones-as-a-service, DaaS), have been increasingly popular in recent years. However, the strict restrictions controlling data privacy may make data exchange between independently owned UAVs difficult. Therefore, the authors of [132] introduced an FL-based strategy to allow privacy-preserving collabora-tive ML across a federation of separate DaaS providers to develop Internet of Vehicles (IoV) applications such as traffic prediction and parking occupancy management.
Caching: Content caching in edge computing appears to be a viable approach [42]. It entails delivering popular material closer to the edge, which may be used locally at BSs or APs. Furthermore, UAVs can serve as BSs to improve caching efficiency by detecting users' mobility and efficiently delivering popular material [133]. However, this use case inherits the aforementioned UAV deployment issues. The hybrid CNN with LSTM method is better in this situation for dealing with the spatio-temporal aspects of both mobility patterns and content request distribution. The aggregated learning model then assists in the deployment of UAVs.
As mobile users, one of the primary issues of such a paradigm is determining which contents should be efficiently saved in each cache by estimating the popularity of UAVs. However, content discrimination necessitates direct access to private UAV information, which is not feasible. FL is a match made in heaven for content popularity prediction since it allows for local model training, respecting user data privacy. For example, an Augmented Reality (AR) application needs access to users' privacysensitive data to collect popular augmentation elements. Because this task is a binary classification problem, an ANN algorithm may be utilized in a federated manner to learn these popular pieces before storing them locally to save latency.
Delivery Services: Traditional cloud-based facial recognition algorithms for receiver location and identification in UAV delivery services have several cost, latency, and dependability issues. The authors of [134] presented Fed-UAV, i.e., the edge-based FL framework to handle the person re-identification problem in the UAV delivery service. The framework allows the UAV to detect the target receivers rapidly and effectively decrease data transfer between the UAV and the cloud server, resulting in faster reaction times and data privacy protection. Experiments on three real-world datasets are undertaken, and the results indicate that Fed-UAV achieved high accuracy and efficiency in human re-identification while maintaining data privacy. The UAV primarily employs face recognition to determine the receiver's identification [135,136]. On the other hand, facial recognition requires high-quality facial photos, which are difficult to produce in a complicated situation such as an outdoor and busy location for UAV delivery.

Collaboration of Multi-UAV Computing
Recently, UAV computing has emerged as a viable solution for offering computing services to everything in smart and harsh environments. However, due to the restricted UAV computing capability and UAV energy limitation, it is difficult to satisfy the computation requirements of smart and harsh environments because each UAV works separately as an independent unit. Therefore, a multi-UAV computing collaboration is required. A collaborative multi-UAV-assisted MEC system was introduced in [137], combined with an MEC-enabled ground BS. Then, the challenge of minimizing delay for everything is investigated by optimizing the offloading decision and allocating communication and computation resources while meeting the energy restrictions of both UAVs and everything in smart environments. The authors of [79] also proposed an intelligent task offloading algorithm for UAV-empowered MEC services in which the UAVs offload computing tasks to fixed MEC servers. UAV BSs are clients in this system, served by MEC and cloud servers, and the task latency performance improvement was studied.
Previous studies discussed UAV computing over a terrestrial MEC station [16,[138][139][140][141][142][143][144]. For example, the authors of [138] presented UAV trajectory control based on DRL in UAV computing, but task offloading and resource allocation were not considered. The authors of [145] investigated the combined resource allocation and UAV trajectory optimization in UAV computing to maximize UAV energy efficiency. Moreover, the authors of [140] investigated the issue of hierarchical reinforcement learning-based task scheduling in UAV computing. The authors of [141] presented a non-cooperative game for effective resource management in UAV computing to decrease the age of information. A Stackelberg game-based resource pricing and trade mechanism for a blockchain application was proposed in [142]. This was used to optimally allocate computing resources at UAVs and BSs. The authors of [16] discussed UAV computing issues for task execution time and energy reduction [16]. However, all previous studies [16,[138][139][140][141][142] focused on a single UAV computing. Meanwhile, the authors of [143] examined the multi-UAV scenario from trajectory planning. In multi-UAV computing, the aim is to optimize fairness among everything in smart environments. The authors of [144] proposed an energy-efficient communication and computation resource management in a two-stage mobile computing system aided by multi-UAVs. The authors postulated that the UAV compute a portion of users' offloaded computing activities while the remainder is transmitted to the MEC-enabled BS. An integrated MEC system of UAVs and ground vehicles is considered in [146] for providing communication, storage, and computing services to the IoT devices. In contrast to this work, the system in [102], as we discussed in Section 3, is also an integrated MEC system, however, it includes ground BSs as well in the MEC system, whereas the system in [146] does not.
While the work reported in [143,144] introduced multi-UAV computing, this work did not go into the problem of joint job offloading and communication and computing resource allocation to reduce overall latency for users. Furthermore, previous research has not taken into consideration UAV collaboration. In contrast, in multi-UAV computing connected to enabled terrestrial BS, the authors of [137] presented a combined task offloading and resource allocation issue that considers collaboration among UAVs computing. Furthermore, the authors in [147] used a multi-UAV task offloading for ground users to minimize energy consumption of the users through a joint optimization of UAV trajectory, task scheduling, and bit allocation. A dynamic programming-based bidding optimization method was used for the task scheduling optimization.
Previous studies [148,149] presume that each server can only perform one task at a time and schedules each task separately, potentially resulting in increased communication overhead. Furthermore, the schedulers place tasks on nodes (virtual machines) with sufficient resource availability at random without taking into account dependent tasks, resulting in longer execution times, resource wastage due to underutilized nodes, and a reduction in the number of tasks that can be executed given the available resources. Therefore, the authors of [150] proposed a federated multioutput linear regression model for estimating multitask resource requirements and execution time. As a result, the closest multitask dispatching policy for selecting the closest UAV deployment with congruent resource availability and flight time executes tasks at a given time and autonomously deploys the selected UAV to the needed location. The mission response time minimization problem was studied in [151] using a multi-UAV MEC. The authors used multiagent reinforcement learning to minimize the average response time for traffic management applications, taking account of UAVs' energy limitation, interdependencies of tasks, and the variable nature of the network states.
Multi-UAVs acquire and evaluate environmental photos of smart or harsh environments before submitting model changes to an aggregate server at the ground fusion center [127]. Multi-UAVs are deployed as FL users, and a swarm leader is considered the aggregation server in a holistic air quality monitoring architecture with two primary components, ground and air sensing [152]. Both studies treat UAVs as learners. In the next sections, we discuss various research related to UAV computing and its applications and challenges. In Table 2 (continued in Table 3), we provide a summary of related works that are reviewed throughout this paper.
Reducing the computational complexity of UAV-aided MEC.
RL for QoS enhancement in a multi-UAV-enabled MEC system.
Intelligent task offloading algorithm for UAV-empowered MEC services.
Enhancing the performance of the entire MEC UAV platform .
UAV-assisted MEC acting as a relay between MEC and users.
AI techniques are used in a UAV-enabled MEC for the NOMA system.
Integration of UAV and ground vehicles in terms of computing, communication, and storage.
UAV for task offloading improvement with reducing energy consumption.
UAV-aided MEC of a multiuser system based on frequency division multiple access for demonstrating task offloading.
Power control and resource allocation in a UAV-empowered MEC system .
UAVs as MEC-assisted wireless communication networks to achieve excellent QoS for users.
UAV-enabled MEC to optimize users' task offloading and energy demands.
Securing a UAV-MEC system where multiple users offload large computing tasks.
Enhancing the processing capacity and the security of UAV-enabled MEC by optimizing the trajectory and resources.
DNN for image processing in UAV, i.e., an edge server and improving product quality and cost.
Reducing computation time and energy usage by using task offloading techniques for multi-UAV-enabled MEC.
UAV deployment as a mobile edge server to manage real-time offloading processing activities for users.

Applications of UAV Computing
UAVs have recently gained a lot of interest in various applications, including delivery, agriculture, emergency response, communication services [77], and mars exploration [154]. The authors of [33] evaluated UAV mobile edge computing for upcoming IoT applications and the role of ML and DL in overcoming latency, job offloading, energy demand, and security constraints. Below, we provide a range of application domains where UAV edge computing could be used, as also shown in Figure 6.

Industry 4.0
As the need for quick and low-cost productivity grows, industrial and scientific groups are increasingly incorporating robots into the manufacturing process. AI and ML play a vital role for improving robotic communication effectively and efficiently [155,156]. In response to the rising requirement for productivity, industrial solution providers have recently focused on UAVs. For example, the authors of [157] presented an industrial IoT-based system that gathers data from a UAV camera and transfers it to a cloud server for processing. Using the robust intelligence of computer vision technologies [158], the design seeks to monitor the industrial zone to prevent unpleasant accidents in the manufacturing process. Drones have also become more popular in the mining industry for 3D mapping, public safety [159], and management [160]. The combination of AI, digital twins and blockchain can play a vital role in improving industry 4.0 [161][162][163][164]. However, UAV computing with the above-mentioned technologies will make the developments of Industry 4.0 easier.

UAV computing applications
Smart agriculture Healthcare

Agriculture
Drones have been used to scan big agricultural fields to discover illnesses early on that jeopardize plant quality. Using image processing and AI classification based on IoT architecture and real-time data capture, the deployed system can forecast agricultural illnesses in real-time [165]. The authors of [166] presented an architecture that combines UAVs, Wireless Sensor Networks (WSNs), and IoT to deliver precision ecological agriculture. Another architecture has been developed to analyze pictures taken using UAV aerial multispectral sensors using the DL technique for crop mapping monitoring and disease evaluation based on satellite data [166]. In addition, in [167,168], UAVs played a vital role in increasing the productivity of farming activities. Furthermore, UAVs play an exciting role in agricultural monitoring by enabling various previously available tasks to laborers and former [169,170].

Healthcare
Drones can help manage various public health issues, including epidemics and dangerous illnesses such as COVID-19. During the COVID-19 pandemic, for example, certain governments and nations used drones to scan the virus's fast spread, identify patients, and then estimate mortality risk factors using AI algorithms to the acquired data. Drones have been used to monitor crowds, transmit public announcements and information, spray disinfectants, and take thorough temperature readings in various residential environments [171]. The lifeguard community often uses UAVs for search and rescue operations that need quick action. Instead of utilizing human-crewed airplanes, which may take longer to deploy, UAVs' adaptability quickly assesses the rescue scenario [172]. Using UAV computing, AI, and computer vision techniques to imitate visual reality might lead to new applications that allow for speedier and real-time judgments in emergencies. UAVs, for example, identify impediments by flying over them, collecting data, extracting the essential aspects, and making choices using machine vision and pattern recognition technology. People with vision impairments can navigate more quickly in this manner. This technology is anticipated to be a critical component of the healthcare revolution [172].

Natural Disaster
UAVs have the features of high mobility and ease of deployment, allowing for the provision of required communication services [76] quickly. UAV computing may deliver required computing services for mobile users with on-demand mobility in a more responsive way than fixed communication infrastructures. The advantages of UAV computing are underlined in situations where fixed communication infrastructures cannot meet the computing requirements of ground users, such as sites far from communication facilities and places where natural catastrophes have damaged communication infrastructure. The UAV may fly to specific locations to assist everything with computational needs, such as monitoring equipment to complete tasks. UAV computing can considerably reduce the strain of computing in specific locations due to its on-demand mobility. A timely and efficient reaction is essential during natural disasters to aid people, avoid increasing the number of victims, and reduce the economic damage [173,174]. For example, UAVs can promptly respond to earthquake assistance requests, locate missing individuals, and assist in monitoring and rescuing flood victims [175]. Furthermore, using UAV computing with AI to collect vast data from various sensors installed in the environment might assist in the forecasting and acting in natural disasters such as tornadoes, volcanic eruptions, tsunamis, and storms [176].

Surveillance
UAVs are being used to monitor and survey in numerous application scenarios, such as environmental and wildlife monitoring and traffic control for archaeological site monitoring and data aggregation. UAV technology can also be used as a support platform for older approaches in ecological monitoring systems to follow animals in varied territories and topographically demanding places [177]. Furthermore, this technique may aid geological researchers in gathering distant data on various species and animals [178]. Employing the latest computer vision techniques and cloud computing technologies, the authors of [179] suggested an intelligent model based on UAVs for monitoring various types of plants. UAVs are also employed to track huge groups of wild animals [180]. A fleet of MEC UAVs were used in [153] for video monitoring applications in 5G networks. The MEC UAVs platform was optimized for low-latency performance.

Smart Environments
Due to various activities in which UAVs as mobile vehicles will play many pivotal roles, such as transportation [181], infrastructure control and management [182], and building observation [183], the urban environment is expected to acquire a massive number of dynamically connected devices. UAVs are anticipated to provide communication services to heterogeneous smart devices in metropolitan settings to improve smart environments [184,185]. For instance, the authors of [186] presented a 5G hierarchical IoT network design in which UAV computing worked as a data fusion center, formation controller, and network gateway. In another study, UAVs were employed to deliver lightweight components to workstation operators within a manufacturing facility where GPS could not provide a realistic solution for interior locating and intelligent shipping, monitoring, and control [187].

B5G Networks
Many attempts have been made in the networks sector to fully realize the potential of UAV communications for cellular and wireless communications. The research community investigated the possibility of UAV-mounted usage via flying relays and BSs that can dynamically relocate themselves to extend network coverage, increase spectral efficiency, and improve user QoS. UAVs can have low-altitude support beyond LoS control and reliable communications [188]. Furthermore, UAVs can provide various services to cellular IoT-based networks by offering processing facilities for consumers close to the ground.
6.8. Industry 5.0 Industry 5.0 is a manufacturing paradigm change that prioritizes human-machine interaction. It has emerged due to advances in AI, distributed computing, and B5G connectivity [189,190], and it is likely to accelerate even further with the inclusion of supporting technologies such as FL and industrial edge computing [191]. In addition, industry 5.0 will minimize latency, boost overall data security and privacy, increase efficiency, and support transactions hindered by limited connection thanks to the development of UAV computing [192]. The availability of AI UAV computing to process data locally and make decisions in real time and UAV computing is a component of the 6G revolution; UAV can play a vital role in improving Industry 5.0. By providing characteristics such as reduced latency, continuous connection, and greater efficiency across many applications, UAV computing can allow essential elements of Industry 5.0 such as resilience, sustainability, cost effectiveness, security and human centeredness.

Privacy and Security
Although the major goal of the FDL idea is to protect data privacy, sharing some local models may nevertheless divulge private information. As a result, the authors presented a safe aggregation approach in [193], which allows clients to encrypt their local models while enabling the FL server to aggregate them without decrypting them. Analyzing the global aggregated model, on the other hand, can nevertheless assist in revealing the participation of some learners. As a result, building algorithms to offer privacy at the participant level is critical rather than preserving obtained data.
Providing privacy at the UAV in the context of UAV networks necessitates high computing workloads and those required for local learning. As a result, efficient FDL algorithms that balance clients' limited resources and privacy protection are critical. Similar to typical ML algorithms, the local models are updated regularly as new data is acquired. By inserting poison data or poison gradient updates, an adversary can affect the outcome of the FL process. In this context, FDL algorithms must resist data-poisoning and modelpoisoning adversaries, whereas robust strategies against such adversarial assaults are also essential.
Another critical security challenge is that of selecting legitimate edge computing UAVs by the IoT devices for task offloading when there are eavesdropper UAVs in the environment [73]. This particularly is challenging in the context of edge computing since security solutions introduce additional latency, whereas the major attraction of using edge computing is to improve the response time of task computing needs by the IoT devices. The UAV MEC systems need to be designed to tackle this challenge. The optimization of UAV transmit power, UAV jamming signals, and UAV locations are useful in this respect. As was stated in [73], there exists a trade-off between security and the latency of UAV MEC systems which is dependent on the UAV energy budget and UAV self-interference efficiency.
Mobile Edge Computing using UAVs faces further security challenges due to attacks on the UAVs platforms. These attacks compromise UAV data and hamper their mission or physical safety [194,195]. A battery depletion attack [196], for example, can drain out the UAV's battery faster, which shortens the mission time, creating unplanned service disruptions. There is a recent trend to use blockchain technology to address the cybersecurity problems of UAVs [197,198]. Additional research is needed to devise solutions for making the UAV platforms safe from external attacks so that a reliable UAV MEC infrastructure can be established.

FL Scalability
The success of the FL process is heavily reliant on the involvement of local learners, who enable both global and local model changes. In this context, additional research is needed to create scalable FL algorithms at all levels, including determining the ideal number of UAVs and the frequency of local and global model updates. Furthermore, participants are presumed to be linked to the FL system at all times. However, specific UAVs in UAV networks may turn off, affecting learning performance due to energy or connection limitations. As a result, FL algorithms must withstand client dropouts by predicting such events.
Another problem is finding the right UAV learners for the correct data, especially when the data is unlabeled or mislabeled. In reality, present research assumes that data is tagged, which is not necessarily the case with data collected by UAVs. As a result, the planned FL method should be resistant to such challenges, for example, by allowing the UAVs to learn the labels of acquired data as a first step.

Energy Efficiency
The energy efficiency of UAV computing is the most common and pressing concern hindering UAV's commercial deployment. The endurance time of a UAV is limited, especially for small-sized ones, owing to battery technological limitations [199]. The energy consumption of communication, payload, and computation in UAV computing impacts flight duration, and therefore the service time. Furthermore, mobile IoT devices are constantly battery-powered, thus because of the long-distance transmission requiring higher power, task offloading performance is compromised. In certain hard-to-reach regions, such as monitoring devices in IoT [200], changing the batteries of mobile devices is problematic. As a result, to reduce the energy consumption of both the UAV and mobile devices, energy-efficient UAV computing with multicriteria optimization must be designed.

Conclusions
The next generation mobile communication networks, such as 6G, have stringent requirements of supporting a massive number of devices with their computing and communication needs with ultra-low latency and high bandwidth. UAVs are being considered as an integral part of these networks to bring additional capacity of communication and computing where the devices are located. To this end, mobile edge computing services provided by UAVs can significantly contribute to fulfilling the data processing needs of IoT devices, addressing computation-intensive offloading and latency issues. Motivated by applications of UAV computing in 6G and Industry 4.0/5.0, in this survey, we provided a comprehensive review of UAV edge computing technology for 6G smart environments. We illustrated the utility of UAV edge computing, which can be a crucial infrastructure in various application domains. We drew special attention to the need of providing privacypreserving computing solutions, especially when ML is used, in UAV computing. In particular, we explained the role of FL in privacy-preserving UAV edge computing, drawing from the recent literature. We thoroughly investigated a novel area of research where federated learning methods are applied to improve the performance of UAV computing networks. Specifically, we elaborated the role of FL in UAV computing achieving privacy, which includes the decentralization of data for FL model development and the reduction in information sharing among the FL agents to achieve data privacy. We explained the collaboration of multi-UAV computing for achieving common goals in the real world. We further discussed UAV edge computing challenges and opportunities that will guide future research in this area. The UAV and IoT energy limitations, wireless communication security, data privacy, as well as the scalability of ML solutions will dictate future research in the domain of UAV-assisted mobile edge computing in smart IoT environments.