Water and fertilizer decision precision irrigation method and device

CN119032714BActive Publication Date: 2026-06-23YANGTZE UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANGTZE UNIVERSITY
Filing Date
2024-08-06
Publication Date
2026-06-23

Smart Images

  • Figure CN119032714B_ABST
    Figure CN119032714B_ABST
Patent Text Reader

Abstract

The present application relates to an irrigation method and device, in particular to a water and fertilizer decision precision irrigation method and device. The method applies the improved African vulture optimization algorithm to the super parameter adjustment of the XGBoost model, can well find the super parameter with the minimum loss value, and improves the model prediction accuracy. Using the model is beneficial to the reasonable allocation of water resources and fertilizer resources, according to the local irrigation reserve water volume, integrates the full irrigation and non-full irrigation mode, greatly saves water resources and reduces the fertilizer usage under the premise of meeting the crop growth demand. Save irrigation water, improve the utilization rate of fertilizer and the utilization rate of crops to fertilizer. The method solves the problem of resource waste caused by the existing method and is not conducive to crop growth.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to an irrigation method and device, in particular to a water and fertilizer decision-making precision irrigation method and device. BACKGROUND

[0002] China is a country with a shortage of water resources per capita, and is one of the 13 water-poor countries listed by the United Nations. Under the background of global warming, the surface temperature is rising year by year, and the precipitation pattern is also changing, making the water resource shortage problem in China more serious. China is a large agricultural country, and a large amount of water resources is used for agricultural irrigation every year. China's agricultural irrigation is mainly artificial irrigation, and most of it is based on experience and uses flood irrigation, which is not appropriate for controlling irrigation water. This experience-dependent irrigation will cause waste of water resources to some extent, and has a certain impact on crop growth.

[0003] In addition, there is no accurate and reasonable model for fertilizer decision-making, and most of them are based on fertilizer effect method, which is a comprehensive analysis of the data between fertilizer amount and yield by regression to solve the fertilizer amount under the maximum yield. Compared with the actual fertilizer amount in 2012-2022 and the national recommended fertilizer amount, the nitrogen, phosphorus and potassium fertilizer amount in each wheat area has generally decreased, but there are still some unreasonable use of nitrogen, phosphorus and potassium fertilizer in some areas or by farmers. Compared with the experience of farmers, this method can improve the utilization rate of fertilizer to some extent, but it still cannot accurately calculate the fertilizer application amount, which will affect crop growth if it is too little, and will cause waste and soil pollution if it is too much.

[0004] Therefore, it is necessary to design a water and fertilizer decision-making precision irrigation method and device to solve the above problems. SUMMARY

[0005] The purpose of the present application is to provide a water and fertilizer decision-making precision irrigation method and device that can guarantee the growth needs of crops and effectively reduce resource waste.

[0006] The technical scheme of the present application is:

[0007] A water and fertilizer decision-making precision irrigation method, characterized in that it comprises the following steps:

[0008] 1) optimizing the XGBoost model by the improved African vulture optimization algorithm;

[0009] 2) calculating the daily fertilizer amount and irrigation amount based on the optimized XGBoost model;

[0010] 3) controlling the water and fertilizer decision-making precision irrigation device to accurately fertilize and irrigate according to the calculated daily fertilizer amount and irrigation amount.

[0011] The optimization process in step 1) specifically includes the following steps:

[0012] S1. Standardize the dataset (irrigation water data comes from the National Meteorological Science Data Center, and fertilizer application data comes from the National Agricultural Science Data Center), and divide the dataset into training and testing sets in an 8:2 ratio.

[0013] S2. Determine the hyperparameters that need to be tuned in the XGBoost model;

[0014] S3. Set the parameters in the improved African vulture optimization algorithm: epoch = 30 iterations, pop_size = 30 population size, probability of updating using the first formula during the exploration phase p1 = 0.6, probability of updating using the first formula during the first development phase p2 = 0.4, probability of updating using the first formula during the second development phase p3 = 0.6, probability of the population moving to the first group of optimal vultures L = 0.8, and parameter w = 2.5 controlling the rate of change in vulture hunger. Train the XGBoost model using the training set data, defining the fitness function as the mean absolute percentage error of the 10-fold cross-validation on the training set.

[0015] S4. Calculate the fitness value and find the optimal parameters using the improved African vulture optimization algorithm; S5. Substitute the found optimal solution into the XGBoost model to obtain the optimal prediction model IAVOA-XGBoost;

[0016] The specific process of improving the XGBoost machine learning model optimized by the African vulture optimization algorithm in step S3 is as follows:

[0017] S21. Initialize the vulture position using the SPM chaotic sequence, where the vulture position is used to characterize a solution containing all hyperparameters in XGBoost;

[0018] S22. Calculate the fitness value of the vulture individuals after initialization, select the best solution as the best vulture in the first group, select the second best solution as the best vulture in the second group, and move all vultures to the two best vultures. The best vulture will be recalculated in each generation. The fitness value is used to characterize the mean absolute percentage error of the XGBoost model ten-fold cross-validation corresponding to a vulture position.

[0019] S23. Calculate the hunger level of vultures, update the hunger level of vultures according to the number of population iterations, and use a non-linear transformation strategy to make the hunger level change non-linearly with the number of iterations.

[0020] S24. Different search strategies are used based on the hunger level of each vulture. When the hunger level is greater than 1, the exploration phase begins; if the hunger level is less than 1, the development phase begins. Specifically, when the hunger level is between 0.5 and 1, the first stage of the development phase begins; when the hunger level is less than 0.5, the second stage of the development phase begins. In this stage, the vulture position is updated using a weighted time-varying strategy. At the same time, an adaptive t-distribution mutation perturbation is added to improve the algorithm's global search capability and its ability to escape local optima. The position is updated in each stage using the vulture position update formula.

[0021] S25. Determine whether the current iteration number is greater than or equal to the preset maximum iteration number. If yes, end the solution and output the position and fitness value of the current best vulture, which are the hyperparameters of the XGBoost model and the loss value of model training; otherwise, return to step S22 and continue the solution.

