Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Available at www.sciencedirect.

com

INFORMATION PROCESSING IN AGRICULTURE xxx (xxxx) xxx

journal homepage: www.elsevier.com/locate/inpa

Data communication mechanism for greenhouse


environment monitoring and control:
An agent-based IoT system

Jizhang Wang a,*, Meizheng Chen a, Jinsheng Zhou a, Pingping Li a,b


a
Key Laboratory of Modern Agricultural Equipment and Technology, Ministry of Education and Jiangsu Province, School of Agricultural
Equipment Engineering, Jiangsu University, Zhenjiang 212013, China
b
College of Biology and the Environment, Nanjing Forestry University, Nanjing 210037, China

A R T I C L E I N F O A B S T R A C T

Article history: Internet of things (IoT) technology has been constantly applied in greenhouse environmen-
Received 28 August 2018 tal monitoring and control in recent years. The acquisition and control parameters, net-
Received in revised form work protocols are different for the various purposes of the greenhouse. These factors
16 September 2019 are the keys to the abilities to effectively communicate and transfer meaningful data in
Accepted 22 November 2019 IoT infrastructures. To achieve the adaptive matching of data communication between
Available online xxxx the gateway and server in a greenhouse IoT system, a data encapsulation method based
on XML was designed to enable data interoperability in a distributed greenhouse IoT sys-
Keywords: tem. Furthermore, the behaviour of the Multi-Agent System (MAS) was used to merge
Greenhouse the heterogeneous information and the responses for data synchronization in the green-
Data communication house IoT system. The data communication mechanism for real-time and cumulative data
XML synchronization between the gateway and server based on JADE was tested in a specific
Internet of Things (IoT) greenhouse. The results showed that the data loss rate between the data acquisition unit
Agent and the gateway was 1.52%, and the data loss rate was 0.4% between the gateway and
the server; therefore, the mechanism could be feasibly applied to the data communication
for a greenhouse IoT system.
Ó 2019 China Agricultural University. Production and hosting by Elsevier B.V. on behalf of
KeAi. This is an open access article under the CC BY-NC-ND license (http://creativecommons.
org/licenses/by-nc-nd/4.0/).

1. Introduction the application layer [11]. In the network layer, the gateway
is developed as a middleware to communicate with the per-
Internet of Things technology has been widely applied in ception and application layers. In the application layer, the
greenhouse environmental monitoring and control in the remote server is used as a channel for sensor data, which
past decade [1–10]. The structure of the IoT is based on three are usually forwarded to a remote infrastructure for storage,
layers, namely, the perception layer, the network layer, and analysis, processing, and decision support [12,13].
To improve the interoperability of the IoT system,
machine-to-machine (M2M) communication must provide a
* Corresponding author at: 301, Xuefu Road, Zhenjiang, Jiangsu seamless intersystem for the exchange of information. To
212013, China. exchange information in the systems, the XML (Extensible
E-mail address: whxh@ujs.edu.cn (J. Wang).
Markup Language) can be used as a markup language that
Peer review under responsibility of China Agricultural University.
https://doi.org/10.1016/j.inpa.2019.11.002
2214-3173 Ó 2019 China Agricultural University. Production and hosting by Elsevier B.V. on behalf of KeAi.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/).

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
2 Information Processing in Agriculture xxx (xxxx) xxx

