Training method and device of model for predicting crop yield

Through the proximal strategy model, the prediction of crop yields is combined with the strategy network and the value network, and the model parameters are optimized, and the problem of low prediction accuracy in the existing technology is solved, achieving higher prediction accuracy and crop yield.

CN119476565APending Publication Date: 2025-02-18BEIJING LONGZHI DIGITAL TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411434254.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The accuracy of predicting crop yields in the prior art is low, and it is difficult to effectively consider various factors such as climate, soil, crop varieties, and water application and fertilization.

Method used

The proximal strategy model is adopted to predict the amount of water and fertilizer application through the strategy network, and the value network predicts the crop yield after water application and fertilization, and the model parameters are optimized using the water application and fertilization reward function to improve the prediction accuracy.

Benefits of technology

Improve the accuracy of crop yield prediction, enables more effective consideration of multiple influencing factors, and provides more accurate water and fertilization strategies to improve crop yield.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476565A_ABST
    Figure CN119476565A_ABST
Patent Text Reader

Abstract

The invention provides a training method and device of a model for predicting crop yield. The method comprises the steps that training data are acquired, and the training data are crop variety data, soil data, meteorological data and planting data; based on the training data, utilizing a strategy network in the near-end strategy model to predict the water application amount and the fertilization amount; based on the training data and the water application amount, predicting the crop yield after water application by using a value network in the near-end strategy model; based on the training data and the fertilization amount, predicting the crop yield after fertilization by using a value network; calculating a water application reward value by using a water application reward function according to the water application amount and the crop yield after water application; calculating a fertilization reward value by using a fertilization reward function according to the fertilization amount and the crop yield after fertilization; and optimizing model parameters of the near-end strategy model according to the water application reward value and the fertilization reward value so as to complete training of the near-end strategy model. By adopting the technical means, the problem of poor crop yield prediction accuracy in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of crop yield prediction, and in particular to a training method and device for a model for predicting crop yield. Background Art

[0002] Crop yields are related to factors such as climate, soil, crop varieties, and crop growth conditions. In addition, the number and amount of watering and fertilizing in the later stage will also affect the final crop yield. Existing methods for predicting crop yields are not accurate. How to accurately estimate crop yields based on various factors and the number and amount of watering and fertilizing is a major technical problem in the current agricultural field. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a training method, device, electronic device and computer-readable storage medium for a model for predicting crop yield, so as to solve the problem of poor accuracy in predicting crop yield in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a training method for a model for predicting crop yield is provided, comprising: obtaining training data, wherein the training data is variety data, soil data, meteorological data and planting data of the crop; based on the training data, using a policy network in a proximal policy model to predict the amount of water and fertilizer applied; based on the training data and the amount of water applied, using a value network in the proximal policy model to predict the crop yield after watering; based on the training data and the amount of fertilizer applied, using a value network to predict the crop yield after fertilization; based on the training data and the amount of fertilizer applied, using a water reward function to calculate a water reward value based on the amount of water applied and the crop yield after watering; using a fertilization reward function to calculate a fertilization reward value based on the amount of fertilizer applied and the crop yield after fertilization; and optimizing the model parameters of the proximal policy model based on the water reward value and the fertilization reward value to complete the training of the proximal policy model.

[0005] According to a second aspect of an embodiment of the present application, a training device for a model for predicting crop yield is provided, comprising: an acquisition module configured to acquire training data, wherein the training data is variety data, soil data, meteorological data and planting data of the crop; a first prediction module configured to predict the amount of water and fertilizer applied based on the training data using a policy network in a proximal policy model; a second prediction module configured to predict the crop yield after watering based on the training data and the amount of water applied using a value network in the proximal policy model; a third prediction module configured to predict the crop yield after fertilization based on the training data and the amount of fertilizer applied using a value network; a first calculation module configured to calculate a watering reward value based on the amount of water applied and the crop yield after watering using a watering reward function; a second calculation module configured to calculate a fertilization reward value based on the amount of fertilizer applied and the crop yield after fertilization using a fertilization reward function; an optimization module configured to optimize the model parameters of the proximal policy model based on the watering reward value and the fertilization reward value to complete the training of the proximal policy model.

