# IoT for Agricultural Information Generation and Recommendation: A Deep Learning-Based Approach

Authors: Huibo Wang; Yu Zhao; Chengzhi Shao
Journal: Mobile Information Systems
 (2022)

---

## Abstract

Agriculture is the foundation of national economy. Therefore, countries all over the world—developed and developing countries—attach great importance to the sustainable development of agriculture. With the rapid development of Internet of Things (IoT) technology, advance applications are being designed to enhance agricultural economy. With the application of IoT, the production mode of traditional agriculture has been restructured and rationalized. Based on the applications of IoT in agriculture, this paper presents a method to automatically classify and recommend agricultural information. The standard domain-related theories and information service system are exploited to promote IoT technology in the construction of agricultural informatization. A convolutional neural network (CNN) model is used to classify agricultural information based on the vector file generated after preprocessing textual agricultural data. With the clustering method, the influence of unbalanced number of documents in the dataset is minimized. Finally, an information recommendation method based on multimodal interaction behavior is proposed for agricultural information recommendation. Potential features from textual information are extracted which are then fed to long short-term memory (LSTM) in connection with the interaction behavior. LSTM is used for the prediction of the possibility of interaction with respect to the information recommendations system. The experimental results show the feasibility of CNN in agricultural information classification problem. A commendable clustering accuracy is obtained for the agriculture category containing a large number of documents. However, the category with fewer documents is less clustered. The model may be used to effectively extract and classify agricultural information and has great significance in structuring and shaping agricultural information for convenient use in agricultural decision-making.


---

## Body

## 1. Introduction

In the current era of IoT and agricultural development, a new agricultural model,precision agriculture, is getting focus. In traditional agriculture development, there were various problems, such as scarcity of resources, environmental pollution, and poor quality of agricultural products. These problems severely hindered agriculture productions. The emergence of precision agriculture has brought new development opportunities in modern agriculture. Based on information technology, we can develop farming operation technology and management system to realize the management of production-related information and improve the growing environment of crops, maximize the profit, realize the efficient use of various agricultural resources, and guarantee economic and ecological benefits.In the process of modern agricultural construction and development, IoT technology brings powerful technical support and has been widely used in agricultural production. First, it can realize the goal of building intelligent agriculture. Through the application of IoT technology, remote monitoring of agricultural production process can be realized and the level of intelligence can be improved [1]. The main monitoring objects are protection of climate change, pest control, crop growth, etc. Through the application of corresponding technical means, a systematic monitoring system can be established to enhance the effectiveness of monitoring, as shown in Figure 1. Moreover, the system supports remote monitoring of agricultural production through the use of intelligent equipment. At the same time, consumers may use the system to independently check the relevant information. This can also be more effective in combating various counterfeit and shoddy products.Figure 1
Agricultural information monitoring system based on IoT.With the strong national investment in agricultural information infrastructure, new technologies are widely applied in the domain of agriculture for agricultural monitoring and production management. While meeting the growing information needs of agriculture, emerging technologies have provided new opportunities for the transformation and development of agricultural information services [2]. With the development and promotion of various high-tech applications, many industries dominated by information technology are undergoing revolutionary changes and breakthroughs.With the addition of IoT, the efficiency of crude agricultural production has been improved and the quality of agricultural products has been ensured, thus contributing to the increase of farmers' income [3]. Unlike traditional farming, IoT is used to take emergency measures in case of disease, epidemic, and disasters. The modern era intelligent farming framework based on IoT is shown in Figure 2. IoT technology can be used to monitor in real time the agricultural growth, crop irrigation, poultry breeding, sensing humidity, rainfall, carbon dioxide concentration, etc. As a result, appropriate measures are taken for regulating inputs of water, fertilizers, and medicines.Figure 2
Structure of intelligent breeding and monitoring system based on IoT.However, in the process of agricultural informatization combined with IoT, it is difficult to realize the rapid classification and accurate recommendation of agricultural information. In this context, it is crucial to choose an optimized agricultural information classification method to assist in achieving fast filtering and accurate recommendation of agricultural information [4]. In this paper, classification and recommendation methods of agricultural information are presented and a deep learning method is proposed for automatic classification and recommendation of agricultural information.


## 2. Related Works