is readable by both humans and machines, and it has been Service and SOAP can be used as the data exchange protocol
used as the M2M communication method in an agricultural for different data sources and platforms, but in the IoT sys-
IoT system. Wu et al proposed the agricultural information tem for a greenhouse, the system needs to adaptively match
4-tuple data model (MCOD) that uses XML data files to maxi- the requirements of distributing the information communica-
mize the synchronization efficiency of high-capacity agricul- tions related to the greenhouse environmental monitoring
tural spatial data. In the network layer, which is highly and control. Multi-Agent System (MAS) technology, as a dis-
suitable for transferring data between servers and mobile cli- tributed decision support system that can optimize logistical
ents [14]. Wang et al developed an integrated network platform processes in agricultural production [25,26], has been applied
based on XML to parse and store data from different monitor- in the agricultural context for greenhouse environmental
ing terminals according to the standard format of a communi- monitoring and control [27–29]. Therefore, the MAS can be
cation protocol for heterogeneous agricultural information used to devise an autonomous and proactive solution for inte-
remote monitoring systems [15]. To exchange data between grating various agricultural information and communication
different systems, Murakami et al developed the Precision protocol that can achieve distributed information communi-
Agriculture Markup Language (PAML) as a message-oriented cation [30].
middleware for connecting web services based on XML [16]. In various greenhouses, the variability of sensing and con-
Wolfert et al produced a standardized XML-based method for trol parameters, network protocols lead to heterogeneous
exchanging data between a farm management system and information communication between the three IoT layers.
other systems [17]. Schuster et al designed an Internet-based This heterogeneity influences the interoperability of the sys-
architecture for M2M communications and computations by tem [9]. To achieve the adaptive matching of the data commu-
using XML to enable data interoperability in a synthetic com- nication between the gateway and server for a greenhouse IoT
puting environment and to establish connections between system, the purposes of this study are the following: (1) to
data and mathematical models [18]. Dai et al designed a set design a data encapsulation method for communicating data
of agricultural production management data structure stan- based on XML to enable data interoperability in a distributed
dards based on XML and AgroXML to realize unified data acquisition and control environment, (2) to develop the data
understandings in different systems [19]. Xiong et al designed communication mechanism based on the MAS to integrate
the web data asynchronous interaction framework based on various greenhouse information and communication protocol
asynchronous JavaScript and XML technology to achieve the to achieve the one-way synchronization of the real-time
real-time synchronization of action states in a greenhouse acquisition data and to control information synchronization
control system [20]. Therefore, as a data structure standard, and two-way synchronization of the environmental acquisi-
XML can be used as a language for information exchange to tion and control unit configuration information, (3) to use
improve the interoperability in IoT systems. the behaviour of the MAS to merge the heterogeneous infor-
To achieve the remote management of agricultural infor- mation from the greenhouse IoT system and to enable data
mation, Web services have been used for data exchange from synchronization between the systems, and (4) to use the Java
different data sources. Nguyen and Kowalczyk developed an Agent Development (JADE) framework to test the data com-
integration framework of Web services and an agent platform munication mechanism for the real-time and cumulative
that is compliant with the Foundation for Intelligent Physical data synchronization between the gateway and server.
Agents (FIPA) called Jade WS2JADE, and a special agent was
designed to communicate between Web services and agents 2. Background and related concepts
[21]. Nikkila et al designed a service infrastructure that trans-
fers the production standards in a computer-encoded and 2.1. IoT system for greenhouse environment monitoring
machine-interpretable format between the stakeholders of and control
modern agricultural production. These encoded production
standards provided an immediate benefit for farmers and To achieve high-efficiency monitoring of environmental infor-
providers of farm management information systems by ulti- mation, we developed an IoT monitoring management sys-
mately enabling automated compliance control using existing tem for a greenhouse [31]. Fig. 1 shows the structure of the
farm data [22]. Chen et al designed a sharing platform for the IoT system for greenhouse environmental monitoring and
distributed multi-source IoT sensor data from agriculture and control. The system mainly consists of an intelligent gateway
forestry. The platform used a non-blocking Socket interface based on an Android system and a remote web server. The
and a data acquisition interface based on HTTP and Web Ser- gateway collects the greenhouse environmental data by using
vice protocol to receive data from different data sources [23]. a data acquisition unit and stores them in the SQLite data-
To ascertain the optimal approach for integrating web base. Meanwhile, the greenhouse environmental data are
service-enabled agricultural information systems and mobile transported to the server via the gateway. The gateway
devices, Arroqui et al analysed the outcomes of employing receives the control data stream from the server, and then
either the Simple Object Access Protocol (SOAP) or Re- parses and sends the data stream to the control unit. The con-
presentational State Transfer (REST) approaches in a web trol node controls the greenhouse equipment, such as the
service-enabled whole-farm simulator that can accessed windows, fans and heating equipment. The server system
from Android-powered smart phones [24]. Additionally, Web receives and manages the data from the gateway.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
Information Processing in Agriculture xxx (xxxx) xxx 3

Fig. 1 – Structure of IoT system for greenhouse environment monitoring and control.

