Grape planting method and device based on Internet of Things, electronic equipment and storage medium
By deploying IoT technology and water and fertilizer decision models in the grape planting system, the water and fertilizer management problems caused by the lack of planting experience of new farmers have been solved, automated water and fertilizer management has been achieved, and the healthy growth and yield quality of vines have been improved.
Patent Information
- Application Number
- CN202510527805.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-06-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
New farmers lack professional grape planting experience and are difficult to effectively manage the water and fertilizer needs of vines, resulting in a decline in yield and quality, and may even lead to the withering or apoptosis of vines.
Using the Internet of Things grape planting method, the water and fertilizer decision model is deployed in the grape planting system. This model is obtained based on expert experience training in the entire cycle of vine growth. The system includes multiple soil moisture sensors, NPK sensors, temperature and humidity sensors, light sensors and water and fertilizer drip irrigation systems to monitor the grape growth environment in real time and generate water and fertilizer application decisions.
Through automated water and fertilizer management, new farmers can accurately obtain water and fertilizer application solutions for each stage of grape growth without planting experience, improve the healthy growth of vines, reduce labor costs, and improve grape yield and quality without planting experience.
Smart Images

Figure CN120197993A_ABST
Abstract
Description
Background Art
[0002] During the grape planting process, different grape varieties have different growth conditions in different regions. After the grape variety and planting region are determined, fertilization and irrigation are the main factors affecting grape yield and quality. Excessive or insufficient fertilization and irrigation will lead to a decrease in grape yield and quality. Moreover, if the timing of fertilization and irrigation is incorrect, it will also reduce the grape yield and quality, and in severe cases, it will cause the withering and apoptosis of grapevines.
[0003] The experience of grapevine planting experts requires years of planting practice, while new farmers who want to plant grapevines do not have planting experience. How to guide grape planting when new farmers do not have professional grape planting experience is an urgent problem to be solved. Summary of the Invention
[0004] This application provides a grape planting method, device, electronic device and storage medium based on the Internet of Things, which provides a technical solution to help new farmers plant grapes to a certain extent.
[0005] Other features and advantages of this application will become apparent through the following detailed description, or be learned in part through the practice of this application.
[0006] According to one aspect of this application, a grape planting method based on the Internet of Things is provided, which is applied to a decision-making device in a grape planting system. A water and fertilizer decision model is deployed in the decision-making device, and the water and fertilizer decision model is trained based on the expert experience of water and fertilizer content in the entire growth cycle of grapevines; the grape planting system also includes multiple soil humidity sensors, multiple NPK sensors, temperature and humidity sensors, light sensors and a water and fertilizer drip irrigation system. The multiple soil humidity sensors and the multiple NPK sensors are evenly distributed in the area where grapevines are planted. The water and fertilizer drip irrigation system is used for fertilization of three chemical fertilizers, nitrogen, phosphorus and potassium, and drip irrigation. The decision-making device is respectively connected to the multiple soil humidity sensors, multiple NPK sensors, temperature and humidity sensors, light sensors and the water and fertilizer drip irrigation system, including: respectively obtaining the data collected by the multiple soil humidity sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors, and obtaining humidity data H including multiple soil humidities t nitrogen content data N including multiple nitrogen contents in the soil t phosphorus content data P including multiple phosphorus contents in the soil t potassium content data K including multiple potassium contents in the soil t temperature data O t air humidity E t and light intensity L t ; obtaining time data T t ; constructing first state data S t, S t = {H t , N t , P t , K t , O t , E t , L t , T t}; Input the said S t into the water and fertilizer decision-making model, and the water and fertilizer decision-making model generates a water and fertilizer application decision a t according to the said S t . The said a t includes the application schemes of water, nitrogen, phosphorus, and potassium. Control the water and fertilizer drip irrigation system according to the said a t to apply water and fertilizer to the grapevines in the said area.
[0007] By using the grape planting system to collect data during the grape growth process, the growth environment of the grapes can be monitored in real time. And the method of using the water and fertilizer decision-making model to generate water and fertilizer application decisions based on the data monitored in the grape planting system enables new farmers to accurately obtain the water and fertilizer application schemes at any stage of grape growth without planting experience. In addition, by implementing the water and fertilizer application decisions through the water and fertilizer drip irrigation system, automatic water and fertilizer application can be achieved, reducing labor costs. The water and fertilizer application decisions generated by the water and fertilizer decision-making model trained with the expert experience of the water and fertilizer content in the whole growth cycle of grapevines can well match the current growth situation of the grapevines, which is beneficial to the healthy growth of grapevines.
[0008] In some embodiments, the decision-making device is configured with an experience pool, and the method further includes: obtaining the second state data S t corresponding to the said S t+1 . The said S t+1 includes the humidity data H t corresponding to the said area after controlling the water and fertilizer drip irrigation system according to the said a t+1 , nitrogen content data N t+1 , phosphorus content data P t+1 , potassium content data K t+1 , temperature data O t+1 , air humidity E t+1 , light intensity L t+1 and time data T t+1 ; obtaining the growth score F t+1 of the grapevines in the said area at the said T t+1 ; calculating the reward R t corresponding to the said a t according to the following formula:
[0009]
[0010] W1, W2, W3, W4, and W5 are all weight coefficients; and are the target humidity, target nitrogen content, target phosphorus content, and target potassium content in the soil of the said area in the expert experience of the water and fertilizer content respectively at T t+1 ; construct historical samples (S t , a t , R t , S t+1 ); store the said (S t , a t , R t , S t+1 ) into the said experience pool.
[0011] By including the reward feedback of the differences between the nitrogen content, phosphorus content, and potassium content in the soil and the corresponding target contents in the reward function, the water and fertilizer decision-making model can learn how to adjust the nitrogen content, phosphorus content, and potassium content in the soil of the area where the grapevines are located at different times of each year, so that the nitrogen content, phosphorus content, and potassium content in the area meet the contents under the expert experience, which is beneficial to the growth and development of the grapevines. In addition, including the growth score of the grapevines in the reward function can further balance the deficiencies in the expert experience, so that the water and fertilizer decision-making model can learn the advantages superior to the expert experience in the actual planting process on the basis of the expert experience, and thus is beneficial to generating a water and fertilizer application decision more suitable for the current planted grapevines.
[0012] In some embodiments, the grape planting system further includes a plurality of image acquisition devices, which are uniformly arranged in the said area for acquiring images of the grapevines in the said area; the decision-making device also stores standard grapevine images under a plurality of time data, and the standard grapevine images are used to represent the standard growth conditions of the grapevines under the corresponding time data; obtaining the growth score F t+1 of the grapevines in the said area includes: at the said T t+1 , acquiring the images captured by the plurality of image acquisition devices to obtain a plurality of grapevine images; for each grapevine image, calculating the similarity between the grapevine image and each standard grapevine image, and determining the standard grapevine image corresponding to the grapevine image according to the similarity, and determining the time difference between the time data of the standard grapevine image corresponding to the grapevine image and the said T t+1 ; calculating the average value of the time differences corresponding to the plurality of grapevine images, and processing the average value according to a preset processing method to obtain the said F t+1 .
[0013] By matching the grapevine image with the standard grapevine image, the stage of growth and development of the current grapevine can be identified, and then the difference between the time corresponding to the current growth stage and the actual time can be judged, so as to identify whether the development of the grapevine is advanced or backward, and thus score according to the development of the grapevine. For example, if the development of the grapevine is backward, the score is negative. If the development of the grapevine is advanced, the positive or negative value of the score and the specific value of the score are determined according to the degree of advancement.
[0014] In some embodiments, a plurality of historical samples are stored in the experience pool; the training process of the water and fertilizer decision-making model includes: obtaining an initial water and fertilizer decision-making model, the type of the initial water and fertilizer decision-making model is a reinforcement learning model, and the initial water and fertilizer decision-making model includes a policy network Actor; obtaining training samples (S i , A i , R i , S i+1 ) from the experience pool; updating the network parameters in the Actor according to the training samples to obtain the water and fertilizer decision-making model.
[0015] In some embodiments, the area includes a plurality of evenly distributed points, and three soil moisture sensors at different preset depths are arranged in the soil corresponding to each point; two NPK sensors at different preset depths are also arranged in the soil corresponding to each point.
[0016] By configuring soil moisture sensors and NPK sensors at different depths of the soil, the growth environment of the grapevine can be better identified, which is beneficial to the water and fertilizer decision-making model to generate more accurate water and fertilizer application decisions, thus being beneficial to the growth of the grapevine.
[0017] In some embodiments, the water and fertilizer drip irrigation system includes storage bins corresponding to three chemical fertilizers, nitrogen, phosphorus, and potassium, four mass flow control valves, a discharge bin, two electric control switches, a dissolution chamber, a drip irrigation pipeline system, and a water storage bin; each storage bin is connected to the discharge bin through a mass flow control valve, the discharge bin is connected to the dissolution chamber through an electric control switch, the dissolution chamber is connected to the water storage bin through a mass flow control valve, and the dissolution chamber is connected to the drip irrigation pipeline system through an electric control switch; the discharge bin is equipped with a ventilation system to facilitate maintaining a dry environment in the discharge bin.
[0018] Through the above water and fertilizer drip irrigation system, the ratio of the three chemical fertilizers, nitrogen, phosphorus, and potassium, and the amount of water applied can be accurately controlled to match the water and fertilizer application decision. Moreover, by setting a discharge bin between the storage bin of the chemical fertilizer and the dissolution chamber and configuring a ventilation system in the discharge bin, water vapor can be prevented from entering the storage bin of the chemical fertilizer and causing the chemical fertilizer to become damp.
[0019] According to another aspect of the present application, there is also provided a grape planting device based on the Internet of Things, which is applied to a decision-making device in a grape planting system. A water and fertilizer decision-making model is deployed in the decision-making device, and the water and fertilizer decision-making model is trained based on the expert experience of the water and fertilizer content in the entire growth cycle of grapevines; the grape planting system further includes a plurality of soil moisture sensors, a plurality of NPK sensors, a temperature and humidity sensor, a light sensor, and a water and fertilizer drip irrigation system. The plurality of soil moisture sensors and the plurality of NPK sensors are respectively evenly distributed in the area where grapevines are planted. The water and fertilizer drip irrigation system is used for applying three chemical fertilizers, namely nitrogen, phosphorus, and potassium, and drip irrigation. The decision-making device is respectively connected to the plurality of soil moisture sensors, the plurality of NPK sensors, the temperature and humidity sensor, the light sensor, and the water and fertilizer drip irrigation system, and includes: a first acquisition module, configured to respectively acquire the data collected by the plurality of soil moisture sensors, the plurality of NPK sensors, the temperature and humidity sensor, and the light sensor, and obtain humidity data H including a plurality of soil moistures t , nitrogen content data N including the nitrogen content in a plurality of soils t , phosphorus content data P including the phosphorus content in a plurality of soils t , potassium content data K including the potassium content in a plurality of soils t , temperature data O t , air humidity E t , and light intensity L t ; a second acquisition module, configured to acquire time data T t ; a construction module, configured to construct first state data S t , S t = {H t , N t , P t , K t , O t , E t , L t , T t}; a decision-making module, configured to input the S t into the water and fertilizer decision-making model, and the water and fertilizer decision-making model generates a water and fertilizer application decision a t according to the S t , and the a t includes the application schemes of water, nitrogen, phosphorus, and potassium; a control module, configured to control the water and fertilizer drip irrigation system according to the a t to apply water and fertilizer to the grapevines in the area.
[0020] In some embodiments, the decision-making device is configured with an experience pool, and the device further includes a sample construction module, configured to obtain second state data S t corresponding to the S t+1 , the St+1 including the humidity data H corresponding to the area after controlling the water and fertilizer drip irrigation system according to the said a t 、nitrogen content data N t+1 、phosphorus content data P t+1 、potassium content data K t+1 、temperature data O t+1 、air humidity E t+1 、light intensity L t+1 and time data T t+1 ; obtaining the growth score F of the grapevines in the said area at the said T t+1 ; calculating the corresponding reward R of the said a according to the following formula t+1 : t+1 where W1, W2, W3, W4 and W5 are all weight coefficients; t and t are respectively the target humidity, target nitrogen content, target phosphorus content and target potassium content in the soil of the said area at the said T
[0021]
[0022] ; constructing a historical sample (S , a , R t+1 , S t , a t , R t , S t+1 ); storing the (S t , a t , R t , S t+1 ) into the said experience pool.
[0023] In some embodiments, the grape planting system further includes a plurality of image acquisition devices, the plurality of image acquisition devices are uniformly arranged in the said area for acquiring images of the grapevines in the said area; the decision-making device also stores standard grapevine images under a plurality of time data, and the standard grapevine images are used to represent the standard growth conditions of grapevines under the corresponding time data; the sample construction module is further configured to obtain the images captured by the plurality of image acquisition devices at the said T t+1 to obtain a plurality of grapevine images; for each grapevine image, calculating the similarity between the grapevine image and each standard grapevine image, and determining the standard grapevine image corresponding to the grapevine image according to the similarity, and determining the time difference between the time data of the standard grapevine image corresponding to the grapevine image and the said T t+1 ; calculating the average value of the time differences corresponding to the plurality of grapevine images, and processing the average value according to a preset processing method to obtain the said F t+1 .
[0024] According to another aspect of the present application, an electronic device is further provided. The electronic device includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method for grape cultivation based on the Internet of Things described in any one of the above by executing the executable instructions.
[0025] According to yet another aspect of the present application, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the method for grape cultivation based on the Internet of Things described in any one of the above is implemented.
[0026] According to yet another aspect of the present application, a computer program product is further provided, including a computer program. When the computer program is executed by a processor, the method for grape cultivation based on the Internet of Things described in any one of the above is implemented. Description of the Drawings
[0027] Figure 1 A flowchart of the method for grape cultivation based on the Internet of Things in an embodiment of the present application is shown;
[0028] Figure 2 A schematic diagram of a water and fertilizer drip irrigation system in an embodiment of the present application is shown;
[0029] Figure 3 A schematic diagram of the device for grape cultivation based on the Internet of Things in an embodiment of the present application is shown;
[0030] Figure 4 A structural block diagram of an electronic device in an embodiment of the present application is shown. Detailed Embodiments
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described can be combined in any suitable manner in one or more embodiments.
[0032] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0033] Figure 1 The flowchart of a grape planting method based on the Internet of Things in an embodiment of the present application is shown. As Figure 1 shown, the grape planting method based on the Internet of Things provided in the embodiment of the present application includes the following S101 - S105. This method is applied to the decision-making device in the grape planting system. A water and fertilizer decision-making model is deployed in the decision-making device, and the water and fertilizer decision-making model is trained based on the expert experience of the water and fertilizer content in the entire growth cycle of the grapevine.
[0034] The grape planting system further includes multiple soil humidity sensors, multiple NPK (nitrogen, phosphorus, potassium) sensors, temperature and humidity sensors, light sensors, and a water and fertilizer drip irrigation system. The multiple soil humidity sensors and the multiple NPK sensors are respectively evenly distributed in the area where the grapevines are planted. The water and fertilizer drip irrigation system is used for applying three kinds of chemical fertilizers, namely nitrogen, phosphorus, and potassium, and drip irrigation. The decision-making device is respectively connected to the multiple soil humidity sensors, the multiple NPK sensors, the temperature and humidity sensors, the light sensors, and the water and fertilizer drip irrigation system.
[0035] Regarding what specific device the decision-making device is, the embodiment of the present application does not make any restrictions. For example, the decision-making device can be any electronic device that can deploy a water and fertilizer decision-making model, receive data collected by various sensors in the grape planting system, and control the water and fertilizer drip irrigation system according to the water and fertilizer application decision generated by the water and fertilizer decision-making model. For example, the electronic device can be a mobile phone, a computer, a server, etc. For another example, the electronic device can be an edge server.
[0036] The way the decision-making device is respectively connected to the multiple soil humidity sensors, the multiple NPK sensors, the temperature and humidity sensors, the light sensors, and the water and fertilizer drip irrigation system can be a wired connection or a wireless connection. The wireless connection can adopt LoRa (Long Range) and NB-IoT (Narrow Band Internet of Things) technologies.
[0037] In one embodiment, the area includes multiple evenly distributed points. In the soil corresponding to each point, three soil humidity sensors are set at different preset depths. In the soil corresponding to each point, two NPK sensors are also set at different preset depths.
[0038] Regarding what the respective preset depths of the three soil humidity sensors are under the soil at each point, the embodiment of the present application does not make any restrictions. For example, the three preset depths are 20 cm (centimeters), 30 cm, and 50 cm. Regarding what the respective preset depths of the two NPK sensors are under the soil at each point, the embodiment of the present application does not make any restrictions. For example, the two preset depths are 20 cm and 35 cm.
[0039] By configuring soil moisture sensors and NPK sensors at different depths of the soil, the growth environment of the grapevine can be better identified, which in turn helps the water and fertilizer decision-making model to generate water and fertilizer application decisions more accurately, thus benefiting the growth of the grapevine.
[0040] S101, respectively obtain data collected by multiple soil moisture sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors to obtain humidity data H including multiple soil moisture t , including nitrogen content data N in multiple soils t , including phosphorus content data P in multiple soils t , including potassium content data K in multiple soils t , Temperature data t , air humidity E t and light intensity L t .
[0041] The decision-making device is connected to multiple soil moisture sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors. Therefore, multiple soil moisture sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors can send the collected data to the decision-making device. After the decision-making device receives the data collected by each sensor, it completes H t 、N t , P t , K t , O t 、E t and L t to obtain.
[0042] It should be noted that the number of soil moisture sensors and NPK sensors can be the same or different, and the embodiments of the present application do not limit this. The arrangement density of soil moisture sensors and NPK sensors can be the same or different.
[0043] S102, obtaining time data T t .
[0044] Among them, T t It is used to indicate the time point when the water and fertilizer application decision corresponding to time step t is generated, which can also be roughly understood as the time point of performing S101. It should be noted that T t At least include month and day. For example, T t is March 7. For another example, T t It is 13:00 on March 7, 2024.
[0045] S103, constructing first state data S t , S t ={Ht , N t , P t , K t , O t , E t , L t , T t}。
[0046] S104, input S t into the water and fertilizer decision-making model, and the water and fertilizer decision-making model generates a water and fertilizer application decision a t according to S t , a t including the application schemes of water, nitrogen, phosphorus, and potassium.
[0047] The embodiments of the present application do not limit how the water and fertilizer decision-making model is deployed to the decision-making device. For example, the initial water and fertilizer decision-making model can be first deployed on the decision-making device, and then the initial water and fertilizer decision-making model is trained on the decision-making device to obtain the water and fertilizer decision-making model.
[0048] Among them, the embodiments of the present application do not limit which specific model the initial water and fertilizer decision-making model is. For example, the initial water and fertilizer decision-making model can be any reinforcement learning model. For example, the PPO (Proximal Policy Optimization) model.
[0049] In one embodiment, the decision-making device is configured with an experience pool, and multiple historical samples are stored in the experience pool. The training process of the water and fertilizer decision-making model includes: obtaining the initial water and fertilizer decision-making model, the type of the initial water and fertilizer decision-making model is a reinforcement learning model, and the initial water and fertilizer decision-making model includes an Actor (policy network); obtaining training samples (S i , A i , R i , S i+1 ) from the experience pool; updating the network parameters in the Actor according to the training samples to obtain the water and fertilizer decision-making model.
[0050] Among them, the process of updating the network parameters in the Actor according to the training samples can refer to any method of updating the parameters of the Actor network in the reinforcement learning model.
[0051] The training sample (S i , A i , R i , S i+1 ) is one of the multiple historical samples.
[0052] In one embodiment, the process of storing historical samples in the experience pool includes: obtaining the second state data S t corresponding to S t+1, S t+1 including humidity data H corresponding to the area controlled by controlling the water and fertilizer drip irrigation system according to a t t+1 nitrogen content data N t+1 phosphorus content data P t+1 potassium content data K t+1 temperature data O t+1 air humidity E t+1 light intensity L t+1 and time data T t+1 ; obtaining the growth score F of the grapevines in the area at T t+1 t+1 ; calculating the corresponding reward R of a according to the following formula 1 t t :
[0053]
[0054] where W1, W2, W3, W4 and W5 are all weight coefficients; and
[0055]
[0056]
[0057]
[0058] are respectively the target humidity, target nitrogen content, target phosphorus content and target potassium content in the soil of the area at T t+1 in the expert experience of the water and fertilizer content.
[0055] After that, construct the historical sample (S t , a t , R t , S t+1 t ); and store (S t , a t , R t+1 , S t+1 ) in the experience pool.
[0056]
[0057] By including the reward feedback of the differences between the nitrogen content, phosphorus content and potassium content in the soil and the corresponding target contents in the reward function, the water and fertilizer decision-making model can learn how to adjust the nitrogen content, phosphorus content and potassium content in the soil of the area where the grapevines are located at different times of each year, so that the nitrogen content, phosphorus content and potassium content in the soil of the area meet the contents under the expert experience, which is beneficial to the growth and development of the grapevines. In addition, including the growth score of the grapevines in the reward function can further balance the deficiencies in the expert experience, so that the water and fertilizer decision-making model can learn the advantages better than the expert experience in the actual planting process on the basis of the expert experience, and thus is beneficial to generating a water and fertilizer application decision more suitable for the current planted grapevines.
[0058] Regarding how to obtain F t+1 , the embodiments of the present application do not make any restrictions.
[0058] In one embodiment, the grape cultivation system further includes a plurality of image acquisition devices uniformly arranged in the area for acquiring images of grapevines in the area; standard grapevine images under a plurality of time data are also stored in the decision-making device, and the standard grapevine images are used to represent the standard growth conditions of grapevines under the corresponding time data. Obtain F t+1 , which may include: at T t+1 , acquire the images captured by the plurality of image acquisition devices to obtain a plurality of grapevine images; for each grapevine image, calculate the similarity between the grapevine image and each standard grapevine image, and based on the similarity, determine the standard grapevine image corresponding to the grapevine image, and determine the time difference between the time data of the standard grapevine image corresponding to the grapevine image and T t+1 ; calculate the average value of the time differences corresponding to the plurality of grapevine images, and process the average value according to a preset processing method to obtain F t+1 .
[0059] In one embodiment, for any grapevine image, among the similarities between the any grapevine image and each standard grapevine image, the standard grapevine image corresponding to the maximum similarity is the standard grapevine image corresponding to the any grapevine image. Then, according to the standard grapevine images under the plurality of time data stored in the decision-making device, the time data of the standard grapevine image corresponding to the any grapevine image can be determined, and then the time difference from T t+1 can be calculated based on the time data.
[0060] Regarding what specific form the preset processing method is, the embodiments of the present application do not make limitations. For example, if the average value is behind T t+1 for a period of time, then F t+1 is negative, and the greater the lagging time, the greater the absolute value of F t+1 . For another example, if the average value is ahead of T t+1 for a period of time, and this period of time is less than the preset leading threshold, then F t+1 is positive, and there is a preset corresponding relationship between the leading time and the evaluation score. For another example, if the average value is ahead of T t+1 for a period of time, and this period of time is greater than the preset leading threshold, then F t+1 is negative, and the greater the leading time, the greater the absolute value of F t+1 .
[0061] By matching the grapevine image with the standard grapevine image, the growth stage of the current grapevine can be identified, and then the difference between the time corresponding to the current growth stage and the actual time can be judged, so as to identify whether the development of the grapevine is advanced or backward, and then score according to the development of the grapevine. For example, if the development of the grapevine is backward, the score is negative. If the development of the grapevine is advanced, the positive or negative value of the score and the specific value of the score are determined according to the degree of advancement.
[0062] S105, according to a t Control the water and fertilizer drip irrigation system to apply water and fertilizer to the grapevines in the area.
[0063] In one embodiment, as Figure 2 shown, the water and fertilizer drip irrigation system includes storage bins 21 corresponding to three chemical fertilizers, nitrogen, phosphorus, and potassium, four mass flow control valves 22, a discharge bin 23, two electric control switches 24, a dissolution chamber 25, a drip irrigation pipeline system 26, and a water storage bin 27.
[0064] Each storage bin 21 is connected to the discharge bin 23 through a mass flow control valve 22. The discharge bin 23 is connected to the dissolution chamber 25 through an electric control switch 24. The dissolution chamber 25 is connected to the water storage bin 27 through a mass flow control valve 22. The dissolution chamber 25 is connected to the drip irrigation pipeline system 26 through an electric control switch 24.
[0065] The discharge bin 23 is equipped with a ventilation system to facilitate maintaining a dry environment in the discharge bin 23.
[0066] By controlling the mass flow control valve 22, the chemical fertilizers in the storage bins 21 corresponding to the three chemical fertilizers, nitrogen, phosphorus, and potassium, can be added to the discharge bin 23 in a controlled manner, and the proportions and respective masses of the added nitrogen, phosphorus, and potassium fertilizers can be controlled separately.
[0067] By controlling the mass flow control valve 22 connected to the water storage bin 27, the amount of drip irrigation water can be accurately controlled.
[0068] Through the above water and fertilizer drip irrigation system, the ratio of the three chemical fertilizers, nitrogen, phosphorus, and potassium, and the amount of water applied can be accurately controlled to match the water and fertilizer application decision. Moreover, by setting a discharge bin between the storage bin of the chemical fertilizer and the dissolution chamber and configuring a ventilation system in the discharge bin, water vapor can be prevented from entering the storage bin of the chemical fertilizer and causing the chemical fertilizer to become damp.
[0069] By using the grape planting system to collect data during the grape growth process, the growth environment of the grapes can be monitored in real time. And by using the water and fertilizer decision-making model to generate water and fertilizer application decisions based on the data monitored in the grape planting system, new farmers can accurately obtain the water and fertilizer application plans at any stage of grape growth without planting experience. In addition, by implementing the water and fertilizer application decisions through the water and fertilizer drip irrigation system, automatic water and fertilizer application can be achieved, reducing labor costs. The water and fertilizer decision-making model trained with the expert experience of the water and fertilizer content in the entire growth cycle of the grapevine can generate water and fertilizer application decisions that can well match the current growth situation of the grapevine, which is beneficial to the healthy growth of the grapevine.
[0070] Based on the same inventive concept, an embodiment of the present application also provides an Internet of Things-based grape planting device, as described in the following embodiments. Since the principle of solving problems in this device embodiment is similar to that of the above method embodiment, the implementation of this device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.
[0071] Figure 3 The following shows a schematic diagram of an Internet of Things-based grape planting device in an embodiment of the present application, as Figure 3 shown. This device is applied to the decision-making device in the grape planting system. A water and fertilizer decision-making model is deployed in the decision-making device, and the water and fertilizer decision-making model is trained based on the expert experience of the water and fertilizer content in the entire growth cycle of the grapevine; the grape planting system further includes multiple soil humidity sensors, multiple NPK sensors, a temperature and humidity sensor, a light sensor, and a water and fertilizer drip irrigation system. The multiple soil humidity sensors and the multiple NPK sensors are evenly distributed in the area where the grapevines are planted respectively. The water and fertilizer drip irrigation system is used for applying nitrogen, phosphorus, and potassium fertilizers and drip irrigation. The decision-making device is respectively connected to the multiple soil humidity sensors, the multiple NPK sensors, the temperature and humidity sensor, the light sensor, and the water and fertilizer drip irrigation system, and includes: a first acquisition module 31, which is used to respectively acquire the data collected by the multiple soil humidity sensors, the multiple NPK sensors, the temperature and humidity sensor, and the light sensor, and obtain humidity data H including multiple soil humidities t , nitrogen content data N including the nitrogen content in multiple soils t , phosphorus content data P including the phosphorus content in multiple soils t , potassium content data K including the potassium content in multiple soils t , temperature data O t , air humidity E t , and light intensity L t ; a second acquisition module 32, which is used to acquire time data T t ; a construction module 33, which is used to construct first state data S t , S t = {H t , Nt , P t , K t , O t , E t , L t , T t}; The decision-making module 34 is used to input S t into the water and fertilizer decision-making model, and the water and fertilizer decision-making model generates the water and fertilizer application decision a t according to S t , a t , including the application schemes of water, nitrogen, phosphorus, and potassium; the control module 35 is used to control the water and fertilizer drip irrigation system according to a t to apply water and fertilizer to the grapevines in the area.
[0072] In some embodiments, the decision-making device is configured with an experience pool, and the device further includes a sample construction module 36, which is used to obtain the corresponding second state data S t of S t+1 , S t+1 , including the humidity data H t corresponding to the area after controlling the water and fertilizer drip irrigation system according to a t+1 , the nitrogen content data N t+1 , the phosphorus content data P t+1 , the potassium content data K t+1 , the temperature data O t+1 , the air humidity E t+1 , the light intensity L t+1 , and the time data T t+1 ; obtain the growth score F t+1 of the grapevines in the area at T t+1 ; calculate the corresponding reward R t of a according to the above formula 1 t ; construct the historical sample (S t , a t , R t , S t+1 ); store (S t , a t , R t , S t+1 ) into the experience pool.
[0073] In some embodiments, the grape planting system further includes a plurality of image acquisition devices, which are evenly arranged in the area and used to acquire images of the grapevines in the area; the decision-making device also stores standard grapevine images under a plurality of time data, and the standard grapevine images are used to represent the standard growth conditions of the grapevines under the corresponding time data; the sample construction module 36 is further used to at T t+1When, obtain images captured by multiple image acquisition devices to obtain multiple grapevine images; for each grapevine image, calculate the similarity between the grapevine image and each standard grapevine image, and based on the similarity, determine the standard grapevine image corresponding to the grapevine image, and determine the time difference between the time data of the standard grapevine image corresponding to the grapevine image and T t+1 Calculate the average value of the time differences corresponding to the multiple grapevine images, and process the average value according to a preset processing method to obtain F t+1 .
[0074] Those skilled in the art of the present application can understand that various aspects of the present application can be implemented as a system, a method, or a program product. Therefore, various aspects of the present application can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuits", "modules", or "systems" here.
[0075] Next, refer to Figure 4 to describe the electronic device 400 according to this embodiment of the present application. Figure 4 The electronic device 400 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0076] As Figure 4 shown, the electronic device 400 is presented in the form of a general computing device. The components of the electronic device 400 may include but are not limited to: the at least one processing unit 410 described above, the at least one storage unit 420 described above, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).
[0077] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 410, so that the processing unit 410 executes the steps according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification. For example, the processing unit 410 can execute the following steps of the above method embodiment: S101 - S105.
[0078] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202, and may further include a read-only storage unit (ROM) 4203.
[0079] The storage unit 420 may also include a program / utilities 4204 having a set (at least one) of program modules 4205. Such program modules 4205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0080] The bus 430 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.
[0081] The electronic device 400 may also communicate with one or more external devices 440 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or may communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be through the input / output (I / O) interface 450. And, the electronic device 400 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 460. As shown in the figure, the network adapter 460 communicates with other modules of the electronic device 400 through the bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0082] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or can be implemented by the way of software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0083] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer program product, and the computer program product includes: a computer program, and when the computer program is executed by a processor, it implements the above-mentioned grape cultivation method based on the Internet of Things.
[0084] In an exemplary embodiment of the present application, a computer-readable storage medium is further provided. The computer-readable storage medium may be a readable signal medium or a readable storage medium. A program product capable of implementing the above method of the present application is stored on the computer-readable storage medium.
[0085] In some possible implementation manners, various aspects of the present application may also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments described in the above "Exemplary Method" section of this specification.
[0086] More specific examples of the computer-readable storage medium in the present application may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0087] In the present application, the computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, and the readable medium may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0088] Optionally, the program code contained on the computer-readable storage medium may be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0089] In specific implementation, program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0090] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more of the above-described modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0091] In addition, although the steps of the methods in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be executed in that specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution, etc.
[0092] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of the present application.
[0093] Other embodiments of the present application will be readily contemplated by those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only to be considered as exemplary, and the true scope of the present application is pointed out by the appended claims.
Claims
1. A grape planting method based on the Internet of Things, characterized in that: A decision-making device applied to a grape planting system, wherein a water-fertilizer decision-making model is deployed in the decision-making device, and the water-fertilizer decision-making model is obtained through expert experience training based on the water-fertilizer content in the entire growth cycle of the grapevine; The grape planting system further includes a plurality of soil moisture sensors, a plurality of NPK sensors, a temperature and humidity sensor, a light sensor and a water and fertilizer drip irrigation system. The plurality of soil moisture sensors and the plurality of NPK sensors are evenly distributed in the grape planting area. The water and fertilizer drip irrigation system is used for fertilizing and drip irrigation of nitrogen, phosphorus and potassium fertilizers. The decision-making device is respectively connected to the plurality of soil moisture sensors, the plurality of NPK sensors, the temperature and humidity sensor, the light sensor and the water and fertilizer drip irrigation system, including: The data collected by the multiple soil moisture sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors are respectively obtained to obtain humidity data H including multiple soil moisture. t , including nitrogen content data N in multiple soils t , including phosphorus content data P in multiple soils t , including potassium content data K in multiple soils t , Temperature data t 、Air humidity E t and light intensity L t ; Get time data T t ; Construct the first state data S t , S t ={H t ,N t ,P t ,K t ,O t ,E t ,L t ,T t }; The S t The water-fertilizer decision model is input, and the water-fertilizer decision model is used according to the S t Generate water and fertilizer application decision a t , the a t Includes application plans for water, nitrogen, phosphorus, and potassium; According to the a t The water and fertilizer drip irrigation system is controlled to apply water and fertilizer to the grapevines in the area.
2. The method according to claim 1, characterized in that The decision device is configured with an experience pool, and the method further comprises: Get the S t The corresponding second state data S t+1 , the S t+1 Including according to the a t After controlling the water and fertilizer drip irrigation system, the humidity data H corresponding to the area t+1 、Nitrogen content data N t+1 、Phosphorus content data t+1 , Potassium content data K t+1 , Temperature data t+1 、Air humidity E t+1 , light intensity L t+1 and time data T t+1 ; Get the grapevines in the area in the T t+1 Growth score F t+1 ; The a is calculated according to the following formula t The corresponding reward R t : W1, W2, W3, W4 and W5 are weight coefficients; and The water and fertilizer content is the same as the expert experience in T t+1 target moisture, target nitrogen content, target phosphorus content and target potassium content in the soil of the area when the target nitrogen content is less than 0.05; Constructing historical samples (S t ,a t ,R t ,S t+1 ); The (S t ,a t ,R t ,S t+1 ) is stored in the experience pool.
3. The method according to claim 2, characterized in that The grape planting system further comprises a plurality of image acquisition devices, which are evenly arranged in the area and are used to acquire images of grapevines in the area; the decision device further stores standard grapevine images under a plurality of time data, and the standard grapevine images are used to represent the standard growth conditions of grapevines under the corresponding time data; The step of obtaining the growth score F of the grapevine in the region t+1 ,include: In the T t+1 When the plurality of images captured by the image acquisition devices are acquired, a plurality of grape vine images are obtained; For each grapevine image, the similarity between the grapevine image and each standard grapevine image is calculated, and the standard grapevine image corresponding to the grapevine image is determined according to the similarity, and the time data of the standard grapevine image corresponding to the grapevine image is determined to be the same as the time data of the standard grapevine image corresponding to the grapevine image. t+1 The time difference between Calculate the average value of the time differences corresponding to the multiple grapevine images, and process the average value according to a preset processing method to obtain the F t+1 .
4. The method according to claim 2, characterized in that: The experience pool stores multiple historical samples; The training process of the water and fertilizer decision model includes: Acquire an initial water-fertilizer decision model, where the type of the initial water-fertilizer decision model is a reinforcement learning model, and the initial water-fertilizer decision model includes a strategy network Actor; Obtain training samples (S) from the experience pool i ,A i ,R i ,S i+1 ); The network parameters in the Actor are updated according to the training samples to obtain the water and fertilizer decision model.
5. The method according to claim 1, characterized in that The area includes a plurality of evenly distributed points, and three soil moisture sensors located at different preset depths are arranged in the soil corresponding to each point; Two NPK sensors located at different preset depths are also arranged in the soil corresponding to each point.
6. The method according to claim 1, characterized in that The water and fertilizer drip irrigation system includes storage bins corresponding to the three fertilizers of nitrogen, phosphorus and potassium, four mass flow control valves, a discharge bin, two electric control switches, a dissolution chamber, a drip irrigation pipe system and a water storage bin; Each storage bin is connected to the discharge bin via a mass flow control valve, the discharge bin is connected to the dissolution chamber via an electric control switch, the dissolution chamber is connected to the water storage bin via a mass flow control valve, and the dissolution chamber is connected to the drip irrigation pipe system via an electric control switch; The discharge bin is equipped with a ventilation system to maintain a dry environment in the discharge bin.
7. A grape planting device based on the Internet of Things, characterized in that: A decision-making device applied to a grape planting system, wherein a water-fertilizer decision-making model is deployed in the decision-making device, and the water-fertilizer decision-making model is obtained through expert experience training based on the water-fertilizer content in the entire growth cycle of the grapevine; The grape planting system further includes a plurality of soil moisture sensors, a plurality of NPK sensors, a temperature and humidity sensor, a light sensor and a water and fertilizer drip irrigation system. The plurality of soil moisture sensors and the plurality of NPK sensors are evenly distributed in the grape planting area. The water and fertilizer drip irrigation system is used for fertilizing and drip irrigation of nitrogen, phosphorus and potassium fertilizers. The decision-making device is respectively connected to the plurality of soil moisture sensors, the plurality of NPK sensors, the temperature and humidity sensor, the light sensor and the water and fertilizer drip irrigation system, including: The first acquisition module is used to respectively acquire the data collected by the multiple soil moisture sensors, multiple NPK sensors, temperature and humidity sensors, and light sensors to obtain humidity data H including multiple soil moisture. t , including nitrogen content data N in multiple soils t , including phosphorus content data P in multiple soils t , including potassium content data K in multiple soils t , Temperature data t 、Air humidity E t and light intensity L t ; The second acquisition module is used to acquire time data T t ; Construction module, used to construct the first state data S t , S t ={H t ,N t ,P t ,K t ,O t ,E t ,L t ,T t }; A decision module is used to t The water-fertilizer decision model is input, and the water-fertilizer decision model is used according to the S t Generate water and fertilizer application decision a t , the a t Includes application plans for water, nitrogen, phosphorus, and potassium; A control module is used to t The water and fertilizer drip irrigation system is controlled to apply water and fertilizer to the grapevines in the area.
8. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the Internet of Things-based grape planting method described in any one of claims 1 to 6 by executing the executable instructions.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the Internet of Things-based grape planting method described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the grape planting method based on the Internet of Things according to any one of claims 1 to 6 is implemented.