[0022] The SPM chaotic sequence in step S21 is specifically as follows:

[0023] ;

[0024] Where mod is the modulo function; when η∈(0,1) and μ∈(0,1), the system is in a chaotic state, η=0.4 and μ=0.3; r is the disturbance parameter of the chaotic system between 0 and 1; x(i) and x(i+1) are the i-th and i+1-th chaotic individuals, respectively.

[0025] The specific process for initializing the vulture position is as follows: N chaotic individuals within the [0,1] interval are generated based on the SPM chaotic sequence, and then the chaotic individuals are transformed into the entire search space:

[0026] 0 <x(i)<1,i=1,2,…,N

[0027] Where P(i) is the position of an individual in the population after the chaotic mapping; lb and ub are the lower and upper boundaries of the population, respectively; and x(i) is the chaotic mapping value.

[0028] The nonlinear transformation strategy in step S23 is specifically as follows:

[0029] ;

[0030] ;

[0031] Where F is the vulture's hunger level; rand1 is a random number between 0 and 1; z ∈ (-1, 1) is a random value; t is the perturbation term of the hunger level F; h ∈ (-2, 2) is a random value; w is a parameter controlling the rate at which the vulture's hunger level changes; iter i`maxiter` represents the current iteration count of the vulture; `maxiter` represents the initially set maximum iteration count for the vulture.

[0032] The exploration phase in step S24 specifically includes:

[0033] ;

[0034] ;

[0035] ;

[0036] ;

[0037] Where P(i+1) is the vulture's position vector in the next iteration; P(i) is the vulture's current position vector; R(i) is one of the best vultures selected in the current iteration; D(i) is the random distance to one of the two best vultures; rand P1 rand1, rand2, and rand3 are all random numbers between 0 and 1; X is the coefficient vector for adding random movement, calculated by X = 2 × rand, where rand is a random number between 0 and 1; lb and ub are the lower and upper boundaries of the population, respectively; BestVulture1(i) and BestVulture2(i) are the best and second-best vulture positions in the i-th generation; L is the preset probability of the population moving towards the first group of best vultures; p i F represents the probability that the population will move towards the first optimal group of vultures. i Let be the fitness of the i-th vulture.

[0038] The first stage of the development phase in step S24 is specifically as follows:

[0039] ;

[0040] ;

[0041] ;

[0042] ;

[0043] Where d(t) is the distance between the current vulture and one of the two best vulture groups; rand5, rand6, and rand P2 P1 is a random number between 0 and 1; P2 is the probability of updating the position using the first formula in the first stage of development; S1 and S2 are the two spiral position update formulas for the vulture.

[0044] The development of the second stage and weighted time-varying strategy in step S24 specifically involves:

[0045] ;

[0046] ;

[0047] ;

[0048] ;

[0049] Where P3 represents the probability of updating the position using the first formula in the first phase of development; rand P3 A random number between 0 and 1; γ a γ b The values ​​represent the influence weights of the best and second-best vultures; A1 and A2 are the position update formulas affected by the best and second-best vultures.

[0050] As the number of iterations increases, the influence weight of the optimal vulture gradually increases, and the update of the vulture position in the later stage of development depends more on the optimal vulture position.

[0051] The development of the second stage and adaptive t-distribution variation perturbation in step S24 is specifically as follows:

[0052] ;

[0053] ;

[0054] ;

[0055] ;

[0056] Where L is the preset probability that the population will move to the first group of optimal vultures; t(iter) is the t-distribution perturbation value; For the second type of Euler integral; n is the degree of freedom parameter, a factor for adjusting the t distribution; t1 is the minimum value of n, t2 is the maximum value of n, t1=0.1, t2=1; Levy(d) is the Wright flight formula; d is the problem dimension; u and v are random numbers between 0 and 1; β is a fixed value of 1.5; σ is calculated from the above formula.

[0057] When n=1, the t-distribution becomes a Cauchy distribution; when n→∞, the t-distribution becomes a Gaussian distribution, so that the degree of freedom parameter n gradually approaches the Gaussian distribution as the number of iterations increases, increasing the diversity and global search capability of the algorithm, thereby improving the convergence speed and the ability to escape local optima.

[0058] The model training and calculation process is as follows: Local irrigation water availability is categorized into sufficient irrigation and insufficient irrigation. Under sufficient irrigation conditions, a prediction model is trained based on local temperature, humidity, wind speed, effective sunshine duration, and reference crop evapotranspiration ET0. Temperature, humidity, and wind speed are obtained using integrated temperature and humidity sensors and wind speed sensors, while effective sunshine duration is obtained from the China Meteorological Administration website. This model is then used to predict the reference crop evapotranspiration ET0 at each crop stage and convert it into daily irrigation time. Under insufficient irrigation conditions, with the goal of maximizing net income and actual yield, irrigation water usage at each crop stage is used as a variable. Under the constraint of irrigation water usage at each crop growth stage, the model automatically finds the optimal irrigation water allocation for the crop, averages it to each day, and converts it into daily irrigation time.

[0059] Based on soil available nitrogen content (mg / kg), available phosphorus content (mg / kg), available potassium content (mg / kg), and yield (kg / ha), a fertilization prediction model is trained. This model is then used to predict the total amount of nitrogen (kgN / ha), phosphorus (kgP2O5 / ha), and potassium (kgK2O / ha) required by the crop. Different amounts of fertilizer are allocated at different stages of crop growth according to the crop's needs. At the same time, the fertilizer is diluted to a ratio suitable for crop growth according to the crop variety. Finally, the irrigation time is converted into the opening and closing times of solenoid valves and pumps, and fertilization is carried out at the corresponding times.

[0060] A precision irrigation device for water and fertilizer decision-making, comprising a mobile support, a water and fertilizer machine, and a remote control device, characterized in that: the water and fertilizer machine is mounted on the mobile support, and the water and fertilizer machine is wirelessly connected to the remote control device.

[0061] The water and fertilizer machine includes a housing, an irrigation mechanism, and a control cabinet. The irrigation mechanism is installed inside the housing, and the control cabinet is installed on the housing above the irrigation mechanism.