The rapid development of the IoT industry has led the world’s major economies to elevate industrial revitalization to a strategic level. Industrial Internet, Industry 4.0, and Made in China 2025 are the industrial strategies of the three major economies of the world—USA, Germany, and China. These initiatives mainly necessitate the use of IoT in public health, smart grid, intelligent transportation, waste management, smart home, smart cities, smart agriculture, and energy management. By 2022, there will be 28.6 billion IoT devices worldwide [5]. By 2025, the value created by the IoT will reach to trillions of dollars annually.IoT promotes the creation of smart cities, realizing fine management and optimal services in the fields of transportation management, traffic control, and video monitoring; enhancing urban efficiency; and benefiting people’s lives [6]. To ensure efficient security, IoT includes sensing terminal, sensing layer gateway, sensing layer access, and data transmission [7]. For modest use of energy, IoT devices are designed to be small in size and have limited inherent resources (battery, processing, and storage) [8]. At present, IoT technology has been widely used in agriculture in the stages of crop cultivation, harvesting, storage, and sales, realizing digital and visual management of agricultural information [9]. At present, the cross-seasonal demand for agricultural products cannot be fully satisfied under the traditional agricultural production mode. Therefore, the greenhouse farming method has been widely used in agricultural production [10]. Pests and diseases have always been the main pests in agriculture, forestry, and animal husbandry. According to relevant data, the average annual loss of pests and diseases is nearly 50 billion pounds of food and poses a great threat to forest vegetation [11]. Besides various environmental factors, diseases and epidemics can also bring a lot of uncertainty to the farmers’ income [12]. The monitoring, early warning, and prevention of pests and diseases are a matter of urgency.As stated in [13], focus should be paid to current and long-term interests of farmers, to the process of informatization, and to the contents of agricultural informatization. With the continuous investment in IoT research funds, some ideal scientific research results have been achieved. So, it is necessary to actively promote cooperation with universities and fully combine high-tech and traditional industries, so that the relevant scientific researchers in universities are oriented to practical applications and enhance the effectiveness of research [14]. At the same time, the standard system should be reasonably formulated within the relevant industry.Text classification refers to taking a set of texts preclassified by experts as the training set, preprocessing the training set, using the classification algorithm to train the discriminative formula or classifier, and using the obtained classifier to classify other texts into predefined categories. Researchers have proposed a landmark text classification method using Bayesian formula to promote research work on text classification [15]. Subsequently, many famous intelligence scholars, in the field of classification research, after a long time of research have now achieved fruitful progress. The development of foreign automatic classification has gone through the stages of feasibility study, experimental research, and so on, and has now entered the stage of practicalization. So far, automatic text classification technology has been widely used in the fields of mail classification, electronic conference, information filtering, and so on.Despite the fact that text classification has made great progress, research on text classification in the field of agriculture is still relatively small. At present, an important problem of agricultural information classification research is that there are a few standard and open agricultural datasets. Most of the researchers have built their own datasets for agricultural information classification [16]. Some researchers have implemented an agricultural information acquisition system based on Web classification technology and realized the application of Chinese web classification technology to an agricultural knowledge acquisition system, which combines Web crawling technology, information extraction technology, and information retrieval technology [17, 18].In deep learning-based recommendation systems, the commonly used deep learning techniques include neural networks such as RBM, MLP, AE, CNN, and RNN. Among them, CNN and AE and their variants are often used for feature engineering to extract features from multimodal data such as text, images, and videos, RBM and MLP are often used for latent factor models, and RNN and its various variants (e.g., long short-term memory networks, gated recurrent units, etc.) are often used for recommendations based on sequence information [19]. The research on deep learning-based recommendation systems is an evolving process. Early on, traditional recommendation methods were mainly combined with deep learning techniques, and as the research continues, many algorithms and models using only deep learning techniques for recommendation have now emerged.


## 3. Methods

In this paper, the CNN deep learning model is utilized for classification of agricultural information and a hybrid multi-model system for the recommendation of agriculture information. In the agriculture text classification, initially information acquisition is carried out from the available agriculture documents. Next in the training process, the DL model is trained after selecting the appropriate features. Finally, by inputting text and representing it in vector form, classification is performed. The entire process is depicted in Figure3.Figure 3
The operation of agriculture information system.


### 3.1. Preprocessing

A text processing algorithm requires preprocessing of textual data for efficient extraction of the features and classifications. In pretraining phase, a word separation tool is used to classify the dataset documents. At the completion of word separation and removing the stop words, feature selection is performed using a feature evaluation function. Finally, a word list is generated so as to build a text vector that can be directly processed by a computer system. The preprocessing process of text classification using CNN model is different from the models which are based on decision tree and Bayesian network.For a Chinese document, word separation is an essential operation in the preprocessing process. The subsequent classification operations need to characterize the text. Although English phrase segmentation is difficult, Chinese is much more complicated than English in the word layer. At present, the development of Chinese word separation technology has been relatively mature, and many word separation tools exist [20]. In the process of word separation, the characteristics of agricultural information should be taken into account, especially the problem of dividing agricultural vocabulary. Therefore, custom words can be added according to the characteristics of agricultural information during word separation to improve the accuracy of word separation. However, the min_freq parameter was set to 3 in order to include into the corpus only those words that appear at least 3 times in a document.After the text is divided into words, the next work that needs to be done is to de-stop words. The purpose of deactivating words is to remove some punctuation, numbers, single words, and some other meaningless words from agricultural information documents. It is because numbers or characters cannot characterize a text; hence, words should be removed from the subset file. The word separation (stop word removal) process is shown in Figure4. Finally, each word in the generated file is transformed into word vector representation. It is observed that execution time of the word-level segmentation is directly proportional to the file size; time in execution increases as the file size increases and vice versa. An average 3.2 s increase was observed for 1 kB increase in the size of file.Figure 4
Flowchart of participle (stop word).