[0006] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0007] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] Compared with the prior art, the embodiments of the present application have the following beneficial effects: obtaining training data, wherein the training data is variety data, soil data, meteorological data and planting data of crops; based on the training data, using the policy network in the proximal policy model to predict the amount of water and fertilizer; based on the training data and the amount of water, using the value network in the proximal policy model to predict the crop yield after watering; based on the training data and the amount of fertilizer, using the value network to predict the crop yield after fertilization; according to the amount of water and the crop yield after watering, using the water reward function to calculate the water reward value; according to the amount of fertilizer and the crop yield after fertilization, using the fertilizer reward function to calculate the fertilization reward value; according to the water reward value and the fertilization reward value, optimizing the model parameters of the proximal policy model to complete the training of the proximal policy model. The above-mentioned technical means can solve the problem of poor accuracy in predicting crop yield in the prior art, thereby improving the prediction accuracy, providing strong support for agricultural production, and increasing crop yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0010] Figure 1 It is a flowchart of a training method for a model for predicting crop yields provided in an embodiment of the present application;

[0011] Figure 2 is a flow chart of a method for predicting crop yields provided in an embodiment of the present application;

[0012] Figure 3 It is a structural schematic diagram of a training device for a model for predicting crop yields provided in an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0015] A training method and device for a model for predicting crop yield according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0016] Figure 1 It is a flowchart of a training method for a model for predicting crop yield provided in an embodiment of the present application. Figure 1 The training method of the model for predicting crop yield can be executed by a computer or a server, or software on the computer or the server. Figure 1 As shown, the training method of the model for predicting crop yield includes:

[0017] S101, obtaining training data, wherein the training data includes crop variety data, soil data, meteorological data, and planting data;

[0018] S102, predicting the amount of water and fertilizer application using the policy network in the proximal policy model based on the training data;

[0019] S103, based on the training data and the water application amount, using the value network in the proximal strategy model to predict the crop yield after water application;

[0020] S104, predicting the crop yield after fertilization using the value network based on the training data and the fertilizer amount;

[0021] S105, calculating a watering reward value using a watering reward function according to the watering amount and the crop yield after watering;

[0022] S106, calculating a fertilization reward value using a fertilization reward function according to the amount of fertilizer applied and the crop yield after fertilization;

[0023] S107, optimizing the model parameters of the proximal strategy model according to the watering reward value and the fertilization reward value to complete the training of the proximal strategy model.

[0024] Crops can be corn, wheat, millet, rice, etc. The variety data of crops include the accumulated temperature data required for the crops of this variety at different growth stages, the number of grains per plant of this variety, and the size of grains per ear. The accumulated temperature data is the number of days of certain temperature and light required for the crops of this variety to pass a certain growth stage. The soil data of crops include the nutrient content data such as minerals and water in the soil where the crops are planted. The meteorological data of crops include the highest temperature, lowest temperature, rainfall, and solar radiation in the area where the crops are planted in the recent period. The planting data of crops include the planting spacing, density, depth, and other data of the crops.

[0025] The proximal policy model is a PPO (Proximal Policy Optimization) model. The proximal policy model and the policy network and value network in the proximal policy model can use existing networks. For example, the policy network and value network can use the following networks: fully connected neural network, convolutional neural network, recurrent neural network, long short-term memory network and Transformer network.

[0026] The policy network predicts the amount of water and fertilizer based on the training data. The value network predicts the crop yield after watering based on the training data and the amount of water. The value network predicts the crop yield after fertilization based on the training data and the amount of fertilizer. The value network can also be used to predict the crop yield after watering and fertilization based on the training data, the amount of water and the amount of fertilizer. The watering reward function is used to calculate the watering reward value, and the fertilization reward function is used to calculate the fertilization reward value. The model parameters of the proximal policy model are optimized according to the watering reward value and the fertilization reward value to complete the training of the proximal policy model.

