# Intelligent Agricultural Greenhouse Control System Based on Internet of
Things and Machine Learning

Cangqing Wang,Boston University, Boston, MA 02215 USA<EMAIL_ADDRESS>
###### Abstract

This study endeavors to conceptualize and execute a sophisticated agricultural
greenhouse control system grounded in the amalgamation of the Internet of
Things (IoT) and machine learning. Through meticulous monitoring of intrinsic
environmental parameters within the greenhouse and the integration of machine
learning algorithms, the conditions within the greenhouse are aptly modulated.
The envisaged outcome is an enhancement in crop growth efficiency and yield,
accompanied by a reduction in resource wastage. In the backdrop of escalating
global population figures and the escalating exigencies of climate change,
agriculture confronts unprecedented challenges. Conventional agricultural
paradigms have proven inadequate in addressing the imperatives of food safety
and production efficiency. Against this backdrop, greenhouse agriculture
emerges as a viable solution, proffering a controlled milieu for crop
cultivation to augment yields, refine quality, and diminish reliance on
natural resources [b1]. Nevertheless, greenhouse agriculture contends with a
gamut of challenges. Traditional greenhouse management strategies, often
grounded in experiential knowledge and predefined rules, lack targeted
personalized regulation, thereby resulting in resource inefficiencies. The
exigencies of real-time monitoring and precise control of the greenhouse’s
internal environment gain paramount importance with the burgeoning scale of
agriculture. To redress this challenge, the study introduces IoT technology
and machine learning algorithms into greenhouse agriculture, aspiring to
institute an intelligent agricultural greenhouse control system conducive to
augmenting the efficiency and sustainability of agricultural production.

Internet of Things(IoT), Machine Learning, RNN model, Agricultural greenhouse

##  1 Introduction

In the formulation of the intelligent agricultural greenhouse control system,
ethical considerations and system comprehensiveness demand meticulous
attention. The real-time monitoring of greenhouse environmental parameters
necessitates the collection and processing of copious sensitive data, thereby
engendering privacy concerns for agricultural stakeholders, greenhouse
equipment manufacturers, and other involved parties. In response, the study
employs secure data transmission and storage mechanisms that encrypt sensitive
information, ensuring exclusive access to critical data by authorized
personnel. Additionally, a well-defined data use policy delineates ownership
and usage rights, complemented by data desensitization measures to mitigate
potential privacy risks.

The advent of IoT and machine learning may precipitate a paradigm shift in
agricultural management, potentially engendering technological adaptation and
employment challenges for practitioners. To mitigate this, the study proffers
training and support initiatives, ensuring that agricultural practitioners are
adept at harnessing new technologies. Concurrently, advocacy for open
communication channels between practitioners, scientists, and governments is
underscored to deliberate on the impact of technological integration on
traditional agricultural practices.

Post-implementation of smart technologies, ensuring the sustainability and
enduring maintenance of the system becomes a pertinent concern. To address
this, the system is meticulously designed with modularity and upgradability,
allowing for facile updates to hardware and software. Furthermore, a judicious
maintenance plan and support system are instituted to uphold the system’s
functionality over the long term.

The introduction of novel technologies harbors the prospect of an uneven
distribution of resources within society, potentially depriving certain
regions or agricultural producers of the benefits of smart agriculture. To
safeguard social equity and accessibility, the study formulates policies and
programs to ensure the equitable and accessible deployment of new technologies
across all societal strata. This encompasses the provision of technical
support and training in remote areas to bridge the digital divide.

The study’s objective revolves around the design and implementation of an
intelligent agricultural greenhouse control system predicated on the IoT and
machine learning, with the overarching aim of enhancing crop growth efficiency
and yield. By scrutinizing internal environmental parameters such as
temperature, humidity, and light, coupled with the judicious application of
machine learning algorithms, real-time and precise control of these parameters
is sought. The anticipated outcome is an adaptive system enabling farmers to
cater to diverse crop needs, mitigate resource wastage, and elevate production
efficiency.

The significance of this research is multifaceted. Primarily, the
implementation of an intelligent agricultural greenhouse control system is
poised to usher in technological innovation in agricultural production,
fostering the metamorphosis from traditional to intelligent and precision
agriculture. Additionally, through curtailed energy, water, and fertilizer
usage, the system is poised to be a linchpin in supporting sustainable
agricultural development. Most crucially, the augmentation of agricultural
production contributes tangibly to meeting the escalating global demand for
food, thereby contributing to societal well-being and sustainable economic
development.

The key trajectory for future development hinges upon the assimilation of
emerging technologies, notably the incorporation of advanced sensor
technologies such as high-resolution multi-spectral sensors. These sensors are
envisaged to yield more comprehensive environmental data, coupled with the
infusion of advanced wireless communication technologies to ensure expeditious
and reliable data transmission. This integration, however, may grapple with
challenges related to hardware compatibility and data processing capabilities.
The envisaged solution entails the adoption of a modular design facilitating
the facile replacement and upgrade of sensors, coupled with the optimization
of data processing algorithms to accommodate expansive datasets.

An additional focal point for future development is the perpetual refinement
of machine learning algorithms. This entails the optimization of extant
algorithms, the integration of deep learning methodologies to fortify the
modeling of intricate relationships within greenhouse environments, and the
infusion of online learning techniques to facilitate dynamic adaptation to
changing agricultural terrains. The introduction of deep learning algorithms,
however, may necessitate augmented computing resources and mandates addressing
energy consumption and hardware requisites. Simultaneously, the challenge
inherent in online learning technology involves real-time model updates
without compromising system performance, necessitating consideration of
algorithmic stability and real-time efficacy.

Future developmental strides should be directed towards the seamless
integration of the intelligent agricultural greenhouse control system with the
entire agricultural ecosystem. This encompasses interoperability with field
management and supply chain systems, thereby actualizing a comprehensive
agricultural intelligence framework. However, the assimilation of diverse
systems may implicate issues of data standardization, warranting the
establishment of industry standards to foster the harmonious development of
disparate systems.

Critical to the realization of future developments is the amplification of
farmers’ acceptance of smart farming technologies. Through systematic training
and education initiatives, the study aims to facilitate a nuanced
understanding among farmers, enabling them to adeptly operate intelligent
greenhouse control systems. Recognizing the potential influence of cultural
and geographical disparities on social acceptance, the study underscores the
establishment of regular training programs, the leveraging of community
resources, and the augmentation of farmers’ awareness and trust in new
technologies as pivotal strategies to overcome these challenges. Through
concerted efforts to address these challenges and persisting in propelling
technological innovation, smart agricultural greenhouse control systems are
poised to assume an expanded role in propelling the sustainable advancement of
agriculture and overall societal progress.

Recent years have witnessed remarkable strides in the application of IoT and
machine learning technologies in agriculture. IoT technology facilitates real-
time connectivity of agricultural equipment and the collection of extensive
environmental data. These data serve as a fertile information bedrock for
machine learning algorithms, enabling intelligent management of agricultural
production processes through data analysis and model training.

Within agriculture, machine learning algorithms find widespread utility in
forecasting, optimization, and decision support. Historical data analysis
empowers the construction of models predicting crop growth under diverse
meteorological conditions, thereby enabling precise regulation of growth
environments. Furthermore, machine learning can dynamically adjust greenhouse
conditions based on real-time data, aligning with distinct stages of crop
growth to amplify production efficiency.

A comprehensive scrutiny of extant literature underscores the prodigious
potential of IoT and machine learning in agriculture. However, for the
exhaustive exploration and practical implementation of an intelligent
agricultural greenhouse control system, myriad challenges and issues persist.
Consequently, this study aspires to bridge extant research lacunae, proffering
an innovative intelligent greenhouse control system and validating its
efficacy in enhancing agricultural production efficiency and sustainability
through real-world case studies.

Within current literature and practical applications, this study focalizes on
rectifying specific deficiencies and research gaps in the domain of
intelligent agricultural greenhouse control systems, thus fostering
intelligent and sustainable agricultural development. Foremost among these
endeavors is the amelioration of real-time interconnection and data collection
integration, achieved through IoT technology to enable real-time connectivity
of agricultural equipment and the aggregation of voluminous environmental
data. This robust data infrastructure forms the bedrock for the design of an
intelligent agricultural greenhouse control system adept at processing and
leveraging diverse environmental data efficiently.

