## 3 System Architecture and Service Process
### System Architecture  
Existing web-based monitoring systems such as WAGRIT have a structure that separates data acquisition devices and the web server. However, the proposed agricultural environment monitoring server system has a structure that integrates the WSN sensors, CCTVs, GPS modules, database server, web server, DVR server, _etc._ to collect environmental information on the outdoors and image information into a device for collecting various pieces of information on the outdoors environment, and provides real-time monitoring and various application services based on this information.  
As shown in Figure 1, the proposed system is composed of a physical layer, which consists of WSN sensors, CCTV, GPS, solar cells _etc._ to collect information on the outdoors environment, a middle layer, which supports communications between the physical layer and the application layer and converts the outdoors information collected from the physical layer into a database to provide data requested from the application layer, and an application layer, which is equipped with interfaces to support various services for producers.  
The WSN sensors are composed of environmental sensors to collect environmental information including luminance, humidity, temperature _etc._ and soil sensors to collect soil information including temperature, EC, soil pH, _etc._ After they are distributed outdoors and every sensor node forms an autonomous network, they send physical information acquired from sensor nodes to the server system by wireless.  
The CCTV system collects image information on the outdoors in real time to provide outdoor images to user, and the GPS module collects location information on the installed server system and the collected outdoors information.  
The solar cell supplies power for the server system installed outdoors, and the system is therefore applicable in an agricultural environment with insufficient power infrastructure because can operate even if no external power is supplied to the server system.  
The sensor manager manages data acquisition from the soil and environmental sensors, extracts the soil and environmental data by processing the collected data packets into a format which could be stored in the database, and stores it in the database or sends it to other server systems for processing by converting the processed data into the format suitable for the measurement elements.  
In addition, the expandability and convenience of the server system is improved by enabling it to select the sensors to be used and the database in which the data is to be stored through a simple menu in order to integrate and manage different kinds of sensors.  
The GPS manager extracts location data coming in through serial communication from the GPS module to store it in the database, extracts the latitudes and longitudes from the received data using the &GPRMC format of NMEA 0183, and stores them in the database through an 'Insert' query statement after converting them appropriately for each unit.  
The image information manager provides images taken from CCTVs to the Web as streaming data and stores them in the database.  
The database stores environmental and soil data, image data, location information data and environmental reference values for notifying conditions into each table, and creates average statistical information by using the collected information.  
The web server provides an environment that users could monitor data processed by the components and environment of the outdoors through a Web browser anywhere and at any time.  
Figure 1: Agricultural Environment Monitoring Server System Architecture.