Characterising the Agriculture 4.0 Landscape—Emerging Trends, Challenges and Opportunities

: Investment in technological research is imperative to stimulate the development of sustainable solutions for the agricultural sector. Advances in Internet of Things, sensors and sensor networks, robotics, artiﬁcial intelligence, big data, cloud computing, etc. foster the transition towards the Agriculture 4.0 era. This fourth revolution is currently seen as a possible solution for improving agricultural growth, ensuring the future needs of the global population in a fair, resilient and sustainable way. In this context, this article aims at characterising the current Agriculture 4.0 landscape. Emerging trends were compiled using a semi-automated process by analysing relevant scientiﬁc publications published in the past ten years. Subsequently, a literature review focusing these trends was conducted, with a particular emphasis on their applications in real environments. From the results of the study, some challenges are discussed, as well as opportunities for future research. Finally, a high-level cloud-based IoT architecture is presented, serving as foundation for designing future smart agricultural systems. It is expected that this work will positively impact the research around Agriculture 4.0 systems, providing a clear characterisation of the concept along with guidelines to assist the actors in a successful transition towards the digitalisation of the sector.


Introduction
It is common knowledge that agriculture is a vital activity for human livelihood, providing food, feed, fibres, fuel and raw materials. It is expected that the global population will reach 8 billion people by 2025 and almost 10 billion by 2050 [1]. This will lead to a significant increase in the demand for countless human needs, namely food, in terms of quantity and quality. To accommodate these needs, global food production must rise about 60-70% [2,3]. Furthermore, the vulnerability of agricultural systems to weather will increase due to the increased frequency of extreme events (e.g., heat and cold waves, droughts and heavy precipitation) associated to climate changes, soil degradation, environmental pollution, scarcity of natural resources, etc. In fact, estimated future climate changes are believed to further amplify the already existing climate-related risks and create new ones [4], turning the practice management measures as crucial to face new environmental challenges. Therefore, there is a huge concern on global key trends and challenges that will influence both agricultural and food sector in the incoming decades. A clear example of this is the Considering this, the remainder of this document is organised as follows. Section 2 (Principles and Methods) presents the fundamental principles and methods used to obtain the emerging trends of Agriculture 4.0 in the last ten years. Section 3 (Emerging Trends of Agriculture 4.0) illustrates and discusses the obtained results in the general analysis of the collected documents. Based on the results, Section 4 (Agriculture 4.0 Core Technologies) provides an overview of the core technologies used in the context of Agriculture 4.0 and Section 5 (Agriculture 4.0 Applications) identifies the main application domains where the mentioned trends are employed and ends with a summary of some applications examples used in a real scenario or under-development. Section 6 (Agriculture 4.0 Challenges and Research Opportunities) explores some challenges faced by new technologies in the agricultural environment and proposes future research directions. Section 7 (Cloud-based IoT Architecture for Agriculture 4.0) describes a typical architecture for the implementation of a smart system in the context of Agriculture 4.0, considering the topics discussed in the previous sections. Section 8 (Discussion and Future Directions) provides a discussion regarding the realisation of Agriculture 4.0 concept within the agri-food sector. Lastly, Section 9 (Conclusions) answers the proposed RQs and culminates with the authors' conclusions about the topic under study and future insights related to what is being researched.

Review Principles
The present study was performed through a combination of quantitative and qualitative methods, inspired by the methodology applied by Peres et al. [22].

Quantitative Method
The quantitative method consists on analysing the selected literature using a semiautomated technique based on natural language processing (NLP), allowing the analysis to be carried out in a shorter amount of time compared to manual methods. It is important to note that, for this analysis, the authors treated the scientific documentation equally, i.e., rankings were not considered in this first broad analysis. Considering this, criteria for including collected documents of interest were explicitly outlined (Table 1), in order to ensure that they can be evaluated consistently. With the fast progression of the technological era, several online research repositories and search engines provide easy access to a massive amount of digital documentation. Web of Science, Scopus and ScienceDirect were chosen due to their scientific and technical content and because they are closely related to the areas of knowledge associated with the objective of this article. These digital libraries were used for the semi-automated search process to understand the evolution of the topic under study over the last ten years and to identify the emerging trends in the context of Agriculture 4.0.

Qualitative Method
As a qualitative assessment, a literature review of the results obtained from the previous step (Section 2.1.1) was conducted to provide further insights into the current status of Agriculture 4.0. To ensure the quality of the study, preferences were given to Q1 and Q2 articles and manuscripts of relevant conferences, based on the empirical experience of the authors. Additionally, other online repositories (IEEE Xplore, Google Scholar, etc.) and publications outside the chronological range outlined in Table 1 were considered of added value for the explanation of some concepts in the following sections of this document.

Search String
A semi-automated method was used to search, identify, select and evaluate preliminary documentation, by using the digital repositories identified in Table 1. The first step was to define the search terms to select credible scientific publications. Accordingly, a list of keywords was created based on the experience of the authors in the topic under study and divided into two groups ( Table 2): Group 1 included the terms related to key enabling technologies for smart agricultural systems, while Group 2 included those keywords associated to the agricultural domain itself. The wildcard ("*") was applied in the end of some words to include all possible variants of that same word. For instance, "Agricultur*" can englobe possible words such as "Agriculture" or "Agricultural" and other related ones. The boolean "AND" was used to link keywords from different groups in the search string, while "OR" was used to link keywords within the same group.

Group
Keywords 1 "Internet of Things", "Artificial Intelligence", "Machine Learning", "Data science", "Robotic*" 2 "Agricultur*", "Smart Farm*", "Precision Farm*" The combination of the keywords of both groups resulted in a search string (Table 3), and it worked as follows: at least one option from Group 1 plus (AND) at least one option from Group 2. Table 3. Search string to be adapted for each of the selected digital repositories (Web of Science, ScienceDirect and Scopus).

Search String
"Internet of Things" OR "Artificial Intelligence" OR "Machine Learning" OR "Data science" OR "Robotic*") AND ("Agricultur*" OR "Smart Farm*" OR "Precision Farm*") The search process includes records indexed to the aforementioned repositories up until 27 July 2020, and the search string was adapted to the syntax of each digital repository. It is unfeasible to manually read all the 13,162 documents for identification of the most frequent and relevant terms used in Agriculture 4.0. Therefore, a semi-automated approach based on NLP was used to obtain a general idea of the overall scope of the studies by analysing the documents' abstract. For this, it was necessary to extract all data from the three digital repositories, including publication title, authors, abstract, year, source title and DOI. Documents that did not possess the previous features were excluded. Afterwards, it was necessary to pre-process the collected data (Section 2.3.2) and import them into a Python script to carry out the NLP analysis using the Natural Language Toolkit [23].

Data Pre-Processing
Before the quantitative analysis, the following four steps were carried out to qualitatively pre-process the collected data: (a) Repeated records removal -Sometimes online repositories share the same documents. Thus, to ensure that there are no repeated records in the survey, entries whose DOI were repeated were removed, leaving a unique entry; (b) Numeric and special characters removal -Numbers and non-alphanumeric special characters were removed from the text and replaced with blanks; (c) Stop words removal -Specific words were excluded from the list, such as prepositions (e.g., "in", "from" and "by"), definite and indefinite articles (e.g., "the", "a" and "an") and pronouns (e.g., "that", "this" and "it"); (d) Custom stop words removal -Words that are not stop words but are too obvious, add no or very little value information and can often cause a lot of noise in the topic model were re-moved. Some examples are "use", "results", "proposed", etc. The same criterion was used for acronyms.