The study keenly addresses the lacunae inherent in intelligent decision
support systems, acknowledging that the application of machine learning
algorithms in agriculture necessitates improvements in accuracy and real-time
capabilities. Through the infusion of innovative machine learning algorithms,
the research endeavors to fortify the intelligent management of agricultural
production processes, thereby facilitating more precise and real-time
decision-making in agriculture.

A discernible focus of the study is the resolution of the comprehensive
optimization challenge in greenhouse environments. The recognition of a
research gap in the extant literature pertaining to the holistic optimization
of greenhouse environmental parameters propels the study to center on
comprehensive greenhouse environment optimization, including temperature,
humidity, light, and other facets. The overarching objective is to fashion a
system that comprehensively meets the diverse needs of crop growth across
distinct stages.

The study accentuates the dearth of comprehensive research and practical
application, underscoring the inadequacy in the existing body of research on
the IoT and machine learning in agriculture. By propounding innovative
intelligent greenhouse control systems and substantiating their efficacy
through practical case studies, the study aspires to rectify this research
gap, thereby offering more robust theoretical and practical support in the
domain of intelligent agriculture.

##  2 Greenhouse internal environmental monitoring system

Figure 1: The structure diagram of the intelligent agricultural temperature
control system of the Internet of Things

###  2.1 Sensor selection and layout: temperature, humidity, light and other
parameters

Achieving precision in monitoring the internal environment of a greenhouse
necessitates the judicious selection of sensors and their strategic
deployment. This ensures a comprehensive and accurate acquisition of
environmental parameters across various zones within the greenhouse.

#### Sensor Selection

In the realm of greenhouse environment monitoring, pivotal factors influencing
crop growth encompass temperature, humidity, and light. Consequently, we opted
for temperature sensors, humidity sensors, and light sensors for surveillance.
Digital temperature sensors such as DS18B20, DHT series sensors for humidity,
and photoresistors or photodiodes for illuminance were employed.

Figure 2: Circuit diagram of light source module

#### Sensor Layout

The efficacy of the monitoring system hinges on the meticulous arrangement of
sensors. We evenly distribute temperature and humidity sensors throughout
diverse areas of the greenhouse to obtain comprehensive environmental data
[2-3]. The light sensor is strategically positioned to discern changes in
light, enabling real-time monitoring of light conditions.

###  2.2 Data acquisition and transmission: real-time monitoring of the
greenhouse internal environment

Real-time monitoring of the greenhouse internal environment necessitates the
seamless collection and transmission of sensor data. Leveraging IoT
technology, acquired data is transferred to the cloud for processing and
storage.

#### Data Collection

Microcontrollers such as Arduino or Raspberry Pi facilitate data collection by
greenhouse sensors. Temperature (T), humidity (H), illuminance (L), and other
environmental parameters are collected and converted into digital signals
through an analog-to-digital converter (ADC) for subsequent processing.

#### Data Transfer

Wireless communication modules like Wi-Fi or LoRa are employed to transmit
collected data to the cloud. Cloud servers receive and store the data,
offering real-time accessibility. This monitoring system ensures a timely
comprehension of changes in the internal greenhouse environment, providing a
foundation for subsequent decision-making and regulation [4].

Table 1: Instructions and Their Functions Instructions |  Functions
---|---
AT+CWMODE=1 |  Set the WiFi module to STA mode
AT+RST |  Restart the WiFi module to take effect
AT+CWJAP=”xx”,”xxxxxxxx” |  Connect to a WiFi hotspot with SSID ”xx” and password ”xxxxxxxx”
AT+CIPMUX=0 |  Enable single connection mode
AT+CIPSTART=”TCP”, ”192.168.1.XXX”, 8000 |  Establish a TCP connection to IP 192.168.1.XXX on port 8000
AT+CIPMODE=1 |  Enable transparent transmission mode
AT+CIPSEND |  Begin data transmission

###  2.3 Data processing and storage: Cloud computing applications

In the cloud, cloud computing technology is utilized for processing and
storing collected data. Processing involves cleaning, normalization, and
denoising to guarantee data quality and accuracy. Additionally, machine
learning algorithms analyze historical data, facilitating model training to
support subsequent prediction and real-time regulation of greenhouse
conditions.

###  2.4 Data processing and storage: Cloud computing applications

In the cloud, cloud computing technology is utilized for processing and
storing collected data. Processing involves cleaning, normalization, and
denoising to guarantee data quality and accuracy. Additionally, machine
learning algorithms analyze historical data, facilitating model training to
support subsequent prediction and real-time regulation of greenhouse
conditions.

#### Data processing

During data processing, outlier detection and repair are conducted to ensure
data reliability. The cleaned data is normalized, unifying sensor data scales
for convenient algorithmic processing.

#### Anomaly Detection and Repair During Data Processing:

1\. Outlier detection:

In the intelligent agricultural greenhouse control system, data may be subject
to various disturbances, such as sensor failures or sudden environmental
changes, leading to outlier generation. Ensuring data reliability requires the
detection and repair of outliers.

1.1 Standard deviation method:

A common approach to outlier detection is the standard deviation method. For
each sensor’s collected data, the deviation from the average is calculated,
and data exceeding the preset threshold are treated as outliers. The formula
is as follows:

$\text{Deviation}=\frac{\text{Data Point}-\text{Mean}}{\text{Standard
Deviation}}$ (1)

If the deviation exceeds a set threshold, the data point is marked as an
outlier.

1.2 Box diagram method: An alternative technique for identifying outliers
involves the application of the boxplot method. This approach leverages the
interquartile range (IQR) to pinpoint data points exceeding predefined upper
and lower thresholds, thus classifying them as outliers. The determination of
these limits involves the computation of the quartiles, where the upper limit
(UL) is expressed as $Q3+1.5\times IQR$, and the lower limit (LL) is given by
$Q1-1.5\times IQR$.

Here, $Q1$ and $Q3$ signify the first and third quartiles, respectively, and
$IQR$ represents the interquartile range.

2\. Data normalization: Data standardization involves the transformation of
sensor data onto a standardized scale, ensuring homogeneity and streamlining
subsequent algorithmic processing. This practice is instrumental in enhancing
algorithm performance and mitigating undesirable impacts arising from
variations in data scales.

2.1 Min-Max normalization: Min-Max normalization is a prevalent approach for
linearly mapping data to a scale within the range of 0 to 1. The specific
formula is articulated as follows:

$x_{\text{normalized}}=\frac{x-x_{\text{min}}}{x_{\text{max}}-x_{\text{min}}}$
(2)

This method ensures that each sensor’s data is uniformly scaled, contributing
to consistent weighting during algorithmic analysis.

2.2 Z-Score normalization: Z-Score normalization transforms data into a
standard normal distribution with a mean of 0 and a standard deviation of 1 by
calculating the standard score. The formula is expressed as:

$z=\frac{x-\mu}{\sigma}$ (3)

Z-Score normalization is particularly applicable in scenarios where data
approximate a normal distribution, effectively reducing the impact of outliers
on the normalized outcomes.

#### Application of machine learning algorithm

Machine learning algorithms are employed for data analysis and model training,
particularly in the context of the dynamic and temporal changes within a
greenhouse environment. Recurrent neural networks, for instance, can be
utilized for predicting greenhouse conditions. The fundamental formula
governing such networks is presented as:

$h_{t}=f(W\cdot h_{t-1}+U\cdot x_{t}+b)$ (4)

Where $h_{t}$ denotes the hidden state at time $t$, $f$ represents the
activation function, $h_{t-1}$ signifies the hidden state at time $t-1$,
$x_{t}$ represents the input at time $t$, $W$ and $U$ are weight matrices, and
$b$ is the bias.

##  3 Application of machine learning algorithms

###  3.1 Data analysis and model training: The use of historical data

In the context of intelligent agricultural greenhouse control systems, the
application of machine learning algorithms holds significant importance.
Through the analysis of historical data and subsequent model training, the
system acquires the ability to discern intricate relationships among
greenhouse environmental parameters, thereby enabling accurate predictions of
future conditions.

#### Data Preparation

The archival data encompass the intrinsic environmental parameters within the
greenhouse, namely temperature, humidity, and illuminance, alongside their
corresponding regulatory actions involving adjustments to the greenhouse
conditions. A prerequisite is the preprocessing of this data, with a temporal
series data format chosen to enable the model’s comprehensive utilization of
temporal information [5].

#### Feature engineering

Preceding model training, a crucial step involves feature engineering and the
judicious selection of pertinent feature variables. Notably, features such as
temperature, humidity, and illuminance over a temporal span serve as input
variables, while future temporal points’ environmental parameters serve as
output labels.

#### Model selection

Given the sequential and dynamic nature of greenhouse environmental changes,
the adoption of a Recurrent Neural Network (RNN) for model training is deemed
appropriate. RNN, a deep learning model tailored for sequential data, exhibits
a fundamental structure as expressed below:

$\displaystyle h_{t}=f(H_{t-1},X_{t})$ (5) $\displaystyle y_{t}=g(H_{y})$ (6)

Where:

  * •

$h_{t}$ signifies the hidden state at time $t$.

  * •

$f$ and $g$ represent the activation and output functions, respectively.

  * •

$h_{t-1}$ denotes the hidden state of time $t-1$.

  * •

$x_{t}$ constitutes the input at time $t$.

  * •

$y_{t}$ is the output at time $t$.

  * •

$W_{hh}$, $W_{hx}$, and $W_{yh}$ are weight matrices.

  * •

$b_{h}$ and $b_{y}$ are bias terms for the hidden and output layers,
respectively.

During the intelligent agricultural greenhouse control system’s model
training, myriad challenges are addressed through targeted countermeasures.
Imbalances in historical data necessitate the application of oversampling or
undersampling techniques to rectify scenario-specific sample scarcity.
Additionally, weight adjustment mitigates learning disparities across
categories, enhancing the model’s proficiency for select classes.

Convergence issues may arise during model training, particularly due to the
sequential and dynamic nature of the greenhouse environment. Addressing this,
learning rate adjustments prove effective in modulating the equilibrium
model’s learning pace. Furthermore, introducing more intricate models, such as
augmenting the layers or units of recurrent neural networks (RNNs), enhances
the model’s fitting capacity.

Complex models processing time series data may encounter overfitting concerns.
To counteract this, regularization techniques such as L1 and L2 regularization
are applied to curb overfitting by penalizing model complexity.
Simultaneously, Dropout technology is integrated to randomly deactivate
certain neurons, reducing the risk of neural network overfitting.

The pivotal roles of data preprocessing and feature engineering in model
performance underscore the importance of meticulous feature selection related
to dynamic changes in the greenhouse environment, thereby augmenting the
model’s generalization capabilities. Normalization and standardization of data
ensure uniform feature value ranges, thereby facilitating the stable training
of the model. These adaptive methodologies collectively aim to effectively
surmount diverse challenges encountered in model training, thereby enhancing
the performance and reliability of the intelligent agricultural greenhouse
control system.

###  3.2 Prediction of greenhouse conditions: a model based on machine
learning

Following model training, the predictive capacity of the model is harnessed to
anticipate greenhouse environmental parameters. By inputting present-moment
environmental data, the model extrapolates greenhouse conditions at specified
future time points.

###  3.3 Overview of control strategies and algorithms of real-time regulation
system:

Within the real-time control system, precision in regulating greenhouse
conditions based on model output is achieved through the employment of
specific control strategies and algorithms in this investigation.

Figure 3: Measurement results using the smart agricultural system (Air
Humidity, Soil Moisture (left)and Soil Temperatire, Air Temperature (right)
Figure 4: Measurement results using the smart agricultural system (Soil pH
value, Light Intensity (left) and Air Pressure, Wind speed (right))

#### PID Controller

This system incorporates the classical Proportional Integral Derivative (PID)
controller as its foundational control algorithm. The PID controller computes
control output by considering the current error (the deviation between actual
and target values), the integral of the error, and the error’s rate of change.
Applied distinctly to temperature, humidity, and irrigation parameters, the
PID controller, through adjustments in proportional coefficient, integration
time, and differential time, accomplishes precise environmental condition
modifications.

#### Model Predictive Control (MPC)

Model Predictive Control (MPC), an advanced method founded on system dynamic
models, utilizes model predictions for a future timeframe as control input to
optimize greenhouse environmental control strategies. Acknowledging system
time-variability and nonlinearity, MPC enhances responsiveness to diverse
meteorological conditions and crop growth stages, augmenting adaptability and
regulation robustness.

#### Fuzzy control system

The fuzzy control system, rooted in fuzzy set theory, is suited for intricate
and nonlinear systems. In greenhouse environmental control, fuzzy control maps
fuzzy natural language rules to tangible control actions. For instance,
intelligent greenhouse regulation is achieved by articulating the fuzzy rule
”if the predicted temperature rises and humidity is low, increase irrigation.”

#### Integrated Control Policy

To leverage various control algorithms’ strengths, the system adopts an
integrated control strategy. Adapted to real-time circumstances, the system
dynamically switches or combines PID controller, MPC, and fuzzy control system
to effect multi-level and multi-faceted regulation of diverse environmental
parameters, thereby enhancing overall system performance.

Through comprehensive application of the aforementioned control strategies and
algorithms, the real-time control system exhibits heightened flexibility and
intelligence in responding to diverse environmental changes and model
predictions. This ensures the greenhouse’s internal environment consistently
aligns with optimal conditions, thereby improving crop growth efficiency and
yield.

####  Impact of Real-Time Regulation

The real-time regulatory efficacy is scrutinized through continuous monitoring
and control measures, elucidating the dynamic fluctuations of internal
environmental parameters within the anticipated range within the greenhouse.
This observation signifies the adept responsiveness of the real-time control
system to the predictive outcomes derived from the model, thereby ensuring the
maintenance of an optimal growth environment.

Table 2: Units for Magnetic Properties Number |  Air Temperature |  Air Humidity % |  Soil Temperature |  Soil Moisture % |  CO2 Concentration (PPM)
---|---|---|---|---|---
1 |  21.3 C |  29.1 |  25.5 |  3000.1 |  441
2 |  21.6 C |  29.1 |  25.6 |  3000.2 |  444
3 |  21.6 C |  29.3 |  25.7 |  3000.2 |  449
4 |  21.7 C |  30.0 |  25.8 |  2999.2 |  455
5 |  21.9 C |  30.1 |  26.9 |  2999.1 |  459
6 |  21.9 C |  30.1 |  27.1 |  3000.2 |  467
7 |  22.1 C |  29.1 |  29.5 |  3001.2 |  471
8 |  22.2 C |  29.2 |  27.8 |  3005.1 |  473
9 |  23.2 C |  30.1 |  28.2 |  3010.1 |  482
10 |  23.5 C |  30.0 |  28.9 |  3011.2 |  491
Table 3: The testing results of the Dedicated testing tools  Number |  Air Temperature |  Air Humidity % |  Soil Temperature |  Soil Moisture % |  CO2 Concentration (PPM)
---|---|---|---|---|---
1 |  20.3 C |  28.1 |  25.2 |  2999.1 |  439
2 |  20.5 C |  28.1 |  25.2 |  2995.2 |  442
3 |  20.6 C |  28.2 |  25.3 |  2991.2 |  448
4 |  20.5 C |  29.0 |  25.5 |  2988.2 |  452
5 |  20.6 C |  29.0 |  26.1 |  2995.1 |  458
6 |  20.7 C |  29.0 |  26.5 |  2999.2 |  465
7 |  21.3 C |  28.0 |  26.9 |  3000.2 |  469
8 |  21.8 C |  29.0 |  27.1 |  3004.1 |  472
9 |  22.1 C |  29.2 |  27.9 |  3009.1 |  480
10 |  22.5 C |  29.3 |  28.2 |  3010.2 |  489

Through the application of such machine learning algorithms, we realize the
intelligent management of the greenhouse environment, improve the efficiency
of crop growth, and reduce the waste of resources. In practical applications,
such a system can provide more reliable and efficient support for agricultural
production and promote the development of agriculture in a smart and
sustainable direction.

##  4 Improvement of crop growth efficiency

###  4.1  Optimization of the growing environment: according to the needs of
different crops

Different crops have their own unique needs for the growing environment,
including temperature, humidity, light and other factors. Through the
intelligent agricultural greenhouse control system, we are able to optimize
the growing environment according to the needs of different crops, thereby
improving their growth efficiency.

#### Adjustment of growth environment parameters

Based on the output of the machine learning model, parameters such as
temperature, humidity, and illuminance in the greenhouse are dynamically
adjusted. Taking temperature as an example, we use a feedback control
algorithm to calculate the demand for heating or cooling in the greenhouse by
measuring the difference between the current temperature and the target
temperature, and adjust the temperature through the control equipment. The
basic formula is as follows:

$\text{Adjustment amount}=K_{p}\cdot e+K_{i}\cdot\int
e\,dt+K_{d}\cdot\frac{de}{dt}$ (7)

Where:

  * •

$K_{p}$, $K_{i}$, and $K_{d}$ are the proportional, integral, and derivative
gain parameters, respectively.

  * •

$e$ represents the error term.

  * •

$\int e\,dt$ represents the integral of the error over time.

  * •

$\frac{de}{dt}$ represents the derivative of the error with respect to time.

#### Individual regulation of different crops

Through the prediction and regulation of greenhouse environment, we can
realize the individualized growth environment adjustment of different crops.
For example, for tropical fruit crops, we can provide higher temperature and
humidity, and for vegetable crops adapted to cold climates, we can adjust the
temperature accordingly.

###  4.2 Improvement of resource utilization efficiency

While improving crop yields, the smart agricultural greenhouse control system
also aims to optimize the efficiency of resource use, including energy and
water resources.

#### Energy consumption optimization

Through real-time monitoring and control systems, we can precisely control the
temperature inside the greenhouse and reduce energy waste. For example, based
on external weather forecasts and real-time data on the greenhouse’s internal
environment, the system can intelligently adjust the use of heating and
ventilation equipment to achieve efficient use of energy.

#### Reduce fertilizer and water use

Based on the greenhouse environmental parameters predicted by the model, the
system precisely controls the amount of irrigation and fertilizer application
to reduce the use of water resources and fertilizers. By adjusting the amount
of irrigation water at different growth stages, the system is able to meet the
needs of the plants and avoid the waste of resources caused by over-
irrigation.

##  5 Energy saving and environmental protection considerations

###  5.1 Optimization of energy consumption

The intelligent agricultural greenhouse control system can optimize energy use
and reduce energy consumption through real-time monitoring of greenhouse
environmental parameters and prediction of machine learning algorithms.

#### Energy consumption model

We built an energy consumption model, taking into account factors such as
temperature difference, light intensity, wind speed, etc., to predict the
heating and ventilation needs of the greenhouse at the current moment. The
basic formula of the model is as follows:

$\text{Energy consumption}=K_{1}\cdot\Delta T+K_{2}\cdot L+K_{3}\cdot W$ (8)

Where:

  * •

$K_{1}$, $K_{2}$, and $K_{3}$ are the adjustment parameters.

  * •

$\Delta T$ represents the temperature difference (indoor and outdoor
temperature difference).

  * •

$L$ represents light intensity (lighting conditions).

  * •

$W$ represents wind speed (wind intensity).

#### Control Policy

Through the prediction of the energy consumption model, the system can develop
intelligent control strategies. For example, in the case of higher external
temperatures predicted, the system can reduce the temperature inside the
greenhouse in advance, reducing the cooling load and thereby reducing energy
consumption.

###  5.2 Reduce fertilizer and water use

Through precise control of irrigation and fertilization, the smart
agricultural greenhouse control system aims to reduce the overuse of
fertilizers and water resources, thereby reducing the burden of agriculture on
the environment.

#### Water resource utilization model

By establishing a water resource utilization model, the system considers
factors such as the internal environment of the greenhouse, soil moisture, and
crop water demand to predict the irrigation demand at the current moment. The
basic formula of the model is as follows:

$I=K_{4}\cdot\Delta M+K_{5}\cdot C$ (9)

Where:

  * •

$I$ represents the irrigation quantity.

  * •

$K_{4}$ and $K_{5}$ are the adjustment parameters.

  * •

$\Delta M$ represents the soil moisture difference (difference between the
current soil moisture and the target moisture).

  * •

$C$ represents the crop water requirement (current crop growth water
requirement).

#### Fertilization optimization algorithm

In terms of fertilization, the system reduces the excessive use of fertilizer
by establishing a fertilization optimization algorithm according to the growth
stage and nutrient requirements of crops. The basic formula of the algorithm
is as follows:

$F=K_{6}\cdot G+K_{7}\cdot N$ (10)

Where:

  * •

$F$ represents the rate of fertilizer application.

  * •

$K_{6}$ and $K_{7}$ are the adjustment parameters.

  * •

$G$ represents the crop growth stage (current crop growth state).

  * •

$N$ represents the soil nutrient content (nutrient level in the soil).

##  6 Ensuring System Stability and Reliability

###  6.1 System Stability and Reliability

The intelligent agricultural greenhouse control system needs to ensure the
stability and reliability of long-term operation to cope with various complex
environmental conditions and system failures.

#### System Status Monitoring

In order to ensure the stability of the system, we introduce the system
condition monitoring module. The module monitors the operating status of
various components of the greenhouse control system in real time, including
sensors, actuators and communication modules. If the system is abnormal, an
alert will be issued immediately and the corresponding automatic repair
measures will be taken.

#### Redundancy Design

In order to improve the reliability of the system, we have adopted a redundant
design. For example, on key greenhouse control equipment, backup equipment can
be configured so that when the primary equipment fails, the system can
automatically switch to the backup equipment to ensure the continuous
operation of the system.

##  7 Conclusion

###  7.1 Summarize the main findings of the study

This research focuses on the design and implementation of an intelligent
agricultural greenhouse control system based on the Internet of Things and
machine learning to improve crop growth efficiency, reduce resource waste, and
adapt to the growth needs of different crops. Key findings are as follows:

#### Effectiveness of intelligent greenhouse control system

Through case studies of multiple agricultural greenhouses, we validate the
effectiveness of intelligent agricultural greenhouse control systems in
improving crop yields, optimizing resource utilization, and reducing energy
consumption. The intelligent control of the system can better adapt to
different environmental conditions and the growth needs of crops, and has
obtained remarkable economic benefits.

#### The key role of sensor technology and machine learning algorithms

The research shows that advances in sensor technology and the application of
machine learning algorithms are key factors in the success of the system. The
accurate measurement of the new generation of sensors provides the system with
reliable environmental parameter data, and the continuous optimization of
machine learning algorithms enables the system to predict and regulate the
greenhouse environment more accurately.

###  7.2  Outlook on the future development of intelligent agricultural
greenhouse control system

#### Introducing a new generation of sensor technology

In the future, the system will continue to pay attention to the development of
new generation sensor technology. More advanced sensors, such as laser ranging
sensors and infrared sensors, are introduced to improve the monitoring
accuracy of environmental parameters in the greenhouse [6].

New sensor output value = $i(\text{new sensor measurement value})$

Through the introduction of new sensors, the system will have a more
comprehensive and accurate understanding of the environmental conditions
inside and outside the greenhouse, and provide more reliable data support for
fine regulation.

#### Explore advanced deep learning algorithms

With the improvement of computing power, the application of advanced deep
learning algorithms in greenhouse control systems will continue to be explored
in the future. With more complex pattern recognition and learning
capabilities, the system will better adapt to the growth characteristics of
different crops and cope with complex and changing environmental conditions.

New model output =j(deep learning algorithm)

Through the introduction of the new model, the system will more accurately
predict the future greenhouse environment, to achieve a higher level of
intelligent regulation, we expect that the intelligent agricultural greenhouse
control system can be more comprehensive and more efficient in the future to
achieve sustainable development of agricultural production.

## References

  * [1] Ya-Di LI, MIAO Teng, ZHU Chao, JI Jianwei. J. Agric Sci Tech China, 18, 94 (2016).
  * [2] Li-Ying Han. Journal of Chinese Agricultural Mechanization, 37, 65 (2016).
  * [3] Hua Ren. Intelligent Processing and Application, 6, 66, (2014).
  * [4] Gabriel Niu. Library Internet [J]. Theory and practice of library, 2011(1): pp.15—16.
  * [5] Wu X, Zhu X, Wu G Q, et al. Data Mining with Big Data[J]. IEEE Transactions on Knowledge & Data Engineering, 2014, 26(1): 97-107.
  * [6] Zhang Yongjun. The Internet of things and its military application [J]. Internet of things technologies, 2012.


11institutetext: Department of Computer Science, IIT Kanpur, Uttar Pradesh,
India.
11email<EMAIL_ADDRESS>22institutetext: Knowledgeable Computing and
Reasoning Lab, IIIT-Delhi, New Delhi, India.
22email<EMAIL_ADDRESS>
# OntoSeer - A Recommendation System to Improve the Quality of Ontologies

Pramit Bhattacharyya This work was done when the first author was at IIIT-
Delhi.  11 0000-0002-3611-358X Raghava Mutharaju  22 0000-0003-2421-3935

###### Abstract

Building an ontology is not only a time-consuming process, but it is also
confusing, especially for beginners and the inexperienced. Although ontology
developers can take the help of domain experts in building an ontology, they
are not readily available in several cases for a variety of reasons. Ontology
developers have to grapple with several questions related to the choice of
classes, properties, and the axioms that should be included. Apart from this,
there are aspects such as modularity and reusability that should be taken care
of. From among the thousands of publicly available ontologies and vocabularies
in repositories such as Linked Open Vocabularies (LOV) and BioPortal, it is
hard to know the terms (classes and properties) that can be reused in the
development of an ontology. A similar problem exists in implementing the right
set of ontology design patterns (ODPs) from among the several available.
Generally, ontology developers make use of their experience in handling these
issues, and the inexperienced ones have a hard time. In order to bridge this
gap, we propose a tool named OntoSeer, that monitors the ontology development
process and provides suggestions in real-time to improve the quality of the
ontology under development. It can provide suggestions on the naming
conventions to follow, vocabulary to reuse, ODPs to implement, and axioms to
be added to the ontology. OntoSeer has been implemented as a Protégé plug-in.

Resource Type: Software tool
Code Repository: https://github.com/kracr/ontoseer
Demo Video URL: https://www.youtube.com/watch?v=LGXHGXmVanI

###### Keywords:

Ontology Engineering Ontology Quality Ontology Design Patterns LOV Protégé
plug-in

##  1 Introduction

An ontology is a shared understanding of some domain of interest [7]. Ontology
development is generally a group activity, where domain experts, ontology
developers, and other stakeholders meet to discuss and develop an ontology.
This makes ontology development time consuming and expensive, especially if
the scope of the ontology is broad. It is not always possible to take the help
of domain experts due to a variety of reasons such as their unavailability and
cost. Experienced developers face issues while building ontologies, and this
problem only magnifies in the case of inexperienced ontology developers. They
will have to deal with several questions such as the classes and properties to
reuse, the appropriate class hierarchy to build, the axioms to use and the
ODPs to use in order to make the ontology modular.

Experienced ontology developers may be able to answer some of these questions
and make better design decisions. But even for them, it will be hard to keep
track of all the new vocabularies, ontologies, and the ontology design
patterns [10] that get published in the repositories. Our tool, named
_OntoSeer_ [1, 2], is a Protégé plug-in that works with the ontology developer
during the ontology development process and gives suggestions in real-time
that can lead to better quality ontologies. The contributions of this work are
as follows.

  * •

A tool that recommends classes, properties, axioms, and the ontology design
patterns to (re)use based on the description, competency questions, and the
ontology under development.

  * •

A mechanism to provide suggestions of names to use during the ontology
development. These suggestions follow the naming conventions.

  * •

Integration with Protégé (available as a plug-in) to improve the ontology
development experience.

##  2 Approach

In this section, we discuss the various features of OntoSeer, along with the
implementation details for each of those features. Since OntoSeer makes use of
the existing ontologies and vocabularies in making the recommendations, we
first describe the datasets that are used, and then proceed with the
description of the method used to make the recommendations. OntoSeer uses the
following datasets.

  1. a)

Competency questions (CQs). 92 CQs and their corresponding ontologies are
available at Software
Ontology111https://softwareontology.wordpress.com/2011/04/01/user-sourced-
competency-questions-for-software. 52 CQs and ontologies are available at
ArCo222https://github.com/ICCD-MiBACT/ArCo. Several CQs and their associated
ontologies are available from CORAL [5] and [14] .

  2. b)

Ontologies. We have collected ontologies from several repositories such as
NCBO BioPortal333https://bioportal.bioontology.org/ontologies, Manchester OWL
Corpus444http://mowlrepo.cs.manchester.ac.uk/datasets/mowlcorp/, Oxford OWL
Repository555https://www.cs.ox.ac.uk/isg/ontologies/, and Protégé Ontology
Library666https://protegewiki.stanford.edu/wiki/Protege_Ontology_Library.

  3. c)

Ontology Design Patterns (ODPs). ODPs are available at the ODP
repository777http://ontologydesignpatterns.org/wiki/Main_Page. Since there is
no bulk download option, we used a web scraper to collect all the ODPs. There
are six categories of ODPs, and their URLs are used as the seed for the web
scraper.

  4. d)

Vocabularies. Several vocabularies are indexed at the Linked Open Vocabularies
(LOV)888https://lov.linkeddata.es/dataset/lov/. These vocabularies can be
accessed using either the SPARQL endpoint or the LOV API.

###  2.1 Class, Property and Vocabulary Recommendation

One of the recommended best practices in building an ontology is to reuse
existing ontologies. But there are several ontologies spread across many
repositories which makes it hard to find the right ones to reuse. OntoSeer
creates an inverted index of the ontologies from the repositories based on the
classes and properties found in the ontologies. It queries this index to get a
ranked list of the classes and properties to reuse, along with the ontology
that they are part of. These classes and properties are similar to the ones
present in the ontology that is currently being built. In the case of
repositories that can be queried over the Web, such as
LOV999https://lov.linkeddata.es/dataset/lov/api/v2/term/suggest?q= and
BioPortal101010http://data.bioontology.org/recommender?input=, we do so
without making a local copy (index).

Figure 1 shows OntoSeer’s recommendations for a class Book. The first
recommendation is of _Comic Book Ontology_ along with its IRI. The second
description represents the vocabulary _Linked Earth Landing_ along with its
IRI. In both these vocabularies, a class named Book is present and the user
can choose to reuse this class from one of the two vocabularies instead of
creating a new one.

Figure 1: Vocabulary recommendation from OntoSeer for the class Book

If the competency questions (CQs) are provided by the user, OntoSeer
recommends the classes and properties to start with by identifying the nouns
and the verbs in the CQs.

###  2.2 Class and Property Name Recommendation

Following the appropriate naming conventions for classes and properties helps
in improving the readability and the ease of maintenance of an ontology. But
it is a challenge to abide by the naming conventions, especially for a
beginner, because they may not be familiar with the conventions. To cater to
this need, OntoSeer supports the class and property naming recommendations
available at http://www-
sop.inria.fr/acacia/personnel/phmartin/RDF/conventions.html. They can be
summarized as follows.

  * •

Use of numbers in the name is discouraged. If there is a class named Human1234
in the ontology, a suggestion to use Human is given.

  * •

Use of any special character other than an underscore is not recommended.

  * •

Use of upper camel case while naming is encouraged. If a class is named
Human_being, the recommendation would be to use HumanBeing instead.

A screenshot of the naming recommendation is shown in Figure 2.

Figure 2: OntoSeer removed the digits present in the classname and suggested
names that follow the upper camel case convention.

###  2.3 Axiom Recommendation

OntoSeer can retrieve axioms from the ontology corpus that have the closest
match with the entities (classes, properties) of the current ontology. It will
recommend axioms such as disjointedness among class siblings and property
characteristics (inverse, symmetric, transitive, etc.). The inverted index
structure created on the ontology corpus is used to make the recommendations.
A sample recommendation of axioms involving the class Person is shown in
Figure 3. The top two or three recommendations are shown based on the
similarity score. The similarity threshold has been varied between 0 to 1 with
an increment of 0.05 and has been fixed at 0.85 after observing the
recommendations on 150 different instances.

Figure 3: Axiom recommendation for the class Person

###  2.4 ODP Recommendation

Ontology Design Patterns help in making an ontology modular and also reduce
the effort in building an ontology since the design solutions approved by the
community can be reused. But it is hard to find the right ODP from among the
hundreds of ODPs available at the ODP
repository111111http://ontologydesignpatterns.org/wiki/Main_Page. OntoSeer
helps in easing this process by recommending appropriate ODPs for a given
ontology by considering its classes and properties. Apart from the classes and
properties of an ontology, OntoSeer can also take into account any available
description, competency questions and the domain of the ontology while making
the recommendations. All the ODPs available at the ODP repository have been
collected. Each ODP has several fields associated with it, such as, intent,
domain, competency questions, elements and the description.

OntoSeer makes use of string similarity for ODP recommendation. We compare the
classes and the properties with those from the ODPs. These are considered as
two sets of strings. Jaro-Winkler [4] distance, a variant of edit distance is
used for computing the similarity between these two sets of strings. We have
tried to use Doc2Vec [11] because it considers semantic matching. The
incompatibility of deeplearning4j121212https://deeplearning4j.org/ with
Protégé compelled us to use the Jaro-Winkler method, and this gives comparable
results. Jaro-Winkler method is able to mimic the results obtained from
Doc2Vec to a considerable extent, as shown in [3].

We gave more weightage to the similarity scores obtained from class and
property matching followed by the scores for the description of the ontology,
domain of the ontology, and competency questions. The total score, thus, can
be represented as $ODP_{score}$ = $w_{1}*s_{1}$ \+ $w_{2}*s_{2}$ \+
$w_{3}*s_{3}$ \+ $w_{4}*s_{4}$, where $s_{1}$ is the similarity score obtained
from term (class and property) matching, $s_{2}$ is the score obtained from
matching the description of the ontology, $s_{3}$ is the score obtained from
matching the domain of the ontology, and $s_{4}$ is the score obtained from
matching the competency questions. The weightage for components ($w_{1}$=5,
$w_{2}$=3, $w_{3}$=2, $w_{4}$=3) and a similarity threshold of 0.65 has been
fixed after running the experiments for more than 150 iterations.

If an ontology has classes named Person and Professor and the description
provided for the ontology is _College_ , the recommended ODPs are
_TimeIndexedPersonRole_ , _Professor_ , _Persons_ and _AgentRole_. This is
shown in Figure 4. On analyzing the recommendations, we noticed that these
ODPs and their descriptions have the same or similar terms (classes and
properties) as the ones found in the ontology.

Figure 4: OntoSeer’s ODP recommendations on providing _College_ as the
description and Person, Professor are the classes available in the ontology

###  2.5 Class Hierarchy Validation

Determining the class hierarchy is confusing, especially to the inexperienced
ontology developers. This often leads to improper hierarchy. OntoSeer makes
use of rigidity (R), identity (I) and unity (U) characteristics [8] of the
classes and takes the user input based on these characteristics to validate
the class hierarchy. These three characteristics can be defined as follows.

  1. 1.

Rigidity: A property is rigid if it is essential to all its possible
instances. An instance of a rigid property cannot cease to exist in the future
or fail to be its instance in a different domain.

  2. 2.

Identity: A property carries an identity criterion if all its instances can be
identified by means of a suitable _sameness_ relation. Identity constraint is
the criteria we use to answer questions like, “Is that my dog?”.

  3. 3.

Unity: A property P is said to carry unity if there is a common unifying
relation R such that all the instances of P are wholes under R. Unity
constraint checks whether properties have wholes as instances.

OntoSeer interacts with the ontology developer and based on the inputs,
determines the characteristics of a particular class. The questions asked by
OntoSeer are as follows.

  1. 1.

Do the properties of the class cease to exist in the future? For example,
Person will always be a person, but Student can cease to exist to be a student
after a time lapse.

  2. 2.

Are the properties of superclass and subclass identical? For example, two one-
hour duration time intervals are identical, but an hour interval on Wednesday
is not identical to an hour interval on Friday.

  3. 3.

Is the property of the subclass part of the properties of the super class? For
example, a lump of clay is part of “amount of matter”, but “amount of matter”
is not part of a lump of clay.

Table 1 shows the superclass and its accepted subclass characteristics for
validating the class hierarchy. Consider the first row of the table. If the
superclass is satisfying the Identity criteria, the Identity constraint for
the hierarchy will be maintained only when the subclass also satisfies the
Identity criteria. The rest of the rows of Table 1 can be interpreted in the
same way. A screenshot from OntoSeer validating the class hierarchy based on
the class characteristics is given in Figure 5.

Table 1: The values of rigidity, identity and unity for class hierarchy validation. Rule | SuperClass Value | SubClass Value
---|---|---
Identity | Positive | Positive
Identity | Negative | Negative
Rigidity | Positive | Negative, Positive
Rigidity | Negative | Negative
Unity | Positive | Positive
Unity | Negative | Negative
Figure 5: OntoSeer validates the class hierarchy based on the rigidity,
identity and unity characteristics. Here, the unity constraint is violated and
hence the class hierarchy needs to be revisited.

##  3 User Study

We evaluated OntoSeer through user study by considering the following
questions.

  1. 1.

Is OntoSeer useful for the inexperienced as well as the experienced ontology
developer?

  2. 2.

Is OntoSeer saving the time of ontology developers?

  3. 3.

Are ontology developers able to make richer ontologies due to the axiom
recommendations of OntoSeer?

  4. 4.

Are the ontology developers reusing existing ontologies more than they
generally do?

  5. 5.

How easy is it to install and use OntoSeer?

  6. 6.

Are the ontology developers able to create modular ontologies by incorporating
ODPs?

  7. 7.

Are the ontology developers able to build ontologies that follow the naming
conventions?

We advertised OntoSeer across several relevant mailing lists131313Protégé
users, ODP users, Semantic Web, OWL API and contacted some of the research
groups that work on ontology design. We requested them to use OntoSeer and
provide an anonymous response to a
questionnaire141414https://github.com/kracr/ontoseer/blob/master/Evaluation/User%20Study/User%20Study%20Questions.txt.
It had questions on the modelling experience of the users, their familiarity
with ODPs, the ease of installing OntoSeer, the relevance of the
recommendations provided by OntoSeer, the modelling experience with and
without using OntoSeer and whether OntoSeer helps in saving modelling time.

There were 21 respondents. Of the 21 users, 12 have identified themselves as
having basic proficiency in Protégé, 7 are at intermediate level and 2 have
advanced proficiency in ontology modelling. For evaluating OntoSeer, users can
either build an ontology or import an existing ontology.

12 users said that the plugin’s installation is easy, and the instructions
were clear, whereas 7 users found it moderately difficult to install the
plugin. Table 3 represents the cumulative user response for vocabulary, ODP
and axiom recommendation when the CQs are provided. Table 2 represents the
cumulative user response for the same features without the CQs. The ratings
are on a scale of 1 to 5, with 1 being the lowest (not satisfied) and 5 is the
highest (very satisfied).

Table 2: Average satisfactory index of users for OntoSeer features without CQs Proficiency | Vocabulary | ODP | Axiom
---|---|---|---
Type | Recommendation | Recommendation | Recommendation
Basic | 4 | 3.67 | 4
Intermediate | 3.571 | 3.571 | 3.714
Advanced | 3 | 3.5 | 3

Figures 6 to 10 are the graphical representations of the user response for the
different features of OntoSeer. The average user satisfaction index for name
recommendation and class hierarchy validation is given in Table 4. On an
average, users are happy with Ontoseer’s recommendations. Table 3 and Table 2
show that the average satisfaction of users decreases minimally when the
intermediate user response is compared with the basic user response (advanced
user response is not considered significant since there were only two users).
With more modelling experience, users become aware of LOV and ODPs. But even
for experienced modellers, OntoSeer can provide useful recommendations. Table
3 and Table 2 also show that the recommendations are better when CQs are
available which is an expected result. But the performance of OntoSeer does
not drop drastically in the absence of CQs.

Table 3: Average satisfactory index of users for OntoSeer features with CQs Proficiency | Vocabulary | ODP | Axiom
---|---|---|---
Type | Recommendation | Recommendation | Recommendation
Basic | 4.25 | 4 | 4.083
Intermediate | 3.86 | 3.86 | 4.143
Advanced | 3 | 3.5 | 3.5
Table 4: Average user satisfactory index for OntoSeer’s naming recommendation and class hierarchy validation Proficiency | Naming | Class Hierarchy
---|---|---
Type | Recommendation | Validation
Basic | 4.08 | 3.92
Intermediate | 4.14 | 4
Advanced | 4 | 3.5
|
---|---
Figure 6: User response on the vocabulary recommendation with and without CQs |
---|---
Figure 7: User response on the axiom recommendation with and without CQs |
---|---
Figure 8: User response on the ODP recommendation with and without CQs Figure
9: User response on the name recommendation Figure 10: User response on the
class hierarchy validation

An important aspect in the evaluation of OntoSeer is the quality of ontology
that gets developed and the amount of effort in terms of the time taken to
develop an ontology. On average, there is an 8.33% improvement in modelling
experience for the basic proficiency level users when using OntoSeer. This
increases to 25.72% for intermediate proficiency level users. The two advanced
proficiency level users chose to be neutral. Fourteen, that is, 66.67% of
users believed that OntoSeer saves modelling time while the remaining seven
chose to be neutral (Figure 12).

|
---|---
Figure 11: Overall user satisfaction in building ontologies without OntoSeer
and with OntoSeer Figure 12: User response to the question on whether OntoSeer
saves modelling time

##  4 Evaluating the quality of OntoSeer’s recommendations

Using the user study, we evaluated the utility and the effectiveness of
OntoSeer’s recommendations in real-time, i.e., when it was used as a plug-in
while building an ontology in Protégé. There exists the possibility of a bias
here because the recommendations were already provided by OntoSeer and the
users were asked to evaluate them. In order to avoid this, we evaluate
OntoSeer against the users’ recommendations, i.e., we first ask the users to
make the recommendations which are then compared with OntoSeer’s
recommendations. We provide two simple use cases in the form of English
language descriptions. Along with the descriptions, a few ontologies and ODPs
are also provided. Among them, some are relevant to the use case and some are
not. Four users were asked to build an ontology (without OntoSeer) by going
over each use case and reusing the classes, properties, axioms from the
provided ontologies and ODPs. Users worked individually and also in a group of
two while building ontologies for the two use cases. The ontologies built by
the users, along with the reused classes, properties, axioms from the provided
ontologies and ODPs were collected. OntoSeer is then run on the same
ontologies and it’s recommendations are compared against the ones from the
users. In order to mitigate the effects of building the ontologies
individually and in a group, we took the union of the recommendations for each
use case and compared them with OntoSeer’s recommendations. We made these
comparisons in two settings. In the exact setting, OntoSeer used only the
ontologies and the ODPs provided to the users in order to produce the
recommendations. In the general setting, OntoSeer used the entire repository
of ontologies and ODPs that were available to it in order to generate the
recommendations. Table 5 and Table 6 show the precision and recall of OntoSeer
for the use cases 1 and 2 in the general setting. Table 7 and Table 8 show the
precision and recall of OntoSeer in the exact setting. From this evaluation,
it is evident that OntoSeer’s recommendations are relevant and are of good
quality. The use cases with all the owl files and user response are available
at https://github.com/kracr/ontoseer/tree/master/Evaluation.

Table 5: Precision and recall of OntoSeer for use case 1 in the general setting. Feature | Precision@3 | Recall@3 | Precision@5 | Recall@5 | Precison@7 | Recall@7
---|---|---|---|---|---|---
ODP | 0.66 | 0.4 | 0.6 | 0.6 | 0.714 | 1
Vocabularies | 0.66 | 0.33 | 0.6 | 0.5 | 0.714 | 0.833
Axioms | 0.33 | 0.2 | 0.4 | 0.4 | 0.43 | 0.6
Table 6: Precision and recall of OntoSeer for use case 2 in the general setting. Feature | Precision@3 | Recall@3 | Precision@5 | Recall@5 | Precison@7 | Recall@7
---|---|---|---|---|---|---
ODP | 0.33 | 0.2 | 0.6 | 0.6 | 0.714 | 0.8
Vocabularies | 0.66 | 0.4 | 0.4 | 0.4 | 0.571 | 0.66
Axioms | 0.33 | 0.166 | 0.4 | 0.33 | 0.29 | 0.5
Table 7: Precision and recall of OntoSeer for use case 1 in the exact setting. Feature | Precision@3 | Recall@3 | Precision@5 | Recall@5 | Precison@7 | Recall@7
---|---|---|---|---|---|---
ODP | 0.66 | 0.4 | 0.8 | 0.8 | 0.714 | 1
Vocabularies | 0.66 | 0.33 | 0.66 | 0.66 | 0.857 | 1
Axioms | 0.66 | 0.4 | 0.6 | 0.6 | 0.571 | 0.8
Table 8: Precision and recall of OntoSeer for use case 2 in the exact setting. Feature | Precision@3 | Recall@3 | Precision@5 | Recall@5 | Precison@7 | Recall@7
---|---|---|---|---|---|---
ODP | 0.66 | 0.4 | 0.8 | 0.8 | 0.571 | 0.8
Vocabularies | 0.66 | 0.4 | 0.8 | 0.8 | 0.71 | 1
Axioms | 0.66 | 0.33 | 0.6 | 0.5 | 0.71 | 0.83

##  5 Related Work

Ontology development process involves a series of tasks that are iterative in
nature and there is no fixed order for most of the tasks [12]. Although there
is no one _correct_ way of building an ontology, the broad tasks involved in
ontology development are as follows.

  * •

List a few competency questions to restrict the scope of the ontology.

  * •

Gather the most important terms in the domain.

  * •

Split the terms into nouns and verbs. Nouns generally become the classes and
verbs become the properties.

  * •

Carefully go over the classes and build a hierarchy. The more general classes
can be considered as superclasses and the more specific ones become the
subclass.

  * •

Reuse existing ontologies as much as possible.

  * •

The relationship between the concepts should be captured using the axioms.

  * •

Appropriate object and data properties should be associated with the classes.

  * •

Check whether the ontology can answer the competency questions and if it does
not, revise the ontology and repeat some of the listed steps.

Each of the above listed steps is subjective and can lead to confusion among
the ontology developers. Having the support of a tool in handling these tasks
would immensely help the ontology developers. Apart from OntoSeer, there have
been a few efforts in this direction.

Tools that are similar to OntoSeer are OntoCheck [15], and OOPS! [13]. We
briefly discuss the functionality of these tools and how they differ from
OntoSeer. OntoCheck [15] is a plugin for Protégé that only indicates the class
names that violate the naming convention. For example, if there are classes
such as HumanBeing, and nitrogenoxide, then OntoCheck reports that 50% of the
classes do not follow naming conventions along with the class nitrogenoxide.
In contrast, OntoSeer indicates the violation and recommends possible class
names such as NitrogenOxide to the user.

OOPS! stands for Ontology Pitfall Scanner. It is an online tool that detects
pitfalls or common modelling errors that ontology developers make. The
pitfalls are divided into three categories - structural, functional, and
usability-profiling. There are around 40 pitfalls, but here we discuss only
some of them due to lack of space. Having cycles in the class hierarchy is a
pitfall that comes under the structural dimension. Generally, the ontology
should not contain more than one semantically equivalent class. Missing
disjoint axioms is a common pitfall. Unless explicitly stated, classes are not
disjoint. A functional pitfall is connecting disconnected components.
Sometimes two unrelated entities are joined by a relationship. This is a
pitfall that should be avoided. A usability pitfall is using different naming
conventions in the ontology. For example, a superclass will have a name
following one naming convention, and a subclass name follows a different
naming convention. Missing domain and range for properties is another common
pitfall.

OntoClean [8] provides guidelines for properties and class hierarchies. It
introduced terms such as essence, rigidity, identity, and unity. A property
that holds in all possible cases is termed as essential for the entity.
Rigidity is a type of essential property that is true for all the instances of
an entity. A rigid class is a class whose every member cannot cease to be a
member without losing its existence. A rigid class cannot be a subclass of an
anti-rigid one. Identity is defined as the ability to differentiate two
individual entities as different or recognize them as the same. Identity helps
in resolving confusion regarding class hierarchies. Unity determines whether
an instance is the whole or part of an entity. ODEClean plug-in of WebODE [6]
devised a way to validate class hierarchy with OntoClean taxonomy. Unlike
OntoSeer, ODEClean is a stand-alone web plugin. Also, ODEClean assumes that
the user will know the characteristics of each property which may not be true
in the case of novice developers. OntoSeer, on the other hand, asks the user
simple questions, and based on the answers, validates the class hierarchy.

One of the main differences between OntoClean, OOPS! and OntoSeer is that
OntoSeer works along with the ontology developer in creating better quality
ontologies. It does not evaluate ontologies post creation. Another major
difference is that OntoSeer recommends terms (classes, properties, instances)
that can be reused. It does this by checking the similarity of the terms from
the ontology being built with existing ontologies.

An important functionality of OntoSeer is to encourage reusability by making
use of existing ontologies and ODPs. An ODP helps domain experts in ontology
engineering by packaging reusable best practices into small blocks of ontology
functionality [9]. Since there are several hundred ODPs, it is difficult to
select the relevant ones. OntoSeer helps users in the selection of ODPs by
making use of the classes and properties of the ontology under construction
and asking a few simple questions to the user. This feature is one of major
differences between existing tools (described earlier) and OntoSeer.

##  6 Sustainability Plan

We collected as many ontology corpora as possible for indexing and
recommendation. But the index that OntoSeer uses may become stale over a
period of time. Users can add more ontologies or update the existing corpora.
OntoSeer can regenerate the indexes and use them for various recommendations
that it supports. Since we query LOV and BioPortal over the Web, the updated
ontologies in these portals will get reflected in the recommendations as well.
For the ODP recommendation, OntoSeer expects each ODP (with all the details
such as description, CQs, axioms, etc.) to be in a separate text file. So the
new additions to the ODP repository need to be made available as text files.
There is no danger of naming recommendation and class hierarchy validation
going stale. Based on the user response and the initial interest shown by the
community on the code repository (5 users have _starred_ the repository), we
expect an increase in the uptake of this tool by the community and this in
turn will help with the sustainability of OntoSeer.

##  7 Conclusion and Future Work

Developing an ontology is often confusing and time consuming, especially for
the inexperienced developers. They have many choices to make, such as the
classes and properties to create or reuse, ODPs to use, the different axioms
to include in the ontology and the naming conventions to follow. We developed
a Protégé plugin named OntoSeer to ease the process of building an ontology.
Our tool recommends classes, properties, axioms, and ontology design patterns
in real-time while a user is developing the ontology. We have conducted a user
study of the tool. There were 21 respondents. Almost all the users are
satisfied with the recommendations provided by OntoSeer. The majority of the
users (14 out of 21) said that OntoSeer also helps them in saving modelling
time. In our evaluation, we also show that the recommendations generated by
OntoSeer are relevant and are of good quality. In the future, we plan to
engage in a dialogue with the ontology developer in real-time to resolve
confusing issues such as a term being a class vs. a property vs. an instance.
A dialogue with the user also helps in checking whether the ontology can
answer the competency questions.

Acknowledgement. This work has partially been supported by the Infosys Centre
for Artificial Intelligence (CAI), IIIT-Delhi, India.

## References

  * [1] Bhattacharyya, P., Mutharaju, R.: Ontoseer: ATool to Ease the Ontology Development Process. In: 8th ACM IKDD CODS and 26th COMAD. p. 428. CODS COMAD 2021 (2021). https://doi.org/10.1145/3430984.3431067
  * [2] Bhattachayya, P.: A recommendation system involving human-in-the-loop to improve the quality of ontologies. Master’s thesis, Indraprastha Institute of Information Technology, Delhi (2020)
  * [3] Cahyono, S.C.: Comparison of document similarity measurements in scientific writing using Jaro-Winkler Distance method and Paragraph Vector method. IOP Conference Series: Materials Science and Engineering 662(5), 052016 (2019). https://doi.org/10.1088/1757-899x/662/5/052016
  * [4] Dreßler, K., Ngonga Ngomo, A.C.: On the Efficient Execution of Bounded Jaro-Winkler Distances (09 2015). https://doi.org/10.13140/RG.2.1.4575.6640
  * [5] Fernández-Izquierdo, A., Poveda-Villalón, M., García-Castro, R.: CORAL: A Corpus of Ontological Requirements Annotated with Lexico-Syntactic Patterns. In: Hitzler, P., Fernández, M., Janowicz, K., Zaveri, A., Gray, A.J., Lopez, V., Haller, A., Hammar, K. (eds.) The Semantic Web, pp. 443–458. Springer International Publishing (2019). https://doi.org/10.1007/978-3-030-21348-0_29
  * [6] Fernández-López, M., Gómez-Pérez, A.: The Integration of OntoClean in WebODE. In: Angele, J., Sure, Y. (eds.) EON2002, Proceedings of the OntoWeb-SIG3 Workshop at the 13th International Conference on Knowledge Engineering and Knowledge Management EKAW 2002, Siguenza (Spain), 30th September 2002. CEUR Workshop Proceedings, vol. 62, pp. 38–52. CEUR-WS.org (2002)
  * [7] Guarino, N., Oberle, D., Staab, S.: What Is an Ontology? In: Staab, S., Studer, R. (eds.) Handbook on Ontologies, pp. 1–17. International Handbooks on Information Systems, Springer (2009). https://doi.org/10.1007/978-3-540-92673-3_0
  * [8] Guarino, N., et al.: An Overview of OntoClean. In: Staab, S., Studer, R. (eds.) Handbook on Ontologies, pp. 201–220. International Handbooks on Information Systems, Springer Berlin Heidelberg (2009)
  * [9] Hammar, K.: Ontology Design Patterns in Use - Lessons Learnt from an Ontology Engineering Case. In: Blomqvist, E., Gangemi, A., Hammar, K., Suárez-Figueroa, M.C. (eds.) Proceedings of the 3rd Workshop on Ontology Patterns, Boston, USA, November 12, 2012. CEUR-WS.org (2012)
  * [10] Janowicz, K., Gangemi, A., Hitzler, P., Krisnadhi, A., Presutti, V.: Introduction: Ontology Design Patterns in a Nutshell. IOS Press (2016)
  * [11] Le, Q.V., Mikolov, T.: Distributed Representations of Sentences and Documents. In: Proceedings of the 31th International Conference on Machine Learning, ICML 2014, Beijing, China, 21-26 June 2014. pp. 1188–1196. JMLR.org (2014)
  * [12] Noy, N., Mcguinness, D.: Ontology development 101: A Guide to Creating Your First Ontology. Knowledge Systems Laboratory (01 2001)
  * [13] Poveda-Villalón, M., et al.: OOPS! (OntOlogy Pitfall Scanner!): An On-line Tool for Ontology Evaluation. International Journal on Semantic Web and Information Systems (IJSWIS) pp. 7–34 (Apr 2014)
  * [14] Ren, Y., Parvizi, A., Mellish, C., Pan, J.Z., van Deemter, K., Stevens, R.: Towards Competency Question-Driven Ontology Authoring. In: Presutti, V., d’Amato, C., Gandon, F., d’Aquin, M., Staab, S., Tordai, A. (eds.) The Semantic Web: Trends and Challenges. pp. 752–767. Lecture Notes in Computer Science, Springer International Publishing (2014)
  * [15] Schober, D., et al.: Ontocheck: verifying ontology naming conventions and metadata completeness in Protégé 4. Journal of Biomedical Semantics (2012)