A method and system for calculating irrigation amount based on CatBoost
Through the irrigation amount calculation method based on CatBoost, combined with environmental characteristics and crop growth stages, the flexibility and intelligence problems of irrigation amount calculation in the existing technology are solved, and efficient and accurate irrigation amount decision-making is achieved.
Patent Information
- Application Number
- CN202210439424.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-27
- Filing Date
- 2022-04-25
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing technology cannot flexibly calculate irrigation volume under different climatic conditions based on different growth periods of different crops, resulting in low irrigation intelligence level, and complex calculations of existing methods and high data collection costs.
The irrigation amount calculation method based on CatBoost is used to construct an evapotranspiration estimation model by obtaining environmental characteristic data and target data, and calculate the irrigation amount based on the crop growth stage and meteorological factors.
It realizes intelligent irrigation decisions under different growth stages and climate conditions of different crops, improves the accuracy and efficiency of irrigation amount calculation, and reduces computational complexity and data collection costs.
Smart Images

Figure CN114626010B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and system for calculating irrigation amount based on CatBoost. Background Art
[0002] The use of advanced irrigation technology to solve the problem of agricultural irrigation water and the rational and scientific use of water resources are of great significance to increasing crop yields and alleviating the water resource crisis.
[0003] With the development of Internet of Things technology and the in-depth research on agricultural water-saving theory, water and fertilizer irrigation is developing towards precision and intelligence. In the current mainstream irrigation decision-making methods, two irrigation methods are mainly used: irrigation based on soil moisture content or light radiation. The soil moisture content irrigation method mainly sets 80% of the water holding capacity of the soil or matrix as the lower limit of irrigation, and 100% of the water holding capacity of the soil or matrix as the upper limit of irrigation. The light radiation-based irrigation method mainly establishes an irrigation control model based on solar radiation. When the solar radiation accumulates to a certain amount, irrigation is started once, and the irrigation amount is proportional to the light radiation. However, the irrigation amount of crops is affected by meteorological factors such as temperature and average humidity, as well as comprehensive factors such as soil moisture. The existing technology cannot flexibly calculate the irrigation amount according to different climatic conditions in different growth periods of different crops, so that the calculation is not calculated and the parameters are adjusted manually, and the level of intelligence is low.
[0004] In addition, crop evapotranspiration is an important parameter for estimating crop water consumption, formulating irrigation systems, improving water use efficiency and achieving agricultural water conservation. The existing method of using the Penman formula to calculate crop evapotranspiration requires many parameters, high data collection costs and complex calculations. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide an irrigation amount calculation method and system based on CatBoost, which comprehensively considers factors such as crop growth, meteorological factors, greenhouse microclimate, substrate moisture content, etc., and establishes an intelligent and comprehensive irrigation decision-making method. The specific technical solution is as follows:
[0006] In a first aspect of an embodiment of the present invention, a method for calculating irrigation amount based on CatBoost is provided, wherein step S110, an environmental feature data set of a set time step and target data corresponding to the environmental feature data set are obtained; step S120, an evaporation and transpiration estimation model based on CatBoost is constructed according to the environmental feature data set, the target data and the CatBoost algorithm, and the model is deployed in hours and days as the step length respectively; step S130, preset target irrigation parameters are obtained; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode. mode; step S140, obtaining image data of the crop to be irrigated and identifying the growth stage of the crop; step S150, the irrigation period meets the preset irrigation conditions, and according to the cultivation mode, the environmental feature data of the corresponding time step is obtained, and the trained evaporation and transpiration estimation model based on CatBoost is input to calculate the reference evaporation and transpiration of the crop to be irrigated; step S160, according to the reference evaporation and transpiration, the actual evaporation and transpiration is calculated; step S170, according to the growth stage and the actual evaporation and transpiration, the irrigation amount of the crop to be irrigated is calculated; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period. Optionally, before the step S110, constructing a feature set according to the set time step, obtaining the feature data set and the target data corresponding to the feature data set, it also includes: step S100, obtaining historical environmental data, and constructing an environmental training data set according to the set time step; preprocessing the environmental training data set, and constructing an environmental feature data set of the set time step.
[0007] Optionally, the step S120, constructing an evaporation and transpiration estimation model based on CatBoost according to the environmental feature data set, target data and CatBoost algorithm, includes: step S121, dividing the environmental feature data set into a training set, a test set and a validation set; step S122, preprocessing and vectorizing the training set to obtain a feature vector; step S123, preprocessing and vectorizing the target data to obtain a target vector; step S124, training the model according to the feature vector and the target vector to obtain a trained model; step S125, verifying the trained model according to the validation set; step S126, testing the accuracy of the trained model according to the test set; step S127, saving the model.
[0008] Optionally, the step S150, according to the cultivation mode, obtains the environmental characteristic data of the corresponding time step, including: if the cultivation mode is the field soil cultivation mode or the facility soil cultivation mode, then the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one day; if the cultivation mode is the facility soilless cultivation mode, then the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one hour.
[0009] Optionally, the step S160, calculating the actual evapotranspiration according to the reference evapotranspiration, includes: step S161, calculating the cumulative reference evapotranspiration according to the reference evapotranspiration using the following formula:
[0010] ;
[0011] Wherein, in the field soil cultivation mode or the facility soil cultivation mode, ET 0i It represents the daily reference evapotranspiration since the last irrigation period. In the soilless cultivation mode of the facility, ET 0i Indicates the reference evapotranspiration per hour from the last irrigation period; ET0 indicates the cumulative sum of the reference evapotranspiration for several days or hours from the last irrigation to the start of this irrigation, that is, the cumulative reference evapotranspiration; Step S162, identify the growth stage of the crop by image recognition technology, and obtain the crop coefficient according to the crop coefficient database; wherein the crop coefficient database is used to store the crop coefficients of different crops at different growth stages; Step S163, calculate the actual evapotranspiration according to the crop coefficient and the cumulative reference evapotranspiration using the following formula:
[0012] ;
[0013] Among them, E.T. c Indicates the actual evapotranspiration, K c represents crop coefficient, and ET0 represents cumulative reference evapotranspiration.
[0014] Optionally, the step S170, calculating the irrigation amount of the crop to be irrigated according to the growth stage and the actual evapotranspiration, includes: calculating the irrigation amount according to the growth stage and the actual evapotranspiration using the following formula:
[0015] ;
[0016] Where W represents the irrigation volume, S represents the actual production area, and ET c Indicates the actual evapotranspiration, represents the irrigation water utilization coefficient, and R represents precipitation.
[0017] Optionally, after calculating the irrigation amount according to the growth stage and the actual evaporation and transpiration in step S170, the method further includes: obtaining an irrigation amount coefficient of the crop to be irrigated; wherein the irrigation amount coefficient for the first irrigation is 1; adjusting the irrigation amount coefficient according to the growth stage; and adjusting the irrigation amount according to the adjusted irrigation amount coefficient and the irrigation amount in step S183.
[0018] Optionally, the step S182, adjusting the irrigation amount coefficient according to the growth stage, is specifically: according to the growth stage, presetting the drainage ratio; obtaining the actual drainage amount of the crop to be irrigated; calculating the actual drainage ratio according to the actual drainage amount; if the difference between the preset drainage ratio and the actual drainage ratio is greater than a preset threshold, adjusting the irrigation amount coefficient.
[0019] In another aspect of the embodiments of the present invention, there is provided an irrigation amount calculation system based on CatBoost, a data set acquisition module, which constructs a feature set according to a set time step, obtains a feature data set and target data corresponding to the feature data set; a model construction module, which is used to construct an evaporation and transpiration estimation model according to the feature data set, the target data and the CatBoost algorithm, divides the data set into a training set, a test set and a validation set, trains the model according to the training set to obtain the trained model; verifies the trained model according to the validation set, verifies the accuracy of the trained model according to the test set, and saves the models with hour and day steps respectively; a basic parameter setting module, which is used to obtain preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode mode, facility soil cultivation mode and facility soilless cultivation mode; an image recognition module, used to identify the growth stage of the crop based on the image data of the crop to be irrigated; a reference evaporation and transpiration calculation module, used to obtain and save the environmental characteristic data set of the corresponding time step according to the cultivation mode when the irrigation period meets the preset irrigation conditions, call the evaporation and transpiration estimation model of the model construction module, input the environmental characteristic data set, and calculate the reference evaporation and transpiration of the crop to be irrigated; an actual evaporation and transpiration calculation module, used to calculate the cumulative reference evaporation and transpiration according to the time from the last irrigation and the cultivation mode, and then calculate the actual evaporation and transpiration according to the cumulative reference evaporation and transpiration; an irrigation amount calculation module, used to calculate the irrigation amount according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period. Optionally, the data set acquisition module is used to construct a feature set according to a set time step. Before acquiring the feature data set and the target data corresponding to the feature data set, it also includes: a data preprocessing module, which acquires historical environmental data and constructs an environmental training data set according to the set time step; preprocesses the environmental training data set to construct an environmental feature data set with a set time step.
[0020] The present application provides a method and system for calculating irrigation amount based on CatBoost, step S110, obtaining an environmental feature data set of a set time step and target data corresponding to the environmental feature data set; step S120, constructing an evaporation and transpiration estimation model based on CatBoost according to the environmental feature data set, the target data and the CatBoost algorithm, and deploying the model with hours and days as the step length respectively; step S130, obtaining preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode; Step S140, obtain image data of the crop to be irrigated and identify the growth stage of the crop; Step S150, when the irrigation period meets the preset irrigation conditions, obtain the environmental feature data of the corresponding time step according to the cultivation mode, input the trained CatBoost-based evaporation and transpiration estimation model, and calculate the reference evaporation and transpiration of the crop to be irrigated; Step S160, calculate the actual evaporation and transpiration according to the reference evaporation and transpiration; Step S170, calculate the irrigation amount of the crop to be irrigated according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period. Since the CatBoost-based evaporation and transpiration estimation model requires few parameters and has high estimation accuracy, the efficiency and accuracy of the reference evaporation and transpiration calculation are improved; the actual evaporation and transpiration are calculated according to different cultivation modes of the crop; and the irrigation amount is determined under different growth periods and different climatic conditions. The method is simple and easy to implement, and the accuracy of the irrigation amount calculation is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a method for calculating irrigation amount based on CatBoost provided in an embodiment of the present application;
[0023] Figure 2 is a structural diagram of the evaporation and transpiration estimation model based on CatBoost provided in an embodiment of the present application;
[0024] Figure 3 It is a structural schematic diagram of the irrigation quantity calculation system based on CatBoost provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0026] The embodiments of the present application provide an irrigation amount calculation method and system based on CatBoost.
[0027] The irrigation amount calculation method and system based on CatBoost can be integrated into an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC); the server can be a single server or a server cluster composed of multiple servers.
[0028] In some embodiments, the CatBoost-based irrigation quantity calculation method and system can also be integrated into multiple electronic devices. For example, the CatBoost-based irrigation quantity calculation method and system can be integrated into multiple servers, and the CatBoost-based irrigation quantity calculation method of the present application can be implemented by multiple servers.
[0029] It is understandable that the irrigation amount calculation method and system based on CatBoost in this embodiment can be executed on a terminal, on a server, or jointly by a terminal and a server. The above examples should not be construed as limiting the present application.
[0030] Figure 1 A schematic diagram of the process flow of the irrigation amount calculation method based on CatBoost provided in the embodiment of the present application is shown. Please refer to Figure 1 ,The irrigation amount calculation method based on CatBoost includes the following steps:
[0031] Step S110: Acquire an environmental feature data set of a set time step and target data corresponding to the environmental feature data set.
[0032] In one embodiment, the step S110, constructing a feature set according to a set time step, and obtaining a feature data set and target data corresponding to the feature data set, further includes:
[0033] Step S100: Acquire historical environmental data and construct an environmental training data set according to a set time step; preprocess the environmental training data set to construct an environmental feature data set with a set time step.
[0034] Among them, environmental data can be collected and environmental parameters can be collected through temperature sensors, humidity sensors, light radiation sensors, wind speed sensors, and rainfall sensors, and the data can be uploaded to the server using mobile wireless communication technology. At the same time, in order to intuitively feel the real-time environmental status image information of the regional points, USB Camera can also be used to capture environmental images and upload them to the server. The server receives and stores the relevant data to build an environmental feature data set.
[0035] In this embodiment, the environmental parameters may include environmental parameters such as average ambient temperature, average humidity, cumulative solar radiation, wind speed, and rainfall.
[0036] It should be noted that the environmental parameters can be obtained by real-time sampling or equivalent time sampling, which is not specifically limited here.
[0037] Step S120: construct an evaporation and transpiration estimation model based on CatBoost according to the environmental feature data set, target data and CatBoost algorithm, and deploy the model with hours and days as the step size respectively.
[0038] In one embodiment, the specific steps of constructing an evapotranspiration estimation model based on CatBoost may include:
[0039] Step S121, dividing the environmental feature data set into a training set, a test set and a validation set.
[0040] Optionally, the environmental feature dataset may be divided into a training set, a test set, and a validation set in a ratio of 2:1:1.
[0041] Step S122: preprocess and vectorize the training set to obtain a feature vector.
[0042] It should be noted that the preprocessing of the training set may include removing outliers, normalizing the format, etc., which are not specifically limited here.
[0043] Step S123, preprocessing and vectorization processing are performed on the target data to obtain a target vector.
[0044] Step S124: train the model according to the feature vector and the target vector to obtain a trained model.
[0045] Step S125: verify the trained model according to the verification set.
[0046] Step S126: testing the accuracy of the trained model according to the test set.
[0047] Step S127, save the model.
[0048] Among them, CatBoost is a new gradient boosted decision tree (GBDT) algorithm, which uses symmetric trees as weak learners and uses GBDT for classification. Gradient boosting essentially constructs weak learners by performing gradient descent in feature space, and constructs strong learners by iteratively weighted combination of weak learners in a local optimal way. The algorithm flow of the evaporation and transpiration estimation model based on CatBoost will be introduced in detail in the next embodiment, which will not be repeated here.
[0049] Step S130, obtaining preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode.
[0050] In one embodiment, the cultivation mode of the crop to be irrigated is a facility soil cultivation mode or a field soil cultivation mode, and the irrigation period can be preset as multiple fixed time periods, such as 9:00-11:00 a.m. and 2:00-4:00 p.m. every day in winter; 8:00-10:00 a.m. and 3:00-5:00 p.m. every day in summer, which are allowed irrigation periods. If the irrigation is not completed during this period, it can be automatically postponed to the next allowed period to continue irrigation.
[0051] In another embodiment, the cultivation mode of the crops to be irrigated is a facility soilless cultivation mode, and the irrigation period can be preset as multiple fixed time periods, for example, 2 hours after sunrise to noon is stage I, called the full irrigation stage, noon to 2-4 hours before sunset is stage II, called the maintenance stage, and other times are stage III, called the water control stage.
[0052] Step S140: Acquire image data of the crop to be irrigated and identify the growth stage of the crop.
[0053] The image data of the crops to be irrigated may be photos of the crops to be irrigated. For example, the image data of the crops to be irrigated may be photographed by a camera. Alternatively, image acquisition technology may be used to acquire image data of the crops to be irrigated over a large area.
[0054] Among them, AlexNet, VGG or ResNet deep learning models can be used to identify image data according to crop growth. For example, when the flowers of the crops to be irrigated are identified, it is determined that they have entered the flowering period, and when the fruits of the crops to be irrigated are identified, it is determined that they have entered the fruiting period.
[0055] In one embodiment, the growth stage of the above-mentioned crops to be irrigated can be divided into an initial growth period, a middle growth and development period, and a mature period; or can be divided into a period from after planting to before the mature plant period and the mature plant period.
[0056] Step S150, when the irrigation period meets the preset irrigation conditions, according to the cultivation mode, the environmental characteristic data of the corresponding time step is obtained, and the trained evaporation and transpiration estimation model based on CatBoost is input to calculate the reference evaporation and transpiration of the crop to be irrigated.
[0057] Optionally, if the cultivation mode is the field soil cultivation mode or the facility soil cultivation mode, the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one day.
[0058] Optionally, if the cultivation mode is a facility soilless cultivation mode, the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one hour.
[0059] In one embodiment, the preset irrigation condition may be: the cultivation mode of the crop to be irrigated is a field soil cultivation mode or a facility field cultivation mode, and the current time period is in a period allowing irrigation.
[0060] The preset irrigation conditions may also include whether the soil moisture content reaches a threshold and whether the weather is sunny. For example, a soil moisture sensor is used to monitor the change in soil moisture content, and the lower limit of the relative soil moisture content at the beginning of irrigation at different growth stages is set. When the monitoring value reaches the lower limit, an irrigation start command is issued. Weather forecast data from meteorological websites is automatically captured. If the weather is sunny on the day the irrigation start command is issued, the irrigation command is executed. If the weather is cloudy on the day the irrigation start command is issued, the irrigation command is automatically postponed to the next day.
[0061] In yet another embodiment, the preset irrigation condition may be that the cultivation mode of the crop to be irrigated is a facility soilless cultivation mode, and the current period is in an irrigation-permitting period.
[0062] The preset irrigation conditions may also include whether the accumulated solar radiation reaches a threshold value. For example, a solar radiation sensor is used to monitor solar radiation, and an upper limit of the accumulated solar radiation at the start of irrigation at different growth stages is set. When the monitored value reaches the upper limit, an irrigation start command is issued.
[0063] It should be noted that the upper limit of the solar radiation accumulation can be preset to a fixed interval, for example, 80-100 J / cm 2 Lighting and irrigation are performed once, without specific limitation.
[0064] Step S160: Calculate the actual evapotranspiration according to the reference evapotranspiration.
[0065] In one implementation, step S160 specifically includes the following steps:
[0066] Step S161: Calculate the cumulative reference evapotranspiration according to the reference evapotranspiration using the following formula:
[0067] ;
[0068] Wherein, in the field soil cultivation mode or the facility soil cultivation mode, ET 0i It represents the daily reference evapotranspiration since the last irrigation period. In the soilless cultivation mode of the facility, ET 0i It indicates the reference evapotranspiration per hour since the last irrigation. ET0 can indicate the cumulative sum of the reference evapotranspiration for several days or hours from the last irrigation to the start of this irrigation, that is, the cumulative reference evapotranspiration.
[0069] Step S162: Identify the growth stage of the crop by using image recognition technology, and obtain the crop coefficient according to the crop coefficient database; wherein the crop coefficient database is used to store the crop coefficients of different growth stages of crops.
[0070] Among them, the crop coefficient is obtained under specific environmental conditions and crops. Different environmental conditions or crops will cause changes in the crop coefficient.
[0071] Alternatively, under the condition of film mulching irrigation, since there is no soil evaporation, the single crop coefficient method can be used. The single crop coefficient is obtained by querying the standard crop coefficients of 84 crops recommended by FAO-56 (this part should establish a relevant database).
[0072] Alternatively, in field production, a double crop coefficient method can be used. The double crop coefficient can be calculated based on the single crop coefficient according to the following formula:
[0073] ;
[0074] Among them, K s Indicates the water stress coefficient. If it is in a normal production area with irrigation conditions, K s =1; K cb Represents the basic crop coefficient; K e Represents the soil surface evaporation coefficient.
[0075] Alternatively, K can be calculated by the following formula e value:
[0076] ;
[0077] Among them, K cmax It is simplified to K c The upper limit value is K cini , Kcmid , K cend The maximum value in K c Represents the basic crop coefficient, K r represents the soil evaporation attenuation coefficient.
[0078] Alternatively, K can be calculated by the following formula r value:
[0079] ;
[0080] Among them, REW represents the depth of the soil surface that can lose water through evaporation, 100 mm for facility production and 200 mm for field production, D represents the time interval from the last irrigation, and TEW represents the total amount of water that can be evaporated from the soil of the current plot.
[0081] Optionally, TEW is calculated by the following formula:
[0082] ;
[0083] : Field water capacity of the current plot (%); : The wilting coefficient of the current plot (%).
[0084] Step S163: Calculate the actual evapotranspiration according to the crop coefficient and the cumulative reference evapotranspiration using the following formula:
[0085] ;
[0086] Among them, E.T. c Indicates the actual evapotranspiration, K c represents crop coefficient, and ET0 represents cumulative reference evapotranspiration.
[0087] Step S170, calculating the irrigation amount of the crop to be irrigated according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period.
[0088] In one embodiment, the irrigation amount is calculated according to the growth stage and the actual evapotranspiration using the following formula:
[0089] ;
[0090] Where W represents the irrigation volume, S represents the actual production area, and ET c Indicates the actual evapotranspiration, represents the irrigation water utilization coefficient, and R represents precipitation.
[0091] Alternatively, the irrigation water utilization coefficient is calculated using the following formula: value:
[0092] ;
[0093] Among them, IR g Indicates the gross irrigation water consumption; IR n Represents the net effective irrigation water volume; L r Indicates the amount of additional irrigation water.
[0094] It should be noted that precipitation can be directly observed using rain gauges and weather radar technology, or it can be indirectly inferred using satellite remote sensing observation technology, without any specific limitation here.
[0095] In another embodiment, after calculating the irrigation amount according to the growth stage and the actual evapotranspiration in step S170, the following steps may also be included:
[0096] Step S181, obtaining the irrigation coefficient of the crop to be irrigated; wherein the irrigation coefficient of the first irrigation is 1.
[0097] Step S182: adjusting the irrigation coefficient according to the growth stage.
[0098] Optionally, the drainage ratio is preset according to the growth stage.
[0099] The actual drainage volume of the crop to be irrigated is obtained.
[0100] According to the actual liquid discharge volume, an actual liquid discharge ratio is calculated.
[0101] If the difference between the preset drainage ratio and the actual drainage ratio is greater than a preset threshold, the irrigation amount coefficient is adjusted.
[0102] Step S183: adjusting the irrigation amount according to the adjusted irrigation amount coefficient and the irrigation amount.
[0103] Optionally, adjust irrigation amounts using the following formula:
[0104] ;
[0105] in, is to adjust the irrigation amount, W represents the irrigation amount, that is, the water consumption between the last irrigation period and the current period, β is the irrigation amount coefficient, and the irrigation amount coefficient is calculated using the following formula:
[0106] ;
[0107] Among them, RFB0 represents the preset discharge ratio, RFB c Indicates the actual discharge ratio.
[0108] Optionally, according to the growth stage, the drainage ratio is preset; the actual drainage volume of the crop to be irrigated is obtained by using a flow meter, and the drainage ratio (drainage ratio=actual drainage volume / irrigation volume) is calculated according to the monitored irrigation volume; the actual drainage ratio is calculated according to the actual drainage volume; if the difference between the preset drainage ratio and the actual drainage ratio is greater than a preset threshold, the irrigation volume coefficient is adjusted. For example, if the preset threshold is 10%, the preset drainage ratio is 40%, and the actual drainage ratio is 25%, the difference between the preset drainage ratio and the actual drainage ratio is 15%, which is greater than the preset threshold, the irrigation volume coefficient is adjusted.
[0109] Optionally, an irrigation cycle is preset, and the irrigation volume coefficient is adjusted according to the irrigation rate of the current irrigation cycle, the actual drainage volume ratio of the current irrigation cycle and the preset drainage volume ratio.
[0110] Optionally, the actual drainage ratio suitable for crops is affected by weather and growth stage factors. For example, for crops in the mature stage, the actual drainage ratio is 25%-30% on sunny days and 10%-15% on cloudy days.
[0111] The training process of the evaporation and transpiration estimation model based on CatBoost in the embodiment of the present application is described below. The reference evaporation and transpiration of the crops to be irrigated is calculated by the evaporation and transpiration estimation model based on CatBoost in order to reduce the parameters involved in the calculation and improve the estimation accuracy.
[0112] Figure 2 : is a structural diagram of the evaporation and transpiration estimation model based on CatBoost provided in an embodiment of the present application. The algorithm flow of the evaporation and transpiration estimation model based on CatBoost includes the following steps:
[0113] 1. Obtain the historical environmental parameter data of the crop area, divide the historical environmental parameter data into three parts: training set, test set and validation set, as the input data of the evaporation and transpiration estimation model based on CatBoost; use the reference evaporation and transpiration data as the target data of the evaporation and transpiration estimation model based on CatBoost.
[0114] Alternatively, historical environmental parameter data may be selected according to the cultivation mode. For example, if the cultivation mode is a field cultivation mode, data based on daily average temperature, daily average humidity, daily cumulative total radiation, daily wind speed, and rainfall may be selected as model input data; when the cultivation mode is a facility soil cultivation mode, data based on daily average temperature, daily average humidity, and daily cumulative total radiation may be selected as model input data; when the cultivation mode is a facility substrate cultivation mode, data based on hourly average temperature, hourly average humidity, and hourly cumulative radiation may be selected as model input data.
[0115] 2. Preprocess the training set to obtain the feature vector; preprocess the target data to obtain the target vector.
[0116] 3. Based on the feature vector and the target vector, a symmetrical first CART decision tree (classification and regression tree) is constructed.
[0117] 4. According to the feature vector and the target vector, a symmetrical second CART decision tree is constructed using an ordered enhancement mode and a gradient boosting decision tree algorithm.
[0118] 5. Iteratively divide the root nodes of the first CART decision tree and the second CART decision tree according to the Gini index;
[0119] 6. If the Gini index of the feature vector and the target vector in the first CART decision tree and the second CART decision tree is less than a preset threshold, the iteration is stopped to obtain a trained evaporation and transpiration estimation model.
[0120] Optionally, the loss function during model training can be determined by mean square error (MSE).
[0121] Optionally, during the model training process, the depth of the tree, the maximum number of trees, and the number of iterations can be adjusted according to the model evaluation index.
[0122] 7. Input the validation set into the trained CatBoost-based evapotranspiration estimation model to verify the model.
[0123] 8. Input the test set into the trained CatBoost-based evapotranspiration estimation model and output the predicted reference crop evapotranspiration data.
[0124] Optionally, under the condition that the monitored meteorological data is sufficient, the model can be used to test the accuracy of the forecast error of the test set.
[0125] 9. Save the model.
[0126] In one implementation, tensorflow can be used to encapsulate the CatBoost-based evaporation and transpiration estimation model, and the method tf.train.saver.save() therein can be used to save the model, and the saving path of the output data can be specified, for example, the training results can be saved in a local database.
[0127] To implement the above method embodiment, this embodiment also provides an irrigation amount calculation system based on CatBoost. Figure 3The structure diagram of the irrigation amount calculation system based on CatBoost provided in an embodiment of the present application is shown, and the system includes:
[0128] The data set acquisition module 310 constructs a feature set according to a set time step, and acquires a feature data set and target data corresponding to the feature data set;
[0129] The model building module 320 is used to build an evaporation and transpiration estimation model according to the feature data set, the target data and the CatBoost algorithm, divide the data set into a training set, a test set and a validation set, train the model according to the training set to obtain a trained model; verify the trained model according to the validation set, and check the accuracy of the trained model according to the test set, and save the models with hour and day steps respectively;
[0130] The basic parameter setting module 330 is used to obtain preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode;
[0131] An image recognition module 340 is used to identify the growth stage of the crop based on the image data of the crop to be irrigated;
[0132] The reference evapotranspiration calculation module 350 is used to obtain and save the environmental characteristic data set of the corresponding time step according to the cultivation mode when the irrigation period meets the preset irrigation conditions, call the evapotranspiration estimation model of the model construction module, input the environmental characteristic data set, and calculate the reference evapotranspiration of the crop to be irrigated;
[0133] The actual evapotranspiration calculation module 360 is used to calculate the cumulative reference evapotranspiration according to the time from the last irrigation and the cultivation mode, and then calculate the actual evapotranspiration according to the cumulative reference evapotranspiration;
[0134] The irrigation amount calculation module 370 is used to calculate the irrigation amount according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period.
[0135] Optionally, the data set acquisition module is used to construct a feature set according to a set time step, and before acquiring the feature data set and the target data corresponding to the feature data set, further includes:
[0136] The data preprocessing module 300 acquires historical environmental data and constructs an environmental training data set according to a set time step; preprocesses the environmental training data set to construct an environmental feature data set with a set time step.
[0137] In one embodiment, tensorflow can be used in a web server or a fertilizer spreader controller to save the output data of the CatBoost-based evaporation and transpiration estimation model. For example, the model is saved using the tf.train.saver.save() method, and a path for saving the training results is specified. For example, the training results can be saved in a local database.
[0138] Alternatively, the reference evapotranspiration may be calculated by a reference evapotranspiration calculation module 350 in a program on the web or in a controller of the fertilizer spreader.
[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the modules / units / sub-units / components in the above-described device can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0140] In summary, the present application provides a method and system for calculating irrigation amount based on CatBoost, which obtains image data and current environmental parameters of crops to be irrigated; obtains target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crops to be irrigated; according to the image data, the growth stage of the crops to be irrigated is identified; if the cultivation mode and irrigation period meet the preset irrigation conditions, the current environmental parameters are input into the evaporation and transpiration estimation model based on CatBoost to calculate the reference evaporation and transpiration of the crops to be irrigated; according to the reference evaporation and transpiration, the actual evaporation and transpiration is calculated; according to the growth stage and the actual evaporation and transpiration, the irrigation amount is calculated; wherein the irrigation amount is the water consumption of the crops to be irrigated between the last irrigation period and the current period. Since the evaporation and transpiration estimation model based on CatBoost requires few parameters and has high estimation accuracy, the efficiency and accuracy of the reference evaporation and transpiration calculation are improved; the actual evaporation and transpiration is calculated according to different cultivation modes of crops; and the irrigation amount is determined under different growth periods and different climatic conditions. The method is simple and easy to implement, and the accuracy of the irrigation amount calculation is improved.
[0141] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0144] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0145] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0146] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for calculating irrigation amount based on CatBoost, characterized in that: The method comprises: Step S110, obtaining an environmental feature data set of a set time step and target data corresponding to the environmental feature data set; Step S120, constructing a CatBoost-based evapotranspiration estimation model according to the environmental feature data set, the target data, and the CatBoost algorithm, and deploying the model in hours and days as the step length respectively; Step S130, obtaining preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode; Step S140, acquiring image data of the crop to be irrigated and identifying the growth stage of the crop; Step S150: When the irrigation period meets the preset irrigation conditions, the environmental characteristic data of the corresponding time step is obtained according to the cultivation mode, and the trained evapotranspiration estimation model based on CatBoost is input to calculate the reference evapotranspiration of the crop to be irrigated; Step S160, calculating the actual evapotranspiration according to the reference evapotranspiration; Step S170, calculating the irrigation amount of the crop to be irrigated according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period; The step S120, constructing a CatBoost-based evapotranspiration estimation model according to the environmental feature data set, the target data and the CatBoost algorithm, includes: Step S121, dividing the environmental feature data set into a training set, a test set and a validation set; Step S122, preprocessing and vectorizing the training set to obtain a feature vector; Step S123, preprocessing and vectorizing the target data to obtain a target vector; Step S124: training the model according to the feature vector and the target vector to obtain a trained model; Step S125, verifying the trained model according to the verification set; Step S126, testing the accuracy of the trained model according to the test set; Step S127, saving the model; The step S160, calculating the actual evapotranspiration according to the reference evapotranspiration, comprises: Step S161: Calculate the cumulative reference evapotranspiration according to the reference evapotranspiration using the following formula: ; Wherein, in the field soil cultivation mode or the facility soil cultivation mode, ET 0i It represents the daily reference evapotranspiration since the last irrigation period. In the soilless cultivation mode of the facility, ET 0i It indicates the reference evapotranspiration per hour since the last irrigation; ET0 indicates the cumulative sum of the reference evapotranspiration for a number of days or hours from the last irrigation to the start of this irrigation, that is, the cumulative reference evapotranspiration; n Indicates the number of days or hours from the last irrigation to the start of this irrigation; Step S162, identifying the growth stage of the crop by image recognition technology, and obtaining the crop coefficient according to the crop coefficient database; wherein the crop coefficient database is used to store the crop coefficients of different growth stages of crops; Step S163: Calculate the actual evapotranspiration according to the crop coefficient and the cumulative reference evapotranspiration using the following formula: ; Among them, ET c Indicates the actual evapotranspiration, K c represents crop coefficient, ET0 represents cumulative reference evapotranspiration; The step S170, calculating the irrigation amount of the crop to be irrigated according to the growth stage and the actual evaporation and transpiration, comprises: According to the growth stage and the actual evapotranspiration, the irrigation amount is calculated using the following formula: ; Where W represents the irrigation volume, S represents the actual production area, and ET c Indicates the actual evapotranspiration, represents the irrigation water utilization coefficient, and R represents precipitation.
2. The irrigation amount calculation method based on CatBoost according to claim 1, characterized in that: The step S110, constructing a feature set according to the set time step, before acquiring the feature data set and the target data corresponding to the feature data set, further includes: Step S100: Acquire historical environmental data and construct an environmental training data set according to a set time step; preprocess the environmental training data set to construct an environmental feature data set with a set time step.
3. The irrigation amount calculation method based on CatBoost according to claim 1, characterized in that: The step S150, obtaining environmental characteristic data of a corresponding time step according to the cultivation mode, includes: If the cultivation mode is the field soil cultivation mode or the facility soil cultivation mode, the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one day; If the cultivation mode is a facility soilless cultivation mode, the average temperature, average humidity and cumulative solar radiation of the corresponding time step are obtained as the environmental characteristic data set; wherein the time step is one hour.
4. The irrigation amount calculation method based on CatBoost according to claim 1, characterized in that: After the step S170 of calculating the irrigation amount according to the growth stage and the actual evapotranspiration, the method further includes: Step S181, obtaining the irrigation coefficient of the crop to be irrigated; wherein the irrigation coefficient of the first irrigation is 1; Step S182, adjusting the irrigation coefficient according to the growth stage; Step S183: adjusting the irrigation amount according to the adjusted irrigation amount coefficient and the irrigation amount.
5. The irrigation amount calculation method based on CatBoost according to claim 4, characterized in that: The step S182, adjusting the irrigation coefficient according to the growth stage, is specifically: According to the growth stage, the drainage ratio is preset; Obtaining the actual drainage volume of the crop to be irrigated; Calculating an actual discharge ratio according to the actual discharge volume; If the difference between the preset drainage ratio and the actual drainage ratio is greater than a preset threshold, the irrigation amount coefficient is adjusted.
6. A CatBoost-based irrigation amount calculation system, used to implement the CatBoost-based irrigation amount calculation method described in claim 1, characterized in that: The system comprises: The data set acquisition module constructs a feature set according to the set time step, and acquires the feature data set and the target data corresponding to the feature data set; A model building module is used to build an evaporation and transpiration estimation model according to the feature data set, the target data and the CatBoost algorithm, divide the data set into a training set, a test set and a validation set, train the model according to the training set to obtain a trained model; verify the trained model according to the validation set, check the accuracy of the trained model according to the test set, and save the models with hour and day steps respectively; A basic parameter setting module is used to obtain preset target irrigation parameters; the target irrigation parameters include the cultivation mode and irrigation period of the crop to be irrigated; the cultivation mode includes field soil cultivation mode, facility soil cultivation mode and facility soilless cultivation mode; An image recognition module is used to identify the growth stage of the crop based on the image data of the crop to be irrigated; The reference evapotranspiration calculation module is used to obtain and save the environmental characteristic data set of the corresponding time step according to the cultivation mode when the irrigation period meets the preset irrigation conditions, call the evapotranspiration estimation model of the model construction module, input the environmental characteristic data set, and calculate the reference evapotranspiration of the crop to be irrigated; An actual evapotranspiration calculation module is used to calculate the cumulative reference evapotranspiration according to the time from the last irrigation and the cultivation mode, and then calculate the actual evapotranspiration according to the cumulative reference evapotranspiration; The irrigation amount calculation module is used to calculate the irrigation amount according to the growth stage and the actual evaporation and transpiration; wherein the irrigation amount is the water consumption of the crop to be irrigated between the last irrigation period and the current period.
7. The irrigation amount calculation system based on CatBoost according to claim 6, characterized in that: The data set acquisition module is used to construct a feature set according to a set time step, and before acquiring the feature data set and the target data corresponding to the feature data set, it also includes: The data preprocessing module obtains historical environmental data and constructs an environmental training data set according to a set time step; preprocesses the environmental training data set to construct an environmental feature data set with a set time step.
Citation Information
Patent Citations
Control method and control system for automatic irrigation of interplanted crops
CN105868864A
Intelligent irrigation system based on facility crop canopy accumulated temperature
CN109302972A