[0027] According to the technical solution provided in the embodiment of the present application, training data is obtained, wherein the training data is variety data, soil data, meteorological data and planting data of crops; based on the training data, the policy network in the proximal policy model is used to predict the amount of water and fertilizer; based on the training data and the amount of water, the value network in the proximal policy model is used to predict the crop yield after watering; based on the training data and the amount of fertilizer, the value network is used to predict the crop yield after fertilization; according to the amount of water and the crop yield after watering, the water reward value is calculated using the water reward function; according to the amount of fertilizer and the crop yield after fertilization, the fertilization reward value is calculated using the fertilization reward function; according to the water reward value and the fertilization reward value, the model parameters of the proximal policy model are optimized to complete the training of the proximal policy model. The above technical means can solve the problem of poor accuracy in predicting crop yield in the prior art, thereby improving the prediction accuracy, providing strong support for agricultural production, and increasing crop yield.

[0028] Furthermore, based on the training data, the policy network in the proximal policy model is used to predict the amount of water and fertilizer, including: generating an action space, wherein the action space includes: a single water application amount range and a single fertilizer application amount range; based on the training data and the action space, the policy network is used to predict the amount of water, wherein the amount of water is within the single water application amount range; based on the training data and the action space, the policy network is used to predict the amount of fertilizer, wherein the amount of fertilizer is within the single fertilizer application amount range.

[0029] According to experience, the range of single water application can be set to 0-50 mm per square meter. The range of single fertilizer application is 0-180 kg per hectare. The strategy network predicts the water application amount within the range of single water application, and the strategy network predicts the fertilizer application amount within the range of single fertilizer application.

[0030] Furthermore, based on the training data and the amount of water applied, the value network in the proximal strategy model is used to predict the crop yield after watering, including: based on the training data and the amount of water applied, the value network in the proximal strategy model is used to predict the current soil data; based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after watering.

[0031] Based on the training data and water application amount, the value network is used to predict the current soil data, that is, the current mineral and water content data of the soil where the crop is planted. In reinforcement learning, the soil data in the training data is the initial state of the environment, the water application amount and fertilizer application amount are strategies, and the current soil data is the current state of the environment or the state of the environment after the strategy is executed. Finally, based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after watering.

[0032] Furthermore, based on the training data and the amount of fertilizer applied, the value network is used to predict the crop yield after fertilization, including: based on the training data and the amount of fertilizer applied, the value network in the proximal strategy model is used to predict the current soil data; based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after fertilization.

[0033] Based on the training data and the amount of fertilizer applied, the value network is used to predict the current soil data, that is, the current nutrient content data such as minerals and water in the soil where the crop is planted. Finally, based on the current soil data and the variety data and planting data of the crop in the training data, the value network is used to predict the crop yield after watering.

[0034] Furthermore, the watering reward value is calculated based on the amount of water applied and the crop yield after watering using a watering reward function, including: predicting the crop yield before watering using a value network based on training data; and calculating the watering reward value based on the crop yield after watering, the crop yield before watering and the amount of water applied using a watering reward function.

[0035] The water application reward value Q is calculated according to the following formula: Q=MNl*W.

[0036] M is the crop yield after watering, N is the crop yield before watering, l is the penalty coefficient, which is set based on experience, and W is the amount of water applied.

[0037] Furthermore, a fertilization reward function is used to calculate a fertilization reward value according to the amount of fertilizer applied and the crop yield after fertilization, including: using a value network to predict the crop yield before fertilization according to training data; and using a fertilization reward function to calculate a fertilization reward value according to the crop yield after fertilization, the crop yield before fertilization and the amount of fertilizer applied.

[0038] The water application reward value Q is calculated according to the following formula: Q = GHi*E.

[0039] G is the crop yield after fertilization, H is the crop yield before fertilization, i is the penalty coefficient, which is set according to experience, and E is the amount of fertilizer applied.

[0040] The total reward value Q3 = aQ1 + bQ2 = a(MNl*W) + b(GHi*E).

[0041] a and b are coefficients set based on experience, ranging from 0 to 1, and the sum of a and b is 1.

[0042] The model parameters of the proximal strategy model are optimized according to the total reward value to complete the training of the proximal strategy model.

[0043] Figure 2 Schematic diagram of a method for predicting crop yields provided in an embodiment of the present application. Figure 2 As shown, the method includes:

[0044] S201, acquiring target data of target crops in a target area, wherein the target data includes variety data, soil data, meteorological data and planting data of the target crops;

[0045] S202, predicting a target water application amount and a target fertilizer application amount using a policy network in a trained proximal policy model based on the target data;

[0046] S203, based on the target data and the target watering amount, using the value network in the trained proximal strategy model to predict the target crop yield after watering;