[0062] The irrigation mechanism includes a diluted fertilizer tank, a concentrated fertilizer tank, and a clean water tank arranged side by side. A diluted fertilizer pump, a concentrated fertilizer pump, and a clean water pump are installed in a box above the diluted fertilizer tank. The inlet of the diluted fertilizer pump is connected to the diluted fertilizer tank via a diluted fertilizer hose, the inlet of the concentrated fertilizer pump is connected to the concentrated fertilizer tank via a concentrated fertilizer hose, and the inlet of the clean water pump is connected to the clean water tank via a clean water hose. The outlet of the concentrated fertilizer pump is connected to the diluted fertilizer tank via a connecting pipe. The outlets of the diluted fertilizer pump and the clean water pump are respectively connected to a flow pipe. An EC sensor and a pH sensor are installed at the end of the flow pipe and are connected to the diluted fertilizer tank. A solenoid valve A is installed on the flow pipe near the diluted fertilizer tank. Multiple discharge outlets are provided on the flow pipe between solenoid valve A and the diluted fertilizer pump, and a solenoid valve B is installed on each discharge outlet.

[0063] The control cabinet includes a cabinet body, a power supply, a touch screen, a wireless terminal device, a programmable logic controller (PLC), and a Raspberry Pi. The touch screen is located outside the cabinet, while the power supply, wireless terminal device, PLC, and Raspberry Pi are located inside. The input of the PLC is connected to the touch screen via the Raspberry Pi and to a remote control device via the wireless terminal device. The output of the PLC is connected to a diluted fertilizer pump, a concentrated fertilizer pump, a clean water pump, solenoid valve A, and solenoid valve B to control the start / stop or switching of these pumps. The touch screen, wireless terminal device, PLC, Raspberry Pi, diluted fertilizer pump, concentrated fertilizer pump, and clean water pump are all connected to the power supply.

[0064] The Raspberry Pi and the remote control device are each loaded with a trained IAVOA-XGBoost model.

[0065] The outer side of the enclosure is equipped with an integrated sensor for detecting temperature and humidity and a sensor for detecting wind speed. An EC sensor and a PH sensor are installed on the flow pipe. The sensors are connected to a programmable controller installed in the enclosure.

[0066] An emergency stop button is provided on one side of the housing of the integrated sensor. The emergency stop button is connected to the programmable controller so that the fertilization and irrigation operation can be stopped in an emergency.

[0067] The beneficial effects of this invention are as follows:

[0068] This improved water and fertilizer decision-making precision irrigation method enhances the African vulture optimization algorithm. It utilizes SPM chaotic mapping to initialize the vulture population, giving it better ergodicity and randomness. A nonlinear hunger transformation strategy avoids the algorithm getting trapped in local optima, thus improving its global search capability. A weighted time-varying strategy ensures that vulture position updates in the later development phase depend more on the optimal vulture position. Adaptive t-distribution mutation perturbation further improves search capability, enabling the population to escape local optima. Applying this improved African vulture optimization algorithm to the hyperparameter tuning of the XGBoost model effectively finds the hyperparameters with the minimum loss, improving model prediction accuracy. This model facilitates the rational allocation of water and fertilizer resources. Based on local irrigation reserves, it integrates sufficient and insufficient irrigation modes, significantly saving water resources and reducing fertilizer usage while meeting crop growth needs. It conserves irrigation water, improves fertilizer utilization, and increases crop fertilizer efficiency. This solves the problems of resource waste and adverse effects on crop growth caused by existing methods. Attached Figure Description

[0069] Figure 1 This is a flowchart illustrating the present invention;

[0070] Figure 2This is a schematic diagram of the model optimization process of this invention;

[0071] Figure 3 This is a schematic diagram of the structure of the device of the present invention;

[0072] Figure 4 This is a cross-sectional schematic diagram of the device of the present invention;

[0073] Figure 5 This is a schematic diagram of the irrigation mechanism of the present invention;

[0074] Figure 6 This is a schematic diagram of the control cabinet of the present invention;

[0075] Figure 7 These are scatter plots showing the actual and predicted values ​​from different models;

[0076] Figure 8 These are box plots of absolute error for different models.

[0077] In the diagram: 1. Mobile support, 2. Remote control device, 3. Cabinet, 4. Dilute fertilizer tank, 5. Concentrated fertilizer tank, 6. Clean water tank, 7. Dilute fertilizer pump, 8. Concentrated fertilizer pump, 9. Clean water pump, 10. Flow pipe, 11. Solenoid valve A, 12. Discharge port, 13. Solenoid valve B, 14. Cabinet, 15. Touch screen, 16. Wireless terminal device, 17. Programmable logic controller, 18. Raspberry Pi, 19. Integrated sensor, 20. Emergency stop button, 21. Power supply, 22. Wind speed sensor, 23. EC / PH combined sensor. Detailed Implementation

[0078] This precision irrigation method for water and fertilizer decision-making includes the following steps:

[0079] The XGBoost model was optimized using an improved African vulture optimization algorithm.

[0080] The XGBoost model optimization process includes the following steps:

[0081] The datasets (irrigation water data from the National Meteorological Science Data Center and fertilizer application data from the National Agricultural Science Data Center) were standardized, and the datasets were divided into training and testing sets in an 8:2 ratio.

[0082] The standardization process is as follows:

[0083] ;

[0084] Where, x * Here is the standardized data; x is the value to be standardized; x min x max These are the minimum and maximum values ​​of the input parameters;

[0085] Determine the hyperparameters that need to be tuned in the XGBoost model (XGBoost is an extreme gradient boosting tree model, which belongs to one of the boosting ensemble algorithms and is a strong learner composed of multiple weak learners).

[0086] The parameters for the improved African vulture optimization algorithm are set as follows: epoch = 30 iterations, pop_size = 30 population size, probability of updating using the first formula during the exploration phase p1 = 0.6, probability of updating using the first formula during the first development phase p2 = 0.4, probability of updating using the first formula during the second development phase p3 = 0.6, probability of the population moving to the first optimal group of vultures L = 0.8, and parameter w = 2.5 controlling the rate of change in vulture hunger. The XGBoost model is trained using the training set data, and the fitness function is defined as the mean absolute percentage error of the 10-fold cross-validation on the training set.