Emerging Trends of Agriculture 4.0
The present section provides crucial insights towards answering RQ1 (What are the emerging trends of Agriculture 4.0 in the last ten years?). Based on the steps described in Section 2, 8485 entries out of a total of 13162 identified publications were eligible for further analysis in the study. These 8485 entries included 3730 journal papers, 4525 conference papers and 230 book chapters. The number of publications by year is represented in Figure 1, based on the values obtained with the previous search on the three online repositories. Early access articles were considered to be part of the year 2020. In a quick analysis, the authors found that the total number of scientific publications across all domains increased by around 36.5% between 2011 and 2020 (data obtained from Scopus, including articles, conference papers and book chapters). Regarding the digital agriculture domain, there is an increasingly higher research interest in the subject under analysis, as evidenced by the growing trend in Figure 1, as more than 55% of the total publications in the last ten years were published in 2019 (31.6%) and 2020 (24.2%). However, the number of publications in 2020 is still lower compared to 2019, as the semi-automated search was performed in the end of July 2020. However, the trend suggests that the number will surpass the previous year.
This reflects the considerable progress in advanced technologies that have emerged in the agricultural sector, including [10,24]: (a) low-cost and improved sensors, with unprecedented combinations of spatial, temporal and spectral capabilities; (b) improvement of wireless communication protocols; (c) deployment of IoT and cloud-based information and communications technology (ICT) systems; (d) data analytics, including big data analytics and AI/ML techniques; (e) advancement of new small platforms (e.g., nano-satellites or unmanned aerial vehicle (UAV)); (f) smart control devices (on-board computers) on tractors, combine harvesters and other equipment; and (g) advanced automation capabilities (guidance, seed placement, spraying, etc.).
As a result from the Python script, two illustrations were created with the frequency of the most used terms (Figures 2 and 3), i.e., the number of times that a combination of n-words appeared in the corpus of the 8485 abstracts collected from the search string (Table 3). This type of n-gram frequency analysis provides some relevant insights for further consideration during the refinement of the search space. Thereby, Figures 2 and 3 show the frequency of bigrams and trigrams respectively, ranked by a raw frequency score measure, representing their occurrence in relation to the document size, so as to under evaluate n-grams occurring in shorter abstracts. A possible interpretation of Figure 2 is that Internet (of) Things and machine learning appear as the most frequent bigrams, which is to be expected given not only the initial search string, but also the fact that these technologies appear to be widely applied in the agricultural domain in the last decade. Additionally, the same illustration suggests the terms artificial intelligence, big data, deep learning (DL) and cloud computing as emerging trends in the topic under study. Such technologies assist the activities of decision support (appearing in the third position), data collection, image processing and computer-vision, particularly for monitoring systems and control systems, in order to evaluate and control variables of interest in real-time, such as soil moisture, crop yield, water quality, temperature, humidity, land cover and energy consumption, across the entire agri-food supply chain (AFSC). Similarly, some conclusions can also be derived from the visualisation of the most frequent trigrams (Figure 3) found in the selected abstracts. As can be observed, the most frequent trigrams are aligned with the previous findings, reinforcing the perspectives coupled to the analysis of the bigrams. Beyond the natural emphasis on decision support system (DSS), it is also possible to see that, from the analysis of both Figures 2 and 3, there is a large focus on ML approaches, such as random forest, support vector machine (SVM), support vector regression (SVR), multiple linear regression (MLR) and principal component analysis, and DL (ML subcategory) methods, namely artificial neural network (ANN), convolutional neural network (CNN) and deep neural network (DNN), insinuating a growing popularity of such algorithms in the agricultural domain in the last years. Statistical techniques are also referenced, such as root mean square (error) and mean absolute error, as they are used to assess the performance of the previously mentioned learning algorithms. As expected, sensor technology has also a huge impact on the context of Agriculture 4.0, appearing as wireless sensor network (WSN) and remote sensing. Speaking of remote sensing, the concepts normalised difference vegetation (index) (NDVI) and leaf area index (LAI) are also considerably frequent in the selected abstracts, showing their importance in the topic under study, mainly with regard to the vegetation dynamics and health monitoring. In addition, robotics has a contribution in the agricultural sector, associated with innovations in unmanned aerial vehicles, which are mentioned with high frequency.

Agriculture 4.0 Core Technologies
Although the use of data in the agricultural sector is not a new concept, the novelty lies in the possibility of sector digitalisation. Another aspect is the quality of the information obtained at the farm level and the technologies used to collect, store, process, manage and share such data. Advances in sensor technology have allowed farmers to monitor specific parameters in real-time, while robotics have supported a better automation of the processes. Additionally, computing power has become more accessible and affordable, which has also helped the creation of new decision support tools for a better agricultural management. For instance, big data supports a high-volume of real-time and historical data and AI-based methods transform these data into added value and actionable knowledge. An illustration of the data flow between the identified technologies is presented in Figure 4. . Data flow between the core technologies of the Agriculture 4.0 paradigm. Five main stages have been identified: sensor and robotics (includes perception and actuation functions, depending on the requirements of the system), Internet of Things (for data communication), cloud computing (for data storage and processing), data analytics (includes big data and AI-based methods for data analysis) and decision support system (for data visualisation, recommendation functions and user interaction).
The desired data are collected by IoT-devices (sensors, robotics, etc.) in the field and transferred by means of wired/wireless network to the cloud server for further storage, processing and analysis. Through big data technology and AI-based methods, it is possible to transform the collected data into knowledge of added value. Finally, a DSS provides the resources for decision-makers (the users) to take advantage of the IoT-system and interact with it, regarding optimisation actions to be undertaken.
However, the order of the stages may be somewhat different depending on the employed IoT configuration and the used computing techniques. For instance, some systems pre-process data in the edge and fog computing before transferring them to the cloud, while other systems process the data on the cloud itself [25].
Thus, the current section overviews the roles of technologies previously identified as being frequently mentioned and used within the context of Agriculture 4.0. Subsequently, specific applications in this domain taking advantage of such technologies are addressed in Section 5.

Sensors
Sensors are one of the main drivers behind the IoT concept, due to advances in technologies that allow reducing their size, as well as making them more intelligent and less expensive [26,27]. In recent decades, wired and wireless sensors have been widely used in the agricultural sector [28]. They play an indispensable role in agricultural activities, by obtaining plant, animal and environmental data and constituting a crucial technology to IoT implementation in agriculture. Spatial and temporal variabilities that have significant influence on agricultural production can be managed mostly in two ways [29]: the mapbased approach and the sensor-based approach. Both approaches involve stationary or mobile sensors and require massive data collection and analysis to make more efficient use of farm inputs, leading to improved crop production and environmental sustainability [30].

Remote Sensing
In a generic way, remote sensing is considered the technique for obtaining data from a distance through instruments that are not in physical contact with the investigated objects [31,32]. Of the entire electromagnetic spectrum, only a small range of energy wavelengths is used in remote sensing applications. These include energy measurements from the visible, reflective infrared, thermal infrared and microwave regions [31]. The platforms responsible for these measurements include satellites, UAVs, unmanned ground vehicles (UGVs), tractors and hand-held sensors [24,30,33]. Measurements made with tractors and hand-held sensors are also known as proximal sensing [30].
Among the many applications of remote sensing in agriculture, the vegetation indices are important tools for assessing the amount and health of vegetation, by understanding if the growth is homogeneous or if there is any stress in the crop. Additionally, AI-based models, combined with remotely sensed data and vegetation indices, have been used to predict crop yield [34], with other applications addressing crop nutrients, water stress, weed infestations, insects and plant diseases and soil properties such as organic matter, moisture, nutrients, pH and salinity [24].
Using the popular NDVI (as evidenced in Figure 3) as an example, higher values can be seen as an indication of high density of green leaves, while a lower values signal less chlorophyll (and/or leaves) in a specific region/crop. This relates to how healthy vegetation will be more photosynthetically active, with greater absorption of red wavelengths associated with leaf chlorophyll. Another example in this domain is the LAI, which is associated with the leaf cover in an ecosystem, being defined as the total one-sided area of photo-synthetic tissue per unit ground surface area and is a dimensionless variable related to plant canopies [35,36].

Wireless Sensor (and Actuator) Networks
WSNs appear as one of emerging trends presented in both bigram and trigram illustrations (Figures 2 and 3, respectively), since they have been widely applied in various agricultural applications to improve the traditional methods of farming in recent years [37]. Sensor networks perform three basic functions [26]: (a) sensing; (b) communication, between the various components of the network; and (c) computation, by using hardware, software and algorithms. In its turn, a wireless sensor and actuator network (WSAN) is a variant of WSN that has an added component: an actuator, which is a physical device (lamps, fans, pumps, valves, irrigation sprinkles, etc.) responsible for interacting with the environment [20]. These networks are distributed arrangements of several sensors and actuators nodes interconnected by wireless link. Generally, such nodes encompass several components each responsible for a particular function, namely for sensing, control, computation, communication and power [25,28,38,39].
Multiple applications using WSNs and WSANs are being utilised today in the context of Agriculture 4.0, to optimise agricultural practices. These systems have enabled the monitoring of several parameters of interest in real-time (such as water parameters, soil characteristics, atmospheric conditions) and made it possible to react in the field accordingly and in-time [37,40]. Consequently, they contribute to increasing efficiency, productivity and profitability in many agricultural production systems [41], reducing the inputs (water, agro-chemical products, etc.), mitigating waste, while minimising the negative impacts on the environment.

Robotics
This field of robotics has grown in interest for agriculture in recent years as robots have been used to automate some practices in this sector, such as crop scouting (plant monitoring and phenotyping), planting and harvesting, water supply, target spraying, environmental monitoring, weed and pest control, disease detection, pruning, milking and sorting [42][43][44]. While UAVs and UGVs are mentioned above in the context of remote sensing (Section 4.1.1), it is important to emphasise that they can also be used directly on the fields and perform certain agricultural tasks. Fixed robots are typically the most common variant in industrial applications; however, within the context of agriculture, mobile robots may provide a larger benefit. Their capacities to go across various types of terrain under different landscape conditions that may not be easily reachable by ground means [45], to cover a wide area of the fields and to automate agricultural tasks are seen as great potential to improve the agricultural management.
UAVs are mentioned with high-frequency in Figure 3, with several applications in the agricultural domain such as yield estimation [46], crop disease detection [47], weed recognition and mapping [48]. Furthermore, UAV-integrated systems can be considered a safety system for workers' health, by preventing health problems related to the manual spraying of agro-chemicals in the crop fields [49].
Another variant of mobile robots that has been widely used in the last decades in the agricultural sector is the UGV, whose main objective is to increase the efficiency of agriculture and reduce the need for manual labour, being especially beneficial in environments that are difficult for humans to access. These robots are involved in a variety of agricultural tasks, such as field cultivation, soil sampling, irrigation management, precision spraying, mechanical weeding and crop harvesting [50,51].