[0047] S204, based on the target data and the target fertilizer application amount, using the value network to predict the target crop yield after fertilization.

[0048] The target crop yield after water and fertilizer application can also be predicted based on the target data, target fertilizer application amount, and target water application amount using the value network in the trained proximal strategy model.

[0049] The target crop yield before watering can also be predicted based on the target data using the value network; the target crop yield before fertilization can also be predicted based on the target data using the value network.

[0050] The trained proximal strategy model can predict the most appropriate amount of water and fertilizer application based on the existing crop variety data, soil data, meteorological data and planting data, and can also predict the crop yield after water and fertilization, as well as the crop yield before water and fertilization.

[0051] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0052] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0053] Figure 3 Schematic diagram of a training device for a model for predicting crop yields provided in an embodiment of the present application. Figure 3 As shown, the training device for the model for predicting crop yields includes:

[0054] The acquisition module 301 is configured to acquire training data, wherein the training data is crop variety data, soil data, meteorological data and planting data;

[0055] The first prediction module 302 is configured to predict the amount of water and fertilizer application based on the training data using the policy network in the proximal policy model;

[0056] The second prediction module 303 is configured to predict the crop yield after watering using the value network in the proximal strategy model based on the training data and the watering amount;

[0057] The third prediction module 304 is configured to predict the crop yield after fertilization using the value network based on the training data and the fertilizer amount;

[0058] The first calculation module 305 is configured to calculate the watering reward value using the watering reward function according to the watering amount and the crop yield after watering;

[0059] The second calculation module 306 is configured to calculate the fertilization reward value using the fertilization reward function according to the fertilization amount and the crop yield after fertilization;

[0060] The optimization module 307 is configured to optimize the model parameters of the proximal strategy model according to the watering reward value and the fertilization reward value to complete the training of the proximal strategy model.

[0061] Crops can be corn, wheat, millet, rice, etc. The variety data of crops include the accumulated temperature data required for the crops of this variety at different growth stages, the number of grains per plant of this variety, and the size of grains per ear. The accumulated temperature data is the number of days of certain temperature and light required for the crops of this variety to pass a certain growth stage. The soil data of crops include the nutrient content data such as minerals and water in the soil where the crops are planted. The meteorological data of crops include the highest temperature, lowest temperature, rainfall, and solar radiation in the area where the crops are planted in the recent period. The planting data of crops include the planting spacing, density, depth, and other data of the crops.

[0062] The proximal policy model is a PPO (Proximal Policy Optimization) model. The proximal policy model and the policy network and value network in the proximal policy model can use existing networks. For example, the policy network and value network can use the following networks: fully connected neural network, convolutional neural network, recurrent neural network, long short-term memory network and Transformer network.

[0063] The policy network predicts the amount of water and fertilizer based on the training data. The value network predicts the crop yield after watering based on the training data and the amount of water. The value network predicts the crop yield after fertilization based on the training data and the amount of fertilizer. The value network can also be used to predict the crop yield after watering and fertilization based on the training data, the amount of water and the amount of fertilizer. The watering reward function is used to calculate the watering reward value, and the fertilization reward function is used to calculate the fertilization reward value. The model parameters of the proximal policy model are optimized according to the watering reward value and the fertilization reward value to complete the training of the proximal policy model.

[0064] According to the technical solution provided in the embodiment of the present application, training data is obtained, wherein the training data is variety data, soil data, meteorological data and planting data of crops; based on the training data, the policy network in the proximal policy model is used to predict the amount of water and fertilizer; based on the training data and the amount of water, the value network in the proximal policy model is used to predict the crop yield after watering; based on the training data and the amount of fertilizer, the value network is used to predict the crop yield after fertilization; according to the amount of water and the crop yield after watering, the water reward value is calculated using the water reward function; according to the amount of fertilizer and the crop yield after fertilization, the fertilization reward value is calculated using the fertilization reward function; according to the water reward value and the fertilization reward value, the model parameters of the proximal policy model are optimized to complete the training of the proximal policy model. The above technical means can solve the problem of poor accuracy in predicting crop yield in the prior art, thereby improving the prediction accuracy, providing strong support for agricultural production, and increasing crop yield.

