A crop water and fertilizer decision-making and growth potential prediction method based on a large language model and an LSTM
Patent Information
- Application Number
- CN202611039708.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-18
AI Technical Summary
但通用大语言模型直接用于水肥管理时,仍存在农业专业知识适配不足、输出结果缺乏结构化约束、难以直接形成可执行控制参数等问题
[0028] This invention collaboratively designs crop growth prediction and water and fertilizer decision-making processes. It extracts temporal features from the Normalized Difference Vegetation Index (NDVI) and Leaf Area Index (LAI) sequences using a dual-channel LSTM time-series prediction model, and then fuses these two types of growth indicators to improve the ability to depict future crop growth trends. Furthermore, this invention converts the future growth prediction sequence into a natural language description and integrates it with current field status information to form a fusion prompt. This allows the large language model to generate water and fertilizer decisions not only based on current soil moisture, weather conditions, and growth stage, but also on future crop growth needs, improving the match between water and fertilizer decisions and the actual crop growth process. Simultaneously, this invention uses trainable fusion weights to fuse water and fertilizer decision parameters obtained under different prompt conditions, enhancing the dynamic adaptability of the decision results. After execution, the system updates the model based on the deviation between subsequent observed growth data and the prediction results, and adjusts subsequent water and fertilizer decisions, forming a closed-loop optimization process of prediction, decision-making, execution, and feedback. This helps improve the intelligence, continuity, and executability of crop water and fertilizer management.
Smart Images