[0087] The specific process of improving the XGBoost machine learning model optimized by the African vulture optimization algorithm is as follows:

[0088] Vulture positions are initialized using SPM chaotic sequences, where a vulture position is used to characterize a solution containing all hyperparameters of XGBoost.

[0089] The SPM chaotic sequence is specifically as follows:

[0090] ;

[0091] Where mod is the remainder function; when η∈(0,1) and μ∈(0,1), the system is in a chaotic state, η=0.4 and μ=0.3; r is the disturbance parameter of the chaotic system between 0 and 1; x(i) and x(i+1) are the i-th and i+1-th chaotic individuals, respectively.

[0092] The specific process of initializing the vulture position is as follows: N chaotic individuals in the interval [0,1] are generated based on the SPM chaotic sequence, and then the chaotic individuals are transformed into the entire search space:

[0093] 0 <x(i)<1,i=1,2,…,N;

[0094] Where P(i) is the position of an individual in the population after the chaotic mapping; lb and ub are the lower and upper boundaries of the population, respectively; and x(i) is the chaotic mapping value.

[0095] Calculate the fitness value of each vulture after initialization, select the best solution as the best vulture in the first group, select the second best solution as the best vulture in the second group, and move all vultures to the two best vultures. The best vulture is recalculated in each generation. The fitness value is used to characterize the mean absolute percentage error of the XGBoost model's 10-fold cross-validation corresponding to a vulture position.

[0096] Calculate the hunger level of vultures, update the hunger level of vultures based on the number of population iterations, and use a nonlinear transformation strategy to make the hunger level change nonlinearly with the number of iterations.

[0097] The nonlinear transformation strategy is as follows:

[0098] ;

[0099] ;

[0100] Where F is the vulture's hunger level; rand1 is a random number between 0 and 1; z ∈ (-1, 1) is a random value; t is the perturbation term of the hunger level F; h ∈ (-2, 2) is a random value; w is a parameter controlling the rate at which the vulture's hunger level changes; iter i `maxiter` represents the current iteration count of the vulture; `maxiter` represents the initially set maximum iteration count for the vulture.

[0101] The exploration phase in step S24 specifically includes:

[0102] ;

[0103] ;

[0104] ;

[0105] ;

[0106] Where P(i+1) is the vulture's position vector in the next iteration; P(i) is the vulture's current position vector; R(i) is one of the best vultures selected in the current iteration; D(i) is the random distance to one of the two best vultures; rand P1 rand1, rand2, and rand3 are all random numbers between 0 and 1; X is the coefficient vector for adding random movement, calculated by X = 2 × rand, where rand is a random number between 0 and 1; lb and ub are the lower and upper boundaries of the population, respectively; BestVulture1(i) and BestVulture2(i) are the best and second-best vulture positions in the i-th generation; L is the preset probability of the population moving towards the first group of best vultures; p i F represents the probability that the population will move towards the first optimal group of vultures. iLet be the fitness value of the i-th vulture.

[0107] The first stage of the development phase in step S24 is specifically as follows:

[0108] ;

[0109] ;

[0110] ;

[0111] ;

[0112] Where d(t) is the distance between the current vulture and one of the two best vulture groups; rand5, rand6, and rand P2 P1 is a random number between 0 and 1; P2 is the probability of updating the position using the first formula in the first stage of development; S1 and S2 are the two spiral position update formulas for the vulture.

[0113] The development of the second stage and weighted time-varying strategy in step S24 specifically involves:

[0114] ;

[0115] ;

[0116] ;

[0117] ;

[0118] Where P3 represents the probability of updating the position using the first formula in the first phase of development; rand P3 A random number between 0 and 1; γ a γ b The values ​​represent the influence weights of the best and second-best vultures; A1 and A2 are the position update formulas affected by the best and second-best vultures.

[0119] As the number of iterations increases, the influence weight of the optimal vulture gradually increases, and the update of the vulture position in the later stage of development depends more on the optimal vulture position.

[0120] The development of the second stage and adaptive t-distribution variation perturbation in step S24 is specifically as follows:

[0121] ;

[0122] ;

[0123] ;

[0124] ;

[0125] Where L is the preset probability that the population will move to the first group of optimal vultures; t(iter) is the t-distribution perturbation value; For the second type of Euler integral; n is the degree of freedom parameter, a factor for adjusting the t distribution; t1 is the minimum value of n, t2 is the maximum value of n, t1=0.1, t2=1; Levy(d) is the Wright flight formula; d is the problem dimension; u and v are random numbers between 0 and 1; β is a fixed value of 1.5; σ is calculated from the above formula.

[0126] When n=1, the t-distribution becomes a Cauchy distribution; when n→∞, the t-distribution becomes a Gaussian distribution, so that the degree of freedom parameter n gradually approaches the Gaussian distribution as the number of iterations increases, increasing the diversity and global search capability of the algorithm, thereby improving the convergence speed and the ability to escape local optima.

[0127] Determine if the current iteration number is greater than or equal to the preset maximum iteration number. If yes, end the solution and output the position and fitness value of the current best vulture, which are the hyperparameters of the XGBoost model and the loss value of model training; otherwise, return to calculate the fitness value of the vulture after initialization and continue the solution process.

[0128] The fitness value is calculated, and the optimal parameters are found using an improved African vulture optimization algorithm.

[0129] The optimal solution is then substituted into the XGBoost model to obtain the optimal prediction model.

[0130] The IAVOA-XGBoost model is obtained by training the optimal prediction model using the dataset.