Internet of Things
Conceptually, IoT is the term used to designate the connectivity between physical and digital "things" with standard and interoperable communication protocols [21]. It has penetrated several domains, such as healthcare, smart home, smart city and industrial production, and agriculture is no exception for the deployment of IoT solutions, since agricultural activities need to be continuously monitored and controlled [21,52]. These include crop, soil and water management, weather forecasting and AFSC traceability, among others, which are further addressed in Section 5. The combination of different Agriculture 4.0 technologies with IoT has shown great potential in contributing to achieve greater efficiency in agricultural activities, each posing a specific set of requirements. To match these, different communication protocols and technologies have been employed in agricultural literature in the context of IoT. A comparison of the most commonly used in this domain is presented in Table 4. In general, the most suitable wireless communication protocols for IoT-based agricultural applications are those whose energy consumption and cost are lower and have a good transmission range, which is the case of Sigfox, ZigBee [21,26,37] and LoRa [38]. Radio Frequency Identification (RFID) and Near Field Communication (NFC) technologies have been increasingly used for tracking agricultural products along the AFSC [28,53]. Although Wi-Fi has been largely used in portable devices (e.g., smartphones, laptops and tablets) and desktops, unfortunately, it is not the best candidate for agricultural applications, as it requires a lot of energy and the associated costs are high. In the case of Bluetooth, despite being a highly secure technology, its transmission range is short and energy consumption is high, making it more suitable for short-time close-range networking [21].
Among the various wireless communication protocols, the choice of the most adequate protocol fully depends on the requirements of the system to be designed and implemented, as well as economic, accessibility and capacity factors.

Cloud Computing
Cloud computing is emerging today as a commercial Internet-based infrastructure that provides hardware, infrastructure, platform, software and storage services to various IoT applications [21]. In the past decades, cloud computing has gained great interest within the agricultural sector, by providing [21]: (a) inexpensive data storage services for text, image, video and other agricultural information, which considerably reduces storage costs for agricultural enterprises; (b) intelligent large-scale computing systems, in order to transform these raw data (on which it is difficult to make the right use and decisions due the technical level of farmers) into knowledge, and from here, make decisions based on quantitative analysis; and (c) a secure platform for the development of various agricultural IoT applications.
An operational application of cloud computing in the agricultural context can be found at [54]. The authors developed a cloud-based farm management system, which allows the interconnection of internal and external services and creates a marketplace of advanced and sophisticated services and applications that can be used by end-users. This system can be seen as an important tool in the management of agricultural businesses, as it assists farmers improving agricultural activities on their farms.
Despite the various benefits, cloud computing also has some limitations. IoT applications are supposed to generate large volumes of data (which in some cases might involve the use of private data) and respond in a very short period. However, they are sensitive to network latency, turning cloud computing sometimes unfeasible to handle these applications, since they require a constant exchange of information between devices and the cloud. The concepts of edge and fog computing appear to solve this limitation. Edge computing enables computing services to be performed at the edge of the network, being closer to data sources [55]. Hence, it can facilitate near real-time analytics whilst keeping the data secure on the device if needed (for instance regarding on-device analysis). Fog computing, appearing as a middle layer between the edge layer and the cloud layer, aims at providing services and functions, such as computing, storage and networking, between end-devices and the traditional cloud computing data centres. This virtual layer is typically, but not exclusively, located at the edges of networks [56]. Fog computing can compensate for the limited processing power of edge computing, as well as provide data fusion capabilities, aggregating data from multiple sources for further processing in the cloud.

Big Data (Analytics)
The advent of IoT technologies has facilitated the collection of data at every stage of the AFSC, resulting in increasingly larger volumes of data being generated. Nevertheless, the rate of exploitation of these data by the agricultural sector is still relatively low [57,58], neglecting a tremendous opportunity for disruptive data-driven innovation in regards to more optimised and sustainable production and consumption practices in the long-term.
In this light, big data analytics can play a key role in the transformation of data into added value of agri-food stakeholders, through its capacity to aggregate, process and visualise large and complex datasets efficiently. Big data is generally defined in the literature in five dimensions [59]: volume, velocity, variety, value and veracity.
Recent studies have shown that big data will have considerable impact in the scope and organisation of Agriculture 4.0, despite being still in its infancy. By leveraging highvolume, multi-source real-time and historical data with processing, forecasting and tracking capabilities, it is expected that farm management and operations will change drastically, promoting the continuous improvement of business models. Beyond more common applications such as optimising production yield by finding optimal parameters (e.g., temperature, rainfall) based on large historical, multi-site datasets [60], big data analytics also opens doors for other more complex and lesser common cases. An example of this is the estimation of food availability in developing countries as a way to address the challenge of sustainable food security [61], enabled by the analysis of land use and production data of more than 13000 farm households across multiple sites in 17 countries across sub-Saharan Africa.

Artificial Intelligence and Machine Learning
Combined with cloud computing and IoT, AI (particularly in the facet of ML) has been identified as one of the main drivers behind the implementation of Agriculture 4.0. Recent studies highlight ML as being one of the most promising techniques currently being explored in this regard [13,57,58], with applications in the areas of food availability and security, weeds, soil, crop and animal monitoring and management, as well as weather and climate change. ML algorithms have been used to maximise crop yield and minimise input costs, since they can identify complex patterns, trends and relationships in the multidimensional, heterogeneous agricultural data; make accurate predictions; and provide a strong foundation for improved agricultural decision-making and operations management [21]. In a recent review [62], it is mentioned that 61% of published agriculture sector articles using ML approaches were from crop management, 19% from livestock management, 10% from soil management and 10% from water management. As highlighted in Figures 2  and 3, some of the more common ML algorithms currently being used in the context of Agriculture 4.0 include random forest, SVMs, ANNs and various DL variants, including CNNs for computer-vision applications. However, given the new challenges imposed by the added connectivity and necessity to build solutions at scale within Agriculture 4.0, additional approaches are emerging from the scientific community, including federated learning and privacy-preserving mechanisms to deal with the cyber-security and privacy issues of the digital era. These approaches focus on distributing the training process across multiple nodes, which collaboratively build ML models without sharing sensitive private data samples, only local parameters [63]. This effectively mitigates the aforementioned security and scalability issues, thus representing a promising venue of research AI applied to Agriculture 4.0.

Decision Support System
While the definition of DSS is not consensual [64], within the context of this work, a DSS is a software mechanism which aids an end-user to easily and quickly leverage complex data to improve decision-making processes. Hence, both raw data and the output of analytics tools can be converted into knowledge and presented through a user interface in an interpretable way.
Regarding the DSS architecture, Figure 5 illustrates a common structure of a DSS, based on the architecture proposed by Turban et al. [64]. A DSS is an indispensable tool in many different sectors and the agricultural sector is a perfect candidate, since agricultural activities are often complex (due to the many physical, chemical and biological processes involved) and require a large amount of data to be processed for proper management. In this way, a DSS can help decision-makers making more effective decisions, when dealing with poorly defined and complex data. However, one of the characteristics of an agricultural DSS is that, typically, it has a low autonomy level. Given that, farmers have total responsibility for taking final decisions, i.e., actions, by validating (or not) the suggestions/instructions provided by the DSS [14], which in turn can show some autonomy level within clearly defined system boundaries.

Agriculture 4.0 Applications
With the goal of providing answers to RQ2 (What are the existing application domains for Agriculture 4.0?), the present section details a more in-depth survey of current Agriculture 4.0 literature, in order to identify the main domains of application and their relevance to the entire AFSC. According to FAO [65], Agriculture 4.0 is about not only improving the practice of farming but also changing how agri-food systems work. The AFSC is a term used to describe the processes involved from the production of agricultural products to their distribution to the final consumer ( Figure 6), and is usually formed by several entities responsible for production, processing, distribution and marketing [66]. Several innovation opportunities brought by Agriculture 4.0 can be observed in heterogeneous domains across the entire AFSC. According to Talavera et al. [20], these application domains can be classified into four main categories, as illustrated in Figure 7: (a) monitoring (Section 5.1); (b) control (Section 5.2); (c) prediction (Section 5.3); and (d) logistics (Section 5.4). Despite this variety, one common characteristic is that this innovation stems from the recent developments in disruptive technologies such as IoT, sensors technology, robotics, cloud computing and AI. Additionally, while these domains appear separately, in fact they are closely linked. For instance, a smart control system actually requires monitoring and possibly forecasting functionalities to fully leverage the potential of data-driven support systems. Moreover, this section also presents some benefits provided by these domains, aiming at finding answers to RQ3 (In which way can Agriculture 4.0 assist sustainable development?). Lastly, this section ends with examples of applications of interest (Table 5), regarding monitoring, control, predictive and logistic activities, across the entire AFSC.