2.2. Data encapsulation and communication based on such as a simple yet powerful task execution and composition
XML model, peer-to-peer agent communication based on the asyn-
chronous message passing paradigm, and a yellow pages ser-
The data from the greenhouse environment acquisition unit vice supporting a publish-subscribe discovery mechanism.
and control unit, such as the configuration parameter infor- Furthermore, suitable configurations can be specified to run
mation, real-time data, and communication status, are com- JADE agents in networks that are characterized by partial con-
municated between the intelligent gateway and the server. nectivity, including network address translations, firewalls,
To adapt to the heterogeneous data structures of different intermittent coverage and IP address changes [34].
acquisition and control units, the XML tree structures are
adopted to achieve information encapsulation [32]. Moreover,
JADE provides considerable support for automatically con-
verting information back and forth between string formats
including XML and RDF to more conveniently and quickly cre-
ate and manage message contents. Therefore, all the infor-
mation encapsulation and communication are conducted
using XML in this system. The data model of the greenhouse
acquisition and control units is shown in Fig. 2.

2.3. JADE framework

The JADE framework is a software scheme that is designed to


simplify the development of multi-agent applications. The
JADE framework simplifies the implementation of multi-
agent systems through middleware that complies with the
FIPA specifications and through a set of graphical tools that
support the debugging and deployment phases [33]. A JADE-
based system can be distributed across machines, and its
configuration can be controlled with a remote graphical user
interface (GUI). If it should be required, this configuration
could even be changed at runtime by transferring agents from
one machine to another. JADE provides many advanced fea-
tures to facilitate the development of a distributed system, Fig. 2 – Data model of acquisition unit and control unit.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
4 Information Processing in Agriculture xxx (xxxx) xxx

2.4. JADE for android communicate data to the server, and receive the message
from the server. The system functions are as follows.
With the development of mobile devices, operating systems
must support the development of third-party applications (1) According to the server IP address and JADE port num-
with open system APIs. In addition to an open API, the ber, the GatewayAgent is registered in the JADE plat-
Android operating system provides a rich inter-application form of the server. The GatewayAgent enters the
message transferring system. Because of the progressive inte- initial state of the agent life cycle, activates the agent
gration between the wireless and wired environments, the state by using the setup() method, and registers with
deployment of distributed applications is becoming increas- the Directory Facilitator Agent.
ingly imperative. Moreover, with the contribution of the LEAP (2) The GatewayAgent adds the execution cycle class
project, versions of JADE exist that are designed to transpar- CyclicBehaviour() to achieve the information synchro-
ently deploy JADE agents in different Java-oriented environ- nization connection. CyclicBehaviour() also sends the
ments, such as on Android devices and J2ME-CLDC MIDP 1.0 real-time acquisition data and state of the data acquisi-
devices. Therefore, Ughetti et al. [34] and Bergenti et al. [35] tion unit to the server.
have used the JADE-LEAP add-on to integrate the JADE and (3) The GatewayAgent adds the execution cycle class Tick-
Android platforms. This add-on addressed the communica- etBehaviour() to enable the intelligent gateway to
tion among JADE agents, among Android activities, and receive data from the server. TicketBehaviour() imple-
between JADE agents and Android activities. ments the data analysis and function processes accord-
ing to the message protocol and monitors the
3. System development communication command flag. When the flag is acti-
vated, measurement and control parameter informa-
3.1. Data communication system based on the agent tion is sent to the server.

The structure of the data communication system based on


the Agent IoT system for greenhouse monitoring and control 3.3. ServerAgent
is shown in Fig. 3. The system consists of a GatewayAgent, a
ServerAgent and the communication between them. The The ServerAgent is mainly used to manage the GatewayAgent
communication is based on the Agent Communication Lan- and transmit the measurement and control information. The
guage (ACL). According to the FIPA specifications of the agent functions of the ServerAgent are shown as follows.
system, the server is constituted by an Agent Management
System, a Directory Facilitator Agent, a Remote Management (1) The ServerAgent is registered in the JADE platform of
Agent and a Sniffer Agent. The Sniffer Agent is used to test the server, and then it enters the initial state of the
the functioning of the system. All the functions of those agent life cycle. The agent state is activated using the
Agents are defined by the JADE system [33]. setup() method and registered with the Directory Facil-
itator Agent.
3.2. GatewayAgent (2) The ServerAgent adds the execution cycle class Cyclic-
Behaviour() to receive the ACL information that is sent
The GatewayAgent, which runs at the intelligent gateway, from the GatewayAgent to the ServerAgent, and it
uses JADE for Android. The function of the GatewayAgent is achieves the data analysis and function processes on
to implement environmental acquisition node management, the basis of the message protocol.

Fig. 3 – System structure.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
Information Processing in Agriculture xxx (xxxx) xxx 5