[0131] The hyperparameters of the XGBoost model—maximum number of decision trees (n_estimators), learning rate (learning_rate), maximum depth (max_depth), tree complexity penalty term (gamma), and minimum leaf node weight (min_child_weight)—were optimized. Using these five hyperparameters as variables and the mean absolute percentage error (MAPE) of 10-fold cross-validation as the objective function, with each variable constrained within the ranges shown in Table 1, the XGBoost model was optimized using an improved African vulture optimization algorithm. The optimized XGBoost model was then compared with the traditional XGBoost model, the BP neural network model (BPNN), the support vector regression model (SVR), and the random forest model (RF) (see Table 2). Finally, scatter plots and box plots of the prediction results were obtained (e.g., ...). Figure 7 and Figure 8 As shown in the figure, this method outperforms other algorithms in ET0 prediction accuracy.

[0132] Table 1 Initial values ​​and predetermined search range of XGBoost model hyperparameters

[0133] .

[0134] This invention selects the coefficient of determination R 2 The root mean square error (RMSE) and mean absolute error (MAE) are used as evaluation indicators as follows:

[0135] ;

[0136] ;

[0137] ;

[0138] Among them, y i The actual value; These are the model's predicted values; is the predicted average; n is the sample size; mean absolute error (MAE) and root mean square error (RMSE) are used to evaluate the error of the model's predictions; the smaller the value, the stronger the model's predictive performance, and vice versa. Coefficient of determination (R²) 2 R reflects the correlation between the expected and actual results, and its value ranges from [0,1]. 2 When the value is close to 1, the model has a stronger predictive ability; conversely, the closer the value is to 1, the weaker the predictive ability.

[0139] Table 2 Performance Comparison of Each Prediction Model

[0140] .

[0141] As shown in Table 2, the method of the present invention has a high coefficient of determination (R²) in terms of evaluation indicators. 2 The XGBoost algorithm outperformed the other four machine learning models in both aspects, while its root mean square error (RMSE) and mean absolute error (MAE) were lower. Compared to the traditional XGBoost algorithm, the RMSE was reduced by 17.11%, the MAE by 15.46%, and the coefficient of determination R0 was significantly lower. 2 Increased by 2.07%

[0142] The daily fertilizer and irrigation amounts were calculated based on the optimized XGBoost model.

[0143] The model training and calculation process is as follows: Local irrigation water availability is categorized into sufficient irrigation and insufficient irrigation. Under sufficient irrigation conditions, a prediction model is trained based on local temperature, humidity, wind speed, solar intensity, effective sunshine duration, and reference crop evapotranspiration ET0. Temperature, humidity, and wind speed are obtained using integrated temperature and humidity sensors and wind speed sensors, while effective sunshine duration is obtained from the China Meteorological Administration website. This model is then used to predict the reference crop evapotranspiration ET0 at each crop stage and convert it into daily irrigation time. Under insufficient irrigation conditions, with the goal of maximizing net income and actual yield, irrigation water usage at each crop stage is used as a variable. Under the constraint of irrigation water usage at each crop growth stage, the model automatically finds the optimal irrigation water allocation for the crop, averages it out over each day, and converts it into daily irrigation time.

[0144] For irrigation time conversion, taking winter wheat as an example, refer to the "Meteorological Grades for Water-Saving Irrigation of Crops (Wheat)" as follows:

[0145] ;

[0146] Where I represents the effective irrigation amount (mm) during a certain developmental stage of wheat; W represents the effective soil moisture content (mm) above the calculated wilting moisture level in the soil layer on the starting date of a certain developmental stage of wheat, which is 200mm for the sowing-greening stage, 500mm for the greening-heading stage, and 1000mm for the heading-maturity stage; P e N represents the effective precipitation (mm) at a certain developmental stage of wheat; E represents the groundwater recharge below the soil layer (mm) at a certain developmental stage of wheat; J represents the water requirement of wheat at a certain developmental stage (mm); i represents the number of days at a certain developmental stage of wheat.

[0147] ;

[0148] P i σ represents the daily precipitation (mm) on day i within a certain developmental stage of wheat; i The effective utilization coefficient of the daily precipitation on day i is given by referring to the recommended value table for σ.

[0149] ;

[0150] ;

[0151] W b Calculate the difference (mm) in soil moisture content (below and above) at the bottom interface of a certain developmental stage of wheat. s2 Calculate the soil moisture content above the bottom interface of the soil layer at the end of a certain developmental stage of wheat; W s1Calculate the soil moisture content above the bottom interface of the soil layer at the initial stage of wheat development; ρ s To calculate the soil bulk density (g / cm³) of the layer above the bottom interface of the soil layer. 3 h d Soil layer thickness: 10cm during the seedling stage, 20mm thereafter; W x1 Calculate the soil moisture content of the layer below the bottom interface of the soil layer at the initial stage of wheat development; ρ x To calculate the soil bulk density (g / cm³) of the layer below the bottom interface of the soil layer 3 );

[0152] ;

[0153] K c ET0 is the crop coefficient; ET0 is the reference crop evapotranspiration (mm / d).

[0154] After calculating the crop irrigation amount, the irrigation time is calculated based on the park area and the pump flow rate;

[0155] ;

[0156] t G S represents the irrigation time (s); S represents the area of ​​the irrigated park (m²). 2 n represents the number of days in a certain developmental stage of wheat; Q represents the pump flow rate (m³ / s). 3 / s);

[0157] The specific inadequate irrigation mode is as follows:

[0158] ;

[0159] Where f is the net income (yuan / hm) 2 ); Y represents the planting percentage of crop i (%). mi The yield of crops under fully irrigated conditions (kg / m²) 2 W pi P represents the irrigation amount (mm) for the p-th growth stage of crop i; epi Rainfall (mm) for crop i at the p-th growth stage; E mpi Maximum evapotranspiration (mm) of crop i at the p-th growth stage; λ pi Crop water shortage sensitivity index (mm) at the p-th growth stage of crop i; P i W represents the market price of crop i (yuan / kg). i Irrigation volume for crops (mm); P w Agricultural irrigation water price (mm); C ij Agricultural production costs of crop i in stage j (yuan / hm) 2 );

[0160] The constraints are:

[0161] Total irrigation volume constraint W min ≤ ≤W max

[0162] Irrigation constraints W at each stage of crop i ijmin ≤W ij ≤W ijmax

[0163] Minimum grain yield constraint for crop i Y i ≥Y min。

