Intelligent sprinkling irrigation method and system based on edge machine learning
Technical Field
The invention relates to an intelligent sprinkling irrigation method and system based on edge machine learning, and belongs to the technical field of garden irrigation.
Background
In China, the garden industry irrigates mostly in manual irrigation, timing spray irrigation and other traditional irrigation modes, but the traditional irrigation modes have a plurality of defects. Firstly, the traditional irrigation method cannot reasonably apply water resources due to social environment, areas, irrigation equipment, irrigation techniques, personnel experience and other reasons, and extreme waste of resources such as fresh water is caused. Secondly, the traditional sprinkling irrigation mode mainly based on manual watering is adopted, the irrigation operation is mostly concentrated in hot and dry summer, a large amount of sunstroke prevention articles, a complete logistics support system and the like are needed to maintain normal operation, the operation efficiency is low, the human resource consumption is high, the personnel cost is increased, and more industrial injury risks are brought. Thirdly, the traditional irrigation mode has the problems of uneven irrigation and academia. Traditional irrigation excessively depends on experience level of personnel, irrigation frequency and water demand of crops are difficult to measure scientifically, scientificity is insufficient, and actual demands of the crops cannot be accurately captured. Meanwhile, due to the non-standardized behavior of artificial irrigation, the problems of low plant survival rate and the like caused by uneven watering and waterlogging differentiation are easy to occur.
With the development of the internet of things technology, more and more computing, storage and network resources are deployed near a user terminal, and because the application of the internet of things has higher requirements on the sensing capability, the processing capability and the analysis capability of a network, the full utilization of the resources has important significance in improving the service quality of the network edge and the experience quality of the terminal user, and the expansion of cloud computing to the network edge is more and more known as industry consensus. The edge gateway is a gateway deployed at the edge of a network, and is connected with a physical world and a digital world through functions of network connection, protocol conversion and the like, so that light connection management, real-time data analysis and application management functions are provided. The edge computing means that an open platform integrating network, computing, storage and application core capabilities is adopted on one side close to an object or a data source to provide nearest-end service nearby. The application program is initiated at the edge side, so that a faster network service response is generated, and the basic requirements of the industry in the aspects of real-time business, application intelligence, safety, privacy protection and the like are met.
The Peneman formula is an international universal method for calculating the evapotranspiration of crops and has higher accuracy. However, the method has many parameters, and individual parameters are difficult to obtain, so that how to effectively improve the obtaining mode of partial parameters, fully utilize a Peneman formula to design a scientific, low-complexity and easily-realized scientific irrigation scheme, carry out quantitative and scientific irrigation according to the water demand of crops is a problem which needs to be solved urgently in the garden industry at present.
Disclosure of Invention
Aiming at the defects of regular and quantitative irrigation of the existing irrigation equipment, the invention provides an intelligent sprinkling irrigation method and system based on machine learning, which can realize sprinkling irrigation according to needs and real-time monitoring, timely master the growth condition of crops in a sprinkling irrigation site and improve the utilization rate of water resources.
In order to achieve the purpose, the invention adopts the following technical scheme:
the solar radiation amount calculation method for the sprinkling irrigation area comprises the following steps:
step 1, installing a solar panel and a storage battery in a sprinkling irrigation area;
step 2, acquiring the charge quantity of the storage battery within the daily effective sunshine starting and stopping time;
step 3, daily solar radiation amount RsH/(2.778/10), the average daily irradiance time H under standard light intensity is Qp/(Cz Kop Ioc), Cz is loss correction coefficient, Kop is slope correction coefficient corresponding to the optimum inclination angle of the solar panel, Ioc is the optimum operation of the solar panelThe current, Qp, is the daily battery charge.
Furthermore, the optimal working current of the solar panel is matched with the power supply condition of the sprinkling irrigation area, and the optimal inclination angle of the solar panel and the corresponding inclined plane correction coefficient are determined according to the latitude of the sprinkling irrigation area.
An intelligent sprinkling irrigation method based on edge machine learning comprises the following specific steps:
step 101: collecting historical data of a sprinkling irrigation area, wherein the historical data comprises temperature, precipitation, air pressure, wind speed, soil humidity and storage battery charging amount;
step 102: installing a solar panel in the sprinkling irrigation area, and calculating the daily solar radiation according to the solar radiation calculation method;
step 103, calculating the daily evapotranspiration of the sprinkling irrigation area based on the historical data in the step 101 and the daily solar radiation amount in the step 102 by using a Peneman formula:
PE=[0.408Δ(Rn-G)+900γu2(es-ea)/(Tmean+273)]/[Δ+γ(1+0.34u2)]
in the formula, PE is possible evapotranspiration, delta is the slope of a saturated water vapor pressure-temperature curve, G is the energy consumed by the heat-increasing soil, gamma is a hygrometer constant, and T is
meanIs the daily average temperature u
2At a high wind speed of 2m, e
sSaturated water vapor pressure, e
aFor actual observation of water vapour pressure, R
nFor net radiation of crop canopy, R
n=R
ns-R
nl,R
ns=(1-α)R
s,
Alpha is the albedo of the crop, sigma is the Stefin-Boltzmann constant, T
max,K、T
min,KRespectively the daily maximum and minimum Kelvin temperature, R
so=(0.75+2×10
-5z)R
aZ is the altitude of the sprinkler irrigation area, R
aIs solar-terrestrial radiation;
step 104: based on the historical data and the corresponding daily evapotranspiration in the step 101, utilizing a progressive gradient regression tree GBRT (global belief transfer) training to obtain a prediction model of the evapotranspiration, wherein input data are temperature, precipitation, air pressure, wind speed, soil humidity of a certain day and the charging amount of a storage battery of the previous day, and output data are the daily evapotranspiration;
step 105, collecting temperature, precipitation, air pressure, air speed and soil humidity at the preset sprinkling irrigation moment in real time, directly sprinkling irrigation according to a set sprinkling irrigation instruction if the soil humidity is lower than a set threshold value, and otherwise, executing step 106;
step 106, predicting the evapotranspiration at the preset sprinkling irrigation time by using the prediction model in the step 104 in combination with the charge amount of the storage battery at the preset sprinkling irrigation time day;
step 107, according to the formula M ═ W of water balancet-Wr-P0-K+PE-W0Calculating the water demand of the crops at the moment; wherein M is the crop water demand, WtThe current soil moisture content; wrFor increased soil water content due to an increase in the planned wetting layer, K is the daily groundwater supply, W0Is the initial soil water content of the day, P0The rainfall is shown;
and step 108, carrying out sprinkling irrigation according to the crop water demand in the step 107.
Further, the value taking method of the set threshold value of the soil humidity comprises the following steps: according to the historical data of the soil humidity, Z-Score and Min-Max standardization are sequentially applied to normalize the historical data, and the quantile of 20% of the normalized soil humidity is taken as a set threshold.
The utility model provides an intelligence sprinkler irrigation system based on edge machine learning, includes data acquisition layer, equipment service layer, core calculation layer and application service layer, wherein:
the data acquisition layer comprises a camera, a meteorological sensor, a soil sensor, a solar panel and a storage battery and is used for collecting images, temperature, precipitation, air pressure, air speed, soil humidity and storage battery charging amount of the sprinkling irrigation area;
the equipment service layer is used for storing the images, the temperature, the precipitation, the air pressure, the air speed, the soil humidity and the charging amount of the storage battery collected by the data acquisition layer, transmitting the temperature, the precipitation, the air pressure, the air speed, the soil humidity and the charging amount of the storage battery to the core calculation layer and transmitting the images to the data visualization module;
the core calculation layer is used for training a prediction model of the evapotranspiration amount by utilizing a gradient regression tree GBRT according to the received temperature, the precipitation amount, the air pressure, the air speed, the soil humidity and the charging amount of the storage battery, and further calculating the water demand of crops;
the application service layer comprises a motion control module, a time control module, a data visualization module and an alarm module, wherein the alarm module is used for sending out alarm information when the soil humidity is lower than a set threshold value; the time control module is used for forwarding a sprinkling irrigation instruction of a user to the motion control module when the soil humidity is lower than a set threshold value; the movement control module is used for driving the sprinkling irrigation equipment to directly spray irrigation according to a set sprinkling irrigation instruction or the sprinkling irrigation instruction forwarded by the time control module when the soil humidity is lower than a set threshold value, and driving the sprinkling irrigation equipment to spray irrigation according to the crop water demand calculated by the core calculation layer when the soil humidity is not lower than the set threshold value, wherein the priority of the sprinkling irrigation instruction forwarded by the time control module is higher than the set sprinkling irrigation instruction; and the data visualization module is used for realizing the real-time monitoring of the sprinkling irrigation area according to the received image.
Furthermore, the equipment service layer, the core computing layer and the application service layer are realized by an intelligent edge gateway and integrated in the sprinkling irrigation equipment, and the data acquisition layer transmits data to the intelligent edge gateway through a Zigbee protocol.
The invention has the beneficial effects that: 1) the edge intelligent gateway is integrated in the irrigation equipment, so that the strong edge computing capability of the edge intelligent gateway can be fully exerted, and the problems of untimely irrigation and the like caused by network delay are greatly improved; 2) aiming at the area capable of acquiring the official data of the meteorological bureau, the sprinkling irrigation site only needs to be provided with a soil humidity sensor; aiming at the area where the official data of the meteorological bureau cannot be obtained, the spray pipe site is only required to be provided with simple meteorological sensing data and a soil humidity sensor; 3) the sprinkling irrigation digital prediction is realized, irrigation is carried out according to needs according to the prediction result, the water consumption of garden irrigation is reduced, and the water use benefit is improved; 4) aiming at the solar radiation quantity which is difficult to obtain through a sensor or a meteorological bureau, the daily solar radiation quantity can be obtained only by deploying one solar panel on the spot and obtaining the solar charging quantity of the solar panel; 5) the water demand prediction model can be corrected according to different plants and different regions, and the application range is wide; 6) the crop growth state of an irrigation field can be monitored in real time through a terminal APP, and meanwhile, the macro management of a cloud is carried out; 7) the invention has great popularization and practical value and has great economic and social benefits.
Drawings
Fig. 1 is a flowchart of an intelligent sprinkling irrigation method based on edge machine learning.
Detailed Description
The embodiments of the present invention are described in order to facilitate the understanding of the present invention by the skilled in the art, and in particular, the present invention is not limited to the scope of the embodiments, and all the inventions utilizing the concept of the present invention are protected.
An intelligent sprinkling irrigation method based on edge machine learning is disclosed, as shown in fig. 1, and comprises the following steps:
step 101: and collecting meteorological data, soil humidity data and storage battery charging quantity of the lawn sprinkling irrigation site for one year.
Step 102: the core calculation layer calculates the daily evapotranspiration of the patch area over the year:
PE=[0.408Δ(Rn-G)+900γu2(es-ea)/(Tmean+273)]/[Δ+γ(1+0.34u2)]
in the formula, PE is possible evapotranspiration, delta is the slope of a saturated water vapor pressure-temperature curve, G is the energy consumed by the heat-increasing soil, gamma is a hygrometer constant, and T is
meanIs the daily average temperature u
2At a high wind speed of 2m, e
sSaturated water vapor pressure, e
aFor actual observation of water vapour pressure, R
nFor net radiation of crop canopy, R
n=R
ns-R
nl,R
ns=(1-α)R
s,
Alpha is the albedo of the crop, sigma is the Stefin-Boltzmann constant, T
max,K、T
min,KRespectively the daily maximum and minimum Kelvin temperature, R
so=(0.75+2×10
-5z)R
aZ is the altitude of the sprinkler irrigation area, R
aIs solar-terrestrial radiation.
Parameter R in Penman formulanWith the amount of solar radiation RsIn relation to, and the amount of solar radiation RsCan not be directly obtained through a sensor and is difficult to timely obtain through a networking mode, so the solar radiation quantity R in the patentsThe calculation method comprises the following steps:
(1) a solar panel and a storage battery are arranged in the area; selecting a solar panel matched with the optimal working current Ioc according to the power supply condition of the area where the spray irrigation is located; according to the latitude of the city, determining the optimal inclination angle phi for mounting the solar panel and the corresponding inclined plane correction coefficient Kop by referring to a radiation parameter table of main cities in China; determining a correction coefficient Cz according to the environment of the area where the spray irrigation is located; the lead-acid maintenance-free battery is selected as the storage battery, the battery is low in cost and small in pollution, and is suitable for unattended intelligent spraying and irrigating areas; determining the capacity of the storage battery according to weather parameters such as the maximum rainy days, the temperature and the like of the past year in the city;
(2) respectively acquiring the residual electric quantity C of the storage battery at the start and stop time of the daily effective sunshine1、C2The charging quantity Qp of the battery in the effective day start-stop time is obtained as C2-C1;
(3) Daily amount of solar radiation RsH/(2.778/10), wherein, 2.778/10 (h.m)2MJ) is a conversion coefficient, the average daily radiation hours under standard light intensity H is Qp/(Cz Kop Ioc)/, Cz is a loss correction coefficient (which is the loss of combination, attenuation, dust, charging efficiency, etc., and is generally 0.8), Kop is a slope correction coefficient corresponding to the optimum inclination angle of the solar panel, Ioc is the optimum operating current of the solar panel, Qp is the average daily radiation hours per unit timeThe daily battery charge.
Step 103: and the core calculation layer is trained by utilizing a progressive gradient regression tree (GBRT) to obtain a prediction model of the evapotranspiration. Selecting the sprinkling irrigation time at 6 am, inputting weather data, soil humidity data and the previous day storage battery charging amount provided by the data acquisition layer at 6 am, and outputting the data as the current day evapotranspiration calculated according to the step 102.
Step 104: and when 6 am, the data acquisition layer acquires the image information, the meteorological data, the soil humidity data and the previous day of storage battery charging amount of the area, and sends the image information, the meteorological data, the soil humidity data and the previous day of storage battery charging amount to the edge intelligent gateway through a Zigbee protocol.
Step 105: data acquired by the data acquisition layer are analyzed, converted and stored through the equipment service layer, meteorological information and soil humidity data are distributed to the core calculation layer and the cloud, and image information is distributed to the data visualization module and the cloud.
Step 106: and (3) judging whether the soil humidity is lower than a set threshold, if so, indicating that the land is seriously lack of water, predicting that the model has problems, and immediately performing sprinkling irrigation if the continuous sprinkling irrigation is insufficient, and executing the step 107, otherwise, executing the step 111. The value method of the set threshold value comprises the following steps: according to the historical data of the soil humidity, Z-Score and Min-Max standardization are sequentially applied to normalize the historical data, and the quantile of 20% of the normalized soil humidity is taken as a set threshold.
Step 107: the alert module sends an alert signal to the client.
Step 108: and (4) whether the time control module receives a sprinkling irrigation instruction from the client, if so, executing step 109, and otherwise, executing step 110.
Step 109: the time control module transmits a sprinkling irrigation instruction of the client to the motion control module, and the motion control module commands the manual-automatic integrated electromagnetic valve to execute corresponding valve opening action.
Step 110: the motion control module immediately sends out an instruction, and the manual and automatic integrated electromagnetic valve automatically opens the valve for sprinkling irrigation.
Step 111: and the core calculation layer obtains the current-day evapotranspiration according to the meteorological data, the soil humidity data, the previous-day storage battery charging amount and the prediction model obtained in the step 103.
Step 112: calculating the water demand of the crops on the day:
M=Wt-Wr-P0-K+PE-W0
wherein M is the crop water demand, WtThe current soil moisture content; wrFor increased soil water content due to an increase in the planned wetting layer, K is the daily groundwater supply, W0Is the initial soil water content of the day, P0The amount of rainfall is.
Step 113: the motion control module performs a spray irrigation based on the water demand of step 112.
In the invention, the sprinkling irrigation period is set to be 1 day (unit: d), and if the obtained water demand is a negative value, the crop water quantity is sufficient, and sprinkling irrigation is not needed; and if the obtained water demand is a positive value, carrying out sprinkling irrigation according to the value.
Therefore, the intelligent sprinkling irrigation system based on the edge machine learning can realize intelligent sprinkling irrigation according to needs, and has a flexible human-computer interaction function and a reliable cloud management function. The invention can establish different water demand prediction models according to different garden crops, different regions and different sprinkling irrigation time periods, accurately predict the water demand in the same day, spray irrigation in proper amount, save labor cost, improve the utilization rate of water resources, have huge economic and social benefits and have extremely high popularization value.
It should be noted that the above description of the embodiments is only for the purpose of assisting understanding of the method of the present application and the core idea thereof, and that those skilled in the art can make several improvements and modifications to the present application without departing from the principle of the present application, and these improvements and modifications are also within the protection scope of the claims of the present application.