Fig. 4 – Data communication workflow. (a) One-way synchronization for the real-time information of the acquisition and
control units, (b) two-way synchronization for the configuration information of the acquisition and control units.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
6 Information Processing in Agriculture xxx (xxxx) xxx

(3) The ServerAgent monitors the information that is is working properly. Otherwise, the file ‘‘sensorvalue.
related to the measurement and control parameters, xml” is stored in the next data synchronization
including the control parameters’ values and the com- cycle, and the data synchronization cycle is
munication commands. The ServerAgent sends the ended.
communication command flag to the intelligent gate- (3) The ServerAgent receives the synchronization message
way when the flag is activated. protocol ‘‘SensorData_Update”, and the
‘‘TicketBehaviour()” analyses the message and inserts
the data into the database according to the package
4. Data communication mechanism between rules. Subsequently, the receiver sets the message pro-
the gateway and the server tocol to ‘‘SensorData_Confirm” and replies to the syn-
chronization initiator.
The data communication mechanism permits data synchro- (4) The GatewayAgent receives the message protocol
nization between the gateway and server. The data synchro- ‘‘SensorData_Confirm” to end the synchronization.
nization includes one-way synchronization for the real-time Alternately, the synchronization ends when the node
information of the acquisition and control units and two- of the file ‘‘sensorvalue.xml” is deleted.
way synchronization for the configuration information of (5) If the initiator cannot obtain the message protocol
the acquisition and control units [32]. The data communica- ‘‘SensorData_Confirm”, the ‘‘sensorvalue.xml” file is
tion procedure is shown in Fig. 4. stored until the next synchronization cycle.

4.1. Real-time acquisition information synchronization


4.2. Real-time control information synchronization
The acquisition unit periodically collects the greenhouse
environmental information. Therefore, the gateway must If the greenhouse environment is not suitable for plant
periodically synchronize the real-time acquisition informa- growth, the server must send the control information to the
tion with the server (Fig. 4(a)). The steps of the synchroniza- control unit via the gateway to adjust the greenhouse equip-
tion are as follows. ment. Therefore, the real-time control information synchro-
nization represents the last control information. The
(1) When the data synchronization cycle is started, the synchronization is similar to real-time acquisition data syn-
GatewayAgent behaviour ‘‘CyclicBehaviour()” is acti- chronization. The ServerAgent is the initiator agent, and the
vated to serve as a synchronization initiator GatewayAgent is the receiver agent. The transport and reply
(2) The ServerAgent behaviour ‘‘CyclicBehaviour()” is protocols are ‘‘CtlData_Update” and ‘‘CtlData_confirm”,
activated to judge whether the heartbeat connection respectively.

Fig. 5 – JADE remote agent management GUI.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
Information Processing in Agriculture xxx (xxxx) xxx 7

Fig. 6 – Communication process of real-time data synchronization for acquisition unit.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
8 Information Processing in Agriculture xxx (xxxx) xxx

Fig. 7 – Data synchronization result between gateway and server.

4.3. Two-way synchronization of configuration (3) When the receiver gets the synchronization message
information protocol ‘‘DRUConfig_Update‘‘ or ‘‘CUConfig_Update”,
the Agent’s behaviour ‘‘TicketBehaviour()” is activated
To achieve the two-way synchronization between the gate- and used to determine whether the table exists in the
way and server, the synchronization message domain should acquisition node configuration or control configuration
possess the message content and its protocol (Fig. 4(b)). The information database. If the table does not exist, a new
steps of the synchronization are as follows. table will be created.
(4) According to the rules of the configuration information
(1) The synchronization initiator Agent actives the beha- package, the message is analysed as the table row
viour ‘‘CyclicBehaviour()” to determine whether the through the message protocol. The receiver subse-
heartbeat connection is working appropriately. quently sets the message protocol as ‘‘DRUConfig_Con
(2) Once the connection is established, the initiator starts firm” (acquisition node) or ‘‘CUConfig_Confirm” (con-
the behaviour ‘‘OneShotBehaviour()” to package the trol node), and then sends the message to the synchro-
configuration information as a message, sets the mes- nization initiator.
sage protocol as ‘‘DRUConfig_Update” (acquisition unit) (5) If the initiator receives the message protocol
or ‘‘CUConfig_Update” (control unit), and then trans- ‘‘DRUConfig_Confirm” or ‘‘CUConfig_Confirm”, the syn-
ports the message to the receiver. chronization will end. If the initiator does not receive

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
Information Processing in Agriculture xxx (xxxx) xxx 9