[0164] The improved African vulture optimization algorithm is used to solve the inadequate irrigation net income function, which includes total irrigation constraints, irrigation constraints for each crop stage, and minimum yield constraints, to obtain the optimal water allocation for each crop stage.

[0165] Based on soil available nitrogen content (mg / kg), available phosphorus content (mg / kg), available potassium content (mg / kg), and yield (kg / ha), a fertilization prediction model is trained. This model is then used to predict the total amount of nitrogen (kgN / ha), phosphorus (kgP2O5 / ha), and potassium (kgK2O / ha) required by the crop. Different amounts of fertilizer are allocated at different stages of crop growth according to the crop's needs. At the same time, the fertilizer is diluted to a ratio suitable for crop growth according to the crop variety. Finally, the irrigation time is converted into the opening and closing times of solenoid valves and pumps, and fertilization is carried out at the corresponding times.

[0166] For fertilization timing conversion, please refer to the "Standards for Fertilizer Application Limits for Winter Wheat", as follows:

[0167] After predicting the total amount of nitrogen, phosphorus, and potassium fertilizers applied to winter wheat, different application rates of nitrogen, phosphorus, and potassium fertilizers were allocated for different growth stages of wheat based on soil fertility level. The fertilizers were diluted according to the wheat fertilizer dilution ratio ω (1:200), and the fertilization time was calculated based on the park area and pump flow rate.

[0168] ;

[0169] Among them, t F Fertilization time (s); L N L P L K These represent the application rates of nitrogen, phosphorus, and potassium fertilizers for a specific developmental stage of wheat (kg / ha); S represents the irrigated orchard area (m²). 2 ); ω is the fertilizer dilution ratio; n is the total number of days in a certain developmental stage of wheat; Q is the pump flow rate (m³ / s). 3 / s);

[0170] The precision irrigation device controls the daily fertilization and irrigation based on the calculated daily fertilization and irrigation amounts to achieve precise fertilization and irrigation.

[0171] This precision irrigation device for water and fertilizer application consists of a mobile support frame 1, a water and fertilizer machine, and a remote control device 2. The water and fertilizer machine is mounted on the mobile support frame 1, allowing it to be moved by the support frame to apply fertilizer and irrigate various parts of the farmland. The water and fertilizer machine is wirelessly connected to the remote control device 2, which can be any of a mobile phone, PC, tablet computer (or other device capable of running programs). The remote control device 2 can remotely control the water and fertilizer machine to perform fertilization and irrigation, thereby reducing labor intensity.

[0172] The fertigation machine includes a housing 3, an irrigation mechanism, and a control cabinet. The irrigation mechanism is installed inside the housing 3 to dispense diluted fertilizer, thereby applying the fertilizer, while simultaneously irrigating with clean water stored in the irrigation mechanism. The control cabinet is installed on the housing 3 above the irrigation mechanism to control the operation of the irrigation mechanism, thereby performing irrigation and fertilization.

[0173] The irrigation system includes a diluted fertilizer tank 4, a concentrated fertilizer tank 5, and a clean water tank 6 arranged side by side. A diluted fertilizer pump 7, a concentrated fertilizer pump 8, and a clean water pump 9 are installed in a housing 3 above the diluted fertilizer tank 4. The inlet of the diluted fertilizer pump 7 is connected to the diluted fertilizer tank 4 via a diluted fertilizer hose. The inlet of the concentrated fertilizer pump 8 is connected to the concentrated fertilizer tank 5 via a concentrated fertilizer hose. The inlet of the clean water pump 9 is connected to the clean water tank 6 via a clean water hose. The outlet of the concentrated fertilizer pump 8 is connected to the diluted fertilizer tank 4 via a connecting pipe. The outlets of the diluted fertilizer pump 7 and the clean water pump 9 are respectively connected to a flow pipe 10, the end of which is connected to the diluted fertilizer tank 4. A solenoid valve A11 is installed on the flow pipe 10 near the diluted fertilizer tank 4. Multiple outlets 12 are installed on the flow pipe 10 between the solenoid valve A11 and the diluted fertilizer pump 7, and a solenoid valve B13 is installed on each outlet 12. The function of the concentrated fertilizer pump 8 is to transfer concentrated fertilizer from the concentrated fertilizer tank 5 to the diluted fertilizer tank 4. This, in conjunction with the clean water pump 9, transfers clean water from the clean water tank 6 to the diluted fertilizer tank 4, thus preparing the diluted fertilizer. An EC sensor and a pH sensor are installed at the end of the flow pipe and connected to the diluted fertilizer tank. The amount of water and concentrated fertilizer input into the diluted fertilizer tank 4 is controlled by the concentrated fertilizer pump 8 and the clean water pump 9, thereby controlling the concentration of the diluted fertilizer. This ensures that the diluted fertilizer meets the growth requirements without waste, while also preventing excessive concentration that could burn the seedlings. Furthermore, the irrigation and fertilization amounts can be controlled by adjusting the opening and closing times of the solenoid valve B13, the diluted fertilizer pump 7, and the clean water pump 9.

[0174] The control cabinet includes a cabinet 14, a power supply 21, a touch screen 15, a wireless terminal device 16 (such as a DTU), a programmable logic controller 17 (such as a PLC), and a Raspberry Pi 18. The touch screen 15 is installed outside the cabinet 14, and the power supply 21, wireless terminal device 16, programmable logic controller 17, and Raspberry Pi 18 are installed inside the cabinet 14. The input terminal of the programmable logic controller 17 is connected to the touch screen 15 through the Raspberry Pi 18 and to the remote control device 2 through the wireless terminal device 16. The output terminal of the programmable logic controller 17 is connected to the dilute fertilizer pump 7, the concentrated fertilizer pump 8, the clean water pump 9, the solenoid valve A11, and the solenoid valve B13 to control the start, stop, or switch of the dilute fertilizer pump 7, the concentrated fertilizer pump 8, the clean water pump 9, the solenoid valve A11, and the solenoid valve B13. The touch screen 15, the wireless terminal device 16, the programmable logic controller 17, the Raspberry Pi 18, the dilute fertilizer pump 7, the concentrated fertilizer pump 8, and the clean water pump 9 are all electrically connected to the power supply 21.

