Intelligent-agent-driven self-adaptive farming management system
By building an intelligent agent-driven adaptive agricultural management system and adopting a hybrid artificial intelligence architecture and reinforcement learning, the problem of insufficient autonomous learning ability of existing farm management systems has been solved, and autonomous adaptation to environmental changes and efficient resource utilization have been achieved, thereby improving crop yield and quality.
Patent Information
- Application Number
- CN202511165111.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-09-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing intelligent farm management systems lack autonomous learning capabilities and are unable to adapt to environmental changes. Their decision-making logic is static, resulting in decreased adaptability and control accuracy when facing unexpected environmental changes or the introduction of new crop varieties. In addition, artificial intelligence models have problems of poor interpretability or rigidity in practical applications.
Build an agent-driven adaptive agricultural management system, adopt a hybrid artificial intelligence architecture, deeply couple large-scale agricultural models with crop growth mechanism models, combine perception modules, planning and reasoning modules, action modules and incremental learning modules, and continuously optimize strategies through reinforcement learning and multi-objective reward signals to achieve autonomous adaptation to the farm environment.
It realizes autonomous and precise agricultural management, improves resource utilization efficiency, reduces manpower operation and maintenance costs, and is able to autonomously perceive, reason and execute tasks in a dynamic environment, ensuring the scientific and safe decision-making, adapting to the microclimate differences of different plots, and improving crop yield and quality.
Smart Images