### 3.2. Information Classification Method Based on CNN Model

An agriculture category classification algorithm accepts input as a text vector. The new instance of text is checked whether it is a new category. If it is a new category, then the weight of the category feature is updated. In else case, the center vector of the class and the eigenvalues are modified. Schematic of the system is shown in Figure5.Figure 5
Schematic of agriculture information classification system.The CNN model is used to achieve agricultural information classification, and the experiment is implemented with reference to the classical paper using a five-layer network structure. The first data input layer, which receives the word vector sequence generated after preprocessing, is connected to the convolutional layer, activation layer, and down-sampling layer, where three convolutional layers are placed in the parallel direction due to the difference in the size of the convolutional window. Three layers (convolutional layer, activation layer, and down-sampling layer) are placed in the vertical direction. The fifth layer is the output layer used to output the probability that the text belongs to a certain class. The network structure is shown in Figure6.Figure 6
Network structure of text information classification based on CNN.After receiving a text as input data, the input layer of the neural network is convolved by the convolutional kernel of the first convolutional layer to produce three features. The configuration of each parameter in the convolutional neural network is shown in Table1.Table 1
Parameter of convolutional neural network.
Layer numberName of layerKernel numberFeature size0Input layer—100143∗501Convolution layer128100139∗12Convolution layer12850069∗13Convolution layer128100140∗14Activation layer—50070∗15Sample layer28100138∗16Output layer—50069∗1Neural networks can be divided into guided learning networks and unguided learning networks. Guided learning networks are mainly used for pattern recognition, while unguided learning networks are more often used for clustering analysis. When using guided learning networks for pattern recognition, because the category of each sample is known, the distribution of samples in space is no longer divided according to their natural distribution tendency, but rather, a suitable spatial division method is found according to the distribution of samples of the same category in space and the degree of distance between samples of different categories, or an appropriate classification boundary is found so that samples of different categories are located in in different regions. This requires a complex learning process and takes a long time, and the position of the classification boundary used to divide the sample space needs to be constantly adjusted to reduce the result of samples being classified into nonidentical regions [21]. The work of these two phases is controlled by the accuracy requirement as the error measure of the network about the p sample. And the error measure of the network about the whole dataset is defined as(1)Ep=12∑j=1mypj−opj2.As mentioned above, the reason why this stage is called the backward propagation stage is relative to the normal propagation process of the input signal. This is because when the connection weights of the neurons are adjusted at the beginning, only the error of the output layer can be found, while the errors of the other layers can be obtained by back-propagating this error in reverse, layer by layer. The outputs of the units in the intermediate layer are(2)hj=f∑i=0N−1Vijxi+ϕj.The outputs of the output layer cells are(3)yk=f∑j=0L−1Whhj+θk,where ϕj and θk are the thresholds for the hidden and output units.


### 3.3. Information Recommendation Methods Combining Multimodal Interactions