the message protocol ‘‘DRUConfig_Confirm” or GatewayAgent and ServerAgent. The behaviour between the
‘‘CUConfig_Confirm”, the synchronization will fail, GatewayAgent and ServerAgent for real-time data synchro-
and the process will be repeated from step 1. nization is shown in Fig. 6(a). The content is the data stream
of the acquisition unit’s real-time information that is in XML
(Fig. 6(b)), and the protocol is the ‘‘SensorData_Update” (Fig. 6
5. Case study (c)). Therefore, the system has the ability to merge heteroge-
neous information from a greenhouse IoT system and to con-
5.1. GatewayAgent register duct data synchronization for the system.

As shown in Fig. 5, the JADE remote agent management GUI is 5.2.2. Cumulative data synchronization
used to test the data communication between the gateway The data synchronization communication between the gate-
and server. The gateway configures the server IP address way and server was tested via suspending communication
and the port, and then it stores the configuration information when the gateway and server were running. The gateway net-
as an XML file in the gateway. When the GatewayAgent is acti- work was disconnected for 30.0 mins and then the network
vated, the agent container reads the configuration informa- was reconnected. During the disconnection, the gateway
tion from the file. According to the server IP address and the stored the cumulative data in the local file sensorvalue.xml
port, the GatewayAgent is registered in the JADE platform of (Fig. 7(a)). When the network was recovered, the GatewayA-
the server through the Internet, and it is automatically gent transported the data to the ServerAgent. The ServerA-
embedded in the agent container of the server’s JADE plat- gent phased the data according to the protocol, and it
form. The ServerAgent is registered in the main container. stored the data in the MySQL database (Fig. 7(b)). The results
show that the system can effectively communicate and trans-
5.2. Data synchronization fer meaningful data, and the behaviours of the GatewayAgent
and ServerAgent determined the quality of the distributed IoT
5.2.1. Real-time data synchronization infrastructures in highly varying systems.
Fig. 6 shows how the acquisition unit’s real-time information
is synchronized between the ServerAgent and GatewayAgent. 5.3. Long-term running for data communication
The Sniffer is integrated in the JADE environment and is par-
ticularly useful when debugging agents’ behaviours. There- To test the data communication mechanism for long-term
fore, we use the sniffer to track the message record of the running, field tests were conducted in a strawberry green-

Fig. 8 – The greenhouse IoT system for Long-term data communication testing with 3 zigbee nodes for greenhouse
environment acquisition and 1 rs-485 node for outside weather acquisition.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
10 Information Processing in Agriculture xxx (xxxx) xxx

Table 1 – Configurations of the greenhouse environment acquisition system.


Node Data acquisition Unit ID Sensor ID Sensor Protocol Signal type

Node1 f1 f11 Air temperature °C Zigbee Digital


f12 Air humidity %
BC000000 f41 Air temperature °C Zigbee Analog
f42 Air humidity %
b1 Soil temperature °C
BC000001 f51 Air temperature °C Zigbee Analog
f52 Air humidity %
b2 Soil temperature °C
Node 2 f2 f21 Air temperature °C Zigbee Digital
f22 Air humidity %
c1 c1 Carbon dioxide ppm Zigbee Digital
e1 e1 Light intensity lx Zigbee Digital
BC000004 f61 Air temperature °C Zigbee Analogl
f62 Air humidity %
b5 Soil temperature °C
BC000005 f71 Air temperature °C Zigbee Analog
f72 Air humidity %
b6 Soil temperature °C
Node 3 f3 f31 Air temperature °C Zigbee Digital
f32 Air humidity %
BC000002 f81 Air temperature °C Zigbee Analog
f82 Air humidity %
b3 Soil temperature °C
BC000003 f91 Air temperature °C Zigbee Analog
f92 Air humidity %
b4 Soil temperature °C
Node 4 a1 a11 Wind direction ° RS 485 Digital
a12 Air temperature °C
a13 Air humidity %
a14 Wind velocity m/s
a15 Rainfall mm
a16 UVI –
a17 Light intensity lx

