# State-of-the-Art Internet of Things in Protected Agriculture
## 2 The Structure of IoT in Protected Agriculture
### Structure of IoT in Protected Agriculture  
Based on the actual situation of protected agriculture and the experience of other scholars, we proposed a five-layer IoT architecture [22]. As shown in Figure 5, these layers are briefly described below:  
1. Perception layer: This layer consists of various sensors, terminal devices, agricultural machinery, wireless sensor network (WSN), RFID tags andreaders, etc. The common sensors are environmental sensors, animal and plant life information sensors and other sensors related to agriculture. Through these sensors, information such as temperature, humidity, wind speed, plant diseases, insect pests and animal vital signs can be obtained. The collected information is simply processed by the embedded device and uploaded to a higher layer through the network layer for further processing and analysis.
2. Network layer: The network layer is the infrastructure of IoT, which includes a converged network formed by various communication networks and the internet. The transmission medium can be wired technology such as CAN bus and RS485 bus or wireless technology like Zigbee, Bluetooth, LoRa and NB-IoT. The network layer not only transmits various kinds of agricultural related information collected by the perception layer to the higher layer, but also sends the control commands of the application layer to the perception layer, so that the related devices of the sensing layer take corresponding actions.
3. Middleware layer: IoT can provide different types of services for different devices. The technical specifications (processor, power supply, communication module) and system of each device are different and different devices cannot be connected and communicated with each other, which leads to heterogeneity problems. The middleware layer aggregates, filters and processes received data from IoT devices, which greatly reduces the processing time and cost of the above issues and provides developers with a more versatile tool to build their applications. It also  
Figure 4: IoT-A IoT framework [21].  
simplifies the steps of new service development and new device deployment which enables them to integrate more quickly into older architectures, improving the interoperability of IoT.
4. Common platform layer: The common platform layer is responsible for the storage, decision-making, summary and statistics of agricultural information and the establishment of various algorithms and models for agricultural production process such as intelligent control, intelligent decision making, diagnostic reasoning, early warning and prediction. This layer is composed of cloud computing, fog computing, edge computing, Big Data, machine learning algorithm, other common core processing technologies as well as its establishment model.
5. Application layer: The application layer is the highest level of the architecture and the place where IoT's value and utility are most apparent. There are lots of intelligent platforms or systems in this layer for the environmental monitoring and control of plants and animals, the early warning and management of diseases and insect pests, and agricultural product safety traceability, which can improve production efficiency as well as save time and cost.  
Figure 5: Structure of IoT in protected agriculture [22].