Monitoring
It is recognised that laboratory practices for the assessment of a desired parameter (e.g., soil and water parameters) are usually time-consuming, expensive and require highly qualified personnel to carry out the physical-chemical and biological tests of that same parameter, as well as dedicated facilities. Agriculture 4.0 technologies can be seen as an alternative or complement to this traditional approach. Laboratory analysis will still be required, although in a less frequent manner for continuous monitoring, due to its high costs and turnaround times. In this light, automatic monitoring is the first step to implement the concept of Agriculture 4.0. Smart monitoring systems, when correctly used, can be a game-changer for the success of agricultural management, as they collect crucial data from the field in real-time and analyse them using advanced data analytics tools. Such systems enable farmers to take intelligent and quick decisions and implement timely interventions, in order to enhance the agricultural productivity, save time and costs and protect the environment.

Weather and Greenhouse Gases Monitoring
Weather is certainly one of the most important factors that determine the success or failure of agricultural processes. Thus, the acquisition of precise weather information has become a precious tool to improve agricultural processes, since continuous monitoring of weather conditions is crucial to plan future activities accordingly. In its turn, the constant monitoring of greenhouse gases (GHGs) emissions, responsible for the greenhouse effect that affects food production, security and quality, has also became very important nowadays. Agriculture significantly contributes to increasing the global climate temperature, through the release of carbon dioxide (CO 2 ), nitrous oxide (N 2 O) and methane (CH 4 ) emissions into the environment. It is estimated that 21% of total global GHGs emissions are directly caused by crop and animal production and deforestation [1].
Facing this, many digital innovations have been used to monitor both weather conditions and GHGs emissions. Nowadays, it is possible for farmers to measure several related parameters in real-time and take advantage of them to increase agricultural production and protect their crops and animals. Moreover, it is necessary to mitigate the GHGs emissions and shift to "less GHG intensive" practices, i.e., less GHGs emissions per food unit [67].
Agricultural weather stations are the most popular equipment located across the fields [68], as they provide accurate local measurements for various farming applications. Environmental parameters include atmospheric and soil temperature and humidity, rainfall, wind direction, atmospheric pressure, solar radiation (used to calculate evapotranspiration), ultraviolet index, leaf wetness, etc. These parameters are collected and, depending on the system requirements, can be sent to the cloud server for data storage and analysis. Additionally, WSNs and UAVs equipped with gas detection systems have been employed recently in the agricultural sector to monitor GHGs emissions [69]. Thi equipment provides real-time data on site and over the Internet, used for meteorological analysis, land mapping and monitoring of gas emissions.

Crop Monitoring
Crop management is associated with agricultural practices that range from the sowing of seeds, the continuous maintenance of the crops, to the harvest, storage and distribution of crops, and further included the preparation of the plants (namely, trees) for next year. The optimisation of crop management is essential to increase productivity in a sustainable manner, in order to meet the growing demand for food, fibres and raw materials, as a consequence of the rapid world population growth.
Anywhere in the world, growing any crop with quality is strongly dependent on numerous factors. There are spatial and temporal variabilities that have significant influences on agricultural production. These can be categorised into six groups, according to Zhang et al. [29]: yield, field, soil, crop, anomalous factors and management/practices. Considering this, the continuous monitoring of the essential parameters for crop growth and performance during the developmental stages is fundamental to ensure a good agricultural management. Fortunately, with the advancement of Agriculture 4.0 technologies, farmers have gained tools that help them optimise crop growth practices, in terms of crop monitoring, field variability mapping and decision-making processes.
Crop pest infestations, which include weeds, insects, pathogens and rodents [70], and diseases are also seen as big factors that negatively affect agricultural production worldwide. Thus, there is a real need on developing smart solutions that accurately recognise weeds, crop pests and diseases in-time and provide preventive measures to avoid significant agricultural losses. Recently, smart recognition systems using AI-based image processing techniques play a vital role for agricultural management, allowing the earlier detection of the occurrence of such problems before they spread and cause significant damage to crops. Once the identification of the infective agent is completed, the system provides instant diagnosis, feedback and solutions with preventative actions to farmers. Various AI-based recognition systems have been studied and developed to identity and classify weeds [71,72], insect pests [73] and crop diseases [74][75][76][77].

Soil Monitoring
The remote monitoring of basic soil parameters can be seen as one of the potential trends of Agriculture 4.0 to ensure a proper and sustainable agricultural management. Such parameters include temperature, moisture, electrical conductivity, pH value and nutrient content (primary nutrients, namely nitrogen (N), phosphorus (P) and potassium (K), secondary nutrients, more specifically calcium, magnesium and sulphur, and micronutrients), among others. Through the combination of IoT-sensors to measure these parameters in realtime, AI-based methods for data analysis and DSS to support decision-making processes, farmers are empowered to manage their fields in a more efficient and sustainable way (e.g., regarding optimisation of irrigation systems and fertilisation strategies). This approach brings various benefits for farmers, such as increasing productivity and quality of agricultural products, reducing spoilage due to improper or excessive use of fertilisers, reducing the risk of crop losses and minimising the time and cost of agricultural practices [78].

Water Monitoring
According to its use, there is a set of criteria and standards for water quality, which vary with its purpose. Several parameters are determined to characterise water, which represent its physical, chemical and biological characteristics. In agriculture, water is used for different applications, such as irrigation systems, aquaculture or aquaponics (combination of aquaculture and hydroponics for growing both fish and plants in a single integrated system), and the parameters that are generally measured are temperature, conductivity, pH, salinity, turbidity, specific chemical compounds, dissolved oxygen content and water level, among others [79]. These parameters are indicators of water quality and when they reach higher or lower values than those established for a given use, the water is considered inadequate.
A smart monitoring system for water quality that uses the mentioned Agriculture 4.0 techniques usually consists on the deployment of IoT-sensors inside water bodies (e.g., water resources, reservoirs, pipes, aquaponics and aquaculture farms) that measure the desired parameters. Depending on the requirements, data can then be forwarded to a cloud server, where they can be processed, stored, analysed and later visualised to support decision-making processes.

Control
Unlike the monitoring domain (Section 5.1), where information is handled in one-way, the control domain applications use a bidirectional information channel, meaning that a new level of communication has been added and commands can be sent back to the field, which is the case of a WSAN [20]. Generally, an IoT-control system is the result of an active and automatic monitoring system, which uses IoT-sensors and other devices to collect data of interest and transmit them for storage and further processing. The processed data are then used, for instance, to automatically activate and control actuators to modify the state of the process or the environment in a predefined manner (e.g., fully autonomous irrigation systems).

Irrigation Systems
Water scarcity is one of the main challenges worldwide in the 21st century. It is estimated that, by 2025, ca. 1.8 million people will be living in countries/regions with severe water scarcity and two-thirds of the world's population might be facing water stress conditions [80]. The sustainable use of water is not a priority problem only in regions that suffer from water scarcity. Instead, this is a topic on the political and research agenda in all regions and sectors, especially for agriculture, where this issue is particularly relevant. In some regions, rainfall is sufficient for crop growth, but in many others irrigation is required. A sustainable irrigation system requires proper management and must not use more water than necessary. Otherwise, the water source may not be replenished naturally and will become a non-renewable resource.
With the use of Agriculture 4.0 solutions, irrigation systems can be improved in a more innovative and sustainable way. Various sensors are strategically placed in the field to measure key parameters (plant, soil and environment) of the surroundings. The collected data are used for analysis, and, depending on the obtained values, the system can automatically control the actuators (e.g., water pumps) as needed. Various autonomous irrigation systems [81][82][83][84][85] have been designed and implemented in the last decade, in order to optimise the irrigation process.

Fertilisation and Fertigation
Fertiliser is a substance of synthetic or natural origin having some essential elements that improve plant growth. However, fertilisers are one of the major sources of pollution in surface and groundwater when used improperly [86]. In addition, the increased use of inorganic fertilisers, mostly N-based, has a significant contribution to agricultural GHGs emissions [1,86].
The ideal way of fertilisation and fertigation (application of fertiliser through irrigation water) requires sensing capabilities to find the exact location where fertiliser is needed the most, the precise amount of fertiliser needed, and what minerals are below optimal values [33]. In this sense, solutions that use IoT, sensors, robotics and AI-based data analysis have been proposed to create autonomous systems to improve fertilisation techniques in a more sustainable way.