Figure CN120725819A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intersectional technology of smart agriculture and artificial intelligence, and in particular relates to an intelligent-agent-driven adaptive farming management system. Background Art
[0002] Agricultural production is the foundation of the national economy, and its management model is evolving from traditional reliance on manpower and experience to automation and intelligent management. The development of technologies such as the Internet of Things and big data has spawned a variety of intelligent farm management systems designed to improve production efficiency and optimize resource utilization.
[0003] However, existing technologies still have significant limitations. For example, Chinese invention patent publication number CN110347127A discloses a cloud-based crop planting management system, and Chinese utility model patent publication number CN215219747U discloses a farm management system based on internet big data. Such systems are typically based on preset rules or simple predictive models, and their decision-making logic is relatively static, lacking the ability to adapt to specific farm environments and crop growth dynamics. When faced with unexpected environmental changes (such as extreme weather) or the introduction of new crop varieties, their adaptability and control accuracy will be greatly reduced. A deeper problem is that these systems usually require manual periodic offline model updates and maintenance, and cannot achieve a real-time and autonomous policy optimization closed loop based on their own behavior results. In other words, they do not have true autonomous learning capabilities.
[0004] An in-depth analysis of existing technologies reveals that their fundamental deficiencies are mainly reflected in the following two aspects:
[0005] First, there is the "agent gap." Existing systems are essentially advanced tools or data processing platforms, not true intelligent agents. They can execute pre-programmed instructions or present data analysis results, but they lack the ability to autonomously set goals, decompose tasks, plan long-term strategies, or self-correct based on the consequences of their actions. They are reactive systems rather than autonomous entities actively pursuing optimal outcomes.
[0006] Second, there's a "hybrid model gap." The AI models used in existing technologies are often single-source. While purely data-driven models (such as traditional machine learning models) can discover correlations in data, their decision-making processes are like "black boxes," lacking interpretability and potentially generating unreliable or even dangerous instructions when faced with situations outside the training data. While purely mechanistic models (or first principles models) are based on recognized scientific knowledge and ensure scientific and safe decision-making, they can be overly idealistic and struggle to fully capture the complex and ever-changing non-ideal factors of the real world, resulting in their rigidity and imprecision in practical applications.
[0007] Therefore, the field urgently needs an innovative solution that can bridge the above gap, that is, a truly fully autonomous and adaptive agricultural management system that can not only learn from data, but also plan and act autonomously, and can closely combine the reasoning ability of general artificial intelligence with the precision of domain scientific knowledge. Summary of the Invention
[0008] The purpose of the present invention is to provide an intelligent agent-driven adaptive agricultural management system to solve the problems raised by the above-mentioned background technology.
[0009] The present invention provides an agent-driven adaptive agricultural management system, including an agricultural management system. The agricultural management system constructs an agricultural management agent with a high degree of autonomy, adaptive learning ability and scientific decision-making basis, and the agricultural management agent includes a perception module, a planning and reasoning module, an action module and an incremental learning module; the perception module is used to construct a high-fidelity world state model; the planning and reasoning module adopts a hybrid artificial intelligence architecture, and deeply couples the large agricultural model as a high-order planner with the crop growth mechanism model as a scientific knowledge tool through a function call mechanism; the action module is a bridge connecting the agent's decision-making and the changes in the physical world, and is responsible for converting abstract plans into precise interventions in the physical world for precise and reliable environmental regulation; the incremental learning module achieves adaptive evolution through reinforcement learning based on environmental feedback, implements a novel reinforcement learning framework based on environmental feedback, and continuously fine-tunes the planning strategy of the large agricultural model through internally generated multi-objective reward signals and proximal strategy optimization algorithms to achieve autonomous adaptation to the dynamic environment of a specific farm.
[0010] Furthermore, the physical world includes a farm or greenhouse environment, and the original multimodal data of environmental changes is transmitted to the agricultural management system through sensors, and the agricultural management system regulates the physical environment through actuators.
[0011] Furthermore, the agricultural management system consists of an agricultural management intelligent agent framework and a hybrid model-driven paradigm-based intelligent agent architecture. The agricultural management intelligent agent framework includes a communication protocol and orchestration model between modules. The hybrid model-driven control paradigm includes model-free components, model-driven components and paradigm collaboration. Paradigm collaboration is a hybrid paradigm that combines model-driven components for crop growth mechanism models with reinforcement learning of model-free components based on environmental feedback.
[0012] Furthermore, the perception module includes a multimodal sensor and actuator suite, a data preprocessing and fusion pipeline, and a computer vision submodule. The multimodal sensor comprehensively monitors and precisely regulates the agricultural environment based on adapted sensors and actuators. The data preprocessing and fusion pipeline is a multi-stage data processing pipeline used to convert raw noisy sensor signals into a unified and clean world state. The computer vision submodule is used for phenotype analysis and health assessment.
[0013] Furthermore, the data preprocessing and fusion pipeline includes:
[0014] In the first stage, time series data denoising based on the Kalman filter optimized by genetic algorithm is performed. Each time series sensor data stream is processed by an independent Kalman filter. A standard one-dimensional Kalman filter model is defined as follows:
[0015] A1. State prediction,
[0016] A2, Error covariance prediction,
[0017] A3, Kalman gain calculation,
[0018] A4. Status update,
[0019] A5. Error covariance update,
[0020] in, is the current time step index, is the previous time step index, For the known Under the conditions of the moment state The predicted value of the state at the moment; For integration The updated state estimate after the moment measurement; For The forecast error covariance matrix at time t; After fusion measurement value Update error covariance matrix at time t; : state transfer matrix, usually the unit matrix for simple sensor scenarios; is the transposed matrix of the state transfer matrix F; is the measurement matrix, and for sensors that directly measure state variables, the unit matrix is usually used; is the process noise covariance matrix, reflecting the uncertainty of the model prediction process; is the measurement noise covariance matrix, which reflects the uncertainty of the sensor measurement process; is the Kalman gain, which represents the weight distribution between the predicted value and the measured value during fusion; is the transpose of the observation matrix; is the projection of the prediction error covariance in the observation space; is the prediction of the measured value in the observation space; For The measurement values obtained by the sensor at any moment; is the identity matrix;
[0021] In applications, the key to filtering effect lies in the process noise covariance Covariance with measurement noise To achieve the optimal parameters, a genetic algorithm is used to automatically search and determine the optimal and value, thus transforming the traditional experience-based parameter adjustment process into a reproducible and quantifiable technical step, ensuring the optimal performance of the Kalman filter in multi-sensor time series signal denoising;
[0022] Phase 2: Visual data feature extraction: The visual data is processed by the computer vision submodule to extract high-level semantic information;
[0023] In the third stage, multimodal data fusion and world state vector construction are carried out. The processed modal data are aligned by timestamps and integrated using an early fusion strategy. The modal data include denoised environmental data, actuator state feedback, and semantic features extracted by the visual submodule. All data are spliced into a single high-dimensional world state vector St. This vector is the only comprehensive digital representation of the environment managed by the agricultural management agent at time t and is the basis for all subsequent planning and reasoning.
[0024] Furthermore, the computer vision submodule is responsible for extracting biological information from images that is crucial for agricultural decision-making. The extraction steps include:
[0025] B1. Object detection for fruit counting and maturity grading uses a YOLOv8-based deep learning model trained to identify and locate fruit in images and classify them into multiple maturity levels, including green, veraison, ripe, and fully ripe, based on the fruit's color, size, and shape. The model's network architecture includes the C2f module in its backbone network and a decoupled detection head.
[0026] B2. Semantic segmentation for quantitative disease assessment accurately quantifies the severity of leaf diseases, including early blight and late blight. A semantic segmentation model with a U-Net architecture is used. Its symmetric encoder-decoder structure and signature skip connections enable it to accurately segment irregular diseased areas in an image, maintaining high accuracy even against complex backgrounds. The model output is a mask of the same size as the original image, in which the diseased areas are clearly identified. By calculating the ratio of diseased pixels to total leaf pixels in the mask, a quantitative disease severity index is derived as part of the world state vector.
[0027] B3. A robust training dataset is constructed through advanced data augmentation technology. A two-layer data augmentation strategy of basic geometric and optical enhancement and generative adversarial network enhancement is adopted. The basic geometric and optical enhancement applies a series of traditional enhancement methods to existing images, including random rotation, scaling, cropping, flipping, and adjustment of brightness, contrast and saturation. The generative adversarial network enhancement adopts an advanced cycle-consistent generative adversarial network to solve the problem of insufficient rare disease samples. The cycle-consistent generative adversarial network can perform style transfer between unpaired image sets. A larger set of healthy leaf images and a smaller set of specific diseased leaf images are used to train the cycle-consistent generative adversarial network. After training, the network can translate images of healthy leaves into images with realistic disease textures, generating high-quality and diverse disease samples.
[0028] Furthermore, the agricultural model uses low-rank adaptive technology, namely Low-Rank Adaptation (LoRA), to perform efficient parameter fine-tuning to balance the model's adaptability and training efficiency. The LoRA fine-tuning hyperparameter configuration example includes fine-tuning the corpus and system prompt words;
[0029] The crop growth mechanism model simulates the growth and development of crops under given environmental conditions and contains a series of mathematical equations describing key physiological processes:
[0030] C1. Photosynthesis and biomass accumulation. The model first calculates the photosynthetic radiation intercepted by the crop canopy, hereinafter referred to as PAR, and calculates the potential daily dry matter increment based on the crop's light energy utilization efficiency, hereinafter referred to as BE, and a genetic parameter. , and its calculation formula is, The intercepted PAR is calculated according to the Beer-Lambert law as follows: in, is the canopy extinction coefficient, is the leaf area index, is the total daily solar radiation;
[0031] C2. Dry matter distribution. The daily accumulated dry matter, i.e., biomass, needs to be distributed to different organs of the crop, i.e., roots, stems, leaves, or fruits. The distribution ratio is not fixed, but a dynamic function determined by the current developmental stage of the crop, i.e., the vegetative growth period and the reproductive growth period. The distribution coefficient is a genetic characteristic of the crop variety and is encoded as a genetic parameter of the model.
[0032] Furthermore, the action module includes IoT actuator control logic, MQTT-based secure communication infrastructure, and a command queue model for asynchronous and reliable operations.
[0033] Furthermore, the incremental learning module includes a formal definition of the reinforcement learning problem, a multi-objective reward function and a proximal policy optimization update mechanism. The multi-objective reward function calculates a comprehensive reward value after executing the action at each time step t+1. , which is the weighted formula of multiple sub-goals:
[0034]
[0035] in, Yield maximization reward is the core intrinsic reward of the reinforcement learning framework based on environmental feedback. It measures the degree to which the actual growth of crops matches the ideal situation predicted by the scientific model. is a quality improvement reward, which comes directly from the output of the computer vision submodule; is the resource cost penalty, which is proportional to the normalized total amount of resources consumed in the previous time step; 、 and All of them are hyperparameters, and the sum of the three is 1. By adjusting these weights, the learning direction of the agent can be guided to adapt to different production goals;
[0036]
[0037] in, is the actual biomass, i.e., dry matter increment, measured by the perception module between time steps t and t+1; It is the biomass increment that should be expected under ideal conditions, predicted by the crop growth mechanism model at time step t based on the current state St. When the actual growth approaches or exceeds the ideal growth, the reward value approaches 1;
[0038] The proximal policy optimization update mechanism includes a proximal policy optimization composite loss function, a proximal policy optimization hyperparameter configuration, and a reinforcement learning training loop pseudocode based on environment feedback.
[0039] Furthermore, the proximal strategy optimizes the composite loss function in each learning iteration by minimizing a composite loss function To update the model parameters , the loss function consists of three parts: strategy loss, value function loss and entropy reward. The loss function formula is,
[0040]
[0041] in, It is the strategy loss, which is the core of proximal strategy optimization; is the loss function, is the value function loss, is the loss weight coefficient of the value loss function, is the entropy reward weight coefficient, which is used to control the degree of exploration, It's a strategy Output the entropy of the action probability distribution to encourage exploration, the policy loss The formula is, in, is the empirical expectation at time step t, is the estimated value of the advantage function, which measures the Take action Compared with the evaluation level,
[0042] in, is the probability ratio of the new and old policies. The clip function limits the probability ratio to a small interval [1−ϵ, 1+ϵ]. ϵ is a hyperparameter, ϵ = 0.2. This clipping operation is key to the stability of proximal policy optimization, preventing a single update from overly changing the policy and thus avoiding training crashes.
[0043] The value function loss The formula is,
[0044]
[0045] in, It is the state value predicted by the value network, namely the Critic; is the target value, the discounted sum of future returns calculated from the collected trajectories, i.e., Return; this item is the mean squared error, i.e., MSE loss, which is used to train the Critic to estimate a more accurate state value;
[0046] The entropy reward It's a strategy The entropy of the output action probability distribution is added as a reward term to the loss function to encourage the strategy to maintain a certain degree of randomness, promote more thorough exploration of the agent in the early stages of training, and prevent it from converging to a suboptimal deterministic strategy too early.
[0047] The beneficial effects of the technical solution of the present invention are:
[0048] 1. The present invention combines flexibility with scientific rigor. It adopts a hybrid artificial intelligence (Hybrid AI) architecture through planning and reasoning modules. This deeply couples a large-scale agricultural model, serving as a high-level planner, with a crop growth mechanism model, serving as a scientific knowledge tool, through a function call mechanism, ensuring that decision-making combines flexibility with scientific rigor. The present invention also ensures scientific and secure decision-making. The hybrid planning process ensures that all decisions are based on the crop growth mechanism model, effectively avoiding the "hallucinations" or erroneous instructions that may be generated by pure large-scale language models, thereby ensuring the safety and reliability of the production process.
[0049] 2. This invention implements a novel reinforcement learning framework based on environmental feedback through an incremental learning module. Using internally generated multi-objective reward signals and a proximal policy optimization algorithm, it continuously fine-tunes the planning strategy of a large agricultural model, enabling the system to autonomously adapt to the dynamic environment of a specific farm. This invention enables precise, autonomous, and efficient management of the entire agricultural production cycle, significantly improving resource utilization and crop output while significantly reducing human operation and maintenance costs.
[0050] 3. The present invention is highly autonomous and adaptable. Through an intelligent agent architecture and a reinforcement learning closed loop based on environmental feedback, it can autonomously adapt to environmental changes, the transition of crop growth stages, and the microclimate differences between different plots of land, achieving precise management, which is significantly superior to static and rule-based systems.
[0051] 4. The present invention improves resource utilization efficiency and output. By continuously optimizing environmental control strategies, it can minimize the waste of resources such as water, fertilizer, or energy while meeting the optimal growth requirements of crops, thereby reducing production costs while improving crop yield and quality.
[0052] 5. The present invention reduces manpower dependence and operation and maintenance costs. The fully autonomous operation characteristics of the system greatly reduce the need for professional agronomists to perform daily monitoring and decision-making intervention, reduce long-term operating costs, and enable high-level agricultural management knowledge to be applied on a large scale and in an automated manner.
[0053] 6. The present invention integrates an agricultural management intelligent agent architecture, hybrid artificial intelligence and reinforcement learning control theory to form an automated management system for the entire agricultural production cycle. The intelligent agent artificial intelligence is an autonomous system that can autonomously perceive, reason, plan and execute tasks in its dynamic environment; the hybrid artificial intelligence system combines data-driven learning models (such as large language models) with knowledge-driven first principles models (such as crop growth mechanism models) to achieve a more robust and explainable decision-making system architecture; reinforcement learning for control systems applies reinforcement learning theory, a technology that self-optimizes and iteratively improves control strategies through continuous interaction and feedback with the environment; sensor networks are used to monitor the agricultural environment in real time, and precise regulation is performed through the Internet of Things and automated actuators. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a schematic diagram of the system architecture of the agricultural management intelligent body described in the present invention.
[0055] Figure 2 This is a flowchart for pre-training and fine-tuning the large-scale agricultural model described in the present invention.
[0056] Figure 3 This is a workflow diagram of the planning and reasoning module described in the present invention.
[0057] Figure 4 This is a workflow diagram of the action module described in the present invention.
[0058] Figure 5 This is a workflow diagram of the perception module described in the present invention.
[0059] Figure 6 This is a workflow diagram of the incremental learning module described in the present invention.
[0060] Figure 7 This is a comparative analysis diagram of the tomato growth system described in the present invention.
[0061] Figure 8 This is a summary table of sensor component types of the present invention.
[0062] Figure 9 This is a summary table of actuator component types of the present invention.
[0063] Figure 10 Parameter details for the low-rank adaptive technology of the present invention.
[0064] Figure 11 are exemplary genetic coefficients for tomato according to the present invention.
[0065] Figure 12 The invention provides a computer program with a large agricultural model - a crop growth mechanism model "handshake" protocol as a function call mechanism.
[0066] Figure 13 A clear hierarchical structure of computer programs from the general to the specific is employed for the present invention.
[0067] Figure 14 A computer program that standardizes the JSON payload format for the present invention.
[0068] Figure 15 A possible computer program for the state vector St of the present invention.
[0069] Figure 16 This is a set of typical configurations used in the embodiments of the present invention.
[0070] Figure 17 This is the front part of the pseudo code of the reinforcement learning training loop based on environmental feedback of the present invention.
[0071] Figure 18 This is the latter part of the pseudo code of the reinforcement learning training loop based on environmental feedback of the present invention. DETAILED DESCRIPTION
[0072] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0073] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0074] The following describes in detail a specific solution of an intelligent agent-driven adaptive agricultural management system provided by the present invention with reference to the accompanying drawings.
[0075] Refer to the attached Figure 1-7, which shows an agent-driven adaptive agricultural management system provided by an embodiment of the present invention, including an agricultural management system. The agricultural management system constructs an agricultural management agent with high autonomy, adaptive learning capabilities and scientific decision-making basis, and the agricultural management agent includes a perception module, a planning and reasoning module, an action module and an incremental learning module; the perception module is used to construct a high-fidelity world state model; the planning and reasoning module uses a hybrid artificial intelligence Hybrid AI architecture to deeply couple the large agricultural model as a high-order planner with the crop growth mechanism model as a scientific knowledge tool through a function call mechanism, so that the decision-making has both flexibility and scientific rigor; the action module is a bridge connecting the agent's decision-making and changes in the physical world, responsible for converting abstract plans into precise interventions in the physical world for precise and reliable environmental regulation; the incremental learning module achieves adaptive evolution through reinforcement learning based on environmental feedback, implements a novel reinforcement learning framework based on environmental feedback, and continuously fine-tunes the planning strategy of the large agricultural model through internally generated multi-objective reward signals and proximal policy optimization algorithm to achieve autonomous adaptation to the dynamic environment of a specific farm. The hybrid planning process of the planning and reasoning modules innovatively combines a large-scale generative language model as a high-level planner and a crop growth mechanism model as a deterministic scientific knowledge tool. The large-scale language model is responsible for understanding complex situations and decomposing tasks; the crop growth mechanism model provides precise and reliable parameter basis for planning. This hybrid model ensures that decision-making plans are both context-aware and strictly adhere to agricultural science principles. The adaptive learning loop is a reinforcement learning framework based on environmental feedback. This framework generates an intrinsic multi-objective reward signal by continuously comparing the actual growth state of crops with the ideal state of the crop growth mechanism model. This signal is used to fine-tune the agent's planning strategy, allowing the system to continuously evolve in its interaction with the specific environment and continuously improve its management efficiency.
[0076] The perception module is used to acquire and construct a unified world state model of crop status and environmental conditions in real time through multimodal sensor fusion and data preprocessing;
[0077] The planning and reasoning module integrates a large-scale agricultural model as a high-level planner and a crop growth mechanism model as a scientific knowledge tool. The large-scale agricultural model generates a preliminary operation plan based on the world state model and preset top-level goals provided by the perception module. It then uses a function call mechanism to call the crop growth mechanism model to obtain optimal environmental parameters, ultimately forming a precise execution plan that is both scientific and context-adaptive.
[0078] An action module is used to translate the precise execution plan into specific control instructions for the Internet of Things (IoT) actuators and schedule the execution through a command queue-based model to regulate the agricultural physical environment;
[0079] The incremental learning module is used to implement a reinforcement learning framework based on environmental feedback. This module calculates a multi-objective reward signal by comparing the actual growth indicators of crops with the ideal indicators predicted by the crop growth mechanism model, and uses this signal to continuously optimize the planning strategy of large-scale agricultural models through reinforcement learning algorithms such as proximal policy optimization.
[0080] The physical world includes a farm or greenhouse environment, and the original multimodal data of environmental changes is transmitted to the agricultural management system through sensors, and the agricultural management system controls the physical environment through actuators.
[0081] The agricultural management system constructs an intelligent agent architecture through an agricultural management intelligent agent framework and a hybrid model-driven control paradigm. The agricultural management intelligent agent framework includes an inter-module communication protocol and an orchestration model. The hybrid model-driven control paradigm includes model-free components, model-driven components, and paradigm collaboration. Paradigm collaboration is a hybrid paradigm that combines model-driven components for crop growth mechanism models with reinforcement learning of model-free components based on environmental feedback. The present invention is constructed as an agricultural management intelligent agent. "Agricultural management intelligent agent" is not only a concept, but also a specific software engineering practice. The present invention adopts the design concept of a multi-agent system and implements the four core functional modules of the agricultural management intelligent agent, namely the perception module, planning and reasoning module, action module, and incremental learning module, into four independent microservices that can be deployed in a container. This architectural choice brings significant engineering advantages, including modularity, scalability, maintainability, and specialized division of labor, which are crucial for building a complex real-world control system that requires long-term stable operation.
[0082] In order to meet the requirements of real-time control of the system, the choice of inter-module communication protocol is crucial. This application adopts a high-performance, low-latency gRPC (Google Remote Procedure Call), which is superior to the traditional text-based RESTful API. gRPC is based on the HTTP / 2 protocol, supports multiplexing, header compression, and bidirectional streaming, and uses the efficient binary serialization format Protocol Buffers. This enables efficient inter-process communication (IPC) between modules, especially when coexisting on edge servers, significantly reducing communication overhead and latency. This is an essential technical detail for a control system that needs to respond quickly to environmental changes.
[0083] This orchestration model employs a supervisor-worker orchestration model within a multi-agent system architecture. The planning and reasoning module plays the role of the "supervisor agent." As the system's cognitive core, it receives "world state" updates from the perception module (worker), performs high-level planning, and then dispatches specific execution tasks (via gRPC service calls) to the action module (worker) and incremental learning module (worker), thereby coordinating the entire autonomous "perception-planning-action-learning" cycle.
[0084] The core control philosophy of this application is a hybrid paradigm of model-driven and model-free reinforcement learning, which aims to combine the advantages of both and overcome their respective limitations.
[0085] The core adaptive capability of this model-free component stems from its model-free component, namely, reinforcement learning based on environmental feedback. Learning occurs through direct interaction with the real physical environment, a process known as trial and error. This enables the agricultural management agent to learn and adapt to nuances of a specific farm that cannot be fully captured by a priori models, such as the microclimate of a particular plot of land or performance drift caused by wear and aging of specific equipment. The core advantages of model-free methods, such as proximal policy optimization, lie in their strong environmental adaptability and robustness to model uncertainty.
[0086] The model-driven component integrates an explicit, scientifically based model of the environment that models crop growth mechanisms. This “model” provides two key functions:
[0087] 1. Secure planning space and efficient sample generation. The crop growth mechanism model, as a high-fidelity digital twin, allows the planning module (a large-scale agricultural model) to "rehearse" and evaluate different control strategies in a virtual environment, eliminating the need for costly and even risky trial and error in the real world. This greatly improves the sample efficiency of learning, a classic advantage of model-driven approaches.
[0088] 2. Source of Reward Signals: In real-world tasks such as agriculture, reward signals are often sparse (e.g., final yield) and delayed. The innovation of this application lies in using a crop growth mechanism model to address this issue. This crop growth mechanism model predicts the ideal growth indicators for crops under the current state. The difference between this ideal value and the actual value measured by the perception module is used to generate a dense, immediate intrinsic reward signal. This provides key learning guidance for model-free reinforcement learning based on environmental feedback.
[0089] The hybrid paradigm of these synergistic paradigms forms a virtuous cycle. The model-driven component (the crop growth mechanism model) provides efficient planning simulation and critical reward signals for the model-free component (environmental feedback-based reinforcement learning), addressing its low sample efficiency and sparse rewards. Simultaneously, the model-free component continuously learns and compensates for the model-driven component's "reality gap"—the inevitable error between the crop growth mechanism model and the real physical world—through interaction with the real world. This allows the entire system to continuously converge toward the optimal strategy in the real environment.
[0090] The Agricultural Management Agent framework organically integrates the various functional components of this application into a unified, goal-oriented, autonomous entity. This architecture follows a "perception-planning-action-learning" cycle, enabling the system to autonomously interact with and manage the agricultural environment as a whole.
[0091] The perception module includes a multimodal sensor and actuator suite, a data preprocessing and fusion pipeline, and a computer vision submodule. The multimodal sensor comprehensively monitors and precisely regulates the agricultural environment based on the adapted sensors and actuators. The data preprocessing and fusion pipeline is a multi-stage data processing pipeline used to convert the original noisy sensor signals into a unified and clean world state. The computer vision submodule is used for phenotype analysis and health assessment. Figure 5 As shown in the figure, the perception module is the "sensory organ" of the agricultural management intelligent agent. Its core task is to provide a comprehensive, accurate and real-time digital representation of the real world for the subsequent decision-making of the intelligent agent by fusing multimodal data streams.
[0092] In order to achieve comprehensive monitoring and precise control of the agricultural environment, the multimodal sensor and actuator suite deploys specific types of sensors and actuators. Figure 8 Sensor component type and Figure 9 The actuator assembly types list a non-limiting set of preferred hardware configurations.
[0093] The core of the perception module is a multi-stage data processing pipeline, such as Figure 5 As shown, the raw, noisy sensor signals are transformed into a unified, clean "world state".
[0094] The data preprocessing and fusion pipeline includes:
[0095] In the first stage, time series data denoising is performed using a genetic algorithm-optimized Kalman filter. The readings from environmental sensors (such as temperature and humidity) are inherently noisy time series data. To obtain the best estimate of the actual physical quantity, each time series sensor data stream is processed through an independent Kalman filter. A standard one-dimensional Kalman filter model is defined as follows:
[0096] A1. State prediction,
[0097] A2, Error covariance prediction,
[0098] A3, Kalman gain calculation,
[0099] A4. Status update,
[0100] A5. Error covariance update,
[0101] in, is the current time step index, is the previous time step index, For the known Under the conditions of the moment state The predicted value of the state at the moment; For integration The updated state estimate after the moment measurement; For The forecast error covariance matrix at time t; After fusion measurement value Update error covariance matrix at time t; : state transfer matrix, usually the unit matrix for simple sensor scenarios; is the transposed matrix of the state transfer matrix F; is the measurement matrix, and for sensors that directly measure state variables, the unit matrix is usually used; is the process noise covariance matrix, reflecting the uncertainty of the model prediction process; is the measurement noise covariance matrix, which reflects the uncertainty of the sensor measurement process; is the Kalman gain, which represents the weight distribution between the predicted value and the measured value during fusion; is the transpose of the observation matrix; is the projection of the prediction error covariance in the observation space; is the prediction of the measured value in the observation space; For The measurement values obtained by the sensor at any moment; is the identity matrix;
[0102] In applications, the key to filtering effect lies in the process noise covariance To achieve optimal parameters, a genetic algorithm is used with the objective function of minimizing the root mean square error (RMSE) between the filtered output and the reading of a high-precision reference sensor. This algorithm automatically searches for and determines the optimal Q and R values, thereby transforming the traditional empirical parameter tuning process into a reproducible and quantifiable technical procedure, ensuring the optimal performance of the Kalman filter in denoising multi-sensor time series signals.
[0103] Phase 2: Visual data feature extraction: The visual data is processed by the computer vision submodule to extract high-level semantic information;
[0104] In the third stage, multimodal data fusion and world state vector construction are carried out. The processed modal data (denoised environmental data, actuator state feedback, and semantic features extracted by the visual submodule) are aligned by timestamps and integrated using an early fusion strategy. The modal data includes denoised environmental data, actuator state feedback, and semantic features extracted by the visual submodule. All data are spliced into a single high-dimensional world state vector St. This vector is the only comprehensive digital representation of the environment managed by the agricultural management agent at time t and is the basis for all subsequent planning and reasoning.
[0105] The computer vision submodule is responsible for extracting biological information from images that is crucial for agricultural decision-making. The extraction steps include:
[0106] B1. Object detection for fruit counting and maturity grading uses a YOLOv8-based deep learning model trained to identify and locate fruit in images and classify them into multiple maturity levels, including green, veraison, ripe, and fully ripe, based on the fruit's color, size, and shape. The model's network architecture includes the C2f module in its backbone network and a decoupled detection head.
[0107] Taking tomatoes as an example, a YOLOv8-based deep learning model was used to achieve real-time tomato fruit counting and maturity assessment. YOLOv8 was selected for its excellent balance of speed and accuracy, making it ideal for deployment on edge computing devices. The model was trained to identify and locate tomatoes in images and classify them into multiple maturity levels (green, veraison, ripe, and well-ripened) based on fruit color, size, and shape. The model's network architecture, including the C2f module in its backbone network and the decoupled detection head, adheres to the standard YOLOv8 design to ensure optimal performance.
[0108] B2. Semantic segmentation for quantitative disease assessment accurately quantifies the severity of leaf diseases, including early blight and late blight. A semantic segmentation model with a U-Net architecture is used. Its symmetric encoder-decoder structure and signature skip connections enable it to accurately segment irregular diseased areas in an image, maintaining high accuracy even against complex backgrounds. The model output is a mask of the same size as the original image, in which the diseased areas are clearly identified. By calculating the ratio of diseased pixels to total leaf pixels in the mask, a quantitative disease severity index is derived as part of the world state vector.
[0109] To accurately quantify the severity of leaf diseases (such as early blight and late blight), a semantic segmentation model with a U-Net architecture was employed. U-Net's symmetric encoder-decoder structure and its signature "skip connections" enable extremely precise segmentation of irregular diseased areas within an image, maintaining high accuracy even against complex backgrounds. The model output is a mask of the same size as the original image, clearly identifying the diseased areas. By calculating the ratio of diseased pixels to total leaf pixels in the mask, the system generates a quantitative disease severity index as part of the world state vector.
[0110] B3. A robust training dataset is constructed through advanced data augmentation technology. A two-layer data augmentation strategy is adopted, which includes basic geometric and optical enhancement and generative adversarial network (GAN) enhancement. The basic geometric and optical enhancement applies a series of traditional enhancement methods to existing images, including random rotation, scaling, cropping, flipping, and adjustment of brightness, contrast, and saturation. The generative adversarial network (GAN) enhancement addresses the problem of insufficient rare disease samples by adopting an advanced cycle-consistent generative adversarial network (CycleGAN). The cycle-consistent generative adversarial network is capable of style transfer between unpaired image sets. A larger set of healthy leaf images and a smaller set of specifically diseased leaf images are used to train the cycle-consistent generative adversarial network. After training, the network can translate images of healthy leaves into images with realistic diseased textures, generating high-quality and diverse diseased samples. To prevent the generative adversarial network from mistakenly generating disease features in the background area (a common problem known as "texture overflow"), we integrated an attention mechanism into its generator to guide the model to focus on the leaf area, ensuring that the generated disease features are semantically correct.
[0111] like Figure 3 As shown, the planning and reasoning module is the intelligent core of the agricultural management agent, the hybrid AI-driven "brain." The technical advancement of this solution lies in the use of a hybrid AI architecture that deeply and specifically couples the general reasoning and planning capabilities of a large language model with the precise domain knowledge of a crop growth mechanism model.
[0112] The large agricultural model is used as a high-level planner. The basic model and fine-tuning are built on an open-source, pre-trained large language model, chatglm3-6b, with billions of parameters. In order to achieve efficient domain adaptation without sacrificing performance, the present invention uses Low-Rank Adaptation (LoRA) technology for parameter-efficient fine-tuning (PEFT). Figure 10 shown.
[0113] Specific specifications for LoRA hyperparameters: LoRA's performance is highly dependent on the selection of its hyperparameters. To ensure the reproducibility of the technical solution, this paper specifies a set of preferred hyperparameter configurations. These parameters were selected based on a comprehensive analysis of existing research and aim to balance the model's adaptability and training efficiency.
[0114] An example of LoRA fine-tuning hyperparameter configuration for a large agricultural model, that is, the present invention explicitly specifies a set of preferred hyperparameter configurations as follows:
[0115] The fine-tuning corpus for the large agricultural model consists of a vast amount of specialized agricultural text, including but not limited to agricultural textbooks, plant pathology journal articles, agricultural extension service manuals, and pest control guides. Importantly, during the preprocessing phase, this text data is structuredly annotated using existing agricultural ontologies such as AGROVOC and the Agronomy Ontology. This "ontology-grounded generation" approach helps LLM better understand and organize domain knowledge, significantly improving the factual accuracy of the generated content.
[0116] System Prompt: At the beginning of each interaction, the agricultural model is initialized with a carefully designed system prompt to clarify its roles, goals, constraints, and available tools. A specific example of a system prompt is as follows: "You are a professional agricultural management agent. Your core goal is to maximize the long-term yield and first-grade fruit rate of the 'Provence' variety of tomatoes in the greenhouse in Area A, while simultaneously controlling daily water, electricity, and fertilizer resource consumption below preset thresholds. You will receive a real-time 'world state' vector as input. Your task is to generate a precise environmental control plan for the next 24 hours based on the current state."
[0117] You must use the get_optimal_environmental_parameters tool to query all numerical setpoints relevant to crop growth (such as temperature, humidity, CO2 concentration, nutrient solution formulation, etc.). Do not make up or 'hallucinate' any agronomic parameters. Your final output must be a structured JSON object that fully describes the execution plan for the next 24 hours.
[0118] The crop growth mechanism model uses the model foundation and core calculation process as a scientific knowledge oracle.
[0119] Model Foundation: The crop growth mechanism model is not a black-box model constructed from scratch. Instead, it is based on the internationally recognized and extensively validated DSSAT-CROPGRO-Tomato crop growth simulation model. Choosing this mature scientific model as the foundation provides a solid, traceable scientific basis for the decision-making of this invention.
[0120] Core Computational Process: The core function of the crop growth mechanism model is to simulate the growth and development of crops under given environmental conditions. It contains a series of mathematical equations describing key physiological processes, the two most important of which are photosynthesis and biomass accumulation and dry matter distribution.
[0121] The large agricultural model uses low-rank adaptive technology, also known as LoRA, for efficient parameter fine-tuning to balance the model's adaptability and training efficiency. The LoRA fine-tuning hyperparameter configuration example includes a fine-tuning corpus and system prompt words. The crop growth mechanism model simulates the growth and development of crops under given environmental conditions and contains a series of mathematical equations describing key physiological processes:
[0122] C1. Photosynthesis and biomass accumulation. The model first calculates the photosynthetically active radiation intercepted by the crop canopy (hereinafter referred to as PAR). Then, based on the crop's light energy use efficiency (hereinafter referred to as BE), a genetic parameter, the model calculates the potential daily dry matter increment (hereinafter referred to as BE). , and its calculation formula is, The intercepted PAR is calculated according to the Beer-Lambert law as follows: Where k is the canopy extinction coefficient, LAI is the leaf area index; is the total daily solar radiation;
[0123] C2. Dry matter distribution. The daily accumulated dry matter, i.e., biomass, needs to be distributed to different organs of the crop, i.e., roots, stems, leaves, or fruits. The distribution ratio is not fixed, but a dynamic function determined by the current developmental stage of the crop, i.e., the vegetative growth period and the reproductive growth period. The distribution coefficient is a genetic characteristic of the crop variety and is encoded as a genetic parameter of the model.
[0124] Genetic Coefficients: In order for the crop growth mechanism model to accurately simulate the growth characteristics of a specific crop variety (such as the 'Provence' tomato in this example), a set of exclusive genetic coefficients needs to be configured for it. These coefficients describe the variety's intrinsic characteristics such as growth cycle, photosynthetic efficiency, dry matter distribution pattern, etc. Figure 11 An exemplary set of genetic coefficients applicable to tomato is shown.
[0125] The "handshake" protocol of the large agricultural model - crop growth mechanism model is a function call mechanism.
[0126] The interaction between the agricultural model and the crop growth mechanism model is not a vague "consultation" but is achieved through a precise, standardized function calling mechanism. Under this mechanism, if the agricultural model determines that an external tool is needed to obtain information during its reasoning process, it generates a structured JSON object that precisely describes the function to be called and its parameters.
[0127] API Definition: The agriculture model uses a well-defined API endpoint to call the functions of the crop growth mechanism model. This API contains only one function: get_optimal_environmental_parameters.
[0128] JSON Schema for function calls: To ensure that the agricultural model can correctly call the crop growth mechanism model, the system predefines the JSON Schema for this function call. Any call request generated by the agricultural model must strictly comply with this schema. This provides a contract for the "handshake" between the two modules. Figure 12 As shown, the design of this Schema follows the best practices of OpenAI Function Calling and Google AI Function Calling.
[0129] Workflow:
[0130] When the Agricultural Big Model receives a high-level goal (such as "optimizing tomato quality during fruit set") and the current world state, it performs "chain-of-thought" analysis, generating a preliminary action framework containing undetermined parameters. It then identifies the steps requiring computation by the Crop Growth Mechanism Model and generates the aforementioned function call request in JSON format. Upon receiving the request, the Crop Growth Mechanism Model runs its internal simulation model to calculate the optimal environmental parameters (such as temperature, humidity, CO2 concentration, and nutrient solution EC / pH), returning them to the Agricultural Big Model in JSON format. Finally, the Agricultural Big Model incorporates these precise numerical parameters into its action framework, forming a final, executable, and precise plan. This mechanism functions similarly to an advanced, dynamic Retrieval-Augmented Generation (RAG), in which the Crop Growth Mechanism Model acts as a computable, authoritative external knowledge source.
[0131] A key advantage of this hybrid architecture is that it effectively overcomes the core flaw of using large language models alone for physical world control. The "hallucination" problem of LLMs, which may generate outputs that do not conform to physical laws or domain common sense, is a major obstacle to their application in critical tasks. In this invention, the crop growth mechanism model plays the role of a "scientific guardrail", forcing any planning of large agricultural models to be verified and constrained by scientific models, thereby ensuring the safety, reliability, and explainability of the entire system's decisions, which is crucial for industrial-grade applications.
[0132] The action module includes IoT actuator control logic, MQTT-based secure communication infrastructure, and a command queue model for asynchronous and reliable operations.
[0133] Action modules enable precise and reliable environmental control such as Figure 4 As shown in Figure 2, the action module is the bridge connecting the agent's decision-making and changes in the physical world, and is responsible for converting abstract plans into precise interventions in the physical world.
[0134] IoT actuator control logic:
[0135] The action module contains a device abstraction layer. This layer's primary responsibility is to translate high-level instructions output by the planning and reasoning modules (for example, "Open the irrigation solenoid valve in zone A for 90 seconds") into low-level, device-specific control commands. It maintains a device registry that records information about all controllable actuators in the greenhouse, including:
[0136] Device ID
[0137] Communication protocols (e.g., MQTT, Modbus TCP, HTTP API)
[0138] Device addresses / endpoints (e.g., MQTT topics, Modbus slave addresses, and register addresses)
[0139] Command format (e.g., JSON payload template, Modbus function code)
[0140] This abstract design decouples the upper-level planning logic from the underlying hardware details. When a new model of actuator needs to be replaced or added, only the device registry and the corresponding driver need to be updated without modifying the core planning code.
[0141] Secure MQTT-based communication infrastructure: To enable reliable communication with distributed IoT actuators, this paper mandates that all device communication must occur over the MQTT (Message Queuing Telemetry Transport) protocol. MQTT has become a standard protocol in the IoT due to its lightweight nature, publish / subscribe model, and support for unstable networks. To ensure secure, manageable, and scalable communication, this paper defines a strict set of MQTT infrastructure specifications.
[0142] Hierarchical MQTT topic structure: A well-designed topic structure is the cornerstone of a scalable and secure IoT system. This invention adopts a clear hierarchical structure from general to specific such as Figure 13 shown.
[0143] Standardized JSON payload format: To ensure interoperability, all MQTT message payloads must be in JSON format. Figure 14 shown.
[0144] Robust Security Architecture: Security is a top priority in industrial control systems. This invention enforces a multi-layered security model to prevent unauthorized access, data tampering, and eavesdropping: Transport-layer encryption: All MQTT communications must be encrypted using the TLS 1.3 protocol and run on the standard secure port 8883. Any cleartext communication using port 1883 is strictly prohibited. Mutual TLS (mTLS): Mutual TLS authentication is employed. This means that not only does the client (actuator / sensor) need to verify the identity of the server (MQTT broker), but the server must also verify the identity of the client. Both communicating parties must possess a valid X.509 certificate and private key issued by the system's internal private certificate authority (CA). Authentication methods that rely solely on username / password authentication are considered insecure and are prohibited for device-level authentication. Application-layer authorization: Strict access control lists (ACLs) are configured on the MQTT broker. Each device's certificate identity (typically the common name / CN in the certificate) is mapped to a specific ACL policy. This policy precisely defines the topics that a device is allowed to publish and subscribe to. For example, the ACL policy for a vent actuator, vent-louver-01, would only allow it to subscribe to the cmd / .... / vent-louver-01 / set topic, and only allow it to publish to the dt / .... / vent-louver-01 / status and ack / .... / vent-louver-01 / status topics. This strictly enforces the principle of least privilege, limiting the potential damage even if a device is compromised.
[0145] Command Queue Pattern for Asynchronous Reliable Operations: To cope with inevitable real-world issues such as network outages and temporary device offlines, the Action module implements a reliable execution mechanism based on the Command Design Pattern and a persistent message queue.
[0146] Workflow:
[0147] The action module receives the complete execution plan from the planning module and breaks it down into a series of independent, serializable command objects. Each command object encapsulates all the information needed to execute a single action: the target device ID, the action type (e.g., set_position), parameters (e.g., {"position_percent": 75}), and a globally unique command_id.
[0148] After these command objects are serialized, they are not sent directly to the MQTT Broker, but are placed in a persistent command queue (for example, using the persistent session feature of RabbitMQ or the MQTT Broker itself).
[0149] One or more independent Command Dispatcher worker processes take commands from the queue.
[0150] The dispatcher publishes the command to the corresponding topic through MQTT and starts listening to the corresponding ack topic, waiting for the confirmation message of the command_id.
[0151] Reliability: If the dispatcher receives a SUCCESS confirmation message within a preset timeout (e.g., 30 seconds), the command is considered successfully executed and removed from the system. If no confirmation is received after the timeout, the dispatcher puts the command back at the end of the queue for retry (a maximum retry count can be configured). If a command still fails after the maximum number of retries, or receives a FAILURE confirmation message, it is removed from the main queue and placed in a dedicated dead letter queue (DLQ).
[0152] Commands in the dead letter queue are recorded and trigger alerts for system administrators to manually investigate. This mechanism ensures that a single device failure or network problem does not block the execution of the entire system, greatly improving the robustness and reliability of the system.
[0153] The incremental learning module achieves adaptive evolution through reinforcement learning based on environmental feedback. Figure 6 As shown, this module is one of the core innovations that distinguishes this invention from existing technologies. It replaces the simple model updates or rule adjustments in traditional systems with an advanced, closed-loop reinforcement learning framework, which is the key to achieving autonomous learning and continuous evolution of the system.
[0154] The reinforcement learning problem is formally defined. The learning problem of the present invention is strictly formalized as a Markov decision process (MDP), and its various elements are defined as follows:
[0155] State Space S: A high-dimensional, continuous vector space. The state St at any time point t is defined by the "world state vector" constructed by the perception module. This vector contains all the pre-processed and fused sensor information. For example, at 10:00 am on June 20, 2025, the system models the state of a tomato greenhouse in its "peak fruiting period". The specific state vector St may be as follows: Figure 15 shown.
[0156] Action Space A: A multidimensional, continuous action space. An action At is a vector containing the setpoints of all controllable actuators, such as [target temperature, target humidity, target CO2 concentration, irrigation duration, supplemental lighting intensity, nutrient solution pump flow rate, etc.]. The policy $\pi$ (Policy), or $\pi(A_t | S_t)$, is represented by the large-scale agricultural model. It is a stochastic policy. For a given state St, the large-scale agricultural model outputs a probability distribution over the continuous action space, from which the system samples a specific action vector At to execute. The learning goal is to optimize the parameters of this policy function $\pi$ (i.e., the weights of the large-scale agricultural model).
[0157] Multi-Objective Reward Function: A well-designed reward function is key to successful reinforcement learning. This paper proposes a novel multi-objective reward function tailored to the practical needs of agricultural production. After executing an action at each time step t+1, the system calculates a comprehensive reward value, Rt+1, which is the weighted sum of multiple sub-goals.
[0158] The incremental learning module includes a formal definition of the reinforcement learning problem, a multi-objective reward function, and a proximal strategy optimization update mechanism. The multi-objective reward function calculates a comprehensive reward value after executing the action at each time step t+1. , which is the weighted sum of multiple sub-goals,
[0159]
[0160] in, Yield maximization reward is the core intrinsic reward of the reinforcement learning framework based on environmental feedback. It measures the degree to which the actual growth of crops matches the ideal situation predicted by the scientific model. is the quality improvement reward, which comes directly from the output of the computer vision submodule, is the resource cost penalty, which is proportional to the normalized total amount of resources consumed in the previous time step; 、 and They are all hyperparameters, and their sum is 1. By adjusting these weights, the learning direction of the agent can be guided to adapt to different production goals;
[0161] in, is the actual biomass, i.e., dry matter increment, measured by the perception module between time steps t and t+1; It is the biomass increment that should be expected under ideal conditions, predicted by the crop growth mechanism model at time step t based on the current state St. When the actual growth approaches or exceeds the ideal growth, the reward value approaches 1;
[0162] The proximal policy optimization update mechanism includes a proximal policy optimization composite loss function, a proximal policy optimization hyperparameter configuration, and a reinforcement learning training loop pseudocode based on environment feedback.
[0163] Rquality (quality improvement reward): This reward is directly derived from the output of the computer vision submodule. For example, it can be defined as the normalized increase in the number of tomatoes classified as "first-class fruit," or inversely proportional to the normalized value of the detected leaf disease area.
[0164] Rcost (resource cost penalty): This penalty is proportional to the normalized total amount of resources (e.g., electricity, water, fertilizer) consumed in the previous time step. This incentivizes the agent to find more energy- and water-efficient control strategies while still meeting crop growth requirements.
[0165] Weight coefficients: wyield, wquality, and wcost are hyperparameters, and their sum is 1. By adjusting these weights, the learning direction of the agent can be guided to adapt to different production goals (for example, wquality can be increased when pursuing the highest quality, and wcost can be increased in cost-sensitive periods).
[0166] To update the parameters of the large policy network agricultural model, this paper uses a proximal policy optimization algorithm. Proximal policy optimization has become a mainstream choice for fine-tuning large language models for decision-making tasks due to its excellent stability and data efficiency in complex control tasks.
[0167] Proximal strategy optimizes composite loss function: wherein, in each learning iteration, the proximal strategy optimizes the composite loss function by minimizing a composite loss function To update the model parameters θ, the loss function consists of three parts: strategy loss, value function loss and entropy reward. The loss function formula is:
[0168]
[0169] in, It is the strategy loss, which is the core of proximal strategy optimization. is the loss function, is the value function loss, is the loss weight coefficient of the value loss function, is the entropy reward weight coefficient, which is used to control the degree of exploration, It's a strategy Output the entropy of the action probability distribution to encourage exploration,
[0170] The strategy loses The formula is, in, is the empirical expectation at time step t, is the estimated value of the advantage function, which measures the Take action Compared with the evaluation level,
[0171] in, is the probability ratio of the new and old policies. The clip function limits the probability ratio to a small interval [1−ϵ, 1+ϵ]. ϵ is a hyperparameter, ϵ = 0.2. This clipping operation is key to the stability of proximal policy optimization, preventing a single update from overly changing the policy and thus avoiding training crashes.
[0172] The value function loss The formula is,
[0173]
[0174] in, It is the state value predicted by the value network, namely the Critic; is the target value, the discounted sum of future returns calculated from the collected trajectories, i.e., Return; this item is the mean squared error, i.e., MSE loss, which is used to train the Critic to estimate a more accurate state value;
[0175] The entropy reward It's a strategy The entropy of the output action probability distribution is added as a reward term to the loss function to encourage the strategy to maintain a certain degree of randomness, promote more thorough exploration of the agent in the early stages of training, and prevent it from converging to a suboptimal deterministic strategy too early.
[0176] Proximal policy optimization hyperparameter configuration: The performance of the proximal policy optimization algorithm also depends on a series of key hyperparameters. Figure 16 A set of typical configurations used in the embodiments of the present invention are listed. Pseudo code of reinforcement learning training loop based on environmental feedback: Figure 17 and Figure 18 A complete pseudo code for the reinforcement learning training loop based on environment feedback is given, describing in detail the entire process from data collection to network update.
[0177] Example: Figure 7As shown, the application demonstration of the full cycle management of tomato planting is shown. The following uses a specific case of tomato planting to illustrate how the agricultural management intelligent body described in the present invention operates in a complete production cycle.
[0178] Step 1: Initialization
[0179] The operator enters the initial command through the user interface: "Crop: Tomato, Variety: 'Provence'; Objective: Maximize primary fruit yield." The agricultural management agent loads the tomato crop growth mechanism model corresponding to this variety and initializes the strategy of the large agricultural model.
[0180] Step 2: Seedling Management (Weeks 1-3)
[0181] Perception: The perception module uses a camera to identify seedlings and uses an object detection model to calculate the seedling emergence rate and average plant height. Environmental sensor data indicates that the current greenhouse environment is high humidity and medium temperature. Planning: The agricultural model receives the world state and identifies the current stage as either the "seedling" or "vegetative growth" phase. Its high-level planning goal is to "promote healthy root development and lay the foundation for subsequent growth." It generates a function call to query the crop growth mechanism model for the optimal soil temperature, humidity, and light cycle for this phase. Based on its internal biophysical model, the crop growth mechanism model calculates and returns a set of precise parameters (e.g., soil moisture of 55%-65%, daytime temperature of 24°C, nighttime temperature of 18°C, and a 14-hour photoperiod). The agricultural model integrates these parameters to create a detailed irrigation and lighting plan. Action: The action module translates the plan into MQTT commands and reliably sends them to the drip irrigation system and LED lighting actuators via the command queue. Learning: The incremental learning module calculates rewards based on actual seedling emergence and growth (compared to the ideal model of crop growth mechanism) to make small positive or negative adjustments to the early management strategy of the large agricultural model.
[0182] Step 3: Management during the flowering and fruiting period (weeks 4-8)
[0183] Perception: The camera detects the rapid formation of inflorescences through image recognition. Soil sensor data indicates a significant increase in the plant's absorption rate of phosphorus and potassium. Planning: The agricultural model identifies a key transition in the growth phase. Its planning focus shifts to "promoting pollination and increasing fruit set." It again calls upon the crop growth mechanism model to query the optimal nutrient solution NPK ratio for this phase and the optimal day-night temperature difference for fruit set. The crop growth mechanism model returns a precise formula (such as increasing the P:K ratio) and a temperature control curve (such as appropriately increasing the day-night temperature difference). Action: The action module adjusts the integrated water and fertilizer system, injecting a new nutrient solution formula. Simultaneously, it coordinates the ventilation, heating, and cooling systems to create an ideal day-night temperature difference. Learning: In this phase, the weight of $R_{quality}$ is increased in the reward function. Its calculation is directly related to the fruit set rate and young fruit expansion rate detected by the vision system. A reinforcement learning loop based on environmental feedback continuously optimizes the agricultural model's planning strategy, making it more adept at creating optimal flowering and fruit set conditions for tomatoes in this specific environment.
[0184] Step 4: Fruit maturity management (week 9 and beyond)
[0185] Perception: The camera determines the maturity by analyzing the color and size of the fruit and outputs the proportion of fruit at each maturity level. Planning: The planning goal of the large agricultural model has shifted to "maximizing the accumulation of sugar and flavor substances in the fruit while ensuring the first-grade fruit rate." It consults the crop growth mechanism model for agronomic technical parameters for concentrating the flavor of the fruit through moderate water stress. The crop growth mechanism model will return a safe water stress range that can improve quality without causing permanent damage to the plant. Action: Based on the detailed plan of the large agricultural model, the action module slightly reduces the amount of irrigation at specific times of the day to achieve precise water stress. Learning: The system continues to optimize until the final harvest. Throughout the entire process, the agricultural management intelligent agent autonomously learned and executed a set of highly customized and dynamically optimized management plans for this batch of tomatoes in this specific environment.
[0186] In summary, the present invention provides a system and method that can realize fully autonomous, adaptive and efficient management of agricultural production by constructing an agricultural management intelligent body that integrates advanced artificial intelligence technology. It has important theoretical value and broad application prospects for promoting the development of smart agriculture.
[0187] The order in which the embodiments of the invention are presented is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0188] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above 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 invention, and should all be included in the scope of protection of the present invention.
Claims
1. An agent-driven adaptive agricultural management system, characterized in that: It includes an agricultural management system, which constructs an agricultural management intelligent body with high autonomy, adaptive learning ability and scientific decision-making basis. The agricultural management intelligent body includes a perception module, a planning and reasoning module, an action module and an incremental learning module; the perception module is used to construct a high-fidelity world state model; the planning and reasoning module adopts a hybrid artificial intelligence architecture, and deeply couples the large agricultural model as a high-order planner with the crop growth mechanism model as a scientific knowledge tool through a function call mechanism; the action module is a bridge connecting the intelligent body's decision-making and the changes in the physical world, and is responsible for converting abstract plans into precise interventions in the physical world for precise and reliable environmental regulation; the incremental learning module achieves adaptive evolution through reinforcement learning based on environmental feedback, implements a novel reinforcement learning framework based on environmental feedback, and continuously fine-tunes the planning strategy of the large agricultural model through internally generated multi-objective reward signals and proximal strategy optimization algorithms to achieve autonomous adaptation to the dynamic environment of a specific farm.
2. The agent-driven adaptive agricultural management system according to claim 1, characterized in that: The physical world includes a farm or greenhouse environment, and sensors transmit raw multimodal data of environmental changes to an agricultural management system, which regulates the physical environment through actuators.
3. The agent-driven adaptive agricultural management system according to claim 2, characterized in that: The agricultural management system consists of an agricultural management intelligent agent framework and a hybrid model-driven paradigm-based intelligent agent architecture. The agricultural management intelligent agent framework includes a communication protocol and orchestration model between modules. The hybrid model-driven control paradigm includes model-free components, model-driven components and paradigm collaboration. Paradigm collaboration is a hybrid paradigm that combines model-driven components for crop growth mechanism models with reinforcement learning of model-free components based on environmental feedback.
4. The agent-driven adaptive agricultural management system according to claim 3, characterized in that: The perception module includes a multimodal sensor and actuator suite, a data preprocessing and fusion pipeline, and a computer vision submodule. The multimodal sensor comprehensively monitors and precisely regulates the agricultural environment based on adapted sensors and actuators. The data preprocessing and fusion pipeline is a multi-stage data processing pipeline used to convert raw noisy sensor signals into a unified and clean world state. The computer vision submodule is used for phenotype analysis and health assessment.
5. The intelligent agent-driven adaptive agricultural management system according to claim 4, characterized in that: The data preprocessing and fusion pipeline includes: In the first stage, time series data denoising based on the Kalman filter optimized by genetic algorithm is performed. Each time series sensor data stream is processed by an independent Kalman filter. A standard one-dimensional Kalman filter model is defined as follows: A1. State prediction, ; A2, Error covariance prediction, ; A3, Kalman gain calculation, ; A4. Status update, ; A5. Error covariance update, ; in, is the current time step index, is the previous time step index, For the known Under the conditions of the moment state The predicted value of the state at the moment; For integration The updated state estimate after the moment measurement; For The forecast error covariance matrix at time t; After fusion measurement value Update error covariance matrix at time t; : state transfer matrix, usually the unit matrix for simple sensor scenarios; is the transposed matrix of the state transfer matrix F; is the measurement matrix, and for sensors that directly measure state variables, the unit matrix is usually used; is the process noise covariance matrix, reflecting the uncertainty of the model prediction process; is the measurement noise covariance matrix, which reflects the uncertainty of the sensor measurement process; is the Kalman gain, which represents the weight distribution between the predicted value and the measured value during fusion; is the transpose of the observation matrix; is the projection of the prediction error covariance in the observation space; is the prediction of the measured value in the observation space; For The measurement values obtained by the sensor at any moment; is the identity matrix; In applications, the key to filtering effect lies in the process noise covariance Covariance with measurement noise To achieve the optimal parameters, a genetic algorithm is used to automatically search and determine the optimal and value, thus transforming the traditional experience-based parameter adjustment process into a reproducible and quantifiable technical step, ensuring the optimal performance of the Kalman filter in multi-sensor time series signal denoising; Phase 2: Visual data feature extraction: The visual data is processed by the computer vision submodule to extract high-level semantic information; In the third stage, multimodal data fusion and world state vector construction are carried out. The processed modal data are aligned by timestamps and integrated using an early fusion strategy. The modal data include denoised environmental data, actuator state feedback, and semantic features extracted by the visual submodule. All data are spliced into a single high-dimensional world state vector St. This vector is the only comprehensive digital representation of the environment managed by the agricultural management agent at time t and is the basis for all subsequent planning and reasoning.
6. The agent-driven adaptive agricultural management system according to claim 5, characterized in that: The computer vision submodule is responsible for extracting biological information from images that is crucial for agricultural decision-making. The extraction steps include: B1. Object detection for fruit counting and maturity grading uses a YOLOv8-based deep learning model trained to identify and locate fruit in images and classify them into multiple maturity levels, including green, veraison, ripe, and fully ripe, based on the fruit's color, size, and shape. The model's network architecture includes the C2f module in its backbone network and a decoupled detection head. B2. Semantic segmentation for quantitative disease assessment accurately quantifies the severity of leaf diseases, including early blight and late blight. A semantic segmentation model with a U-Net architecture is used. Its symmetric encoder-decoder structure and signature skip connections enable it to accurately segment irregular diseased areas in an image, maintaining high accuracy even against complex backgrounds. The model output is a mask of the same size as the original image, in which the diseased areas are clearly identified. By calculating the ratio of diseased pixels to total leaf pixels in the mask, a quantitative disease severity index is derived as part of the world state vector. B3. A robust training dataset is constructed through advanced data augmentation technology. A two-layer data augmentation strategy of basic geometric and optical enhancement and generative adversarial network enhancement is adopted. The basic geometric and optical enhancement applies a series of traditional enhancement methods to existing images, including random rotation, scaling, cropping, flipping, and adjustment of brightness, contrast and saturation. The generative adversarial network enhancement adopts an advanced cycle-consistent generative adversarial network to solve the problem of insufficient rare disease samples. The cycle-consistent generative adversarial network can perform style transfer between unpaired image sets. A larger set of healthy leaf images and a smaller set of specific diseased leaf images are used to train the cycle-consistent generative adversarial network. After training, the network can translate images of healthy leaves into images with realistic disease textures, generating high-quality and diverse disease samples.
7. The agent-driven adaptive agricultural management system according to claim 6, characterized in that: The agricultural model uses low-rank adaptive technology, namely Low-Rank Adaptation (LoRA), to perform efficient parameter fine-tuning to balance the model's adaptability and training efficiency. The LoRA fine-tuning hyperparameter configuration example includes fine-tuning the corpus and system prompt words; The crop growth mechanism model simulates the growth and development of crops under given environmental conditions and contains a series of mathematical equations describing key physiological processes: C1. Photosynthesis and biomass accumulation. The model first calculates the photosynthetic radiation intercepted by the crop canopy, hereinafter referred to as PAR, and calculates the potential daily dry matter increment based on the crop's light energy utilization efficiency, hereinafter referred to as BE, and a genetic parameter. , and its calculation formula is, ; The intercepted PAR is calculated according to the Beer-Lambert law as follows: ; in, is the canopy extinction coefficient, is the leaf area index, is the total daily solar radiation; C2. Dry matter distribution. The daily accumulated dry matter, i.e., biomass, needs to be distributed to different organs of the crop, i.e., roots, stems, leaves, or fruits. The distribution ratio is not fixed, but a dynamic function determined by the current developmental stage of the crop, i.e., the vegetative growth period and the reproductive growth period. The distribution coefficient is a genetic characteristic of the crop variety and is encoded as a genetic parameter of the model.
8. The agent-driven adaptive agricultural management system according to claim 7, characterized in that: The action module includes IoT actuator control logic, secure communication infrastructure based on MQTT, and a command queue pattern for asynchronous and reliable operations.
9. The agent-driven adaptive farming management system according to claim 8, characterized in that: The incremental learning module includes a formal definition of the reinforcement learning problem, a multi-objective reward function, and a proximal policy optimization update mechanism. The multi-objective reward function calculates a comprehensive reward value after executing the action at each time step t+1. , which is the weighted formula of multiple sub-goals: ; in, Yield maximization reward is the core intrinsic reward of the reinforcement learning framework based on environmental feedback. It measures the degree to which the actual growth of crops matches the ideal situation predicted by the scientific model. is a quality improvement reward, which comes directly from the output of the computer vision submodule; is the resource cost penalty, which is proportional to the normalized total amount of resources consumed in the previous time step; 、 and All of them are hyperparameters, and the sum of the three is 1. By adjusting these weights, the learning direction of the agent can be guided to adapt to different production goals; ; in, is the actual biomass, i.e., dry matter increment, measured by the perception module between time steps t and t+1; It is the biomass increment that should be expected under ideal conditions, predicted by the crop growth mechanism model at time step t based on the current state St. When the actual growth approaches or exceeds the ideal growth, the reward value approaches 1; The proximal policy optimization update mechanism includes a proximal policy optimization composite loss function, a proximal policy optimization hyperparameter configuration, and a reinforcement learning training loop pseudocode based on environment feedback.
10. The agent-driven adaptive farming management system according to claim 9, characterized in that: The proximal strategy optimizes the composite loss function in each learning iteration by minimizing a composite loss function. To update the model parameters , the loss function consists of three parts: strategy loss, value function loss and entropy reward. The loss function formula is, ; in, It is the strategy loss, which is the core of proximal strategy optimization; is the loss function, is the value function loss, is the loss weight coefficient of the value loss function, is the entropy reward weight coefficient, which is used to control the degree of exploration, It's a strategy Output the entropy of the action probability distribution to encourage exploration, the policy loss The formula is, ; in, is the empirical expectation at time step t, is the estimated value of the advantage function, which measures the Take action Compared with the evaluation level, in, is the probability ratio of the new and old policies. The clip function limits the probability ratio to a small interval [1−ϵ, 1+ϵ]. ϵ is a hyperparameter, ϵ = 0.
2. This clipping operation is key to the stability of proximal policy optimization, preventing a single update from overly changing the policy and thus avoiding training crashes. The value function loss The formula is, ; in, It is the state value predicted by the value network, namely the Critic; is the target value, the discounted sum of future returns calculated from the collected trajectories, i.e., Return; this item is the mean squared error, i.e., MSE loss, which is used to train the Critic to estimate a more accurate state value; The entropy reward It's a strategy The entropy of the output action probability distribution is added as a reward term to the loss function to encourage the strategy to maintain a certain degree of randomness, promote more thorough exploration of the agent in the early stages of training, and prevent it from converging to a suboptimal deterministic strategy too early.
Citation Information
Patent Citations
Farm hosting system based on Internet big data
CN215219747U
Crop planting management system and method based on cloud services
CN110347127A
Litchi fruit identification method based on deep learning
CN117058669A
Intelligent agent control method and device, equipment and storage medium
CN117518907A
Agricultural machinery scheduling method and system based on deep learning
CN119067404A
Cited By
Production control method and system based on industrial field multi-role physical agent
CN121050398A
Agricultural environment intelligent control system based on artificial intelligence and control method thereof
CN121300097A
Aerospace equipment-oriented digital-analog fusion dual-drive digital-real fusion evaluation method
CN121637435A
Foot type robot control method and system based on event triggering and world model
CN121798647A
Event-triggered and world model-based control method and system for legged robots
CN121798647B