Intelligent irrigation method for crops
By introducing LoRa P2P communication technology and a variety of machine learning algorithms into the intelligent agricultural greenhouse environmental monitoring system, the shortcomings of existing systems in coverage, data processing and intelligent decision support are solved, and more efficient and accurate irrigation management is achieved, and agricultural production efficiency is improved.
Patent Information
- Application Number
- CN202510155723.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing intelligent agricultural greenhouse environmental monitoring system has shortcomings in coverage, data processing capacity, data volume and intelligent decision-making support, and it is difficult to meet the needs of large-scale farms and improve agricultural production efficiency.
LoRa P2P communication technology is used for long-distance IoT data transmission, combined with a variety of machine learning algorithms (such as linear SVR, support vector classification, decision trees and random forests) for data preprocessing and model training, and final prediction is made through stacked generalization and extreme gradient enhancement metamodels, generating automatic adjustment of irrigation strategies and controlling the irrigation time of the water valve through network management.
The coverage of the system has been expanded, data processing and analysis capabilities have been improved, the accuracy and stability of irrigation prediction have been enhanced, manual intervention has been reduced, costs have been reduced, and agricultural production efficiency has been improved.
Smart Images

Figure CN119629204A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of intelligent irrigation, and in particular relates to an intelligent irrigation method for crops. Background Art
[0002] In agricultural irrigation decision-making, many decisions are still highly dependent on farmers' experience, which is difficult to quantify with simple numerical values, resulting in insufficient scientificity and accuracy in irrigation decisions.
[0003] Currently, the agricultural Internet of Things can collect real-time environmental data in farmland or greenhouses, such as soil moisture, air temperature, light intensity, etc., by deploying various sensors (such as temperature sensors, humidity sensors, light sensors, etc.) and monitoring equipment. These data can help farmers understand the growth status of crops in a timely manner, so as to carry out precise management and regulation and improve agricultural production efficiency. For example, the intelligent agricultural greenhouse environment monitoring system based on the Internet of Things technology is a system built with ZigBee technology, which has the following shortcomings: 1. ZigBee coverage limitation: As a short-range wireless communication technology, ZigBee’s effective communication range is usually limited to less than 100 meters. This means that in a large farm or when multiple greenhouses need to be monitored, ZigBee may not meet the needs of long-distance data transmission. As the size of the farm increases, it will become impractical and costly to deploy a sufficient number of ZigBee base stations to maintain full coverage.
[0004] 2. Limited data processing capabilities: Although many smart agricultural greenhouse environmental monitoring systems can collect a large amount of environmental data in real time, they are unable to process the data. This may be because the system lacks powerful data processing algorithms or hardware support, and cannot perform real-time and effective analysis of the collected data.
[0005] 3. Insufficient data: Since environmental monitoring systems often only focus on a few key environmental parameters, such as temperature, humidity, and light, the amount of data collected is limited. In addition, the system's acquisition frequency and storage capacity may also limit the amount of data accumulated. This limits the application of machine learning algorithms in agricultural greenhouse environmental monitoring systems. Machine learning algorithms require a large amount of data to train models to improve the accuracy of predictions and decisions. Insufficient data may lead to insufficient model training and failure to achieve the desired effect.
[0006] 4. Lack of intelligent decision support: Since data cannot be processed automatically, the system cannot provide intelligent decision support for farmers or managers based on the collected data. For example, the system cannot automatically calculate the optimal amount of irrigation, fertilization or ventilation based on current data such as soil moisture, air temperature, and light intensity. Summary of the invention
[0007] In view of the current status and shortcomings of the above-mentioned prior art, an object of the present invention is to provide an intelligent irrigation method for crops.
[0008] An intelligent irrigation method for crops comprises the following steps: Step S1: Hardware deployment, the hardware includes slave nodes, gateways, a control center, a database, and an API server; the API server has a built-in data identification and processor and an API service processor; Step S2: Data collection and transmission: The gateway receives data from the node, decodes and transmits it, and sends the data to the data identification and processor for preliminary processing through the MQTT Broker. The processed data is stored in the database; Step S3, data preprocessing; Step S4, model training phase: use four basic algorithms, namely linear support vector regression, support vector classification, decision tree and random forest, to train the model; Step S5, stacked generalization stage: extreme gradient boosting is used as a meta-model to integrate the prediction results of each model in the first stage to obtain the final prediction result; Step S6, final prediction stage: use the trained meta-model to make a final prediction on the test set, generate an automatic adjustment irrigation strategy, and control the irrigation time of the water valve through the network management.
[0009] Further, the slave nodes are sensors, water valves and sensor hubs deployed in the farm; the sensors include soil temperature and humidity sensors, air temperature and humidity sensors and light intensity sensors; The slave node realizes bidirectional data transmission with the gateway through LoRa P2P communication technology; The gateway sends data to the API server through the MQTT Broker; and the gateway realizes two-way data transmission with the control center through the MQTT Broker, receives instructions from the control center, and passes the instructions to the corresponding slave nodes; The API service processor realizes two-way data transmission with the control center through MQTT Broker; and the API service processor has two-way transmission with the user end and the database. It is responsible for receiving and processing API requests from the user end, calling the control center and the database, and returning the processing results; The control center has a built-in rule engine that makes decisions based on preset rules.
[0010] Further, in step S3, historical environmental data, weather data and past irrigation control records are extracted from the database; the data is cleaned; average data and real-time data are calculated as model input features; the average data is the average data of each day calculated from the original data; the real-time data is the average value of the data collected between 7:30 and 8:30.
[0011] Further, step S4 includes: Step S401, select algorithm: Choose from four algorithms: linear support vector regression, support vector classification, decision tree, and random forest; Step S402, data set division: Divide the data set into training set, test set and validation set; The training set is further divided into three subsets; each subset contains a portion of the training data and is used to train three different models of the same algorithm; Step S403, training model: For each algorithm, three different models were trained using the three subsets.
[0012] Further, step S5 comprises: Step S501, generate metadata: Use the four trained algorithms to predict the test set; for each algorithm, three prediction results will be obtained; Step S502, integrating prediction results: The prediction results of these four algorithms are used as new features and combined into a new dataset; this new dataset is used to train the meta-model; Step S503: Select a meta-model: Select Extreme Gradient Boosting as the meta-model; Step S504: training the meta-model: The meta-model is trained using a new dataset containing the prediction results of the four algorithms.
[0013] This solution has the following advantages: 1. Long-distance IoT technology: Introduce long-distance IoT technologies such as LoRa P2P to expand the system coverage and meet the needs of large-scale farms.
[0014] 2. Use Internet of Things technology to realize automatic data collection, monitoring and remote control, reduce labor costs and improve agricultural production efficiency.
[0015] 3. Combining the advantages of multiple machine learning models, it combines multiple algorithms such as linear SVR, support vector classification, decision tree and random forest. Through the complementary advantages of different algorithms, the generalization ability and accuracy of the model are improved. Improve the accuracy and stability of irrigation prediction.
[0016] 4. Automated irrigation control systems reduce farmers’ manual intervention and reduce manpower requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a hardware deployment diagram of the present invention; Figure 2 This is a hardware deployment diagram of an organic vegetable farm; Figure 3 This is the integrated learning flow chart of this program. DETAILED DESCRIPTION
[0018] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0019] Explanation of terms.
[0020] LoRa (Long Range) is a low-power wide area network (LPWAN) wireless communication technology developed by Cycleo in France and owned by Semtech. It is capable of wireless communication over long distances and is suitable for application scenarios that require coverage of a wide area and small amounts of data. LoRa technology has the advantages of long distance, low power consumption and low cost, making it very suitable for data collection and monitoring in agricultural IoT systems.
[0021] LoRaWAN is a wide area network protocol based on LoRa technology, defined and maintained by the LoRa Alliance. It uses a star topology and supports multiple device types and communication modes, such as two-way communication, downlink receiving window, etc. LoRaWAN is suitable for various low-power, long-distance IoT applications, such as smart cities, smart agriculture, etc.
[0022] LoRa P2P (Peer-to-Peer) is a point-to-point communication protocol based on LoRa technology. It uses time division multiple access (TDMA) technology to achieve data transmission between multiple devices by allocating different time slots. LoRa P2P has the characteristics of good real-time performance and low latency, and is suitable for scenarios that require instant data transmission and control, such as automatic irrigation control in agricultural IoT systems.
[0023] An intelligent irrigation method for crops comprises the following steps: Step S1: Hardware deployment, the hardware includes slave nodes, gateways, control centers, databases, and API servers; The slave nodes are sensors, water valves and sensor hubs deployed in the farm.
[0024] Sensors, including soil temperature and humidity sensors, air temperature and humidity sensors, and light intensity sensors. Sensors, collect environmental and weather data from the farm, including air temperature, air humidity, light intensity, soil temperature, soil moisture, and conductivity.
[0025] Water Valve: A switch used to control the flow of water.
[0026] Sensor Hub: Collects sensor data and transmits it to the gateway.
[0027] The slave node realizes bidirectional data transmission with the gateway through the LoRa P2P communication technology.
[0028] The gateway sends data to the API server through MQTT Broker. Moreover, the gateway realizes two-way data transmission with the control center through MQTT Broker, receives instructions from the control center, and passes the instructions to the corresponding slave nodes. The gateway is responsible for data collection, decoding and transmission. In this solution, the gateway uses Raspberry Pi 3.
[0029] The API server provides API services for websites and mobile applications to call to achieve interaction between users and the system. The API server has built-in data identification and processors and API service processors.
[0030] The data identification and processor pre-processes the data and transmits it to the database. The database stores all the data in the system for query and use by the API server and other components.
[0031] The API service processor realizes two-way data transmission with the control center through MQTT Broker; and the API service processor has two-way transmission with the user end and the database. It is responsible for receiving and processing API requests from the user end, calling the control center and the database, and returning the processing results.
[0032] The control center has a built-in rule engine that makes decisions based on preset rules.
[0033] Step S2: Data collection and transmission.
[0034] The gateway receives data from the slave node, decodes and transmits it, and sends the data to the data identification and processor through the MQTT Broker for preliminary processing. The processed data is stored in the database.
[0035] For example, we take a cooperative organic vegetable farm as an example to collect actual data and verify it. Figure 2As shown in the figure, the entire farm consists of thirteen greenhouses, one of which is a nursery (the unmarked rectangular box in the figure), and the others are all crop rotation (B1~B5, C1~C7). Seven sensor hubs are set up to collect land data from the twelve greenhouses, and a sensor hub between the B1 and B2 greenhouses also collects local weather data. These sensor hubs support LoRa point-to-point communication and transmit the collected data to a nearby gateway. The water valve also supports LoRa point-to-point communication so that farmers can easily irrigate through the water valve corresponding to each greenhouse.
[0036] This system collects comprehensive weather data and land data through the sensor hub to support precision agriculture decision-making. In terms of weather data, the system monitors air temperature (in degrees Celsius), air humidity (in relative humidity percentage) and light intensity (in lux) in real time. Among them, the air humidity index is particularly important. When the humidity reaches 100%, it usually indicates the occurrence of rainfall. According to long-term agricultural practice experience, weather factors play a dominant role in the decision-making of irrigation water. Compared with regional weather data provided by other open source databases, local real-time weather data is more representative and accurate.
[0037] In terms of land data, the system also closely monitors soil temperature (in degrees Celsius), soil moisture (in relative percentage), and soil conductivity (in micro-Siemens per centimeter). To ensure the comprehensiveness and accuracy of the data, each greenhouse is equipped with two soil sensors, installed at the front and end of the greenhouse. In the arrangement of sensors, we strive to maintain consistency in position between different greenhouses to minimize data deviations caused by position differences. At the same time, we average the data of the two sensors to effectively eliminate human errors. In addition, we pay more attention to the trend of data changes rather than a single data point. This approach helps to ensure the consistency and reliability of data and provide stronger support for agricultural decision-making.
[0038] In this solution, the water valve collects data on irrigation time and watering amount. The valve returns the accumulated water consumption every two hours. The unit is milliliters. Therefore, the watering amount can be easily calculated in the background.
[0039] Step S3: data preprocessing.
[0040] Sensor data often become inconsistent due to various agricultural activities. To eliminate the bias of raw data caused by different placements or human movement, the model is trained with preprocessed data.
[0041] Extract historical environmental data, weather data, and past irrigation control records from the database.
[0042] Clean the data to remove outliers, missing values, etc. to ensure the accuracy and consistency of the data.
[0043] Calculate average data and real-time data as model input features.
[0044] The preprocessed data includes: Average data: Calculate the average data for each day from the raw data. The average data can clearly show the state of the weather and land.
[0045] Real-time data: It is not real-time raw data. According to farmers’ habits, farmers usually irrigate between 8:00 and 8:30. Therefore, real-time data is the average of data collected between 7:30 and 8:30.
[0046] Table 1 is the irrigation parameter table
[0047] Soil moisture content is determined based on soil temperature. There are two reasons why soil temperature is chosen instead of soil moisture: one is that the soil temperature value in the greenhouse is much higher than normal, so the soil temperature value has a greater impact on the moisture content; the other is that the sprinklers are unevenly distributed under the irrigation conditions in the greenhouse. Not only are the humidity measurements different in each greenhouse, but even the humidity measurements in the same greenhouse are different.
[0048] Step S4: model training phase.
[0049] Machine learning is used to predict the amount of water needed for daily irrigation of organic crops. Due to the difficulty of collecting large amounts of data, the total amount of data is not enough to train a strong model. This solution uses ensemble learning to integrate multiple weak classifiers into a strong classifier. The overall model is trained through stacked generalization and adaptive enhancement, including a two-stage training process. The first stage contains four basic algorithms, while the second stage integrates the prediction results of the first stage. Finally, the predictive irrigation model is embedded in the agricultural IoT system, and users can obtain the results through a mobile application.
[0050] Step S401, select algorithm: Four algorithms were selected: linear support vector regression (SVR), support vector classification (SVC), decision tree (DT), and random forest (RF).
[0051] Step S402, data set division: The data set is divided into training set, test set and validation set.
[0052] The training set is further divided into three subsets (Subset 1, Subset 2, Subset 3); each subset contains a part of the training data and is used to train three different models of the same algorithm.
[0053] Step S403, training model: For each algorithm, three different models were trained using the three subsets.
[0054] For example, for linear support vector regression, model Model 1 using subset Subset 1, model Model 2 using subset Subset 2, and model Model 3 using subset Subset 3 are trained.
[0055] Similarly, the same training process is performed for Support Vector Classification (SVC), Decision Tree (DT) and Random Forest (RF).
[0056] Step S5, stacked generalization stage: extreme gradient boosting is used as the meta-model to integrate the prediction results of each model in the first stage to obtain the final prediction result.
[0057] Step S501, generate metadata: Use the four trained algorithms (each with three models) to make predictions on the test set.
[0058] Thus, for each algorithm, three prediction results are obtained.
[0059] Step S502, integrating prediction results: The prediction results of these four algorithms are used as new features and combined into a new dataset.
[0060] This new dataset is used to train the meta-model.
[0061] Step S503: Select a meta-model: Extreme Gradient Boosting (XGBoost) was selected as the meta-model.
[0062] XGBoost is an efficient gradient boosting algorithm that can handle large-scale data well and has excellent performance.
[0063] Step S504: training the meta-model: Train the XGBoost meta-model using a new dataset containing predictions from the four algorithms.
[0064] The meta-model learns how to combine the predictions of these four algorithms to produce a more accurate final prediction.
[0065] Step S6, final prediction stage.
[0066] Step S601, generate the final prediction: The trained XGBoost metamodel is used to make final predictions on the test set, generate an automatic adjustment irrigation strategy, and control the irrigation time of the water valve through the network management.
[0067] This prediction result combines the advantages of four algorithms (each algorithm has three models) and therefore has higher accuracy.
[0068] Step S602, evaluating model performance: Use the validation set to verify the model and evaluate the prediction accuracy and stability of the model; use evaluation indicators (such as mean square error, accuracy, etc.) to evaluate the performance of the final prediction results. According to the evaluation results, adjust and optimize the model to improve the prediction accuracy.
[0069] Example, yes Figure 2 The model was trained on all twelve greenhouses in the study, with a mean absolute error of about 15. The results predicted by the two models were classified into five common categories, with irrigation time of 60, 90, 100, 120 and 150 seconds respectively.
[0070] According to farmers, slightly higher irrigation has less impact than less irrigation. Therefore, the classification criteria are based on the higher value. For example, a value of 40 seconds is classified as 60 seconds and a value of 110 seconds is classified as 120 seconds.
[0071] Table 2 is a summary table of statistical indicators
[0072] It can be seen that the root mean square error (RMSE) is about 20 seconds, which can meet the irrigation needs of large-scale farms.
[0073] This solution preprocessed the data, trained three different models of four algorithms, integrated the advantages of the algorithms using the stacked generalization method, and used XGBoost as a mixer. Finally, the prediction results of thirteen models (three models of each of the four algorithms plus one XGBoost meta-model) were obtained. This process fully utilized the advantages of multiple algorithms and improved the accuracy and stability of the prediction.
[0074] Figure 3 This is the integrated learning flowchart of this solution, which uses multiple machine learning algorithms to predict the results and finally makes the final prediction through the meta-model (XGBoost).
[0075] Figure 3 In the data set, this is the input part of the whole system. All algorithms start learning from the same data set. Four basic algorithms: Algorithm 1 (Linear SVR): Linear support vector regression, used to generate prediction 1; Algorithm 2 (SVC): Support Vector Classification, used to generate prediction 2; Algorithm 3 (AdaBoost DT): AdaBoost ensemble decision trees for generating prediction 3; Algorithm 4 (Random Forest): Random Forest, used to generate prediction 4; Prediction output: Each basic algorithm generates an independent prediction result; Metamodel: The metamodel receives the prediction results of all basic algorithms, synthesizes them through the XGBoost algorithm, and generates the final prediction results.
[0076] This solution improves the accuracy of predictions by combining the prediction results of multiple models. In this process, four different algorithms generate independent predictions, which are then input into a meta-model. The meta-model is further optimized and comprehensively analyzed by the XGBoost algorithm to ultimately generate a more accurate and reliable prediction result. This approach can effectively utilize the advantages of different algorithms, reduce the limitations of a single model, and thus improve the performance of the overall model.
[0077] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and inventive concept of the present invention, and all these changes or substitutions should fall within the protection scope of the claims attached to the present invention.
Claims
1. An intelligent irrigation method for crops, characterized in that: The following steps are involved: Step S1: Hardware deployment, the hardware includes slave nodes, gateways, a control center, a database, and an API server; the API server has a built-in data identification and processor and an API service processor; Step S2: Data collection and transmission: The gateway receives data from the node, decodes and transmits it, and sends the data to the data identification and processor for preliminary processing through the MQTT Broker. The processed data is stored in the database; Step S3, data preprocessing; Step S4, model training phase: use four basic algorithms, namely linear support vector regression, support vector classification, decision tree and random forest, to train the model; Step S5, stacked generalization stage: extreme gradient boosting is used as a meta-model to integrate the prediction results of each model in the first stage to obtain the final prediction result; Step S6, final prediction stage: use the trained meta-model to make a final prediction on the test set, generate an automatic adjustment irrigation strategy, and control the irrigation time of the water valve through the network management.
2. The intelligent irrigation method for crops according to claim 1, characterized in that: The slave nodes are sensors, water valves and sensor hubs deployed in the farm; the sensors include soil temperature and humidity sensors, air temperature and humidity sensors and light intensity sensors; The slave node realizes bidirectional data transmission with the gateway through LoRa P2P communication technology; The gateway sends data to the API server through the MQTT Broker; and the gateway realizes two-way data transmission with the control center through the MQTT Broker, receives instructions from the control center, and passes the instructions to the corresponding slave nodes; The API service processor realizes two-way data transmission with the control center through MQTT Broker; and the API service processor has two-way transmission with the user end and the database. It is responsible for receiving and processing API requests from the user end, calling the control center and the database, and returning the processing results; The control center has a built-in rule engine that makes decisions based on preset rules.
3. The intelligent irrigation method for crops according to claim 1, characterized in that: In step S3, historical environmental data, weather data and past irrigation control records are extracted from the database; the data is cleaned; average data and real-time data are calculated as model input features; Average data is calculated from the raw data for each day; The real-time data is the average of the data collected between 7:30 and 8:
30.
4. The intelligent irrigation method for crops according to claim 3, characterized in that: Step S4 comprises: Step S401, select algorithm: Choose from four algorithms: linear support vector regression, support vector classification, decision tree, and random forest; Step S402, data set division: Divide the data set into training set, test set and validation set; The training set is further divided into three subsets; each subset contains a portion of the training data and is used to train three different models of the same algorithm; Step S403, training model: For each algorithm, three different models were trained using the three subsets.
5. The intelligent irrigation method for crops according to claim 4, characterized in that: Step S5 comprises: Step S501, generate metadata: Use the four trained algorithms to predict the test set; for each algorithm, three prediction results will be obtained; Step S502, integrating prediction results: The prediction results of these four algorithms are used as new features and combined into a new dataset; this new dataset is used to train the meta-model; Step S503: Select a meta-model: Select Extreme Gradient Boosting as the meta-model; Step S504: training the meta-model: The meta-model is trained using a new dataset containing the prediction results of the four algorithms.
Citation Information
Patent Citations
Blueberry yield prediction method based on machine learning
CN112906298A
Irrigation decision-making method and device based on Internet of Things
CN116011331A
Vegetable dry matter yield estimation method based on crop model and machine learning model
CN118036797A
Method and device for determining water demand of crops in irrigated area
CN118469093A
Intelligent irrigation decision-making method and system based on artificial intelligence algorithm
CN119026932A