[0065] In some embodiments, the first prediction module 302 is also configured to generate an action space, wherein the action space includes: a single watering amount range and a single fertilizer application amount range; based on the training data and the action space, the strategy network is used to predict the watering amount, wherein the watering amount is within the single watering amount range; based on the training data and the action space, the strategy network is used to predict the fertilizer amount, wherein the fertilizer amount is within the single fertilizer application amount range.

[0066] According to experience, the range of single water application can be set to 0-50 mm per square meter. The range of single fertilizer application is 0-180 kg per hectare. The strategy network predicts the water application amount within the range of single water application, and the strategy network predicts the fertilizer application amount within the range of single fertilizer application.

[0067] In some embodiments, the second prediction module 303 is further configured to predict current soil data based on the training data and the amount of water applied, using the value network in the proximal strategy model; and predict crop yield after watering based on the current soil data and the variety data and planting data of crops in the training data, using the value network.

[0068] Based on the training data and water application amount, the value network is used to predict the current soil data, that is, the current mineral and water content data of the soil where the crop is planted. In reinforcement learning, the soil data in the training data is the initial state of the environment, the water application amount and fertilizer application amount are strategies, and the current soil data is the current state of the environment or the state of the environment after the strategy is executed. Finally, based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after watering.

[0069] In some embodiments, the third prediction module 304 is further configured to predict current soil data using the value network in the proximal strategy model based on the training data and the amount of fertilizer applied; and to predict crop yield after fertilization using the value network based on the current soil data and the variety data and planting data of crops in the training data.

[0070] Based on the training data and the amount of fertilizer applied, the value network is used to predict the current soil data, that is, the current nutrient content data such as minerals and water in the soil where the crop is planted. Finally, based on the current soil data and the variety data and planting data of the crop in the training data, the value network is used to predict the crop yield after watering.

[0071] In some embodiments, the first computing module 305 is further configured to predict the crop yield before watering using the value network based on the training data; and calculate the watering reward value using the watering reward function based on the crop yield after watering, the crop yield before watering and the amount of water applied.

[0072] The water application reward value Q1 is calculated according to the following formula: Q1 = MNl*W.

[0073] M is the crop yield after watering, N is the crop yield before watering, l is the penalty coefficient, which is set based on experience, and W is the amount of water applied.

[0074] In some embodiments, the second computing module 306 is further configured to predict the crop yield before fertilization using the value network based on the training data; and calculate the fertilization reward value using the fertilization reward function based on the crop yield after fertilization, the crop yield before fertilization and the amount of fertilizer applied.

[0075] The water application reward value Q2 is calculated according to the following formula: Q2 = GHi*E.

[0076] G is the crop yield after fertilization, H is the crop yield before fertilization, i is the penalty coefficient, which is set according to experience, and E is the amount of fertilizer applied.

[0077] The total reward value Q3 = aQ1 + bQ2 = a(MNl*W) + b(GHi*E).

[0078] a and b are coefficients set based on experience, ranging from 0 to 1, and the sum of a and b is 1.

[0079] The model parameters of the proximal strategy model are optimized according to the total reward value to complete the training of the proximal strategy model.

[0080] In some embodiments, the optimization module 307 is also configured to obtain target data of target crops in the target area, wherein the target data includes variety data, soil data, meteorological data and planting data of the target crops; based on the target data, using the strategy network in the trained proximal strategy model to predict the target water application amount and the target fertilizer application amount; based on the target data and the target water application amount, using the value network in the trained proximal strategy model to predict the target crop yield after water application; based on the target data and the target fertilizer application amount, using the value network to predict the target crop yield after fertilization.

[0081] The target crop yield after water and fertilizer application can also be predicted based on the target data, target fertilizer application amount, and target water application amount using the value network in the trained proximal strategy model.

[0082] The target crop yield before watering can also be predicted based on the target data using the value network; the target crop yield before fertilization can also be predicted based on the target data using the value network.

[0083] The trained proximal strategy model can predict the most appropriate amount of water and fertilizer application based on the existing crop variety data, soil data, meteorological data and planting data, and can also predict the crop yield after water and fertilization, as well as the crop yield before water and fertilization.

[0084] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0085] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0086] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.