In existing research, it is usually assumed that potential features are static and unchanging, but such an assumption is not consistent with the real scenarios. In reality, users’ preferences change continuously according to their own experiences, so the latent features should also be dynamic. The emergence of recurrent neural networks provides an effective solution for modeling dynamic user latent features. Potential feature representation using LSTM, a long short-term memory network, updates potential features after each generated interaction and is a way to model users and potential features dynamically. However, LSTM keeps adding new user preferences and gradually forgetting the previous preferences, and the further away from the current moment, the greater the forgetting is. In fact, users are not always “new and old” in the process of changing user preferences. Some of the users’ inherent preferences may persist for a longer period of time, while for some new items, users may not necessarily like them even if they have interactions. That is, while users’ preferences are constantly changing, some preferences change to a lesser degree and some preferences change to a greater degree [22].Being able to obtain accurate representations of potential user characteristics is of great value to the improvement of recommendation results. In order to solve this problem, a recommendation method based on multimodal interaction behavior information is proposed. Firstly, the textual auxiliary information of each item is extracted as its item latent features using convolutional neural network. Then, the user’s rating data and the corresponding item textual auxiliary information in the user-item interaction behavior are combined. The user’s interest change process is effectively modeled by the LSTM to obtain a more accurate potential feature representation. Finally, the sigmoid function is used to fuse user and potential feature vectors to predict the likelihood of user interactions, which is ranked and formed into a recommendation list. Multimodal data can provide richer user and item information and help alleviate the sparsity problem of scoring data. Compared with the traditional bag-of-words model, the multi-layer convolutional operation of CNN is able to capture the interconnections between words in the text and obtain a more accurate representation of item potential features. In other words, after the convolution operation, each description text can generate three overall contextual features. The three overall contextual features are stitched together to obtain the final description text contextual features. The potential feature space is mapped by the activation function tanh.(4)vj=tanhW2tanhW1epooling+b1+b2,where tanh denotes the nonlinear function, and W1, W2,b1, and b2 are weights and biases of the fully connected layers in the CNN structure.In practical application scenarios, user preferences change continuously over time and to different degrees. Therefore, we hypothesize that (1) users’ preferences change over time, and recent interaction items better reflect users’ preferences. (2) In the user’s interaction behavior, higher rated items have a slower decaying effect on user preferences, and lower rated items have a faster decaying effect on user preferences. This user dynamic latent feature is modeled using LSTM. The update process of user latent features is shown in Figure7. The model considers the latent features of user interactions as user preferences and uses them as input to the LSTM of the long short-term memory network. In the LSTM, new user preferences will be added continuously, while the previous preferences will be gradually forgotten. Therefore, the first assumption of the model can be satisfied by using LSTM.Figure 7
The LSTM operational pipeline.The forgetting gate is used to control the information discarded from the potential features of the current user, which reads the potential features of the user and transmits them to the output gate through a sigmoid function. The input gate, which controls the information received from the current input, also determines updates to the user’s potential features via the sigmoid function and creates a new candidate vector to add to the cell state using the tanh function. Then, the old cell state is multiplied with the forget gate to determine the discarded information, and the new candidate state information is multiplied with the input gate to determine the new input information, completing the update of the cell state and obtaining the new cell state. Ifit, ft, and ot represent the input, forget, and output gates, then the LSTM gate equations are given as follows:(5)it=σ…wiht−1,xt+bi,ft=σwfht−1,xt+bf,ot=σwoht−1,xt+bo,where σ represents the sigmoid activation function, wx the weight of the respective neurons, ht−1 previous LSTM block output, xt input to the current gate, and bx bias of the current gate. Equation of the tanh activation function used for regulating the values in between 1 and −1 is given as(6)tanht=expt−exp−texpt+exp−t.


## 3.1. Preprocessing

A text processing algorithm requires preprocessing of textual data for efficient extraction of the features and classifications. In pretraining phase, a word separation tool is used to classify the dataset documents. At the completion of word separation and removing the stop words, feature selection is performed using a feature evaluation function. Finally, a word list is generated so as to build a text vector that can be directly processed by a computer system. The preprocessing process of text classification using CNN model is different from the models which are based on decision tree and Bayesian network.For a Chinese document, word separation is an essential operation in the preprocessing process. The subsequent classification operations need to characterize the text. Although English phrase segmentation is difficult, Chinese is much more complicated than English in the word layer. At present, the development of Chinese word separation technology has been relatively mature, and many word separation tools exist [20]. In the process of word separation, the characteristics of agricultural information should be taken into account, especially the problem of dividing agricultural vocabulary. Therefore, custom words can be added according to the characteristics of agricultural information during word separation to improve the accuracy of word separation. However, the min_freq parameter was set to 3 in order to include into the corpus only those words that appear at least 3 times in a document.After the text is divided into words, the next work that needs to be done is to de-stop words. The purpose of deactivating words is to remove some punctuation, numbers, single words, and some other meaningless words from agricultural information documents. It is because numbers or characters cannot characterize a text; hence, words should be removed from the subset file. The word separation (stop word removal) process is shown in Figure4. Finally, each word in the generated file is transformed into word vector representation. It is observed that execution time of the word-level segmentation is directly proportional to the file size; time in execution increases as the file size increases and vice versa. An average 3.2 s increase was observed for 1 kB increase in the size of file.Figure 4
Flowchart of participle (stop word).


## 3.2. Information Classification Method Based on CNN Model