Crop Pest and Disease Control
As mentioned above, crop pests include weeds, animals (insects and rodents) and pathogens that can reduce crop production by 34%, 18% and 16%, respectively [70].
Weeds are one of the main threats to agricultural production worldwide, as they compete with crops for water, nutrients and sunlight, leading to a reduction in quantity and quality of agricultural products [87]. Weed control is a quite important topic to be considered and improved, as it prevents weeds from competing with the desired flora and fauna, including crops and livestock. Weed control methods typically include preventive, biological, cultural, mechanical/physical and chemical control techniques [88]. Controlling weeds without the use of agro-chemical products (e.g., herbicides) takes a long time and can be very expensive, since they are done by tractors or by hand, which is very labour-intensive and nearly impossible to be applied on large scale [70,89]. However, agro-chemical products have brought up various problems, regarding agricultural production, weed ecology, biodiversity, environment and human health [70]. Despite weed distribution being typically uneven, most traditional sprayers apply chemical herbicides uniformly, resulting in waste of valuable compounds, increased costs, risk of crop damage, pest resistance to chemicals, environmental pollution and contamination of agricultural products [90].
Similarly, insect/rodent pests and crop diseases are another major problem that negatively affect agricultural activities worldwide, not only because they cause significant crop losses but also because they promote epidemic diseases in humans and animals. Traditional methods for crop pest and disease control are limited, sometimes laborious and error-prone [73], and the misuse of agro-chemical products (pesticides, insecticides, etc.) can have harmful effects on the environment and human and animal health.
It is common sense that it is more profitable to prevent and avoid an infestation than eliminating an infectious agent when the production area is already infested. Considering this, adequate IoT-based sensors, robotics and AI-based techniques have been designed and developed for crop pest and disease control in recent years, to bring more efficient solutions to the agricultural sector. They allow farmers to significantly cut the time spent on manual labour and its associated costs. For instance, some techniques can distinguish target weeds from non-target vegetation, thus directly eradicate them without damaging the crops or precisely spray the desired target/location and apply an accurate dosage of herbicides, based on weed density or weed species composition.

Smart Greenhouses
With modern technological developments, greenhouses have become more popular to overcome the challenges that agriculture is facing (growing population, climate change, scarcity of natural resources, etc.) and boost agricultural production in a sustainable manner. The concept of Agriculture 4.0 is very present in the so-called "smart greenhouses", as they have adequate equipment that guarantees the constant monitoring of environmental, soil and plant parameters essential for crops growth and the automation of some agricultural processes. Such processes can include for instance smart irrigation and fertilisation systems (Sections 5.2.1 and 5.2.2, respectively), crop pest and disease control (Section 5.2.3) and autonomous robots for harvesting fruit and vegetables (Section 5.2.5). Moreover, illumination systems, temperature control (through ventilation, heating/cooling systems, water fogging, hydropanels, etc.) and CO 2 concentration control (through CO 2 enrichment systems) [91][92][93][94] are also good strategies to control the indoor environment of greenhouses and provide ideal conditions for crops growth during the whole year.
The combination of core technologies brought by Agriculture 4.0 has promoted autonomous control and optimisation of the previous processes. Thus, it makes possible to react in time and accordingly, whenever a parameter is not within the appropriate range for a given purpose.

Harvesting Systems
After monitoring and controlling all the previous agricultural processes, it is time to harvest the fruit and vegetables. However, selective manual harvesting can be laborious, time-consuming and sometimes error-prone operation. In addition, it is necessary to consider that the cost associated with human labour is increasing and the availability of skilled workforce that accepts repetitive tasks, sometimes facing adverse conditions, is being reduced [43,95]. For this reason, agriculture-related industries are moving towards automating processes on the farm, which may include agricultural harvesting robots.
There are two types of robotic harvesting systems [42]: (a) in bulk, in which every fruit/vegetable is harvested; and (b) selective, where only the fruit/vegetable ready to be harvested is collected. Focusing in the latter type, an automated harvesting robot typically involves three major steps [43]: (1) recognition and localisation of fruit/vegetables and obstacles avoidance through the use of sensors and computer vision techniques; (2) movement of the robot arm to the detected target position; and (3) careful harvest with the end-effector mechanism (e.g., picking gripper), without harming the target and the surroundings, ending with the placement of the fruit/vegetable in the appropriate basket.

Prediction
Predicting is an important function that Agriculture 4.0 brings to facilitate decisionmaking processes for the optimisation of agricultural management. Monitoring and documentation processes are fundamental pre-requisites to enable forecasting, since it is necessary to use both real-time and historical data to develop accurate analytical methods for predicting concrete events [25].
The science of "training" machines to learn and produce models for predictions is widely used nowadays in various fields, with agriculture constituting an ideal candidate for the employment of such science. The use of predictive models in real-time allows to monitor the development of crops and animals and predict, for instance, their ideal harvest time or possible occurrence of diseases, respectively, in order to optimise their production and thus increase the income. Additionally, they can also estimate the precise time and number of agricultural inputs needed for a specific case at hand and make an effective planning (e.g., the optimisation of irrigation and fertilisation systems). Above all, the use of predictive models allows an effective action in the fields and the optimisation of the resources used, with evident benefits of productivity, cost-benefit and sustainability.

Forecasting Weather Conditions
As mentioned above, agricultural production is greatly dependent on weather conditions, as they have significant impact on soil, crop growth and every stage of plant and animals. Even though irregular weather events are beyond human control, it is possible to adapt and mitigate the effects of adverse weather events if an accurate forecast is obtained in-time.
The use of data through the technologies of Agriculture 4.0 already mentioned allows the implementation of smart agricultural systems that forecast valuable parameters for the successful management of crops and field operations. By effectively forecasting weather conditions, it is possible to plan activities efficiently, minimise costs and maximise yields and profits. For instance, if farmers check an accurate precipitation forecast, such as the expected amount of rain and time of precipitation, they could take advantage of it and save the cost and time associated with unnecessary irrigation.

Crop Development and Yield Estimation
Not only is it important to predict the good development of crops, but also to estimate agricultural production yield, due to the continuous expansion of Human population and the impacts of climate change, deforestation, scarcity of resources and other phenomena. With Agriculture 4.0 core technologies, it is possible to predict crops growth based on their key growth parameters (plant ecophysiology, environment, soil nutrients level, etc.). Re-cently, AI-based methods have been applied to estimate crop yield, in order to help farming planning, storage management and marketing strategies, and address the challenges of food security in the years to come. Classical ML techniques include SVM, MLR, association rule mining, decision trees and random forests. More recent approaches comprise DL techniques, such as ANN, DNN, CNN, recurrent neural network (RNN) and long-short term memory (LSTM) [96][97][98].

Forecasting Market Demand
Market demand fluctuates quite rapidly, which means that agri-food companies must be one step ahead to take action on time. Facing this, companies have been pursuing predictive analytics techniques to improve their supply chains and optimise marketing operations. Due to its ability to effectively discover trends and patterns in large datasets, ML methods allow predictive analysis that can support not only agricultural operations, as discussed above, but also in retail [99]. Thus, taking into account financial constraints to have an accurate market demand forecast and an automated inventory control system is a game changer for the retail sector. In addition, ML methods can also predict market prices and what are the tendencies regarding the agri-food sector that will be in the pipeline in the near future, by understanding the market demand behaviour. With this, AI-based techniques have become very popular among agri-food companies, in order to efficiently boost supply chains performance, increasing productivity and profit, optimising stock management and resource allocation, reducing costs and wastes and increasing customer satisfaction.