house that was located at the Lishui planting base of the was 1.5%, and the maximum packet loss rate was 2.1%. Table 3
Jiangsu Academy of Agricultural Sciences. A greenhouse envi- is the results of the data transmission between the gateway
ronmental acquisition system was set up with four gateway and server. The testing was conducted from March 20, 2015,
nodes. The system structure is shown in Fig. 8, and the con- to March 26, 2015. The data transmission includes the green-
figurations of each unit are shown in Table 1. house environmental data and the data acquisition unit com-
Table 2 is the results of the data transmission between the munication states, and the data transmission interval was set
data acquisition unit and the gateway. The data transmission to 1.0 min. The average data loss rate was 0.4%, and the max-
interval was set to 1.0 min, and the data acquisition unit ran imum data loss rate was 0.5%. Therefore, the results showed
for 24 h. The results revealed that the average data loss rate that the data communication mechanism for real-time and

Table 2 – Data transmission between the data acquisition unit and gateway.
Data acquisition unit ID Packets Sent Packets received Packets lost Packet loss rate (%)

f1 1440 1416 24 1.67


f2 1440 1422 18 1.25
f3 1440 1421 19 1.32
c1 1440 1414 26 1.81
e1 1440 1411 29 2.01
a1 1440 1430 10 0.69
BC000000 1440 1410 30 2.08
BC000001 1440 1413 27 1.88
BC000002 1440 1419 21 1.46
BC000003 1440 1418 22 1.53
BC000004 1440 1421 19 1.32
BC000005 1440 1422 18 1.25

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
Information Processing in Agriculture xxx (xxxx) xxx 11

Table 3 – Data transmission from gateway to server.


Date Data Sent Data received Data Lost Data Loss rate

3–20 2880 2868 12 0.42%


3–21 2880 2867 13 0.45%
3–22 2880 2870 10 0.35%
3–23 2880 2869 11 0.38%
3–24 2880 2865 15 0.52%
3–25 2880 2873 7 0.24%
3–26 2880 2867 13 0.45%

cumulative data synchronization based on the MAS can ronmental acquisition and control data from the green-
reduce the data loss rate of the IoT system and improve the house IoT system and initiate an appropriate response
data transmission stability [8,36]. were improved.
In this research, the field tests were conducted for straw- (4) A case study of the real-time and cumulative data syn-
berry greenhouse real-time environmental acquisition and chronization showed that the data synchronization
control information. The packet loss rate is the main evalua- between the gateway and server was successfully
tion indicator for the Wireless Sensor Network (WSN) system implemented. The field test results showed that the
in the greenhouse [37]. As we all know, the structures of the data loss rate between the data acquisition unit and
different types of greenhouses and crops influence the radio gateway was 1.52%, and the data loss rate between
wave propagation for a WSN [38]. Therefore, future work the gateway and server was 0.4%.
should statistically analyse the data loss. It would be valuable
to know how the missing/waiting messages are concentrated Our study indeed has some limitations. For the green-
or not with the possible consequences for different crops. house IoT system, we only used XML for data encapsulation;
however, JSON or another data encapsulation format is typi-
6. Conclusion cally better for accomplishing data communication for a
greenhouse based on cloud computing and big data. Addi-
This study presents a data communication mechanism to tionally, this study only focused on distributed environmental
achieve the adaptive matching of the data transmission pro- monitoring and control, which concerns only the information
tocol and provides the configuration of the acquisition and acquisition and transmission layers. However, the data com-
control parameters in a greenhouse based on Agents. The munication of all three layers must be considered, particu-
characteristics of the proposed system are the following. larly for decision support based on an intelligent control
model of the greenhouse.
(1) The system applies interoperable data encapsulation of
the greenhouse environmental acquisition and control Declaration of Competing Interest
system based on XML that integrates the real-time
environmental acquisition data, the real-time control The authors declared that there is no conflict of interest.
data, and the configuration information of the acquisi-
tion and the control unit. Furthermore, the data Acknowledgements
description method can improve the ability to effec-
tively communicate and transfer meaningful data and This work was supported by the Jiangsu Provincial R&D Pro-
can improve the success of distributed greenhouse ject (BE2018321), the Natural Science Foundation of Jiangsu
IoT infrastructures for highly varying systems. Provincial Department of Education (17KJA416002), the China
(2) Agent-based data synchronization between the gate- Postdoctoral Science Foundation (2015M580400), the Jiangsu
way and the server is achieved. The GatewayAgent Province Postdoctoral Science Foundation (1501112B), and
and ServerAgent were established to achieve the one- the Priority Academic Program Development of Jiangsu
way synchronization for the real-time acquisition and Higher Education Institutions.
control information and two-way synchronization for
the environmental acquisition and control unit config-
uration information. This synchronization mechanism
R E F E R E N C E S
enabled the processing, encapsulation, transmission,
analysis and synchronization of the distributed infor-
mation communication for the greenhouse IoT system.
[1] Zhao J, Zhang J, Yu F, Guo J. The study and application of the
(3) An agent-based IoT management system for the green- IoT technology in agriculture. In: 2010 3rd international
house motioning and control system was developed in conference on computer science and information
JADE. The data communication mechanism between technology. Chengdu, China: IEEE; 2010. p. 462–5.
the gateway and the server was achieved based on [2] Luo H, Yang P, Li Y, Xu F. An intelligent controlling system for
the behaviour of the MAS. According to those MAS greenhouse environment based on the architecture of the
internet of things. Sens Lett 2012;10:514–22.
behaviours, the abilities to merge heterogeneous envi-

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002
12 Information Processing in Agriculture xxx (xxxx) xxx