An agriculture category classification algorithm accepts input as a text vector. The new instance of text is checked whether it is a new category. If it is a new category, then the weight of the category feature is updated. In else case, the center vector of the class and the eigenvalues are modified. Schematic of the system is shown in Figure5.Figure 5
Schematic of agriculture information classification system.The CNN model is used to achieve agricultural information classification, and the experiment is implemented with reference to the classical paper using a five-layer network structure. The first data input layer, which receives the word vector sequence generated after preprocessing, is connected to the convolutional layer, activation layer, and down-sampling layer, where three convolutional layers are placed in the parallel direction due to the difference in the size of the convolutional window. Three layers (convolutional layer, activation layer, and down-sampling layer) are placed in the vertical direction. The fifth layer is the output layer used to output the probability that the text belongs to a certain class. The network structure is shown in Figure6.Figure 6
Network structure of text information classification based on CNN.After receiving a text as input data, the input layer of the neural network is convolved by the convolutional kernel of the first convolutional layer to produce three features. The configuration of each parameter in the convolutional neural network is shown in Table1.Table 1
Parameter of convolutional neural network.
Layer numberName of layerKernel numberFeature size0Input layer—100143∗501Convolution layer128100139∗12Convolution layer12850069∗13Convolution layer128100140∗14Activation layer—50070∗15Sample layer28100138∗16Output layer—50069∗1Neural networks can be divided into guided learning networks and unguided learning networks. Guided learning networks are mainly used for pattern recognition, while unguided learning networks are more often used for clustering analysis. When using guided learning networks for pattern recognition, because the category of each sample is known, the distribution of samples in space is no longer divided according to their natural distribution tendency, but rather, a suitable spatial division method is found according to the distribution of samples of the same category in space and the degree of distance between samples of different categories, or an appropriate classification boundary is found so that samples of different categories are located in in different regions. This requires a complex learning process and takes a long time, and the position of the classification boundary used to divide the sample space needs to be constantly adjusted to reduce the result of samples being classified into nonidentical regions [21]. The work of these two phases is controlled by the accuracy requirement as the error measure of the network about the p sample. And the error measure of the network about the whole dataset is defined as(1)Ep=12∑j=1mypj−opj2.As mentioned above, the reason why this stage is called the backward propagation stage is relative to the normal propagation process of the input signal. This is because when the connection weights of the neurons are adjusted at the beginning, only the error of the output layer can be found, while the errors of the other layers can be obtained by back-propagating this error in reverse, layer by layer. The outputs of the units in the intermediate layer are(2)hj=f∑i=0N−1Vijxi+ϕj.The outputs of the output layer cells are(3)yk=f∑j=0L−1Whhj+θk,where ϕj and θk are the thresholds for the hidden and output units.


## 3.3. Information Recommendation Methods Combining Multimodal Interactions

In existing research, it is usually assumed that potential features are static and unchanging, but such an assumption is not consistent with the real scenarios. In reality, users’ preferences change continuously according to their own experiences, so the latent features should also be dynamic. The emergence of recurrent neural networks provides an effective solution for modeling dynamic user latent features. Potential feature representation using LSTM, a long short-term memory network, updates potential features after each generated interaction and is a way to model users and potential features dynamically. However, LSTM keeps adding new user preferences and gradually forgetting the previous preferences, and the further away from the current moment, the greater the forgetting is. In fact, users are not always “new and old” in the process of changing user preferences. Some of the users’ inherent preferences may persist for a longer period of time, while for some new items, users may not necessarily like them even if they have interactions. That is, while users’ preferences are constantly changing, some preferences change to a lesser degree and some preferences change to a greater degree [22].Being able to obtain accurate representations of potential user characteristics is of great value to the improvement of recommendation results. In order to solve this problem, a recommendation method based on multimodal interaction behavior information is proposed. Firstly, the textual auxiliary information of each item is extracted as its item latent features using convolutional neural network. Then, the user’s rating data and the corresponding item textual auxiliary information in the user-item interaction behavior are combined. The user’s interest change process is effectively modeled by the LSTM to obtain a more accurate potential feature representation. Finally, the sigmoid function is used to fuse user and potential feature vectors to predict the likelihood of user interactions, which is ranked and formed into a recommendation list. Multimodal data can provide richer user and item information and help alleviate the sparsity problem of scoring data. Compared with the traditional bag-of-words model, the multi-layer convolutional operation of CNN is able to capture the interconnections between words in the text and obtain a more accurate representation of item potential features. In other words, after the convolution operation, each description text can generate three overall contextual features. The three overall contextual features are stitched together to obtain the final description text contextual features. The potential feature space is mapped by the activation function tanh.(4)vj=tanhW2tanhW1epooling+b1+b2,where tanh denotes the nonlinear function, and W1, W2,b1, and b2 are weights and biases of the fully connected layers in the CNN structure.In practical application scenarios, user preferences change continuously over time and to different degrees. Therefore, we hypothesize that (1) users’ preferences change over time, and recent interaction items better reflect users’ preferences. (2) In the user’s interaction behavior, higher rated items have a slower decaying effect on user preferences, and lower rated items have a faster decaying effect on user preferences. This user dynamic latent feature is modeled using LSTM. The update process of user latent features is shown in Figure7. The model considers the latent features of user interactions as user preferences and uses them as input to the LSTM of the long short-term memory network. In the LSTM, new user preferences will be added continuously, while the previous preferences will be gradually forgotten. Therefore, the first assumption of the model can be satisfied by using LSTM.Figure 7
The LSTM operational pipeline.The forgetting gate is used to control the information discarded from the potential features of the current user, which reads the potential features of the user and transmits them to the output gate through a sigmoid function. The input gate, which controls the information received from the current input, also determines updates to the user’s potential features via the sigmoid function and creates a new candidate vector to add to the cell state using the tanh function. Then, the old cell state is multiplied with the forget gate to determine the discarded information, and the new candidate state information is multiplied with the input gate to determine the new input information, completing the update of the cell state and obtaining the new cell state. Ifit, ft, and ot represent the input, forget, and output gates, then the LSTM gate equations are given as follows:(5)it=σ…wiht−1,xt+bi,ft=σwfht−1,xt+bf,ot=σwoht−1,xt+bo,where σ represents the sigmoid activation function, wx the weight of the respective neurons, ht−1 previous LSTM block output, xt input to the current gate, and bx bias of the current gate. Equation of the tanh activation function used for regulating the values in between 1 and −1 is given as(6)tanht=expt−exp−texpt+exp−t.