[0175] The Raspberry Pi 18 and Remote Control Device 2 are each equipped with the IAVOA-XGBoost model.

[0176] The outer side of the enclosure is equipped with an integrated sensor for detecting temperature and humidity and a sensor for detecting wind speed. An EC sensor and a PH sensor are installed on the flow pipe. The sensors are connected to a programmable controller installed in the enclosure.

[0177] An emergency stop button 20 is provided on the housing 3 on one side of the integrated sensor 19. The emergency stop button 20 is connected to the programmable controller 17 so that the fertilization and irrigation operation can be stopped in an emergency by using the emergency stop button 20.

[0178] During irrigation and fertilization, the start time of irrigation is set via remote control device 2 or touch screen 15. This precision irrigation device executes the irrigation process according to a pre-programmed sequence in the programmable controller 17: fertilizer dilution stage, fertilization stage, irrigation stage, and stop. During the fertilizer dilution stage, concentrated fertilizer pump 8, clean water pump 9, and diluted fertilizer pump 7 are activated. All solenoid valves B13 are closed, and solenoid valve A11 is opened, allowing concentrated fertilizer and clean water to be pumped into the diluted fertilizer tank 4. The fertilizer and clean water in the diluted fertilizer tank 4 are circulated by the diluted fertilizer pump 7 to ensure uniform fertilizer dilution. The concentration of diluted fertilizer is controlled by the activation time of the concentrated fertilizer pump 8 and clean water pump 9, which controls the amount of fertilizer and water input into the diluted fertilizer tank. An EC sensor detects the diluted fertilizer concentration, and a pH sensor detects the diluted fertilizer pH. Dynamic adjustments are made to the diluted fertilizer concentration and pH to ensure they remain within a reasonable range that does not burn seedlings and is suitable for crop growth. During the fertilization stage, turn on the diluted fertilizer pump 7, turn off the concentrated fertilizer pump 8 and the clean water pump 9, and close the solenoid valve A11. As needed by the farmland, open the solenoid valve B13 to allow fertilizer to be discharged from the outlet 12. The opening and closing times of the pumps and valves are determined by calculation. During the irrigation stage, turn on the clean water pump 9, turn off the concentrated fertilizer pump 8, turn off the diluted fertilizer pump 7, close the solenoid valve A11, and open the solenoid valve B13 as needed by the farmland. The opening and closing times of the pumps and valves are determined by calculation. Control is stopped after the diluted fertilizer stage, fertilization stage, and irrigation stage are completed.

[0179] This improved water and fertilizer decision-making precision irrigation method enhances the African vulture optimization algorithm. It utilizes SPM chaotic mapping to initialize the vulture population, giving it better ergodicity and randomness. A nonlinear hunger transformation strategy avoids the algorithm getting trapped in local optima, thus improving its global search capability. A weighted time-varying strategy ensures that vulture position updates in the later development phase depend more on the optimal vulture position. Adaptive t-distribution mutation perturbation further improves search capability, enabling the population to escape local optima. Applying this improved African vulture optimization algorithm to the hyperparameter tuning of the XGBoost model effectively finds the hyperparameters with the minimum loss, improving model prediction accuracy. This model facilitates the rational allocation of water and fertilizer resources. Based on local irrigation reserves, it integrates sufficient and insufficient irrigation modes, significantly saving water resources and reducing fertilizer usage while meeting crop growth needs. It conserves irrigation water, improves fertilizer utilization, and increases crop fertilizer efficiency. This solves the problems of resource waste and adverse effects on crop growth caused by existing methods.

Claims

1. A precision irrigation method for water and fertilizer decision-making, characterized in that: It includes the following steps: 1) Optimize the XGBoost model using an improved African vulture optimization algorithm; 2) Calculate the daily fertilizer application rate and irrigation amount based on the optimized XGBoost model; 3) Based on the calculated daily fertilizer and irrigation amounts, the precision irrigation device controls water and fertilizer application for accurate fertilization and irrigation; The optimization process in step 1) specifically includes the following steps: S1. Standardize the dataset and divide it into training and test sets in an 8:2 ratio; S2. Determine the hyperparameters that need to be tuned in the XGBoost model; S3. Set the parameters in the improved African vulture optimization algorithm: epoch=30 iterations, pop_size=30 population size, probability of updating with the first formula during the exploration phase p1=0.6, probability of updating with the first formula during the first development phase p2=0.4, probability of updating with the first formula during the second development phase p3=0.6, probability of the population moving to the first group of optimal vultures L=0.8, and parameter w=2.5 to control the speed of change in vulture hunger. Train the XGBoost model using the training set data, and define the fitness function as the mean absolute percentage error of the 10-fold cross-validation of the training set. S4. Calculate the fitness value and find the optimal parameters using the improved African vulture optimization algorithm; S5. Substitute the found optimal solution into the XGBoost model to obtain the optimal prediction model; S6. Train the optimal prediction model using the dataset to obtain the IAVOA-XGBoost model; The specific process of improving the XGBoost machine learning model optimized by the African vulture optimization algorithm in step S3 is as follows: S21. Initialize the vulture position using the SPM chaotic sequence, where the vulture position is used to characterize a solution containing all hyperparameters in XGBoost; S22. Calculate the fitness value of the vulture individuals after initialization, select the best solution as the best vulture in the first group, select the second best solution as the best vulture in the second group, and move all vultures to the two best vultures. The best vulture will be recalculated in each generation. The fitness value is used to characterize the mean absolute percentage error of the XGBoost model ten-fold cross-validation corresponding to a vulture position. S23. Calculate the hunger level of vultures, update the hunger level of vultures according to the number of population iterations, and use a non-linear transformation strategy to make the hunger level change non-linearly with the number of iterations. S24. Based on the hunger level of each vulture, different search strategies are used. When the hunger level is greater than 1, the exploration phase is entered. If the hunger level is less than 1, the development phase is entered. Specifically, when the hunger level is between 0.5 and 1, the first stage of the development phase is entered. When the hunger level is less than 0.5, the second stage of the development phase is entered. In this stage, the vulture position is updated using a weighted time-varying strategy. At the same time, an adaptive t-distribution mutation perturbation is added to improve the algorithm's global search capability and its ability to escape local optima. The position is updated in each stage using the vulture position update formula. S25. Determine whether the current iteration number is greater than or equal to the preset maximum iteration number. If yes, end the solution and output the position and fitness value of the current best vulture, which are the hyperparameters of the XGBoost model and the loss value of model training; otherwise, return to step S22 and continue the solution. The SPM chaotic sequence in step S21 is specifically as follows: ; Where mod is the modulo function; when η∈(0,1) and μ∈(0,1), the system is in a chaotic state, η=0.4 and μ=0.3; r is the disturbance parameter of the chaotic system between 0 and 1; x(i) and x(i+1) are the i-th and i+1-th chaotic individuals, respectively; The specific process for initializing the vulture position is as follows: N chaotic individuals within the [0,1] interval are generated based on the SPM chaotic sequence, and then the chaotic individuals are transformed into the entire search space: ,0<x(i)<1,i=1,2,…,N Where P(i) is the position of an individual in the population after the chaotic mapping; lb and ub are the lower and upper boundaries of the population, respectively; and x(i) is the chaotic mapping value.