Figure CN122779367A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart agriculture technology, and in particular to a method for crop water and fertilizer decision-making and growth prediction based on large language models and LSTM. Background Technology
[0002] Crop water and fertilizer management is a crucial aspect of agricultural production. The appropriateness of irrigation and fertilization amounts directly impacts crop growth, yield, and water and fertilizer resource utilization efficiency. With the development of remote sensing, IoT-based monitoring, meteorological data acquisition, and intelligent control equipment, data-driven crop growth monitoring and water and fertilizer decision-making methods are increasingly being applied to agricultural production management. Existing methods typically utilize data such as soil moisture, meteorological conditions, crop growth stage, and vegetation indices to analyze crop growth status and generate irrigation or fertilization recommendations accordingly.
[0003] Existing crop water and fertilizer decision-making methods mainly include those based on human experience or expert rules, those based on crop growth models, and data-driven methods based on machine learning. Methods based on human experience or expert rules typically rely on preset thresholds, rule bases, or expert knowledge for judgment, such as determining irrigation or fertilization amounts based on soil moisture content, growth stage, and weather conditions. While these methods are simple to implement, the rules are usually relatively fixed and difficult to adapt to dynamic changes in different fields, crop growth stages, and complex weather conditions. When the external environment or crop growth changes, the system requires manual adjustment of the rules, resulting in low knowledge update efficiency.
[0004] Crop growth model-based methods can simulate crop growth processes and their responses to water, nutrients, and meteorological conditions. However, these methods typically require numerous crop, soil, and management parameters as input, and the model parameter calibration process is complex. In practical applications, parameters vary significantly across different regions, varieties, and management practices. Inaccurate parameter settings can easily affect the reliability of growth predictions and water and fertilizer recommendations.
[0005] In recent years, machine learning and deep learning methods have been used for crop growth forecasting and agricultural decision-making. For example, recurrent neural networks, long short-term memory networks, or other time-series models are used to model time series data such as normalized vegetation index (NVI), leaf area index (LAI), and meteorological data to predict future crop growth changes. However, existing time-series forecasting methods often focus on modeling single indicators or single-channel data, failing to adequately utilize the synergistic relationships between multiple growth indicators such as NVI and LAI. Furthermore, in long-term agricultural time-series data, local fluctuation characteristics, long-term dependence characteristics, and correlations between different growth indicators are difficult to fully extract, resulting in limited support for subsequent management decisions from the forecast results.
[0006] Furthermore, in existing intelligent water and fertilizer management systems, the crop growth prediction module and the water and fertilizer decision-making module are often relatively independent. Growth prediction results are typically output in numerical form, while water and fertilizer decisions are mostly generated directly based on current soil moisture, weather conditions, or preset rules. There is a lack of effective information conversion and feedback mechanisms between the two. Because future crop growth changes are not fully involved in current water and fertilizer decisions, a mismatch between the decision results and the crop's subsequent growth needs can easily occur.
[0007] With the development of large language models, they have demonstrated strong capabilities in knowledge understanding, natural language generation, and complex information integration, and have been gradually applied to scenarios such as agricultural question answering and agricultural suggestion generation. However, when general-purpose large language models are directly used for water and fertilizer management, there are still problems such as insufficient adaptation to agricultural professional knowledge, lack of structured constraints in output results, and difficulty in directly generating executable control parameters. At the same time, if large language models only generate suggestions based on current state information and cannot effectively combine future growth prediction information, it is still difficult to achieve dynamic water and fertilizer decisions for crop growth processes.
[0008] Therefore, existing technologies still need a method that can comprehensively utilize historical crop growth sequences, current field status information, and agricultural knowledge information, so that crop growth prediction results can effectively participate in the water and fertilizer decision-making process, and continuously adjust the model and decision results based on feedback from subsequent observation data, in order to improve the dynamic adaptability and execution availability of crop water and fertilizer decisions. Summary of the Invention
[0009] This invention addresses the technical problems existing in the background art by proposing a crop water and fertilizer decision-making and growth prediction method based on a large language model and LSTM.
[0010] To solve the technical problem, the technical solution of the present invention is as follows:
[0011] A method for crop water and fertilizer decision-making and growth prediction based on large language models and LSTM, the method comprising:
[0012] S1. Input the normalized vegetation index (NVI) and leaf area index (LAI) sequences from multiple historical moments of the target field into a dual-channel LSTM time-series prediction model, and output the predicted NVI and LAI sequences for multiple future moments; the dual-channel LSTM time-series prediction model extracts the time-series features of the NVI and LAI sequences respectively and fuses them.
[0013] S2. The normalized vegetation index and leaf area index prediction sequences are converted into natural language descriptions that characterize crop growth changes, and the natural language descriptions are spliced together with status information prompts that include the current crop type, growth stage, soil moisture and meteorological conditions of the field to form a fused prompt.
[0014] S3. Input the status information prompt and the fusion prompt into the large language model after fine-tuning the agricultural water and fertilizer instruction data to obtain the first water and fertilizer decision parameters and the second water and fertilizer decision parameters; use trainable fusion weights to perform weighted fusion of the first water and fertilizer decision parameters and the second water and fertilizer decision parameters to obtain the final water and fertilizer decision parameters including irrigation amount and fertilizer amount, and generate water and fertilizer decision text based on the final water and fertilizer decision parameters.
[0015] S4. Parse the irrigation amount and fertilizer amount from the water and fertilizer decision text and send them to the field irrigation and fertilization control system for execution;
[0016] S5. Collect the observed normalized vegetation index and leaf area index sequences during the subsequent growth cycle, and compare them with the predicted sequences of normalized vegetation index and leaf area index to obtain the prediction deviation. When the prediction deviation meets the preset update conditions, update the dual-channel LSTM time series prediction model using the newly collected data, and adjust the subsequent water and fertilizer decisions according to the updated growth prediction results, thereby forming a closed-loop optimization.
[0017] Furthermore, the status information prompts include at least one of the following: crop type, growth stage, soil moisture, soil nutrient content, and recent weather conditions.
[0018] Furthermore, the dual-channel LSTM time-series prediction model in step S1 includes a normalized vegetation index (NVI) processing channel, a leaf area index (LAI) processing channel, an attention fusion layer, and an output layer. The NVI processing channel and the LAI processing channel respectively include a feature extraction network for extracting local change features and a long short-term memory network for extracting long-term temporal dependence features. The attention fusion layer is used to assign weights to the temporal features output by the two channels to obtain fused crop growth context features. The output layer is used to map the crop growth context features into a prediction sequence for multiple future time periods.
[0019] Furthermore, the feature extraction network is a residual convolutional network, and the attention fusion layer is a multi-head self-attention layer.
[0020] Furthermore, the natural language description in step S2 includes at least one of the following: future crop growth level, growth trend, vigorous growth period assessment, water requirement trend, and fertilizer requirement trend.
[0021] Furthermore, the large language model fine-tuned by agricultural water and fertilizer instruction data in step S3 is obtained by introducing trainable parameters into the pre-trained large language model through an efficient parameter fine-tuning method, and by training it using a dataset containing status information prompts and water and fertilizer decision instruction text.
[0022] Furthermore, before inputting the status information prompt or the fusion prompt into the large language model, relevant agronomic knowledge text is automatically retrieved based on the status information prompt or the fusion prompt, and the retrieved relevant agronomic knowledge text and the corresponding prompt are input into the large language model together.
[0023] Furthermore, the trainable fusion weights mentioned in step S3 are used to determine the contribution ratio of the first water and fertilizer decision parameters and the second water and fertilizer decision parameters to the final water and fertilizer decision parameters, and are updated according to the difference between the water and fertilizer decision parameters and the expert-annotated water and fertilizer decision parameters, the growth prediction error, or a combination of the two.
[0024] Furthermore, the information parsed in step S4 also includes the application time, and the parsing results are converted into control commands that can be recognized by the field irrigation and fertilization control system.
[0025] Furthermore, the preset update condition in step S5 is that the prediction deviation exceeds a preset threshold; when the prediction deviation exceeds the preset threshold, the dual-channel time-series prediction model is updated using the newly collected normalized vegetation index and leaf area index sequences, and a fusion prompt is regenerated based on the updated growth prediction results to adjust subsequent water and fertilizer decisions.
[0026] Furthermore, when water and fertilizer decision labeling data or decision feedback data corresponding to the newly collected data are obtained, the trainable parameters of the large language model are updated.
[0027] The present invention has the following advantages:
[0028] This invention collaboratively designs crop growth prediction and water and fertilizer decision-making processes. It extracts temporal features from the Normalized Difference Vegetation Index (NDVI) and Leaf Area Index (LAI) sequences using a dual-channel LSTM time-series prediction model, and then fuses these two types of growth indicators to improve the ability to depict future crop growth trends. Furthermore, this invention converts the future growth prediction sequence into a natural language description and integrates it with current field status information to form a fusion prompt. This allows the large language model to generate water and fertilizer decisions not only based on current soil moisture, weather conditions, and growth stage, but also on future crop growth needs, improving the match between water and fertilizer decisions and the actual crop growth process. Simultaneously, this invention uses trainable fusion weights to fuse water and fertilizer decision parameters obtained under different prompt conditions, enhancing the dynamic adaptability of the decision results. After execution, the system updates the model based on the deviation between subsequent observed growth data and the prediction results, and adjusts subsequent water and fertilizer decisions, forming a closed-loop optimization process of prediction, decision-making, execution, and feedback. This helps improve the intelligence, continuity, and executability of crop water and fertilizer management. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0030] Figure 1 This is the overall architecture diagram of the system of the present invention, showing the data flow of the data perception layer, time series prediction layer, knowledge decision layer and application execution layer;
[0031] Figure 2 The diagram shows the structure of the dual-channel LSTM prediction module, illustrating the processing path of the dual-stream inputs from NDVI and LAI through ResNet, LSTM, and Self-Attention.
[0032] Figure 3 This is a flowchart of the dynamic feedback fusion mechanism, showing how the prediction results are transformed into natural language and embedded with LLM prompts. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] Example 1:
[0035] This embodiment provides a crop water and fertilizer decision-making and growth prediction method based on a large language model and LSTM. It constructs a knowledge-data dual-driven collaborative architecture, using structured agronomic knowledge to guide the large language model in generating interpretable water and fertilizer instructions; it jointly predicts NDVI and LAI using a dual-channel time-series model; and it establishes a dynamic feedback path from the prediction results to the decision-making module, forming a closed-loop optimization. This embodiment specifically includes the following steps:
[0036] Step 1: Construct a decision-making module for an agricultural water and fertilizer knowledge-enhanced large language model;
[0037] Step 2: Design a dual-channel LSTM timing prediction module;
[0038] Step 3: Establish a dynamic feedback and fusion mechanism;
[0039] Step 4: Implement the water and fertilizer strategy and update it online.
[0040] For example, step one: Construct an agricultural water and fertilizer knowledge-enhanced large language model decision module to generate structured, executable water and fertilizer management instructions. This module is based on a general-domain pre-trained large language model, with its original parameters... The introduction of a low-rank adaptation (LoRA) structure adds incremental trainable parameters. This allows for efficient fine-tuning without modifying the backbone network. The fine-tuning process utilizes a manually constructed agricultural instruction dataset for supervised training, which contains… 100 samples, each sample consisting of a prompt word With the corresponding target decision instructions Composition, in which Describe the current crop type, growth stage, soil moisture, and recent weather conditions. Provide standardized water and fertilizer recommendations (e.g., "Irrigation rate: 25 mm; Nitrogen fertilizer: 30 kg / ha"). The model updates the LoRA parameters by minimizing the following cross-entropy loss function:
[0041]
[0042] in: The total number of training samples; The input prompts for the i-th sample include information such as crop type, growth stage, soil moisture, and weather conditions. This represents the expert-annotated water and fertilizer decision answer corresponding to the i-th sample; Indicates the parameters of the original model Superimposed LoRA incremental parameters Then, input The generated output; The target loss function for the entire fine-tuning process is used to measure the difference between the model output and the true answer. This represents the cross-entropy loss function, used to measure the difference between the probability distribution of the model's output and the true answer. The smaller the value, the more accurate the prediction.
[0043] After fine-tuning, the model possesses basic agronomic reasoning capabilities. To further enhance its adaptability to specific field scenarios, the system further integrates a retrieval-enhanced generation (RAG) mechanism: pre-encoding water and fertilizer recommendations from publicly available agronomic guidelines into vectors to construct a knowledge base. When a new input prompt is received At that time, the system calculates its embedding representation. and from Search for the top 3 knowledge items with the most similar semantics. This is combined with the original prompt to create an enhanced prompt. Then, the finely tuned model is input to generate preliminary water and fertilizer decisions. It is worth noting that the knowledge base used here is only for contextual supplementation and does not constitute a limitation of the method itself, and all retrieval and generation operations are automatically completed by the process described in this invention without manual intervention. Indicates the first in the knowledge base The last knowledge item; among which It represents the total number of knowledge items in the knowledge base. This represents the third relevant knowledge item retrieved from the knowledge base; where... It is the index number of the knowledge item in the knowledge base.
[0044] Example, Step 2: Design a dual-channel LSTM timing prediction module:
[0045] This invention constructs a dual-channel LSTM growth prediction module, firstly by preparing input data: obtaining past data of the target field. Normalized Difference Vegetation Index (NDVI) series for 1 month and concurrent leaf area index series Next is dual-channel feature extraction. Take the stage, respectively and Convert to time series feature matrix and and will Input a residual convolutional network ResNet-18, output a feature map ;in, Indicates the target field is in the 1st month. Normalized vegetation index values obtained from historical moments or calculations; Indicates the target field is in the 1st month. Leaf area index values obtained from historical moments or calculated. Indicates the length of the input historical time series, such as past. Months Zhou or One monitoring cycle.
[0046] Similarly, Feature maps are also generated using the same ResNet-18 structure. ,here This represents the feature dimension. In the process of temporal modeling and attention fusion, The hidden state is fed into the first LSTM layer with a hidden state dimension of 128, resulting in the output sequence. ;
[0047] Similarly, Entering the second LSTM layer, output is generated. Then concatenate these two sequences into And input into a multi-head self-attention layer to obtain a context-aware representation. Finally, take the last time step. After passing through a fully connected layer, it is mapped to a 12-dimensional vector. This represents the predicted value for the next 6 months. During model training, the mean squared error loss function is used. To optimize this, This represents the future growth forecast sequence output by the dual-channel LSTM time series forecasting model; This indicates that the model predicts the future... Normalized Difference Vegetation Index (NDVI) value at a given time. This indicates that the model predicts the future... Leaf area index value at each time point. Among them, the future... The specific time can be set as the future [number] time according to the actual application scenario. Month, First Zhou or the One monitoring cycle. In this embodiment, It includes 12 predicted outputs, including Normalized Difference Vegetation Index (NDVI) and Leaf Area Index (LAI) values for the next six time points, used to characterize the crop growth trend of the target field over a future period. This represents the growth prediction loss function of the dual-channel LSTM time-series prediction model, used to measure the difference between the model's predicted normalized vegetation index and leaf area index and the actual observed values. Indicates the sequence number of the predicted future time. ; This indicates that the model predicts the future... The normalized vegetation index value at each moment; Indicates the future number The normalized vegetation index value actually observed at each moment; This indicates that the model predicts the future... Leaf area index value at each moment; Indicates the future number The leaf area index value observed at each time point. The loss function calculates the squared error between the predicted and actual values of the normalized vegetation index and leaf area index over the next 6 time points, and averages the 12 prediction error terms to train and optimize the dual-channel LSTM time series prediction model.
[0048] For example, step three: establish a dynamic feedback fusion mechanism:
[0049] After completing the growth forecast, the system enters a dynamic feedback fusion mechanism: first, the forecast output is... Converted into natural language description using a preset template. For example: "NDVI is projected to reach 0.72 and LAI to reach 4.1 in the next three months, indicating the start of a vigorous growth period." This description is then appended as new context to the original agricultural tip. Next, construct fusion hints Based on this, the system introduces a learnable fusion weight. (Indicating the proportion of knowledge-driven components), and let (Indicating the proportion of data-driven components), the final water and fertilizer decision is generated by a weighted combination:
[0050]
[0051] in, This represents the LoRA-tuned agricultural large language model (as described in step one). The weights... Instead of using preset constants, it achieves joint optimization through end-to-end training: the system defines a comprehensive loss function. ,in The cross-entropy loss used in step S1 for fine-tuning the large language model, The mean squared error loss for growth prediction defined in step S2, and These are non-negative balance coefficients. During backpropagation, the gradient updates not only the LoRA parameters. And LSTM network weights, while also updating the fused weights. Its update rules are as follows:
[0052]
[0053] in, Let be the learning rate. Therefore, and A unified optimization goal is formed to ensure that knowledge reasoning and data prediction evolve in a closed loop, thereby achieving dynamic and adaptive water and fertilizer decision generation.
[0054] For example, step four: Implement the water and fertilizer strategy and update it online:
[0055] After completing the dynamic feedback fusion, the system enters the execution and online update phase: First, the executable irrigation amount is parsed from the decision text output in step S3. (Unit: mm) and fertilizer application rate (Unit: kg / ha), where , , The recommended application rates for nitrogen, phosphorus, and potassium are specified; the instructions are then transmitted via a pre-defined API. The data is sent to the field's automatic irrigation and fertilization control system for precise operation; during the next crop growth cycle, the system collects the observed normalized vegetation index and leaf area index sequences. and the prediction in step S2 Compare and calculate the prediction bias. If the deviation exceeds the preset threshold This triggers the model fine-tuning mechanism: using the newly collected data as training samples, the loss function is recalculated. Simultaneously update the parameters of the dual-channel LSTM network and the LoRA parameters in the large language model. Meanwhile, the comprehensive loss function The optimization goal remains the same, ensuring that knowledge reasoning and data prediction continue to evolve collaboratively in a closed loop. As a result, the entire system achieves a complete closed loop of "prediction-execution-feedback-relearning", improving the intelligence level and adaptability of agricultural water and fertilizer management.
[0056] Example 2:
[0057] This embodiment provides an application scenario for a crop water and fertilizer decision-making and growth prediction method based on a large language model and LSTM. Compared with existing water and fertilizer decision-making technologies (such as rule-based expert systems, traditional single-channel LSTM models, and general time series forecasting tools), it has significant advantages in crop growth prediction accuracy, water and fertilizer decision rationality, and environmental adaptability. The following results are all verified based on publicly available and reproducible data sources and a standardized evaluation system.
[0058] 1. The growth prediction accuracy is better than that of the traditional LSTM model;
[0059] Experimental Methods: Vegetation index data were obtained from the monthly composite MODIS NDVI and LAI products (2020–2024) downloaded from the Google Earth Engine platform, spatially covering multiple farms in Heilongjiang Province; soil basic properties (pH, bulk density, available nitrogen, total nitrogen, total phosphorus, total potassium, available phosphorus, available potassium) data were obtained from the 15–30 cm layer raster dataset (1 km resolution) released by the National Tibetan Plateau Scientific Data Center, and were matched to the target field coordinates using inverse distance weighted interpolation to construct the initial state features of the fields; under the same training / testing partition, a traditional single-channel LSTM model and the proposed dual-channel LRSA model (integrating ResNet feature extraction, LSTM temporal modeling, and Self-Attention mechanism) were trained respectively; the model inputs were the NDVI, LAI, and soil properties of the past 12 months, and the outputs were the predicted values of NDVI and LAI for the next 6 months.
[0060] Evaluation criteria: Four indicators were used for quantitative evaluation: mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²); results (see Table 1):
[0061] Table 1 Model Evaluation Indicators
[0062] LSTM(NDVI) 0.00356 0.05966 0.03653 0.95584 LSTM(LAI) 9.29086 3.04809 1.55319 0.94497 LRSA((NDVI)) 0.00336 0.05803 0.03562 0.95821 LRSA(LAI) 8.10108 2.84624 1.46185 0.95201
[0063] Analysis shows that:
[0064] In NDVI prediction, the LRSA model showed a 5.6% decrease in MSE (0.00356 → 0.00336), a decrease in RMSE to 0.05803 (approximately 12.9% of the NDVI sample mean of 0.45), and an increase in R² to 0.95821, demonstrating stronger fitting ability and stability.
[0065] In LAI prediction, despite the large range of LAI values (0–8, with a sample mean of approximately 4.2), LRSA still achieved an RMSE of 2.846 (approximately 67.8% of the mean), a 12.8% reduction in MSE, and an R² increase to 0.95201, outperforming traditional LSTM.
[0066] All four indicators consistently demonstrate that the dual-channel structure and attention enhancement mechanism designed in this invention effectively improve the long-term time-series modeling capability of vegetation dynamics, especially in capturing the co-evolutionary patterns of NDVI and LAI.
[0067] 2. More precise water and fertilizer decisions lead to improved resource utilization efficiency;
[0068] Test method:
[0069] Based on the above high-precision growth prediction results, water and fertilizer recommendations are generated by combining the knowledge-enhanced LLM module.
[0070] The comparison objects include: (a) the Ministry of Agriculture and Rural Affairs' recommended scheme; (b) the default strategies of mainstream smart irrigation systems (such as NetafimFieldNET); and (c) local farmers' routine management.
[0071] All schemes were run in the same set of backtracking scenarios (with the same Google Earth vegetation sequence and Tibetan Plateau soil data as input).
[0072] Evaluation criteria: simulated nitrogen fertilizer application (kg / ha) and total irrigation volume (mm / season).
[0073] Results: While maintaining a yield simulation error of <3%, the average nitrogen fertilizer application rate was 185 kg / ha, a reduction of 18.9% compared to farmers (228 kg / ha); the total irrigation volume was 308 mm / season, saving 22.1% of water. This is attributed to the ability of LLM to dynamically match measured soil nutrients (such as automatically adjusting the potassium fertilizer ratio when available potassium is <120 mg / kg) with future growth requirements predicted by LRSA.
[0074] In summary, this invention, relying on real remote sensing vegetation indices (Google Earth Engine) and authoritative soil physicochemical data (National Tibetan Plateau Scientific Data Center), and through a collaborative architecture of the LRSA time-series prediction module and knowledge-enhanced LLM, comprehensively outperforms existing technologies in terms of prediction accuracy (R² > 0.95), decision rationality, and environmental adaptability (low "inapplicability" rate). All experiments are based on publicly available data and standardized indicators, and the results are objective, reproducible, and possess outstanding technological advancement and practical value.
[0075] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0076] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for crop water and fertilizer decision-making and growth prediction based on large language model and LSTM, characterized in that, The method includes: S1. Input the normalized vegetation index (NVI) and leaf area index (LAI) sequences from multiple historical moments of the target field into a dual-channel LSTM time-series prediction model, and output the predicted NVI and LAI sequences for multiple future moments; the dual-channel LSTM time-series prediction model extracts the time-series features of the NVI and LAI sequences respectively and fuses them. S2. The normalized vegetation index and leaf area index prediction sequences are converted into natural language descriptions that characterize crop growth changes, and the natural language descriptions are spliced together with status information prompts that include the current crop type, growth stage, soil moisture and meteorological conditions of the field to form a fused prompt. S3. Input the status information prompt and the fusion prompt into the large language model after fine-tuning the agricultural water and fertilizer instruction data to obtain the first water and fertilizer decision parameters and the second water and fertilizer decision parameters; use trainable fusion weights to perform weighted fusion of the first water and fertilizer decision parameters and the second water and fertilizer decision parameters to obtain the final water and fertilizer decision parameters including irrigation amount and fertilizer amount, and generate water and fertilizer decision text based on the final water and fertilizer decision parameters. S4. Parse the irrigation amount and fertilizer amount from the water and fertilizer decision text and send them to the field irrigation and fertilization control system for execution; S5. Collect the observed normalized vegetation index and leaf area index sequences during the subsequent growth cycle, and compare them with the predicted sequences of normalized vegetation index and leaf area index to obtain the prediction deviation. When the prediction deviation meets the preset update conditions, update the dual-channel LSTM time series prediction model using the newly collected data, and adjust the subsequent water and fertilizer decisions according to the updated growth prediction results, thereby forming a closed-loop optimization.
2. The method according to claim 1, characterized in that, The status information prompts include at least one of the following: crop type, growth stage, soil moisture, soil nutrient content, and recent weather conditions.
3. The method according to claim 1, characterized in that, The dual-channel LSTM time-series prediction model in step S1 includes a normalized vegetation index (NVI) processing channel, a leaf area index (LAI) processing channel, an attention fusion layer, and an output layer. The NVI and LAI processing channels respectively contain a feature extraction network for extracting local change features and a long short-term memory network for extracting long-term temporal dependence features. The attention fusion layer is used to assign weights to the temporal features output by the two channels to obtain fused crop growth context features. The output layer is used to map the crop growth context features into a predicted sequence for multiple future time points.
4. The method according to claim 3, characterized in that, The feature extraction network is a residual convolutional network, and the attention fusion layer is a multi-head self-attention layer.
5. The method according to claim 1, characterized in that, The natural language description in step S2 includes at least one of the following: future crop growth level, growth trend, judgment of vigorous growth period, water requirement trend, and fertilizer requirement trend.
6. The method according to claim 1, characterized in that, The large language model fine-tuned by agricultural water and fertilizer instruction data in step S3 is obtained by introducing trainable parameters into the pre-trained large language model through an efficient parameter fine-tuning method, and by training it using a dataset containing status information prompts and water and fertilizer decision instruction text.
7. The method according to claim 6, characterized in that, Before inputting the status information prompt or the fusion prompt into the large language model, relevant agronomic knowledge text is automatically retrieved based on the status information prompt or the fusion prompt, and the retrieved relevant agronomic knowledge text and the corresponding prompt are input into the large language model together.
8. The method according to claim 1, characterized in that, The trainable fusion weights mentioned in step S3 are used to determine the contribution ratio of the first water and fertilizer decision parameters and the second water and fertilizer decision parameters to the final water and fertilizer decision parameters, and are updated according to the difference between the water and fertilizer decision parameters and the expert-annotated water and fertilizer decision parameters, the growth prediction error, or a combination of the two.
9. The method according to claim 1, characterized in that, The information parsed in step S4 also includes the application time, and the parsing results are converted into control commands that can be recognized by the field irrigation and fertilization control system.
10. The method according to claim 1, characterized in that, The preset update condition in step S5 is that the prediction deviation exceeds a preset threshold. When the prediction deviation exceeds the preset threshold, the dual-channel time-series prediction model is updated using the newly collected normalized vegetation index and leaf area index sequences, and a fusion prompt is regenerated based on the updated growth prediction results to adjust subsequent water and fertilizer decisions. Furthermore, when water and fertilizer decision labeling data or decision feedback data corresponding to the newly collected data are obtained, the trainable parameters of the large language model are updated.