## 4. Experiments

The proposed system is evaluated by an open dataset. Dedicated experiments were performed for analyzing the accuracy and clustering effectiveness of the method, and details are as follows.


### 4.1. Experimental Dataset

The text training set plays a decisive role in the performance of the final generated text discriminative formula or classifier. To conduct research on text classification methods for agricultural information, we need to consider how to design and establish a text training library for agricultural information first. The quality of the text training set will directly lead to the classification accuracy of the classification method, if the training set is not good, even if the classification algorithm is accurate, it may lead to unsatisfactory classification results. A good text training set should have obvious category characteristics, accurate representation of documents in each category, and uniform distribution of documents in each category under feature values.At present, there is a lack of research on agricultural information datasets in China, and an open and standard agricultural information dataset has not been formed. Therefore, the dataset used for agricultural information text classification using deep learning methods in this paper is a small agricultural information text dataset established by ourselves. To build the agricultural information text dataset, firstly, the need for category refinement in the field of agricultural information is established, and the agricultural crops are divided into category characteristics, technology, and market information. Secondly, the training samples of the training set for each category of agricultural information text are selected, and the number of feature words of each sample is controlled so that each sample in the dataset has good category representation, and finally the text dataset is built. The agricultural information dataset is obtained from the online dedicated platform [23, 24]. A crawler program is written in Java language in Eclipse IDE for the purpose of auto-collection of agriculture data from the Web.The agricultural information used by the category classification network includes soil quotations, drought forecasts, crop pests and diseases, and aquatic pests and diseases. In this study, we select the categories that people pay more attention to as the research object, and study a total of 10 categories such as pest and disease, analysis and forecast, price quotation, detection and early warning, etc., to establish the dataset, and the specific number of documents contained in each category is shown in Table2. The total 8637 documents were split into 10 : 4 train-test ratios. As per the ratio, 635 documents were used for training and 254 for testing. Aim behind keeping a large training set was to effectively train the model.Table 2
Distribution of the number of agricultural information documents contained in each category.
CategoryCategory nameDocument number1Plant diseases and insects2602Price quotation27513Analysis of forecast4104Policies and regulations1535Monitoring and early warning8376Rural culture9987Rural tourism9578Practical technology4749Information construction133610Investment promotion461


### 4.2. Experimental Results of Information Classification

The first experiment is the binary classification experiment, and the blue curve in Figure8 shows the loss drop curve for 10 iterations. From the loss drop curve in Figure 8, it is clear that the loss value of the network drops to the lowest point after the 3rd iteration. The misclassification curve does not change much during the training process, and the network model tends to be stable and reaches the convergence state as proceeded. From the experimental results, we can see that the network model has good recognition ability for dichotomous text. The network model has a more satisfactory classification effect when it is dichotomized. The dataset of documents/articles is arranged into group of tens—decile classes for appropriate training and testing. The decile class experiments are conducted for all the agricultural information texts in the training set using the model. The results of the decile class experiments are shown in the red curve in Figure 8. In ten iterations of the text decile class, the loss value still decreases more in the second iteration than the first one, and the loss value gradually becomes smaller as the number of iterations increases. In the text decile class, due to the larger dataset and longer training time of the model, the results of text classification in the decile class are not as obvious as those of the binary classification, the category ability of the classifier for text is not ideal, and the recognition of text in ten categories is not as good as that of the binary classification experimental data.Figure 8
Loss curve of two classifications and ten classifications.To better validate the model classification method, clustering experiments were conducted to analyze the model’s classification accuracy for each category of information. The purpose of the clustering experiment is to gather similar texts together and classify dissimilar texts into different categories, so as to see the distribution of categories in the dataset. The experimental results are shown in Figure9, which shows that those containing more documents are well clustered. However, the category with fewer documents is more likely to be less clustered or left un-clustered. Thus, it is easy to imagine that the difference in the accuracy of the network model in dichotomous and decentralized categories is probably due to the uneven number of documents contained in each category in the dataset.Figure 9
Clustering experiment results.