Logistics
It is known that, in recent years, consumers have been increasingly concerned in how the purchased agri-food products are produced, handled, packaged, stored and distributed, in the same way they intend to know the authenticity and origin/traceability of the same products. Additionally, global shocks and disruptions in supply chains (e.g., caused by the COVID-19 pandemic scenario) have made it evident that robust agri-food systems are crucial. Facing this, there is huge need of a resilient, functional, equitable, fair and transparent AFSC that will benefit farmers, involved stakeholders (including the processing industry, suppliers, retailers, etc.) and consumers. Besides that, a sustainable circular bioeconomy can serve to mitigate the socio-economic impacts caused by global crises, especially with regard to food security and safety to those in greater need. Therefore, the logistics domain is also of great importance within the context of Agriculture 4.0 and refers to the physical flow of entities and related information from producer to consumer, in order to satisfy consumer demand [20]. It is present in all stages of the "Farm to Fork" journey and each stage has the challenge of maintaining product integrity, efficiency and quality [100]. Until they reach the "Fork", agri-food products are exposed to different conditions that can potentially degrade their quality. Lack of or weak temperature and/or humidity control, incorrect physical handling and delays, as well as the increasing threats to food security and the inevitable food loss and waste, have led to the tremendous need for a traceability system. These systems are considered an important quality control mechanism that guarantees the safety of agri-food products, throughout the cycle from farming to consumption [101].
In this regard, advances in Agriculture 4.0 have provide new opportunities for the digitalisation and automation of the entire AFSC, by promoting IoT-related applications and data-oriented technologies and offering new and effective services for end-users. For instance, IoT-based systems using WSNs can provide continuous, automatic and up-todate information on crop products storage [102], allowing managers to make decisions about what products should be given priority to be handled and/or removed, in order to avoid losses or deterioration. Blockchain, the distributed ledger technology behind Bitcoin and other cryptocurrencies, also has a big role in the AFSC management, as it can be used to know who is performing which actions, including the time and location of the same actions [103]. Blockchain can provide end-to-end traceability and integrity of all transactions and ensure that all information produced along the AFSC is auditable, if all agri-food parties implement transparency measures in their processes. Transport operators will be able to monitor important parameters (time, temperature, humidity, etc.) inside the containers in real-time, by using adequate sensors for the effect. Whenever a value exceeds the established safety limit, an alarm is immediately triggered [104]. In addition, it is possible to predict delays in the products delivery and, in this way, react through active cooling or decide for a faster route [105]. In turn, by analysing the transportation data reports, retailers will be able to accept or reject the goods, which is of great importance when dealing with sensitive and refrigerated products. In addition, they will be able to manage the goods stock based on their current condition. Blockchain can be also used to prevent food fraud, which causes enormous economic losses and reduce consumer's trust, by tracking and authenticating the AFSC and understanding the provenance of products [104].
If the right tools for monitoring are used, allied with advanced data analysis, it is possible to accurately detect problems in the AFSC, predict them before they occur and make faster and better decisions, in order to improve the resilience and sustainability of AFSCs. In fact, Agriculture 4.0 allows a more intelligent management of AFSCs, with the vision of reinforcing logistical efficiency, addressing food safety and security, mitigating inherent risks and complying with certifications and regulations. Additionally, it aims at promoting provenance traceability and food authentication, increasing the relationship between stakeholders and ensuring consumer confidence that the products are genuine and of high quality, among other aspects.

Application Examples
A summary of Agriculture 4.0 current and under-development applications by domain and specific sub-domain (identified and discussed throughout the development of the present section) is presented in Table 5, along with their associated enabling technologies. For the elaboration of this table, the authors considered the following: (a) IoT considers the digital interconnection capable of gathering and transmitting data between objects and the Internet; (b) Sensors include any device applied directly in the field or installed on fixed or mobile platforms, which produce a signal that can be transformed into data for monitoring and controlling purposes (e.g., WSNs and WSANs). In addition, stationary actuators (valves, pumps, fans, etc.) are considered to be part of sensors column; (c) Robotics encompass physical platforms (UAVs, ground-vehicles, etc.) that provide some kind of autonomy in certain activities across the AFSC, especially regarding primary production; (d) Cloud computing provides system resources and computational power regarding data storage, processing and analysis in the cloud; (e) Data analytics involve not only AI-based approaches but also statistical methods that grants processing functions and data analysis; and (f) DSS includes any service or platform that could be accessed by a web-browser or mobile device and provides tools to support users in agricultural management and/or logistics. Table 5. Agriculture 4.0 applications per domain and specific sub-domain, along with their associated enabling technologies (IoT, Internet of Things; S, sensors; R, robotics; CC, cloud computing; DA, data analytics; DSS, decision support system). These technologies are marked if they are addressed in at least one of the references identified in the respective application example.

Domain Sub-Domain Application Example and References
IoT S R CC DA DSS

Soil
Monitoring system for multi-layer soil [120] --System to remotely measure soil's parameters in real-time [78] ----Monitoring system for soil's parameters and nutrient detection (N, P and K) and recommendation for water and fertilisers quantity [121] -Real-time monitoring of citrus soil moisture and nutrients with fertilisation and irrigation decision support [122] --Water Low-cost system for monitoring nitrate concentration in real-time in surface and groundwater [123] --Control Irrigation

Crop pest
Weed controller using machine-vision, DL methods and robotics for crop-weed classification [126] ---Smart spraying and weed mapping system, capable of targeting weeds (using machine-vision and AI) and precisely spray the target [90] --UAV-integrated system for RS, weed identification and mapping and for herbicide spraying at the specific location [45] ---Pest control system, using Infrared sensors ultrasonic sound generator and image processing technologies [127] ---Smart greenhouses Smart control system for tomato greenhouses and growth prediction [128] -Low-cost ubiquitous sensor networks for greenhouse hydroponics [41] -Arduino-based system to monitor and control environmental and soil parameters in greenhouses [129] ---Greenhouse control system using fuzzy logic enhanced with wireless data monitoring [130] --

Market demand
Forecasting monthly prices of arecanuts in India using ML methods [145] -----Sales forecasting and order planning operations using statistical analysis for packaged fresh and highly perishable products management [146] ----

Supply chain management
Scheduling optimisation for AFSC management using big data [148] -Fruit and vegetable identification using computer-vision and CNNs for retail applications [149] --

Supply chain traceability
IoT-based traceability system using RFID [150,151] QR Code and RFID [152], NFC [153], blockchain and HACCP methods [154] -Provenance of supply chain products using blockchain [155,156] --A recent study classified "Smart Farming" technologies according to their technology readiness level (TRL) (from TRL 1 (basic principles observed) to TRL 9 (actual system proven in operational environment) [157]), with results showing that the majority of scientific papers encompassed lies at TRL 5 [158]. This assessment is aligned with the literature review of the present document, in which the maturity level of most Agriculture 4.0 technologies is still relatively low, with most being stuck at the pilot stage under a controlled environment. While this can be justified by a number of factors specific to agriculture, including the adverse and dynamic conditions of real environments, along with typical awareness and training challenges for end-users, it is interesting to note that the same roadblock is found in Industry 4.0 applications [22], from which the Agriculture 4.0 paradigm draws many of its technologies. Nevertheless, some exceptions can be found, as in the case of remote sensing, which has seen increased levels of adoption in recent years due not only to the amount of data available, but also to the possibility of circumventing geographical and environmental barriers, providing useful insights in many domains, such as crop management and yield estimation, among others.
It is also particularly interesting to note that the maturity level and the adoption rate of digital technologies are highly dependent on development level associated with a given geographic area. While developed countries are adopting the concept of Agriculture 4.0 more quickly [159], several initiatives have been launched in recent years to fill this gap in developing countries, with programs dedicated to promoting and enabling digital innovation in agricultural systems. For instance, an overview of the digital transformation of the agri-food sector in the region of the Near East and North Africa can be found at [65].

Agriculture 4.0 Challenges and Research Opportunities
Despite the many advantages that the realisation of Agriculture 4.0 could bring, there are still several open issues and challenges that need to be addressed to enable a successful transition towards this paradigm. The present section focuses on answering RQ4 (What are the main challenges Agriculture 4.0 is facing?), providing a critical assessment of the results from the analysis carried out in this study in the form of a summary of key challenges and gaps found in current literature. These challenges have been stratified into five levels, as illustrated in Figure 8. Consequently, these also represent the main directions for future research efforts in this domain, as their resolution would contribute considerably to increase the viability and adoption rate of Agriculture 4.0 solutions. Figure 8. Some of the key challenges to be addressed in Agriculture 4.0 divided into five main levels, namely: device, data, network, application and system.

Device Level
Moving beyond the pilot stage under controlled conditions to the deployment in real agricultural environments can be extremely difficult due to the many challenges that can arise during this process. To effectively digitalise agriculture, edge devices in the fields need to be exposed to harsh and variable environmental conditions, including heavy rain, very high/low temperatures, high humidity and strong wind speeds. Additionally, these devices are also exposed to wildlife such as small rodents or birds that can easily damage their electronic circuits or disrupt their normal functionality. A possible solution that should be considered when designing an IoT-based system is the choice of an adequate casing for the devices, which does not interfere with their functionality and tolerates the environment they are located [25].
Wireless devices have limited battery life, being the energy the scarcest resource in a wireless system. For instance, one of the characteristics when implementing an agricultural system using WSNs is that they can be strategically placed in the fields, which are often difficult for humans to access. Therefore, it is extremely important to guarantee an efficient energy saving scheme for the system to operate during long periods of time. The first possible option is to choose low-power sensors and the most adequate communication protocol when designing an IoT-based system. The addiction of a "sleep/wake" mechanism in physical components could be seen as another possible solution to optimise the energy consumption of the system. In the case of a WSN, the transceiver is the most energyconsumer component, meaning that communications must be properly managed. With the previous mechanism, it is possible to put the component in "sleep" mode, so no data communication occurs during this period [38]. Another possible solution is the development of self-supporting wireless systems, through the use of external power sources such as solar panels or wind turbines [28]. These are used not only to prolong the lifetime of the devices but also to charge the system batteries so that they can be used on days when the solar radiation or the wind energy are weak.
Further research is crucial to ensure that edge IoT devices can be designed and built to not only to be robust and durable enough to endure real field conditions, but also as self-sustainable as possible as they need to work reliably for long periods of time, often without human intervention or the support of external power sources. To complement this, the cost of sensors and actuators is another factor that should be addressed. For large applications scale, WSNs tend to have a large number of sensor nodes. Therefore, it is important to consider low-cost units, the same way they should be easily installed or replaced in an affordable way.