[0087] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0088] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0089] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0090] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0091] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for training a model for predicting crop yield, characterized in that: include: Acquiring training data, wherein the training data includes crop variety data, soil data, meteorological data, and planting data; Based on the training data, using the policy network in the proximal policy model to predict the amount of water and fertilizer applied; Based on the training data and the water application amount, using the value network in the proximal strategy model to predict the crop yield after water application; Based on the training data and the fertilizer application amount, using the value network to predict the crop yield after fertilization; Calculating a watering reward value using a watering reward function according to the watering amount and the crop yield after watering; Calculating a fertilization reward value using a fertilization reward function according to the fertilization amount and the crop yield after fertilization; The model parameters of the proximal strategy model are optimized according to the watering reward value and the fertilization reward value to complete the training of the proximal strategy model.

2. The method according to claim 1, characterized in that Based on the training data, the policy network in the proximal policy model is used to predict the amount of water and fertilizer, including: Generate an action space, wherein the action space includes: a single water application amount range and a single fertilizer application amount range; Based on the training data and the action space, using the policy network to predict the water application amount, wherein the water application amount is within the single water application amount range; Based on the training data and the action space, the strategy network is used to predict the fertilizer application amount, wherein the fertilizer application amount is within the range of the single fertilizer application amount.

3. The method according to claim 1, characterized in that Based on the training data and the water application amount, the value network in the proximal strategy model is used to predict the crop yield after water application, including: Based on the training data and the water application amount, using the value network in the proximal strategy model to predict current soil data; Based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after watering.

4. The method according to claim 1, characterized in that: Based on the training data and the fertilizer application amount, the value network is used to predict the crop yield after fertilization, including: Based on the training data and the fertilizer application amount, using the value network in the proximal strategy model to predict current soil data; Based on the current soil data and the variety data and planting data of the crops in the training data, the value network is used to predict the crop yield after fertilization.

5. The method according to claim 1, characterized in that According to the water application amount and the crop yield after water application, a water application reward value is calculated using a water application reward function, including: Predicting crop yield before watering using the value network based on the training data; The watering reward value is calculated using the watering reward function according to the crop yield after watering, the crop yield before watering and the watering amount.

6. The method according to claim 1, characterized in that According to the fertilizer amount and the crop yield after fertilization, a fertilization reward value is calculated using a fertilization reward function, including: According to the training data, using the value network to predict the crop yield before fertilization; The fertilization reward value is calculated using the fertilization reward function according to the crop yield after fertilization, the crop yield before fertilization and the fertilizer amount.

7. The method according to claim 1, characterized in that After optimizing the model parameters of the proximal strategy model according to the watering reward value and the fertilization reward value to complete the training of the proximal strategy model, the method further includes: Acquire target data of target crops in a target area, wherein the target data includes variety data, soil data, meteorological data and planting data of the target crops; Based on the target data, a policy network in the trained proximal policy model is used to predict a target water application amount and a target fertilizer application amount; Based on the target data and the target water application amount, using the value network in the trained proximal strategy model to predict the target crop yield after water application; Based on the target data and the target fertilizer application amount, the value network is used to predict the target crop yield after fertilization.

8. A training device for a model for predicting crop yield, characterized in that: include: An acquisition module is configured to acquire training data, wherein the training data is crop variety data, soil data, meteorological data, and planting data; A first prediction module is configured to predict the amount of water and fertilizer application based on the training data using a policy network in the proximal policy model; A second prediction module is configured to predict the crop yield after watering using the value network in the proximal strategy model based on the training data and the watering amount; A third prediction module is configured to predict the crop yield after fertilization using the value network based on the training data and the fertilizer application amount; A first calculation module is configured to calculate a watering reward value using a watering reward function according to the watering amount and the crop yield after watering; A second calculation module is configured to calculate a fertilization reward value using a fertilization reward function according to the fertilization amount and the crop yield after fertilization; The optimization module is configured to optimize the model parameters of the proximal strategy model according to the watering reward value and the fertilization reward value to complete the training of the proximal strategy model.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Crop growth prediction system and method based on agricultural unmanned aerial vehicle remote sensing technology

    CN120471233A

  • Crop Growth Prediction System and Method Based on Agricultural Unmanned Aerial Vehicle Remote Sensing Technology

    CN120471233B