2. The precision irrigation method for water and fertilizer decision-making according to claim 1, characterized in that: The nonlinear transformation strategy in step S23 is specifically as follows: ; ; Where F is the vulture's hunger level; rand1 is a random number between 0 and 1; z ∈ (-1, 1) is a random value; t is the perturbation term of the hunger level F; h ∈ (-2, 2) is a random value; w is a parameter controlling the rate at which the vulture's hunger level changes; iter i `maxiter` represents the current iteration count of the vulture; `maxiter` represents the initially set maximum iteration count for the vulture. The exploration phase in step S24 specifically includes: ; ; ; ; Where P(i+1) is the vulture's position vector in the next iteration; P(i) is the vulture's current position vector; R(i) is one of the best vultures selected in the current iteration; D(i) is the random distance to one of the two best vultures; rand P1 rand1, rand2, and rand3 are all random numbers between 0 and 1; X is the coefficient vector for adding random movement, calculated by X = 2 × rand, where rand is a random number between 0 and 1; lb and ub are the lower and upper boundaries of the population, respectively; BestVulture1(i) and BestVulture2(i) are the best and second-best vulture positions in the i-th generation; L is the preset probability of the population moving towards the first group of best vultures; p i F represents the probability that the population will move towards the first optimal group of vultures. i Let be the fitness of the i-th vulture; The first stage of the development phase in step S24 is specifically as follows: ; ; ; ; Where d(t) is the distance between the current vulture and one of the two best vulture groups; rand5, rand6, and rand P2 P1 is a random number between 0 and 1; P2 is the probability of updating the position using the first formula in the first stage of development; S1 and S2 are the two spiral position update formulas for the vulture. The development of the second stage and weighted time-varying strategy in step S24 is specifically as follows: ; ; ; ; Where P3 represents the probability of updating the position using the first formula in the first phase of development; rand P3 A random number between 0 and 1; γ a γ b The values ​​represent the influence weights of the best and second-best vultures; A1 and A2 are the position update formulas affected by the best and second-best vultures. As the number of iterations increases, the influence weight of the optimal vulture gradually increases, and the update of the vulture position in the later stage of development depends more on the optimal vulture position. The development of the second stage and adaptive t-distribution variation perturbation in step S24 is specifically as follows: ; ; ; ; Where L is the preset probability that the population will move to the first group of optimal vultures; t(iter) is the t-distribution perturbation value; This is the second type of Euler integral; n is the degree of freedom parameter, a factor for adjusting the t-distribution; t1 is the minimum value of n, t2 is the maximum value of n, t1=0.1, t2=1; Levy(d) is the Wright flight formula; d is the problem dimension; u and v are random numbers between 0 and 1; β is a fixed value of 1.5; σ is calculated from the above formula. When n=1, the t-distribution becomes a Cauchy distribution; when n→∞, the t-distribution becomes a Gaussian distribution, so that the degree of freedom parameter n gradually approaches the Gaussian distribution as the number of iterations increases, increasing the diversity and global search capability of the algorithm, thereby improving the convergence speed and the ability to escape local optima.

3. The precision irrigation method for water and fertilizer decision-making according to claim 1, characterized in that: The model training and calculation process is as follows: Local irrigation water availability is categorized into sufficient irrigation and insufficient irrigation. Under sufficient irrigation conditions, a prediction model is trained based on local temperature, humidity, wind speed, effective sunshine duration, and reference crop evapotranspiration ET0. Temperature, humidity, and wind speed are obtained using integrated temperature and humidity sensors and wind speed sensors, while effective sunshine duration is obtained from the China Meteorological Administration website. This model is then used to predict the reference crop evapotranspiration ET0 at each crop stage and convert it into daily irrigation time. Under insufficient irrigation conditions, with the goal of maximizing net income and actual yield, irrigation water usage at each crop stage is used as a variable. Under the constraint of irrigation water usage at each crop growth stage, the model automatically finds the optimal irrigation water allocation for the crop, averages it to each day, and converts it into daily irrigation time. Based on soil available nitrogen content, available phosphorus content, available potassium content, and yield, a fertilization prediction model is trained. This model is then used to predict the total amount of nitrogen, phosphorus, and potassium required by the crop. Different amounts of fertilizer are allocated at different stages of crop growth according to the crop's needs. At the same time, the fertilizer is diluted to a ratio suitable for crop growth according to the crop variety. Finally, the irrigation time is converted into the opening and closing times of solenoid valves and pumps, and fertilization is carried out at the corresponding times.

4. A precision irrigation device for water and fertilizer decision-making, characterized in that: The device includes a mobile support frame, a water and fertilizer machine, and a remote control device. The water and fertilizer machine includes an irrigation mechanism and a control cabinet. The control cabinet and the remote control device are respectively equipped with the optimized XGBoost model as described in any one of claims 1-3.