Data Level
Agriculture 4.0 systems rely heavily on the quality of collected data to produce meaningful results, making this a cornerstone for the success of such solutions and transversal to the layers of any architecture, as discussed below in Section 7. Data quality can be distilled down to four categories [160]: (a) intrinsic, referring the characteristics that are inherent to the data itself such as accuracy, timeliness, completeness and consistency; (b) contextual, related to attributes pertaining to the specific context of a given task; (c) representational, meaning the way in which data is presented, being thus directly related to how interpretable the data is and therefore conditioning the creation of added value from it; and (d) accessibility, highlighting the importance of storing and managing data in a way that makes it easily accessible to stakeholders while maintaining reliability, integrity and privacy of sensitive data.
These characteristics are aligned with the European Commission's action plan for findable, accessible, interoperable and reusable (FAIR) data [161]. FAIR attributes have been stated to be essential for the extraction of the full scientific value from data resources and to unleash the potential for AI-based DSS at scale. Hence, future research can contribute to jointly improve the way the different dimensions of data quality can be monitored and optimised, consequently improving the performance, reliability and trustworthiness of Agriculture 4.0 solutions.

Network Level
Contrary to wired networks, wireless networks have major advantages in terms of lowcost, good networking flexibility and high scalability and can cover much wider areas [21]. However, unstable connectivity, network size, data transmission rate and other issues were identified as core challenges that affect the performance of any IoT-based agricultural system.
The digitalisation of the processes involved in the "Farm to Fork" journey leads to the collection of an enormous amount of data that must be processed and visualised in a timely manner, so that it is possible to take the necessary actions in-time. This becomes a challenge for wireless systems with low transmission rate. When designing an IoT-based system, it is important to consider the most adequate wireless communication protocol and its data transmission rate. By analysing Table 4, it is possible to see that, for instance, 4G can handle high-rates (0.1-1 Gb/s) while ZigBee is for low-rates (250 kb/s). Another possible solution is the employment of edge and fog computing technologies to reduce network latency and congestion issues [25].
Additionally, the transmission range within the fields is also an important characteristic that needs to be considered when designing an IoT-based solution. While longer transmission ranges imply higher energy consumption, shorter transmission ranges require a higher number of hops for data packet reach their destination, albeit with less energy consumed per transmission [162]. Different wireless communication protocols have different transmission ranges (Table 4), therefore it is important to choose the most suitable protocol for the case at hand. One way to extend the transmission range is to use UAVs as mobile routers, as they could pass the data collected by the sensor nodes to the master node through multi-hop [38].
Furthermore, network size could also be an issue, since WSN configuration has a maximum number of sensor nodes per gateway that the network can handle [25]. Considering this, further studies need to be focused on the optimisation of the transmission range of wireless networks, as well as studying the best spatial distribution for the sensor nodes to be placed in the agricultural field, in order to guarantee sustained operations.
Adverse environmental conditions, as well as the presence of humans, animals, plants or other obstacles, are also known to be one of the major factors affecting the wireless link quality, resulting in background noise and leading to fluctuations in the received signal's intensity due to the multi-path propagation effects [13,21,28]. Furthermore, the use of different IoT networks can also cause serious wireless interference and degrade the quality of the service [13]. To avoid or mitigate propagation losses, it is necessary to make a precise study and planning for the location of the sensor nodes, as well as the antenna height, the communication protocols and the network topology [25].
Lastly, this higher degree of connectivity between "things" in agricultural environments also brings with it additional challenges regarding interoperability and efficiency. To enable a network of heterogeneous devices to be truly interconnected and interoperable, common data representation and exchange formats, along with adequate communication protocols must be implemented to ensure that these devices can effectively communicate. In line with this, wireless IoT technology should boast low construction and maintenance costs, low energy consumption and excellent extensibility [21].

Application Level
One of the main selling points of Agriculture 4.0 is its capacity to transform data into knowledge that can be used by stakeholders to improve their agricultural systems. However, in order for these data to be effectively transformed into actionable knowledge, processing needs to occur in a timely manner, meaning that these systems should be capable of processing varying volumes of data in real-time. Naturally, this comes with its own set of challenges, as these systems should be capable of coping with the aforementioned data issues in an automated, reliable and distributed manner during run-time with often limited processing power and all of the constraints imposed at the device and network levels.
Furthermore, applications should be context-aware, meaning they should be aware of metadata and information that can be useful to characterise entities or events in particular context, which, once again, makes it possible for stakeholders to act upon this knowledge.
Lastly, the added connectivity and distributed nature of agricultural IoT systems also brings additional concerns regarding potential vulnerabilities to cyber-attacks such as eavesdropping, data integrity, denial-of-service attacks or other types of disruptions which may risk the privacy, integrity and availability of the system. As such, cyber-security is a major challenge to be addressed within the context of Agriculture 4.0 research, with potential venues including diverse privacy-preserving mechanisms and federated learning approaches [63].

System Level
Some of the challenges identified in the literature review can be framed at system-wide level, meaning they encompass general characteristics of the system that do not pertain to a singular layer of the architecture at individual level, but should emerge from the system as a whole. These include aspects such as the scalability of the solutions and their flexibility, meaning the capacity to adapt to changing conditions or requirements dynamically in a robust manner. These aspects, along with the real-time capability of the service layer, are crucial to cope with the real-time and ever-changing dynamics of the global economy. As the system grows and adapts, it can also become increasingly complex making it important to find ways to keep this complexity under check.
A major point that relates to this system dynamics is the aspect of continuous improvement and engineering, which is enabled by the system's combination of real-time data and capacity to learn and adapt through AI. New approaches should leverage data collected in real-time not only to ensure that the system performance can be improved, but most of all that it can be at least maintained in the face of these dynamic conditions inherent to real-world environments. This entails, for instance, in the case of ML applications, dealing with aspects such as concept drift, which refers to instances in which the distributions of data may have changed from those with which models were initially trained. As such, integrated approaches for seamless and automated monitoring, adaptation and validation of deployed solutions should be explored.

Cloud-Based IoT Architecture for Agriculture 4.0
To date, there is no unified architecture for the design of a IoT-based system within the scope of Agriculture 4.0, as different authors propose different types of architecture with varying degrees of technical quality and rigor. Some authors present a three-layers architecture [163,164], which is considered the basic model for an IoT architecture for agricultural applicability [28,163,165]. Although the classification of the layers may vary slightly, the concept is similar and goes through the following: (a) a perception/sensing layer supported by several devices that collect the desired data from the fields (e.g., system using WSNs), and, if it is a control system, actuators that can take appropriate actions in the fields (e.g., system using WSANs); (b) a network layer where, by using adequate gateways and communication protocols, the sensed data are transferred to the application layer; and (c) application layer which, depending on the software requirements, could include a cloud server responsible for data storage, processing and visualisation and data analytics tools for data analysis. Other authors present an IoT-based architecture divided into four-layers [20,41,166] and five-layers [21].
Based on the literature survey and to give an answer to RQ5 (In which way can a common architecture be formalised to encompass Agriculture 4.0 core elements and support the implementation of future smart agricultural systems?), a high-level four-layer architecture of a cloud-based IoT system is presented in this review (Figure 9). This architecture has as foundation the architecture proposed by Talavera et al. [20] and involves the principal aspects discussed along the development of this review article. In addition, it was designed with a generic applicability in mind and can serve as an illustrative example for future implementation of a smart agricultural system, within the scope of Agriculture 4.0. Nevertheless, even using this architecture as a foundation, different implementations are possible, as long as the objectives and requirements for the desired system are respected. Figure 9. Conceptual cloud-based IoT architecture for Agriculture 4.0, consisting on four layers: physical layer (where data are collected at the perception layer), communication layer (where an adequate network allows the data communication between layers), service layer (for data storage, processing and analysis) and application layer (for access of agricultural information and control actions).

Physical Layer
It is the lower level in an agricultural architecture and includes the physical objects that are capable of sensing (perception layer) and/or controlling (control layer) the agricultural environment, with some sort of connection to the Internet. The perception layer is used to acquire a wide range of valuable parameters (environmental, plant, soil, water, animals, etc.) from the field. This process is done through the strategic deployment of sensors in the fields and/or using robotics (e.g., satellites, AGVs and UGVs). Sensor nodes should be connected to a microcontroller, which is responsible for collecting the data from the different sensors and transmitting them to the transceiver that, in its turn, communicates the data to the next layer. The microcontroller depends on some energy source to power its commands from the microprocessor, and it can be battery-powered, self-powered using solar panels (commonly used in weather stations) or self-powered with backup batteries [164]. The control layer receives the control commands from the upper layers, so that actuators/controllers can act in the field.