[3] Cui W, Cui S, Yuan L, Shang J. Design and implementation of [21] Nguyen X, Kowalczyk R. WS2JADE: Integrating web service
sunlight greenhouse service platform based on IoT and cloud with Jade Agents. In: International workshop on service-
computing. In: Proceedings of 2013 2nd international oriented computing: agents, semantics, and engineering.
conference on measurement, information and Honolulu, USA. p. 147–59.
control. Harbin, China: IEEE; 2013. p. 141–4. [22] Nikkilä R, Wiebensohn J, Nash E, Seilonen I, Koskinen K. A
[4] Li L, Wang M, Zhang M, Li M, Sigrimis N, Anastasiou A. service infrastructure for the representation, discovery,
Application of IoT technology in greenhouse management. distribution and evaluation of agricultural production
In: Proceedings of American Society of Agricultural and standards for automated compliance control. Comput
Biological Engineers. Dallas, USA. p. 1. Electron Agric 2012;80:80–8.
[5] Li G, Zhang W, Zhang Y. A design of the IoT gateway for [23] Chen D, Wu B, Chen T, Dong J. Development of distributed
agricultural greenhouse. Sens Transd 2014:75–80. data sharing platform for multi-source IOT sensor data of
[6] Dan L, Xin C, Huang C, Ji L. Intelligent agriculture greenhouse agriculture and forestry. Trans CSAE 2017;33(1):300–7.
environment monitoring system based on IOT Technology. [24] Arroqui M, Mateos C, Machado C, Zunino A. RESTful Web
In: 2015 International conference on intelligent Services improve the efficiency of data transfer of a whole-
transportation, big data and smart city. Halong Bay, farm simulator accessed by Android smartphones. Comput
Vietnam: IEEE; 2015. p. 487–90. Electron Agric 2012;87:14–8.
[7] Qin L, Lu L, Shi C, Wu G, Wang Y. Implementation of IoT- [25] Jayarathna H, Hettige B. AgriCom: A communication
based greenhouse intelligent monitoring system. Trans platform for agriculture s. In: international conference on
CSAM 2015;46(3):261–7. industrial and information syst2013 8th IEEE ems
[8] Ferentinos KP, Katsoulas N, Tzounis A, Bartzanas T, Kittas C. (ICIIS). IEEE; 2013. p. 439–44.
Wireless sensor networks for greenhouse climate and plant [26] Quindt J, Reetz E, Kukuck V, Tonjes R, Westerkamp C. Agent
condition assessment. Biosyst Eng 2017;153:70–81. based decision support system for optimizing logistical
[9] Tzounis A, Katsoulas N, Bartzanas T, Kittas C. Internet of processes in agricultural production. In: IEEE International
Things in agriculture, recent advances and future challenges. conference on industrial informatics. IEEE; 2011. p. 27–32.
Biosyst Eng 2017;164:31–48. [27] Stipanicev D, Stula M, Bodrozic L. Multiagent based
[10] Talavera J, Tobón L, Gómez J, Culman M, Aranda J, Parra D, greenhouse telecontrol system as a tool for distance
et al. Review of IoT applications in agro-industrial and experimentation. In: IEEE international symposium on
environmental fields. Comput Electron Agric industrial electronics. IEEE; 2005. p. 1691–6.
2017;142:283–97. [28] Kasaei S, Kasaei S, Kasaei S. Design and development a
[11] Popović T, Latinović N, Pešić A, Zečević Ž, Krstajić B, control and monitoring system for greenhouse conditions
Djukanović S. Architecting an IoT-enabled platform for based-on multi agent system. BRAIN. Broad Res Artif Intell
precision agriculture and ecological monitoring: A case study. Neurosci 2011;2(4):28–35.
Comput Electron Agric 2017;140:255–65. [29] Sørensen J, Bo N, Klein M, Demazeau Y. An agent-based
[12] Liao M, Chen S, Chou C, Chen H, Yeh S, Chang Y, et al. On extensible climate control system for sustainable greenhouse
precisely relating the growth of Phalaenopsis leaves to production. In: International conference on agents in
greenhouse environmental factors by using an IoT-based principle, agents in practice. Wollongong, Australia. p.
monitoring system. Comput Electron Agric 2017;136:125–39. 218–33.
[13] Chen M, Wang J, Li P, Zhou J, Xia D. Development of intelligent [30] Adikari S. Using a dynamic smarm of intelligent agents for
gateway for heterogeneous networks environment advising farmers-agro agent. In: The international
monitoring in greenhouse based on Android system. Trans conference on computer and automation engineering. IEEE;
CSAE 2015;31(5):218–25. 2010. p. 177–81.
[14] Wu H, Zhao C, Yin B, Zhu H. Synchronization model of [31] Wang J, Zhou J, Gu R, Chen M, Li P. Manage system for
agricultural spatial data based on XML. Trans CSAE 2008;18 internet of things of greenhouse based on GWT. Info Proc
(9):1530–7. Agric 2018;5(2):269–78.
[15] Wang X, Zhang Y, Xu M, Xing B, Zeng H. Development of [32] Li P, Chen M, Wang J, Zhou J, Xia D. Development of
integrated network platform for heterogeneous agricultural monitoring management system and data synchronization
information remote monitoring terminal. Trans CSAE 2017;33 for greenhouse IoT. Trans CSAM 2015;46(8):224–31.
(23):211–8. [33] Bellifemine F, Caire G, Greenwood D. Developing multi-agent
[16] Murakami E, Saraiva A, Junior L, Cugnasca C, Hirakawa A, systems with JADE (Wiley Series in Agent Technology). John
Correa P. An infrastructure for the development of Wiley & Sons; 2007.
distributed service-oriented information systems for [34] Ughetti M, Trucco T, Gotta D. Development of Agent-Based,
precision agriculture. Comput Electron Agric 2007;58 Peer-to-Peer mobile applications on ANDROID with JADE. In:
(1):37–48. International conference on mobile ubiquitous computing,
[17] Wolfert J, Verdouw C, Verloop C. Organizing information systems, services and technologies. 294: IEEE; 2008. p. 287.
integration in agri-food—A method based on a service- [35] Bergenti F, Caire G, Gotta D. Agents on the move: JADE for
oriented architecture and living lab approach. Comput Android devices. Procs. workshop from objects to agents,
Electron Agric 2010;70:389–405. Catania, Italy, 2014.
[18] Schuster E, Lee HG, Ehsani R, Allen S, Rogers J. Machine-to- [36] Li P, Peng Y, Wang J. Propagation characteristics of 2. 4 GHz
machine communication for agricultural systems: An XML- radio wave in greenhouse of green peppers. Trans CSAM
based auxiliary language to enhance semantic 2014;45(2):251–5.
interoperability. Comput Electron Agric 2011;78:150–61. [37] Zhang R, Bai B, Li K, Xiang M. Fault diagnosis of the
[19] Dai J, Wang K, Li S, Lai J, Xiao C, Li S, et al. Research on greenhouse WSN based on the time series and space series
agricultural data sharing based on REST and XML. Scie Agric analysis. Trans CSAM 2009;40(2):155–60.
Sinica 2012;45:4156–65. [38] Li P, Wang J. Research progress of intelligent management for
[20] Xiong Y, Shen M, Liu Y, Sun Y, Lu M, Liu L, et al. Design of greenhouse environment information. Trans CSAM 2014;45
intelligent greenhouse information management system (4):236–43.
with hybrid architecture. Trans CSAE 2012;28:181–5.

Please cite this article as: J. Wang, M. Chen, J. Zhou et al., Data communication mechanism for greenhouse environment monitoring and control:
An agent-based IoT system, Information Processing in Agriculture, https://doi.org/10.1016/j.inpa.2019.11.002

You might also like