### 4.3. Information Recommendation Experiment Results

In this section, two publicly available rating datasets are used: MovieLens-100K and MovieLens-1m. Two methods are used for comparison experiments: neural matrix factorization (NeuMF) and NeuMF+. NeuMF is to personalize ranking task with implicit feedback, whereas NeuMF+ is the improved version of the model. In the proposed research work, NeuMF is used for mapping nonlinear interactions between user and embedding items via a multi-layer perceptron (MLP) [25]. NeuMF+ assumes that both user and item potential features obey Gaussian distribution. The distribution of the number of user interactions is given in Table 3.Table 3
User interaction number distribution.
Interactive distributionMovieLens-100K (%)MovieLens-1m (%)<100.05011–2017.837.2621–4026.1521.3441–8022.0922.7481–16022.5823.15161–32013.2616.81321–6402.428.42>64101.69Hit ratio (HR) and normalized discounted cumulative gain (NDCG) [26–28] are the commonly used methods for the assessment of the effectiveness of a recommendation system. In this paper, HR and NDCG are used to evaluate metrics of the model, and equations for the same are given as(7)HR=No.ofhitsNo.ofusers,NDCG=1No.ofusers∑i=1No.ofusers1log2pi+1.HR can be considered as a recall-based evaluation method, which indicates the percentage of successful recommendations, and NDCG is an accuracy-based evaluation method, which is closely related to the position of the test case in the ranking list. The higher the ranking position of the case, the higher will be the value of NDCG. The experimental results are shown in Figure10. Under the evaluation criterion of HR, except for the lower value of HR at d = 64 than at d = 32 on the MovieLens-100K dataset, both MovieLens-100K and MovieLens-1m datasets show an increasing trend, and the larger the dimensionality, the higher the value of HR. Under the NDCG criterion, an increasing trend is shown on the MovieLens-100K and MovieLens-1m datasets, and the increasing trend is more obvious on the MovieLens-100K dataset. In general, when the latent feature dimension is very small, the corresponding model effect is poor, while when the latent feature dimension is very large, the overfitting phenomenon is easy to occur, which increases the computation and the model training time.Figure 10
Influence of potential feature dimensiond on model effect.


## 4.1. Experimental Dataset

The text training set plays a decisive role in the performance of the final generated text discriminative formula or classifier. To conduct research on text classification methods for agricultural information, we need to consider how to design and establish a text training library for agricultural information first. The quality of the text training set will directly lead to the classification accuracy of the classification method, if the training set is not good, even if the classification algorithm is accurate, it may lead to unsatisfactory classification results. A good text training set should have obvious category characteristics, accurate representation of documents in each category, and uniform distribution of documents in each category under feature values.At present, there is a lack of research on agricultural information datasets in China, and an open and standard agricultural information dataset has not been formed. Therefore, the dataset used for agricultural information text classification using deep learning methods in this paper is a small agricultural information text dataset established by ourselves. To build the agricultural information text dataset, firstly, the need for category refinement in the field of agricultural information is established, and the agricultural crops are divided into category characteristics, technology, and market information. Secondly, the training samples of the training set for each category of agricultural information text are selected, and the number of feature words of each sample is controlled so that each sample in the dataset has good category representation, and finally the text dataset is built. The agricultural information dataset is obtained from the online dedicated platform [23, 24]. A crawler program is written in Java language in Eclipse IDE for the purpose of auto-collection of agriculture data from the Web.The agricultural information used by the category classification network includes soil quotations, drought forecasts, crop pests and diseases, and aquatic pests and diseases. In this study, we select the categories that people pay more attention to as the research object, and study a total of 10 categories such as pest and disease, analysis and forecast, price quotation, detection and early warning, etc., to establish the dataset, and the specific number of documents contained in each category is shown in Table2. The total 8637 documents were split into 10 : 4 train-test ratios. As per the ratio, 635 documents were used for training and 254 for testing. Aim behind keeping a large training set was to effectively train the model.Table 2
Distribution of the number of agricultural information documents contained in each category.
CategoryCategory nameDocument number1Plant diseases and insects2602Price quotation27513Analysis of forecast4104Policies and regulations1535Monitoring and early warning8376Rural culture9987Rural tourism9578Practical technology4749Information construction133610Investment promotion461


## 4.2. Experimental Results of Information Classification

The first experiment is the binary classification experiment, and the blue curve in Figure8 shows the loss drop curve for 10 iterations. From the loss drop curve in Figure 8, it is clear that the loss value of the network drops to the lowest point after the 3rd iteration. The misclassification curve does not change much during the training process, and the network model tends to be stable and reaches the convergence state as proceeded. From the experimental results, we can see that the network model has good recognition ability for dichotomous text. The network model has a more satisfactory classification effect when it is dichotomized. The dataset of documents/articles is arranged into group of tens—decile classes for appropriate training and testing. The decile class experiments are conducted for all the agricultural information texts in the training set using the model. The results of the decile class experiments are shown in the red curve in Figure 8. In ten iterations of the text decile class, the loss value still decreases more in the second iteration than the first one, and the loss value gradually becomes smaller as the number of iterations increases. In the text decile class, due to the larger dataset and longer training time of the model, the results of text classification in the decile class are not as obvious as those of the binary classification, the category ability of the classifier for text is not ideal, and the recognition of text in ten categories is not as good as that of the binary classification experimental data.Figure 8
Loss curve of two classifications and ten classifications.To better validate the model classification method, clustering experiments were conducted to analyze the model’s classification accuracy for each category of information. The purpose of the clustering experiment is to gather similar texts together and classify dissimilar texts into different categories, so as to see the distribution of categories in the dataset. The experimental results are shown in Figure9, which shows that those containing more documents are well clustered. However, the category with fewer documents is more likely to be less clustered or left un-clustered. Thus, it is easy to imagine that the difference in the accuracy of the network model in dichotomous and decentralized categories is probably due to the uneven number of documents contained in each category in the dataset.Figure 9
Clustering experiment results.


## 4.3. Information Recommendation Experiment Results

In this section, two publicly available rating datasets are used: MovieLens-100K and MovieLens-1m. Two methods are used for comparison experiments: neural matrix factorization (NeuMF) and NeuMF+. NeuMF is to personalize ranking task with implicit feedback, whereas NeuMF+ is the improved version of the model. In the proposed research work, NeuMF is used for mapping nonlinear interactions between user and embedding items via a multi-layer perceptron (MLP) [25]. NeuMF+ assumes that both user and item potential features obey Gaussian distribution. The distribution of the number of user interactions is given in Table 3.Table 3
User interaction number distribution.
Interactive distributionMovieLens-100K (%)MovieLens-1m (%)<100.05011–2017.837.2621–4026.1521.3441–8022.0922.7481–16022.5823.15161–32013.2616.81321–6402.428.42>64101.69Hit ratio (HR) and normalized discounted cumulative gain (NDCG) [26–28] are the commonly used methods for the assessment of the effectiveness of a recommendation system. In this paper, HR and NDCG are used to evaluate metrics of the model, and equations for the same are given as(7)HR=No.ofhitsNo.ofusers,NDCG=1No.ofusers∑i=1No.ofusers1log2pi+1.HR can be considered as a recall-based evaluation method, which indicates the percentage of successful recommendations, and NDCG is an accuracy-based evaluation method, which is closely related to the position of the test case in the ranking list. The higher the ranking position of the case, the higher will be the value of NDCG. The experimental results are shown in Figure10. Under the evaluation criterion of HR, except for the lower value of HR at d = 64 than at d = 32 on the MovieLens-100K dataset, both MovieLens-100K and MovieLens-1m datasets show an increasing trend, and the larger the dimensionality, the higher the value of HR. Under the NDCG criterion, an increasing trend is shown on the MovieLens-100K and MovieLens-1m datasets, and the increasing trend is more obvious on the MovieLens-100K dataset. In general, when the latent feature dimension is very small, the corresponding model effect is poor, while when the latent feature dimension is very large, the overfitting phenomenon is easy to occur, which increases the computation and the model training time.Figure 10
Influence of potential feature dimensiond on model effect.


## 5. Conclusion

Agriculture elevation is the basis for sustainable development of economy and society. In the entire history of mankind, the common goal pursued by man is to promote agriculture. However, due to the relatively slow construction of agricultural information technology, it directly or indirectly affects the sustainable development of economy. In recent years, with the continuous and rapid development of modern information technology in China, IoT has been widely used in the process of agricultural production. Through the application of IoT, the transformation and upgrading of agricultural informatization are promoted. To further enhance the process of agricultural informatization, this research work proposes a classification and recommendation method. For the agricultural information classification, word separation, feature dimensionality reduction, and vectored representation techniques are studied. The automatic classification of agricultural information using deep learning CNN models is presented, and a recommendation method based on multimodal interaction behavior information is proposed. The method uses CNN to extract potential features of all items from text information, and potential features of user interactions are used as the source data for user feature construction. Finally, a fully connected layer with sigmoid activation function is used to fuse user and item latent features. The experimental results show that the text classification method based on CNN model can effectively classify agricultural information. The findings revealed that performance of the model is better than the traditional method. The information recommendation method combined with multimodal interaction can recommend agricultural information which helps the construction of agricultural informatization.



---

*Source: 7378755-2022-09-15.xml*