Edge and Fog Computing Layer (Optional)
As close as possible to the physical layer, the edge computing layer can be an option to perform some data processing, even if it has limited computational capabilities, before transmitting data to or from the cloud. In addition, the fog computing layer, located above the edge layer in a vertical view of the architecture, can assist edge computing with more powerful computing tools, as well as provide data fusion capabilities, aggregating data from multiple sources for later processing in the cloud.
The employment of such layers can thus help reducing the load on the local network, in order to improve the efficiency and performance of the overall system.

Communication Layer
Communication channel responsible for transferring agricultural data between the physical layer and the service layer. The communication means can be done using wired technology, such as CAN bus or wireless technology, through the use of wireless communication protocols ( Table 4). Most of the existing devices are not designed to connect to the Internet and, in turn, are unable to share data with the cloud. Fortunately, gateways appear to solve this challenge, acting as intermediaries between "things" and the cloud and providing the necessary connectivity, security and manageability [41].
In addition, depending on the type of system to be designed, the communication layer can operate in one or two directions [20]. For a generic monitoring system, the communication layer only transmits the agricultural data from the perception layer to the service layer. However, if it is a control system that uses controllers or actuators (e.g., a WSAN), the communication layer operates in two directions: first, it sends the data to the service layer from the perception layer for processing and analysis, which, in turn, sends control commands to the control layer.

Service Layer
It is responsible for digitalising the agricultural data. The collected data, from the perception layer and other sources (e.g., historical data from databases or forecasting services), are transferred to the cloud server. Cloud services provide tools for storage, processing, analysis, visualisation and traceability, through the use of supporting digital services, including data analytics, blockchain, valuable decision-making tools, etc.

Application Layer
It is the upper level of the architecture and is responsible for facilitating the access and visualisation of the agricultural information. Several smart applications are used to allow the user to handle agricultural monitoring, control, prediction and logistics, and their access can be made through computer and/or portable devices. The real-time monitoring and control of agricultural systems, the early perception of possible deviations (e.g., prediction of crop diseases), the traceability of agricultural products, etc. bring a new reality for partners involved in the AFSC.

Discussion and Future Directions
From the literature survey, it is clear that, while considerable efforts have been made towards bringing ICT technologies to agricultural domain, several challenges remain, as highlighted in Section 6. This becomes evident from the apparent hurdle to go over the pilot stage, as discussed in Section 5.5, which can be attributed to key challenges in this domain ranging from the technological gap to be bridged, making issues such as awareness and adoption rate difficult to overcome, to the unique and often harsh conditions that new solutions should endure. Nevertheless, there is much to be gained from the adoption of such innovative solutions in the agri-food sector, particularly when addressing key issues pertaining to the aspects of sustainability. The goals defined in the European Green Deal [5] can be more easily reached through a combination of the technologies analysed in this review, providing the foundation for the improved visibility, traceability, decision-making and engagement across the entire AFSC.
To achieve this, the first step comes from the adoption of a common architecture, such as the one presented in Section 9, to avoid constantly "reinventing the wheel" as well as to provide a convergence point for new solutions and consequently promote their interoperability and adoption.
Then, the aspect of data governance is also critical, as larger and larger volumes of data become available through the digitalisation of the sector. Following common guidelines [161], data and digital objects created or used in research should be FAIR. The adoption of FAIR principles in data governance supports the digital revolution and accelerates research, further contributing to stakeholders being able to harness the capabilities of AI-driven data analyses at scale, whilst improving transparency and knowledge discovery. Some examples in this direction include the Platform for Big Data in Agriculture (https://bigdata.cgiar.org/, accessed on 1 March 2021) or the more specific MIAPPE community driven project to harmonise data from plant phenotyping experiments [167]. Such efforts provide a strong data foundation upon which the maturity of approaches such as those based on AI, cloud computing and robotics can be further improved.
Lastly, it is important to ensure that stakeholders are engaged not only at the agricultural level (e.g., farmers), but also across the entire AFSC, including retailers and consumers. The holistic view should be considered if one aims to address sustainability challenges, such as food loss and waste reduction, for which multiple actors play a vital role. In this direction, activities to improve engagement and adoption should not be restricted to awareness campaigns or training, but instead find innovative ways, such as gamification, to provide incentives for stakeholders to take on an active role in the digital revolution of the sector.

Conclusions
In this article, a review of emerging research trends and technologies used in the con-text of Agriculture 4.0 is presented. This study started with the collection of documents of interest (research articles, conference papers and books) from Web of Science, Scopus and ScienceDirect databases. Subsequently, a semi-automated process was conducted for the identification of the emerging trends of the topic under study in the last ten years, by analysing the abstracts of the collected documents using a NLP approach. The results of this process are detailed in Section 3 addressing RQ1 (What are the emerging trends of Agriculture 4.0 in the last ten years?). Following this, a thorough review of the state-of-the-art was conducted, aiming to provide a global vision of the current landscape of Agriculture 4.0 (Section 4).
In addition, from this study, it was possible to identify and explore the main application domains of Agriculture 4.0 (monitoring, control, prediction and logistics) and their sub-domains, as presented in Section 5, and consequently answer RQ2 (What are the existing application domains for Agriculture 4.0?), culminating with some examples of applications for each domain that are currently being used in real scenarios or under-development.
To this point, it was possible to answer to RQ3 (In which way can Agriculture 4.0 assist in sustainable development?). Agriculture 4.0 is playing a central role in shaping the future of the agri-food sector, by having the three main dimensions of sustainability as pillars. These aim at providing economic, social and environmental benefits, in an ethical and fair manner. In terms of economic benefits, Agriculture 4.0 involves applying modern technologies to generate data and use them for real-time processing, analysis and decision-making purposes. This concept helps in optimising primary production, supply-chain and logistics performance. For instance, the adoption of the "produce more with less" strategy in agricultural management envisions to reduce the costs associated with agricultural inputs, while ensuring the economic growth. Regarding social benefits, Agriculture 4.0 aims at turning agri-food systems more sustainable, reducing food losses and waste and improve food security, in order to end hunger and malnutrition worldwide.
Consumers not only would have access to safe, nutritious, healthy products, hopefully at more competitive prices, but would also build a bond of trust between them and farmers/retailers, contributing to empower the social and economic growth not only in the agri-food sector but also of the country. Besides that, Agriculture 4.0 compromises changing the job market and the skills needed in agriculture, as well as the business models of agri-food enterprises. Finally, environmental benefits would essentially focus on a climate neutrality strategy of farming and food systems. The rational use of natural resources and agro-chemical products (such as, fertilisers, herbicides and pesticides) in the fields, the mitigation of GHGs emissions and the efficient use of energy at every stage of the AFSC envision to decrease negative impacts in the environment, as well as protect human life, animal and plants and ensure social welfare.
Afterwards, and to respond to RQ4 (What are the main challenges Agriculture 4.0 is facing?), the core challenges are identified in Section 6 and classified into five main levels (device, data, network, application and system). These challenges demonstrate new opportunities for researchers to improve current technologies and develop future trends. For instance, by modernising the infrastructures to adopt IoT solutions, creating robust, selfsustaining and low-cost devices, improving the connectivity between "things", embracing cloud-based services and variants (edge and fog computing), optimising AI-based models for data analytics, in order to take advantages of a truly connected and smart agricultural IoT system. In addition, another possible challenge that Agriculture 4.0 may face is related to the fact that workforce is ageing [168] meaning that their ability to deal with new digital technologies is very limited. It is necessary to invest in and provide the right mechanisms (e.g., workshops, courses and customised training) to farmers and involved partners in the next years, for them to develop and improve competences and skills to embrace the technologies that Agriculture 4.0 brings in an easier and pleasant way.
Lastly, to address RQ5 (In which way can a common architecture be formalised to encompass Agriculture 4.0 core elements and support the implementation of future smart agricultural systems?), a cloud-based IoT architecture with generic applicability is introduced in Section 7. This architecture covers most of the core technologies analysed in this document and can be used as a foundation for the design and implementation of future smart agricultural systems. However, throughout the study, the authors realised that there is no consensus cloud-based IoT architecture for the design of agricultural systems to date. Future efforts can focus on the alignment of this architecture with the Reference Architecture Model for Industrie 4.0 (RAMI 4.0) [169] and its ecosystems of standards. Reinforcing the parallelism to the Industry 4.0 paradigm, building a bridge to RAMI 4.0 can promote interoperability and uptake of Agriculture 4.0 solutions, facilitating their development and implementation in real agricultural scenarios.
With this framework, the main objectives for this review article were successfully achieved, culminating in what the authors consider to be an adequate guideline for the development and improvement of future sustainable Agriculture 4.0 solutions.  Acknowledgments: Icons used in certain figures were provided by www.flaticon.com and made by Freepik, Nikita Golubev, iconixar and wanicon, Icongeek26, mavadee, Payungkead, Darius Dan, photo3idea_studio, Eucalyp, Vitaly Gorbachev, phatplus, ibrandify, Smashicons, Becris and surang.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: