Method and device for determining agricultural resource allocation quantity data, electronic equipment and medium
Through the target strategy network model trained by the near-end strategy optimization algorithm, the limitations of the agricultural resource judgment system are solved, the rapid, accurate and flexible resource allocation is achieved, and the efficiency of agricultural production and the rationality of decision-making are improved.
Patent Information
- Application Number
- CN202411146864.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-29
AI Technical Summary
The limitations of the existing agricultural resource judgment system for different environments lead to low resource utilization and poor rationality in resource allocation.
The target policy network model trained by the near-end strategy optimization algorithm is used to acquire environmental status data and managed object data, build a planting environment system, calculate the optimal resource allocation amount, and improve resource utilization efficiency and configuration accuracy.
It achieves rapid, accurate and flexible resource allocation, and improves the efficiency of agricultural production and rational decision-making.
Smart Images

Figure CN119047767A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of agricultural resource allocation, and in particular to a method, device, electronic equipment and medium for determining agricultural resource allocation quantity data. Background Art
[0002] For a long time, agricultural production methods have been relatively traditional, facing a series of problems such as low resource utilization efficiency, high production costs, and an aging workforce. As the demand for the quantity and quality of agricultural products continues to increase, traditional agriculture has been unable to meet this demand. At present, some advanced water and fertilizer recommendation strategies have begun to use digital twin technology and supporting equipment to transmit soil moisture data, meteorological data, and crop growth photos taken by drones to large screens for display. Experts use the above collected data and professional knowledge to operate the integrated water and fertilizer machine to implement water and fertilizer strategies. This method collects soil, meteorological and other data through sensors, sets the amount of water and fertilizer based on expert experience, and operates the water and fertilizer machine to implement water and fertilizer strategies. However, this technical method has the problem of inflexible and untimely strategy adjustment, low resource utilization, and the rationality of resource allocation cannot be adapted to local conditions.
[0003] It can be seen that the existing technology has problems such as low resource utilization and poor rationality of resource allocation due to the limitations of the agricultural resource judgment system for different environments. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide a method, device, electronic device and medium for determining agricultural resource allocation quantity data to solve the problems in the prior art of low resource utilization and poor rationality of resource allocation due to the limitations of the agricultural resource judgment system for different environments.
[0005] According to a first aspect of an embodiment of the present disclosure, a method for determining agricultural resource configuration data is provided, including: acquiring environmental status data and managed object data; calling an application programming interface corresponding to target agricultural resource configuration quantity data, wherein a target policy network model is encapsulated in the application programming interface, and the target policy network model is obtained by training an initial policy network model based on environmental status training data and managed object training data through a proximal policy optimization algorithm; inputting the environmental status data and the managed object data into the target policy network model, processing the environmental status data and the managed object data, and obtaining managed object planting data; constructing a managed object planting environment system based on the environmental status data, the managed object data, and preset action space data; and inputting the managed object planting data into the managed object planting environment system for processing, and obtaining target resource configuration quantity data.
[0006] According to a second aspect of the disclosed embodiments, a device for determining agricultural resource configuration quantity data is provided, including: an acquisition module for acquiring environmental status data and managed object data; a calling module for calling an application programming interface corresponding to target agricultural resource configuration quantity data, wherein the application programming interface encapsulates a target policy network model, and the target policy network model is obtained by training the policy network model based on environmental status training data and managed object training data using a proximal policy optimization algorithm; a first processing module for inputting environmental status data and managed object data into the target policy network model, processing the environmental status data and managed object data, and obtaining managed object planting data; a second processing module for constructing a managed object planting environment system based on environmental status data, managed object data, and preset action space data; and a third processing module for inputting managed object planting data into the managed object planting environment system for processing, and obtaining target resource configuration quantity data.
[0007] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including 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.
[0008] According to a fourth aspect of an embodiment of the present disclosure, a 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.
[0009] Compared with the prior art, the disclosed embodiments have the following beneficial effects: by obtaining current environmental status information and detailed data of the managed objects; calling the application program interface of the target agricultural resource configuration amount, the application program interface of the target agricultural resource configuration amount internally integrates the target policy network model trained by the proximal policy optimization algorithm; the collected environmental status data and managed object data are passed as input to the target policy network model for processing to generate the planting data of the managed objects; a managed object planting environment system is constructed through environmental status data, managed object data, and preset action space data; the managed object planting data is input into the managed object planting environment simulation system for deep processing to obtain the target resource configuration amount data, so that the target policy network model obtained by training with the proximal policy optimization algorithm can quickly and accurately calculate the optimal resource configuration amount based on real-time environmental status data and managed object data, thereby improving resource utilization efficiency. Since the proximal policy optimization algorithm is a reinforcement learning algorithm, it can adapt to environmental changes during training, improve the accuracy of resource allocation, and enhance the rationality of decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0011] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;
[0012] Figure 2 It is a flowchart of a method for determining agricultural resource allocation quantity data provided by an embodiment of the present disclosure;
[0013] Figure 3 It is a structural schematic diagram of a device for determining agricultural resource allocation quantity data provided by an embodiment of the present disclosure;
[0014] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0015] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may 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 avoid obstructing the description of the present disclosure with unnecessary details.
[0016] A method and device for determining agricultural resource allocation quantity data according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0017] Figure 1 Schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.
[0018] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the above electronic devices. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0019] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.
[0020] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present disclosure are not limited to this.
[0021] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present disclosure.
[0022] The user can establish a communication connection with the server 4 via the network 5 through the terminal devices 1, 2 and 3 to receive or send information, etc. Specifically, the server 4 can obtain the current environmental status information and detailed data of the managed object through the terminal devices 1, 2 and 3; call the application interface of the target agricultural resource configuration amount, which internally integrates the target policy network model trained by the proximal policy optimization algorithm; the collected environmental status data and managed object data are passed to the target policy network model as input for processing to generate the planting data of the managed object; the managed object planting environment system is constructed through the environmental status data, the managed object data, and the preset action space data; the managed object planting data is input into the managed object planting environment simulation system for deep processing to obtain the target resource configuration amount data.
[0023] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.
[0024] Figure 2 It is a flow chart of a method for determining agricultural resource allocation quantity data provided by an embodiment of the present disclosure. Figure 2The method for determining the agricultural resource allocation data can be obtained by Figure 1 The server executes. Figure 2 As shown, the method for determining the agricultural resource allocation data includes:
[0025] Step 201, obtaining environmental status data and managed object data.
[0026] Specifically, environmental status data can be obtained through sensors, and managed object data can be obtained through a database, which is not limited here. In addition, it should be noted that the obtained environmental status data and managed object data can also be transmitted to a data center or cloud server by wireless or wired means, and the collected data can be preprocessed, including but not limited to data cleaning, data conversion, and / or data compression, etc., and the preprocessed data can be stored in a database. In this way, through real-time data collection and transmission, it is ensured that the decision on agricultural resource allocation is based on the latest environmental status and managed object status, thereby improving the accuracy and timeliness of decision-making, and based on real-time data, improving the accuracy of information acquisition on various factors in the agricultural production process, improving agricultural production efficiency, and enhancing the scalability of the target strategy network model.
[0027] Among them, the environmental status data can be various data related to the agricultural production environment, including but not limited to meteorological data, soil profile physical and chemical data, field planting data, and / or ecological environment data, etc., which can be used to characterize the status and changing trends of the agricultural production environment. The managed object data can be data of various objects that need to be managed and controlled in agricultural production, including but not limited to crop growth data, variety data, and / or operation data of agricultural facilities, which can be used to characterize the status and performance of the managed objects.
[0028] For example, the managed object data can be corn seed data, and the environmental status data can be soil profile physical and chemical data, meteorological data, and field planting data. The corn seed data can be obtained through the corn seed variety database of the administration, and the mineral, moisture, and nutrient content data of different soil profiles can be obtained through tubular soil moisture sensors. The agricultural meteorological data of the planting area can be obtained through the agricultural meteorological station database, including the daily maximum temperature, minimum temperature, rainfall, and solar radiation data for the past and next week. The corn crop planting spacing, density, and depth data can be obtained through the planting area’s own preset database.
[0029] Step 202, calling the application programming interface corresponding to the target agricultural resource configuration quantity data, the application programming interface encapsulates the target policy network model, and the target policy network model is obtained by training the policy network model based on the environmental state training data and the managed object training data through the proximal policy optimization algorithm.
[0030] Specifically, the application programming interface corresponding to the target agricultural resource configuration data can be called. The application programming interface corresponding to the target agricultural resource configuration data integrates the target policy network model trained by the proximal policy optimization algorithm. The target policy network model can be obtained by policy optimization training through environmental state training data and managed object training data. For example, a user can use a terminal device to send a request to the application programming interface corresponding to the target agricultural resource configuration data. The application programming interface corresponding to the target agricultural resource configuration data can process the request based on the target policy network model and return the optimal agricultural resource configuration data, thereby ensuring the most reasonable allocation of agricultural resources and improving resource allocation efficiency. The target policy network model can dynamically adjust the resource allocation strategy according to environmental changes and the characteristics of the managed objects, thereby improving the flexibility and adaptability of agricultural production.
[0031] Among them, the target agricultural resource configuration quantity data can be the allocation of agricultural resources obtained by an algorithm according to the environmental status and the needs of the managed objects, including but not limited to the amount of water, fertilizer, or pesticide, etc. The application programming interface corresponding to the target agricultural resource configuration quantity data can be a software interface, allowing an external system or program to interact with the internal target policy network model through a specific request method to obtain or set the configuration quantity data of agricultural resources. The target policy network model can be a trained neural network model, which can be used to obtain the agricultural resource allocation strategy through the policy algorithm according to the input environmental status data and the managed object data. The proximal policy optimization algorithm can be a reinforcement learning algorithm, which can maximize the cumulative reward through iterative optimization strategy, and can limit the difference between the new strategy and the old strategy to ensure the stability and collection of learning. The environmental state training data can be data of various environmental factors that affect agricultural resource allocation decisions, such as weather conditions, soil moisture, light intensity, etc., which are not limited here. The environmental state training data can be used to train the policy network model to obtain data of the target policy network model. The managed object training data can be relevant data of the agricultural objects for optimized resource allocation, including but not limited to the geographical location of the farmland, soil type, crop type, and crop growth cycle, etc. The managed object training data can be used to train the policy network model to obtain data of the target policy network model. The policy network model can be a policy representation implemented by a neural network, which can receive environmental state training data and managed object training data as input, and output corresponding actions, such as outputting water application amount, fertilizer application amount, and / or pesticide application amount, etc.
[0032] For example, the target agricultural resource allocation amount can be the water application amount. The application programming interface corresponding to the water application amount can be called by the execution terminal, and the water application amount data in the current state can be obtained by processing the water application amount strategy network model inside the application programming interface corresponding to the water application amount.
[0033] Step 203: input the environment status data and the managed object data into the target policy network model, process the environment status data and the managed object data, and obtain the managed object planting data.
[0034] Specifically, environmental status data and managed object data can be used as input. By calling an application programming interface that encapsulates a target policy network model, the environmental status data and managed object data can be input into the target policy network model for processing. The target policy network model can calculate and infer based on the input data through optimization strategies to obtain the planting data of the managed objects. Based on the acquired environmental status data and managed object data and intelligent algorithms, accurate planting decision support is provided for the managed objects, thereby improving the scientificity and efficiency of agricultural production. According to changes in environmental status data and managed object data, the planting strategy is dynamically adjusted, thereby enhancing the flexibility and adaptability of agricultural production.
[0035] Among them, the planting data of the managed objects can be a configuration file that can be used for subsequent processing processes by processing and analyzing the input environmental status data and managed object data through the target strategy network model. The planting data of the managed objects includes but is not limited to crop type data, growth data, soil profile physical and chemical data, farmland management data, and / or meteorological data, etc.
[0036] For example, the managed object may be corn, and the acquired corn seed data, soil profile physical and chemical data, meteorological data, and farmland management data may be processed through the target strategy network model to obtain corn planting data.
[0037] Step 204: construct a managed object planting environment system based on the environmental state data, the managed object data, and the preset action space data.
[0038] Specifically, the acquired environmental status data, managed object data, and preset action space data can be used to construct a planting environment system for the managed objects through the agricultural technology transfer decision support system. The construction process can be processed through the built-in crop growth simulation, soil moisture and nutrient dynamics, and agricultural management measures optimization functional modules of the agricultural technology transfer decision support system. There is no limitation here. The growth status, yield performance, and resource utilization efficiency of the managed objects under different environments and management conditions can be simulated and predicted, and then the planting environment system for the managed objects can be obtained. By optimizing the environmental conditions and management measures, the best planting plan can be simulated, thereby improving the yield and quality of crops and enhancing the flexibility and adaptability of the target strategy network model.
[0039] Among them, the preset action space data can be a set of actions or decision options pre-set during the training process of the strategy network model. The preset actions may include irrigation amount, fertilizer amount, and / or pest and disease control measures, etc., which are not limited here. The preset action space data can be used to provide decision scope and constraints for the strategy network model. The planting environment system of the managed object can be a comprehensive system built based on the agricultural technology transfer decision support system. The planting environment system of the managed object integrates multiple factors such as environmental status, characteristics of the managed object, and / or management measures, which are not limited here. It can simulate and predict the growth conditions and yield performance of the managed object under different environments and management conditions.
[0040] For example, the acquired corn seed data, soil profile physical and chemical data, meteorological data, farmland management data, and water application spatial data can be used to construct a corn planting environment system through the built-in crop growth simulation, soil moisture and nutrient dynamics, and agricultural management measures optimization functional modules of the agricultural technology transfer decision support system.
[0041] Step 205: input the managed object planting data into the managed object planting environment system for processing to obtain target resource allocation quantity data.
[0042] Specifically, the planting data of the managed objects can be input into the planting environment system of the managed objects, and the planting data of the managed objects can be comprehensively analyzed and processed by combining the crop growth model, soil moisture and nutrient dynamic model and agricultural management measure optimization model built into the agricultural technology transfer decision support system. The target strategy network model can simulate the crop growth process under different resource allocation schemes, evaluate the impact of different resource allocation schemes on crop yield, quality and resource utilization efficiency, and then determine the target resource allocation quantity data, including but not limited to irrigation amount, fertilizer amount, and / or pesticide usage, etc., thereby achieving accurate allocation of agricultural resources by comprehensively considering crop growth needs, environmental conditions and resource utilization efficiency, and improving the accuracy and robustness of the target strategy network model.
[0043] For example, corn planting data can be input into the corn planting environment system for processing. The corn planting data includes but is not limited to corn seed data, weather data for the current and next week, cumulative fertilizer application, nitrogen application, water application, etc., to obtain the water application data for the current stage.
[0044] According to the technical solution provided by the embodiment of the present disclosure, by obtaining the current environmental status information and detailed data of the managed objects; calling the application program interface of the target agricultural resource configuration amount, the application program interface of the target agricultural resource configuration amount internally integrates the target policy network model trained by the proximal policy optimization algorithm; the collected environmental status data and managed object data are passed as input to the target policy network model for processing to generate the planting data of the managed objects; a managed object planting environment system is constructed through the environmental status data, the managed object data, and the preset action space data; the managed object planting data is input into the managed object planting environment simulation system for deep processing to obtain the target resource configuration amount data, so that the target policy network model obtained by training with the proximal policy optimization algorithm can quickly and accurately calculate the optimal resource configuration amount based on the real-time environmental status data and the managed object data, thereby improving the resource utilization efficiency. Since the proximal policy optimization algorithm is a reinforcement learning algorithm, it can adapt to environmental changes during the training process, improve the accuracy of resource allocation, and enhance the rationality of decision-making.
[0045] In some embodiments, before obtaining the environment state data and the managed object data, it also includes: obtaining multiple environment state training data and multiple managed object training data; inputting the multiple environment state training data and the multiple managed object training data into the policy network model, processing the multiple environment state training data and the multiple managed object training data to obtain the managed object planting training data; constructing a managed object planting training environment system based on the multiple environment state training data, the multiple managed object training data, the preset reward function, and the preset action space data; inputting the managed object planting training data into the managed object planting training environment system for processing to obtain the target managed object planting training data, the target resource configuration training data, and the training reward value corresponding to the policy network model; processing the target managed object planting training data, the target resource configuration training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the policy loss of the policy network model; updating the parameters in the policy network model according to the policy loss through loop iteration to obtain the target policy network model; configuring the application programming interface corresponding to the target policy network model based on the target policy network model.
[0046] Specifically, by obtaining multiple environment state training data and multiple managed object training data, the environment state training data and the managed object training data can be used to train the policy network model, and the environment state training data and the managed object training data are input into the policy network model for processing to obtain the managed object planting training data as a configuration file, and then a simulated managed object planting training environment system can be constructed based on the environment state training data, the managed object training data, the preset reward function, and the preset action space data, and the managed object planting training data can be input into the managed object planting training environment system and processed to obtain the target managed object planting training data, the target resource configuration training data, and the training reward value corresponding to the policy network model, and then the proximal policy optimization algorithm can be used to analyze the above-mentioned data and calculate the policy loss, and then the parameters of the policy network model can be updated through cyclic iteration until the model converges to obtain the target policy network model, and then the corresponding application programming interface can be configured for the target policy network model.
[0047] Among them, the managed object planting training data can be obtained after processing the environmental state training data and the managed object training data through the policy network model, and can be used to simulate crop growth and resource allocation data. The preset reward function can be a function used to evaluate the effects of different resource allocation schemes, and different reward values can be given according to preset goals. Among them, the preset goals include but are not limited to maximizing yields or minimizing costs, etc. The managed object planting training environment system can be a simulated agricultural production environment, which can be used to test and optimize the performance of the policy network model under different conditions. The target managed object planting training data can be data processed in the managed object planting training environment system, which can be used to characterize the growth state of crops under the optimized resource allocation scheme. The target resource configuration amount training data can be the optimal or near-optimal resource allocation scheme data generated during the simulation training process. The training reward value corresponding to the policy network model can be the evaluation value obtained by the policy network model in the managed object planting training environment system according to the preset reward function, which can be used to measure the performance of the policy network model on the task. The policy loss can be the gap between the performance of the policy network model during the training process and the target state, which can be used in the update process of the policy network model parameters.
[0048] For example, by obtaining multiple environmental state training data and multiple corn seed training data, the environmental state training data and the corn seed training data can be input into the strategy network model for processing to obtain corn planting training data as a configuration file, and then a simulated corn planting training environment system can be constructed based on the environmental state training data, the corn seed training data, the preset reward function, and the pre-facility water volume space data. The corn planting training data can be input into the corn planting training environment system and processed to obtain target corn planting training data, target water application volume training data, and training reward values corresponding to the strategy network model, and then the proximal strategy optimization algorithm can be used to analyze the above-mentioned data and calculate the strategy loss, and then the parameters of the strategy network model can be updated through cyclic iterations until the model converges to obtain the target strategy network model, and then the corresponding application programming interface can be configured for the target strategy network model.
[0049] According to the technical solution provided by the embodiment of the present disclosure, by acquiring environmental state training data and managed object training data, and inputting the acquired data into the policy network model, the environmental state training data and the managed object training data are processed by the policy network model to obtain the corresponding configuration file, that is, the managed object planting training data, and then based on the acquired environmental state training data and the managed object training data, combined with a preset reward function and preset action space data, a managed object planting training environment system is constructed, and then the managed object planting training data can be processed by the managed object planting training environment system to obtain target managed object planting training data, target resource configuration training data, and training reward corresponding to the policy network model. The reward value can then be used to process the planting training data of the target managed object, the target resource allocation training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the policy loss of the policy network model. Through loop iteration, the parameters in the policy network model are updated according to the policy loss to obtain the target policy network model, and the target policy network model is configured into the corresponding application programming interface. In this way, through the preprocessing and simulation training of a large amount of training data, the accuracy of the policy network model in the process of determining crop growth requirements and optimizing resource allocation is improved, the agricultural production efficiency and resource utilization are improved, and the constructed simulation training environment system provides a stable and controllable environment for model training, which improves the generalization ability and robustness of the target policy network model.
[0050] In some embodiments, the method for determining agricultural resource allocation quantity data also includes: obtaining multiple training data sets, each training data set contains multiple environmental state training data and multiple managed object training data; training and processing the policy network model based on the multiple training data sets respectively, to obtain the policy network model to be evaluated corresponding to each training data set; processing the policy network model to be evaluated corresponding to each training data set through a preset reward function, to obtain the evaluation reward value corresponding to each policy network model to be evaluated; performing maximum value selection processing on the evaluation reward value corresponding to the policy network model to be evaluated, to obtain the target evaluation reward value; and determining the target policy network model according to the target evaluation reward value.
[0051] Specifically, multiple training data sets containing environmental state training data and managed object training data can be obtained, and then the policy network models can be trained separately by different training data sets to obtain the policy network model to be evaluated corresponding to each data set. Each policy network model to be evaluated can be evaluated by a preset reward function, and the evaluation reward value corresponding to each policy network model to be evaluated can be calculated. Then, the maximum value can be selected from each evaluation reward value as the target evaluation reward value, and the corresponding policy network model can be determined as the target policy network model according to the target evaluation reward value.
[0052] Among them, the training data set can be a data set used to train the policy network model, the training data set can include environmental status data, including but not limited to environmental parameters and / or status data, etc., managed object data, including but not limited to current status data and / or operation history data of the managed object, etc. The above data can be used to simulate the actual environment and train the policy network model, the policy network model to be evaluated corresponding to the training data set can be a policy network model instance trained by the training data set, the policy network model to be evaluated corresponding to the training data set can be used to characterize the decision rules or strategies learned on the training data set, the evaluation reward value corresponding to the policy network model to be evaluated can be a reward function calculated by a preset reward function, which can be used to characterize the performance of the policy network model to be evaluated in a simulated or actual environment, the higher the reward value, the better the performance of the policy network model to be evaluated, the target evaluation reward value can be the maximum value selected from the evaluation reward values corresponding to all the policy network models to be evaluated, and the target evaluation reward value can be used to characterize the performance indicator of the policy network model to be evaluated that performs best among the policy network models to be evaluated trained by all the training data sets.
[0053] For example, three training data sets can be obtained, and the policy network model can be trained with each training data set to obtain the policy network model to be evaluated corresponding to each training data set. Each policy network model to be evaluated can be evaluated with a preset reward function to obtain the evaluation reward value corresponding to each policy network model to be evaluated. The evaluation reward values can be 1, 2, and 3 respectively. By selecting the maximum value, 3 is selected as the target evaluation reward value, and according to the target evaluation reward value, the policy network model to be evaluated corresponding to 3 is determined as the target policy network model.
[0054] According to the technical solution provided by the embodiment of the present disclosure, multiple training data sets are obtained, and the policy network models are trained respectively based on the number of training data sets to obtain the policy network models to be evaluated corresponding to each training data set. Through a preset reward function, each policy network model to be evaluated is processed to obtain the evaluation reward value corresponding to each policy network model to be evaluated. The maximum evaluation reward value is selected as the target evaluation reward value, and the corresponding policy network model to be evaluated is determined as the target policy network model based on the target evaluation reward value. In this way, through multi-dataset training and evaluation, the accuracy of the performance of the evaluation policy network model is improved, the adaptability and accuracy of the target policy network model are guaranteed, and the decision-making efficiency and stability of the agricultural resource allocation data determination method are improved.
[0055] In some embodiments, the method for determining agricultural resource configuration quantity data also includes: obtaining real-time environmental status data and real-time managed object data; based on the real-time environmental status data and real-time managed object data, calling and processing the application programming interface corresponding to the target strategy network model to obtain real-time resource configuration quantity data.
[0056] Specifically, the environmental status data of the farmland can be collected in real time through sensor networks or Internet of Things technology, which are not limited here, including but not limited to temperature, humidity, and / or light intensity, and the current status data of the managed objects, including but not limited to crops, soil, and / or irrigation systems, etc. The real-time environmental status data and the real-time managed object data can be input into the target strategy network model. The target strategy network model can obtain corresponding agricultural resource allocation data based on the input real-time environmental status data and real-time managed object data by calling the corresponding application programming interface, including but not limited to irrigation water volume, fertilizer amount, and / or pesticide usage.
[0057] Among them, the real-time environmental status data can be the natural environmental condition data of the farmland at the current moment, including but not limited to temperature, humidity, soil pH value, light intensity, wind speed, and / or rainfall, etc. The real-time managed object data can be the current status information of the managed objects in the farmland, including but not limited to the growth stage of crops, soil moisture content, nutrient status, and operating status data of irrigation systems, fertilization equipment, etc. The real-time managed object data can be used to characterize the actual situation of agricultural production, and the real-time resource allocation quantity data can be the optimal resource allocation plan calculated by the target strategy network model based on the real-time environmental status data and the real-time managed object data, which can include the allocation quantity and application time of various agricultural resources required to achieve the best production effect.
[0058] For example, the current physical and chemical data of the soil profile can be obtained through soil moisture sensors, the current and next week's meteorological data can be obtained through the meteorological system database, and the cumulative amount of fertilizer, nitrogen, and water applied can be obtained through the farmland database. Through the target strategy network model processing, real-time water application data can be obtained.
[0059] According to the technical solution provided by the embodiments of the present disclosure, the environmental status data of the farmland and the current status data of the managed objects are collected in real time through sensor networks, Internet of Things technologies, etc. The real-time environmental status data and the real-time managed object data can be input into the target strategy network model. The target strategy network model can obtain corresponding agricultural resource allocation data based on the input real-time environmental status data and real-time managed object data by calling the corresponding application programming interface, thereby improving the accuracy and efficiency of agricultural resource utilization, dynamically adjusting resource allocation according to real-time data, and enhancing the flexibility and adaptability of the target strategy network model.
[0060] In some embodiments, the target resource configuration quantity training data includes first target resource configuration quantity training data and second target resource configuration quantity training data; before processing the target managed object planting training data, the target resource configuration quantity training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the policy loss of the policy network model, it also includes: processing the target managed object planting training data, the first target resource configuration quantity training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the first policy loss of the policy network model; processing the target managed object planting training data, the second target resource configuration quantity training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the second policy loss of the policy network model; concatenating the first policy loss and the second policy loss to obtain the total policy loss of the policy network model; updating the parameters in the policy network model according to the total policy loss through loop iteration to obtain the target policy network model.
[0061] Specifically, when training the policy network model through the proximal policy optimization algorithm, the planting training data of the target managed object, the first target resource configuration training data and the second target resource configuration training data can be respectively combined with the training reward value corresponding to the policy network model, and the first strategy loss and the second strategy loss generated by the policy network model when processing different resource configuration schemes can be calculated respectively through the proximal policy optimization algorithm. Then, the first strategy loss and the second strategy loss can be spliced to obtain the total strategy loss that can be used to characterize the overall performance of the policy network model. The parameters in the policy network model can be adjusted according to the total strategy loss through a cyclic iteration method to obtain the target policy network model.
[0062] In addition, it should be noted that the first target resource configuration training data and the second target resource configuration training data can be alternately optimized based on the proximal strategy optimization algorithm to obtain a target strategy network model, thereby improving the accuracy of the target strategy network model when processing multi-target tasks.
[0063] Among them, the first target resource configuration amount training data can be a data set used to simulate or represent the first resource configuration scheme during the training process. The first target resource configuration amount training data may include resource configuration information such as the amount of water or fertilizer required for crops. The second target resource configuration amount training data can be used to characterize one or more other different configurable resources. The first strategy loss can be the difference or loss between the predicted result and the actual training reward value when the policy network model makes a decision based on the first target resource configuration amount training data during the training process. The second strategy loss can be the difference or loss between the predicted result calculated based on the second target resource configuration amount training data and the actual training reward value. The total strategy loss can be the concatenation or weighted summation of the first strategy loss and the second strategy loss, which can be used to comprehensively evaluate the overall performance of the policy network model during the training process.
[0064] For example, the corn planting training data, the water application training data, and the training reward values corresponding to the strategy network model can be processed based on the proximal strategy optimization algorithm to obtain the water application strategy loss of the strategy network model, that is, the first strategy loss. Then, the corn planting training data, the fertilizer application training data, and the training reward values corresponding to the strategy network model can be processed based on the proximal strategy optimization algorithm to obtain the fertilizer application strategy loss of the strategy network model, that is, the second strategy loss. The water application strategy loss and the fertilizer application strategy loss are weightedly summed to obtain the total strategy loss corresponding to the strategy network model. Through loop iteration, the parameters in the strategy network model are updated according to the total strategy loss to obtain the target strategy network model.
[0065] According to the technical solution provided by the embodiment of the present disclosure, by combining the planting training data of the target managed object, the first target resource configuration amount training data and the second target resource configuration amount training data with the training reward value corresponding to the policy network model, the first policy loss and the second policy loss generated by the policy network model when processing different resource configuration schemes are respectively calculated through the proximal policy optimization algorithm, and then the first policy loss and the second policy loss can be spliced to obtain the total policy loss that can be used to characterize the overall performance of the policy network model. The parameters in the policy network model can be adjusted according to the total policy loss in a cyclic iteration manner to obtain the target policy network model. In this way, by introducing training data of two or more resources, the policy network model can learn more diversified resource allocation strategies during the training process, thereby improving the adaptability and robustness of the target policy network model, and by comparing the policy losses of different configurable resources, the accuracy and efficiency of agricultural resource allocation are improved.
[0066] In some embodiments, before constructing a managed object planting training environment system based on multiple environmental state training data, multiple managed object training data, a preset reward function, and preset action space data, it also includes: adjusting parameters of the preset reward function through preset reward condition data, environmental state training data, and managed object training data to obtain a preset initial reward function; constructing a managed object initial planting environment system based on the environmental state training data, the managed object training data, the preset initial reward function, and the preset action space data; inputting the managed object planting training data into the managed object initial planting environment system for processing to obtain an initial reward value; performing exponential transformation on the initial reward value to obtain a positive integer reward value; adjusting the parameters of the preset initial reward function based on the positive integer reward value to obtain the preset reward function.
[0067] Specifically, the parameters of the preset reward function can be adjusted through preset reward condition data, environmental state training data, and managed object training data to obtain a preset initial reward function, and then based on the initial reward function, the environmental state training data, the managed object training data, and the preset action space data, an initial environment system that simulates the planting process of the managed objects can be constructed, the managed object planting training data can be input into the initial environment system for processing, the initial reward value can be calculated according to the preset initial reward function, the initial reward value can be exponentially transformed to convert the initial reward value into a positive integer reward value, and the parameters of the preset initial reward function can be adjusted according to the positive integer reward value to obtain the preset reward function.
[0068] Among them, the preset reward condition data can be the conditions or standards required for defining or adjusting the reward function. The preset reward conditions can include the growth indicators of the managed object, the environmental status, and the effects of the management strategy, etc., which are not limited here. The preset initial reward function can be a reward function obtained by preliminarily adjusting the preset reward condition data, the environmental status training data, and the managed object training data before constructing the managed object planting training environment system, which can be used to preliminarily evaluate the performance of the managed object in different states. The preset managed object initial planting environment system can be a simulation environment system constructed based on the preset initial reward function, the environmental status training data, the managed object training data, and the preset action space data, which can be used to simulate the planting process of the managed object during the training process. The initial reward value can be the reward value calculated according to the preset initial reward function by inputting the managed object planting training data into the preset managed object initial planting environment system, which can be used to evaluate the performance of the managed object in a specific environment. The positive integer reward value can be the reward value obtained by exponentially transforming the initial reward value, which is characterized by taking a positive integer as a value. On the basis of ensuring the original monotonicity, the initial reward value is unified into a positive integer value to avoid the positive and negative offset of the total reward value during the target strategy model screening process.
[0069] For example, the parameters of the preset reward function can be adjusted through the preset reward condition data corresponding to corn, the environmental state training data corresponding to corn, and the corn training data to obtain a preset initial reward function, and then based on the initial reward function, the environmental state training data corresponding to corn, the corn training data, and the preset action space data corresponding to corn, an initial environment system simulating the corn planting process can be constructed, the corn planting training data can be input into the initial environment system for processing, the initial reward value can be calculated according to the preset initial reward function to be -0.5, the initial reward value can be exponentially transformed to convert the initial reward value to 1, and the parameters of the preset initial reward function can be adjusted according to the converted initial reward value to obtain the preset reward function.
[0070] According to the technical solution provided by the embodiments of the present disclosure, the parameters of the preset reward function can be adjusted through preset reward condition data, environmental state training data, and managed object training data to obtain a preset initial reward function, and then based on the initial reward function, the environmental state training data, the managed object training data, and the preset action space data, an initial environment system that simulates the managed object planting process can be constructed, the managed object planting training data can be input into the initial environment system for processing, the initial reward value can be calculated according to the preset initial reward function, the initial reward value can be exponentially transformed to convert the initial reward value into a positive integer reward value, and the parameters of the preset initial reward function can be adjusted according to the positive integer reward value to obtain the preset reward function, thereby adjusting the parameters of the preset reward function through multiple iterations, thereby improving the prediction accuracy of the constructed managed object planting training environment system in complex situations, and improving the practicality and accuracy of the trained policy network model.
[0071] In some embodiments, before obtaining multiple training data sets, it also includes: determining the number of interactions corresponding to the managed object planting training environment system; when the number of interactions corresponding to the managed object planting training environment system is equal to the preset number of interactions, obtaining multiple training data sets.
[0072] Specifically, the number of inter-system interactions that occur within the planting training environment system of the managed object can be determined. When the number of interactions corresponding to the planting training environment system of the managed object is monitored to reach a preset threshold, that is, the preset number of interactions, it can be characterized as that the accumulated data basis has reached stability, and then training data sets containing multiple environmental state training data and managed object training data can be batch collected from the planting training environment system of the managed object.
[0073] Among them, the number of interactions corresponding to the planting training environment system of the managed object can be the number of information exchanges between various components within the planting training environment system of the managed object, including but not limited to smart greenhouses or agricultural Internet of Things platforms, for the purpose of adjusting environmental parameters, monitoring plant growth conditions, etc. The preset number of interactions can be a numerical threshold preset according to training requirements, which can be used to determine whether the data volume meets the relevant requirements.
[0074] For example, the preset number of interactions is 1000 times. When it is determined that the number of interactions corresponding to the managed object planting training environment system is 1000 times, multiple training data sets are obtained.
[0075] According to the technical solution provided by the embodiment of the present disclosure, by determining the number of system interactions occurring in the planting training environment system of the managed object, when it is monitored that the number of interactions corresponding to the planting training environment system of the managed object reaches a preset number of interactions, a training data set containing multiple environmental state training data and managed object training data can be batch collected from the planting training environment system of the managed object, thereby ensuring the quality and representativeness of the training data, and accumulating a sufficient amount of interaction data to reduce the problems of insufficient training or poor generalization ability of the target policy network model caused by insufficient or biased data, thereby improving training efficiency, avoiding premature training when the data is immature, reducing the waste of computing resources, and enhancing the applicability and accuracy of the target policy network model.
[0076] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0077] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0078] Figure 3 Schematic diagram of a device for determining agricultural resource allocation data provided by an embodiment of the present disclosure. Figure 3 As shown, the device for determining the agricultural resource allocation amount data includes:
[0079] An acquisition module 301 is used to acquire environmental status data and managed object data;
[0080] A calling module 302 is used to call an application programming interface corresponding to the target agricultural resource configuration quantity data, wherein the application programming interface encapsulates a target policy network model, and the target policy network model is obtained by training the policy network model based on the environmental state training data and the managed object training data through a proximal policy optimization algorithm;
[0081] The first processing module 303 is used to input the environmental state data and the managed object data into the target strategy network model, process the environmental state data and the managed object data, and obtain the managed object planting data;
[0082] The second processing module 304 is used to construct a managed object planting environment system based on the environmental state data, the managed object data, and the preset action space data;
[0083] The third processing module 305 is used to input the managed object planting data into the managed object planting environment system for processing to obtain target resource configuration quantity data.
[0084] According to the technical solution provided by the embodiment of the present disclosure, the current environment status information and detailed data of the managed object are obtained through the acquisition module 301; the application program interface of the target agricultural resource configuration amount is called through the calling module 302, and the application program interface of the target agricultural resource configuration amount internally integrates the target policy network model trained by the proximal policy optimization algorithm; through the first processing module 303, the collected environment status data and managed object data are passed as input to the target policy network model for processing to generate the planting data of the managed object; through the second processing module 304, the managed object planting environment system is constructed through the environment status data, the managed object data, and the preset action space data; through the third processing module 305, the managed object planting data is input into the managed object planting environment simulation system for deep processing to obtain the target resource configuration amount data, so that the target policy network model obtained by training with the proximal policy optimization algorithm can quickly and accurately calculate the optimal resource configuration amount based on the real-time environment status data and the managed object data, thereby improving the resource utilization efficiency. Since the proximal policy optimization algorithm is a reinforcement learning algorithm, it can adapt to environmental changes during the training process, improve the accuracy of resource allocation, and enhance the rationality of decision-making.
[0085] In some embodiments, the above-mentioned agricultural resource configuration quantity data determination device is also used to obtain multiple environmental state training data and multiple managed object training data; input the multiple environmental state training data and the multiple managed object training data into the policy network model, process the multiple environmental state training data and the multiple managed object training data to obtain the managed object planting training data; construct a managed object planting training environment system based on the multiple environmental state training data, the multiple managed object training data, the preset reward function, and the preset action space data; input the managed object planting training data into the managed object planting training environment system for processing to obtain the target managed object planting training data, the target resource configuration quantity training data, and the training reward value corresponding to the policy network model; based on the proximal policy optimization algorithm, the target managed object planting training data, the target resource configuration quantity training data, and the training reward value corresponding to the policy network model are processed to obtain the policy loss of the policy network model; through loop iteration, the parameters in the policy network model are updated according to the policy loss to obtain the target policy network model; based on the target policy network model, the application programming interface corresponding to the target policy network model is configured.
[0086] In some embodiments, the above-mentioned agricultural resource configuration quantity data determination device is also used to obtain multiple training data sets, each training data set contains multiple environmental state training data and multiple managed object training data; based on the multiple training data sets, the policy network model is trained and processed respectively to obtain the policy network model to be evaluated corresponding to each training data set; the policy network model to be evaluated corresponding to each training data set is processed by a preset reward function to obtain the evaluation reward value corresponding to each policy network model to be evaluated; the evaluation reward value corresponding to the policy network model to be evaluated is subjected to maximum value selection processing to obtain the target evaluation reward value; and the target policy network model is determined according to the target evaluation reward value.
[0087] In some embodiments, the above-mentioned agricultural resource configuration quantity data determination device is also used to obtain real-time environmental status data and real-time managed object data; based on the real-time environmental status data and real-time managed object data, the application programming interface corresponding to the target strategy network model is called and processed to obtain real-time resource configuration quantity data.
[0088] In some embodiments, the above-mentioned agricultural resource allocation quantity data determination device is also used to process the target managed object planting training data, the first target resource allocation quantity training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain the first strategy loss of the policy network model; based on the proximal policy optimization algorithm, the target managed object planting training data, the second target resource allocation quantity training data, and the training reward value corresponding to the policy network model are processed to obtain the second strategy loss of the policy network model; the first strategy loss and the second strategy loss are concatenated to obtain the total strategy loss of the policy network model; through loop iteration, the parameters in the policy network model are updated according to the total strategy loss to obtain the target policy network model.
[0089] In some embodiments, the above-mentioned agricultural resource allocation quantity data determination device is also used to adjust the parameters of the preset reward function through preset reward condition data, environmental state training data, and managed object training data to obtain a preset initial reward function; construct an initial planting environment system for the managed object based on the environmental state training data, the managed object training data, the preset initial reward function, and the preset action space data; input the managed object planting training data into the managed object initial planting environment system for processing to obtain an initial reward value; perform exponential transformation on the initial reward value to obtain a positive integer reward value; adjust the parameters of the preset initial reward function based on the positive integer reward value to obtain a preset reward function.
[0090] In some embodiments, the above-mentioned agricultural resource configuration quantity data determination device is also used to determine the number of interactions corresponding to the managed object planting training environment system; when the number of interactions corresponding to the managed object planting training environment system is equal to the preset number of interactions, multiple training data sets are obtained.
[0091] 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 disclosure.
[0092] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present disclosure. 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.
[0093] 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.
[0094] 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.
[0095] 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.
[0096] 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.
[0097] 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 readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present disclosure 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, etc. The computer-readable storage 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, etc.
[0098] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure 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 disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A method for determining agricultural resource allocation quantity data, characterized in that: include: Obtain environmental status data and managed object data; Calling an application programming interface corresponding to the target agricultural resource configuration quantity data, wherein the application programming interface encapsulates a target policy network model, and the target policy network model is obtained by training the policy network model based on the environmental state training data and the managed object training data through a proximal policy optimization algorithm; Inputting the environmental status data and the managed object data into the target strategy network model, processing the environmental status data and the managed object data, and obtaining the managed object planting data; Based on the environmental state data, the managed object data, and the preset action space data, construct a managed object planting environment system; The managed object planting data is input into the managed object planting environment system for processing to obtain the target resource configuration quantity data.
2. The method for determining agricultural resource allocation data according to claim 1, characterized in that: Before acquiring the environmental status data and the managed object data, the method further includes: Acquire a plurality of the environmental state training data and a plurality of the managed object training data; Inputting the plurality of environmental state training data and the plurality of managed object training data into the strategy network model, processing the plurality of environmental state training data and the plurality of managed object training data to obtain managed object planting training data; Based on the plurality of environmental state training data, the plurality of managed object training data, the preset reward function, and the preset action space data, construct a managed object planting training environment system; Inputting the managed object planting training data into the managed object planting training environment system for processing to obtain target managed object planting training data, target resource allocation training data, and a training reward value corresponding to the strategy network model; Based on the proximal policy optimization algorithm, the target managed object planting training data, the target resource configuration amount training data, and the training reward value corresponding to the policy network model are processed to obtain the policy loss of the policy network model; By means of loop iteration, the parameters in the strategy network model are updated according to the strategy loss to obtain the target strategy network model; Based on the target policy network model, an application programming interface corresponding to the target policy network model is configured.
3. The method for determining agricultural resource allocation data according to claim 2, characterized in that: The method further comprises: Acquire a plurality of training data sets, each of which includes a plurality of the environmental state training data and a plurality of the managed object training data; Based on the multiple training data sets, the policy network model is trained respectively to obtain the policy network model to be evaluated corresponding to each training data set; Processing the to-be-evaluated strategy network model corresponding to each of the training data sets through the preset reward function to obtain the evaluation reward value corresponding to each of the to-be-evaluated strategy network models; Performing maximum value selection processing on the evaluation reward value corresponding to the strategy network model to be evaluated to obtain a target evaluation reward value; The target strategy network model is determined according to the target evaluation reward value.
4. The method for determining agricultural resource allocation data according to claim 2, characterized in that: The method further comprises: Obtain real-time environmental status data and real-time managed object data; Based on the real-time environment status data and the real-time managed object data, the application programming interface corresponding to the target policy network model is called and processed to obtain real-time resource configuration quantity data.
5. The method for determining agricultural resource allocation data according to claim 2, characterized in that: The target resource configuration amount training data includes first target resource configuration amount training data and second target resource configuration amount training data; Before the target managed object planting training data, the target resource configuration amount training data, and the training reward value corresponding to the policy network model are processed based on the proximal policy optimization algorithm to obtain the policy loss of the policy network model, the method further includes: Based on the proximal policy optimization algorithm, the target managed object planting training data, the first target resource configuration amount training data, and the training reward value corresponding to the policy network model are processed to obtain a first policy loss of the policy network model; Processing the target managed object planting training data, the second target resource configuration amount training data, and the training reward value corresponding to the policy network model based on the proximal policy optimization algorithm to obtain a second policy loss of the policy network model; Concatenating the first strategy loss and the second strategy loss to obtain a total strategy loss of the strategy network model; Through loop iteration, the parameters in the strategy network model are updated according to the total strategy loss to obtain the target strategy network model.
6. The method for determining agricultural resource allocation data according to claim 2, characterized in that: Before constructing the managed object planting training environment system based on the plurality of environmental state training data, the plurality of managed object training data, the preset reward function, and the preset action space data, the method further includes: By using the preset reward condition data, the environmental state training data, and the managed object training data, the preset reward function is subjected to parameter adjustment processing to obtain a preset initial reward function; Constructing an initial planting environment system for managed objects based on the environmental state training data, the managed object training data, the preset initial reward function, and the preset action space data; Inputting the managed object planting training data into the managed object initial planting environment system for processing to obtain an initial reward value; Performing exponential transformation on the initial reward value to obtain a positive integer reward value; The parameters of the preset initial reward function are adjusted based on the positive integer reward value to obtain the preset reward function.
7. The method for determining agricultural resource allocation data according to claim 3, characterized in that: Before obtaining the plurality of training data sets, the method further includes: Determine the number of interactions corresponding to the managed object planting training environment system; When the number of interactions corresponding to the managed object planting training environment system is equal to the preset number of interactions, a plurality of the training data sets are obtained.
8. A device for determining agricultural resource allocation quantity data, characterized in that: include: An acquisition module is used to acquire environmental status data and managed object data; A calling module, used for calling an application programming interface corresponding to the target agricultural resource configuration quantity data, wherein the application programming interface encapsulates a target strategy network model, and the target strategy network model is obtained by training the strategy network model based on the environmental state training data and the managed object training data through a proximal strategy optimization algorithm; A first processing module, used for inputting the environmental status data and the managed object data into the target strategy network model, processing the environmental status data and the managed object data, and obtaining the managed object planting data; A second processing module is used to construct a managed object planting environment system based on the environmental state data, the managed object data, and the preset action space data; The third processing module is used to input the managed object planting data into the managed object planting environment system for processing to obtain the target resource configuration quantity data.
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 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.
