Crop nutrient diagnosis method and device, storage medium, electronic equipment and product

By combining multimodal data from visible light images, multispectral images, and environmental parameters, and utilizing large language models and neural network technology, we have achieved rapid, non-destructive, and efficient diagnosis of crop nutrients, generating precise fertilization recommendations and solving the problems of cumbersome and destructive traditional chemical methods.

CN121351015BActive Publication Date: 2026-02-24SHENZHEN RESEARCH INSTITUTE OF NORTHWEST A & F UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511903004.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-02-24
Estimated Expiration
2045-12-17

AI Technical Summary

Technical Problem

Current technologies for nutrient diagnosis in crops rely on chemical methods, which are cumbersome, costly, and destructive, resulting in low diagnostic efficiency.

Method used

By combining visible light images, multispectral images, and environmental parameters with a large language model, a mobile neural network is used to determine the reproductive period, generate diagnostic auxiliary knowledge, perform feature extraction and temporal feature fusion, and utilize a long short-term memory network for nutrient diagnosis to generate fertilization recommendations.

Benefits of technology

It enables rapid and non-destructive diagnosis of crop nutrients, improves diagnostic accuracy and efficiency, reduces reliance on expert experience, and provides personalized fertilization recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121351015B_ABST
    Figure CN121351015B_ABST
Patent Text Reader

Abstract

The application discloses a kind of crop nutrient diagnosis method, device, storage medium, electronic equipment and product, belong to agricultural fertilization management technical field.It includes obtaining visible light image, multispectral image, environmental parameter and planting information, based on visible light image to determine the current growth period of crop to be diagnosed, based on current growth period and planting information, generate diagnosis auxiliary knowledge, respectively to the feature extraction of preset time window visible light image, multispectral image and environmental parameter, obtain the visible light time series feature of crop to be diagnosed, multispectral time series feature and environmental time series feature, based on diagnosis auxiliary knowledge and visible light time series feature, multispectral time series feature and environmental time series feature, the nutrient level of crop to be diagnosed is diagnosed, and nutrient diagnosis result is obtained.The application realizes the rapid, non-destructive diagnosis of crop nutrient, through multi-source data fusion and intelligent time series analysis, significantly improve accuracy, and can automatically generate precise fertilization suggestion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural fertilization management technology, specifically to a method, apparatus, storage medium, electronic device, and product for diagnosing crop nutrients. Background Technology

[0002] Crop nutrient diagnosis refers to the determination of the nutritional status of crops through technical means. It is a crucial foundation for implementing precision fertilization and ensuring high yields and quality. Timely and accurate diagnosis of crop nutrient status is of great significance for improving fertilizer utilization, reducing agricultural production costs, minimizing environmental pollution, and ensuring food security.

[0003] Current technologies for diagnosing crop nutrients mainly rely on chemical methods. However, using chemical methods to diagnose crop nutrients is not only cumbersome and costly, but also destructive, resulting in low efficiency in crop nutrient diagnosis.

[0004] To address the aforementioned issues, there is an urgent need for a method, device, storage medium, electronic equipment, and product for diagnosing crop nutrients, which can resolve the problems associated with traditional methods. Summary of the Invention

[0005] The purpose of this invention is to provide a method, apparatus, storage medium, electronic device and product for nutrient diagnosis of crops, which can achieve rapid, non-destructive and crop-friendly diagnosis of crop nutrients and improve the accuracy of nutrient diagnosis.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] A method for diagnosing crop nutrients includes:

[0008] Step 1: Acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window;

[0009] Step 2: Based on the visible light image, determine the current growth stage of the crop to be diagnosed using a mobile neural network;

[0010] Step 3: Based on the current growth stage and planting information, generate diagnostic auxiliary knowledge, which is used to determine the key dimensions that can characterize crop nutrient levels among the feature dimensions covered by visible light images, multispectral images and environmental parameters.

[0011] Step 4: Extract features from the visible light image, multispectral image, and environmental parameters within the preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed.

[0012] Step 5: Based on diagnostic auxiliary knowledge and visible light time series characteristics, multispectral time series characteristics and environmental time series characteristics, the nutrient level of the crop to be diagnosed is diagnosed to obtain nutrient diagnosis results.

[0013] Furthermore, in step 3, diagnostic auxiliary knowledge is generated based on the current reproductive stage and planting information, specifically as follows:

[0014] The current reproductive stage and planting information are used as diagnostic background and input into the large language model;

[0015] In the context of diagnosis, using a large language model, key dimensions that can characterize crop nutrient levels are identified from the feature dimensions covered by visible light images, multispectral images, and environmental parameters.

[0016] The key dimensions are output as diagnostic auxiliary knowledge through a large language model.

[0017] Further, in step 4, feature extraction is performed on the visible light image, multispectral image, and environmental parameters within the preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed, specifically:

[0018] Using a residual network as the backbone network, features are extracted sequentially from visible light images within a preset time window based on the timestamps of the visible light images to obtain a phenotypic feature sequence.

[0019] A convolutional neural network is used as the backbone network to extract features from multispectral images within a preset time window based on the timestamps of the multispectral images, thereby obtaining a spectral feature sequence.

[0020] A fully connected neural network is used to extract features from environmental parameters within a preset time window based on the timestamps of the environmental parameters, resulting in an environmental feature sequence.

[0021] Convolutional long short-term memory networks were used to extract temporal features from phenotypic and spectral feature sequences, respectively, to obtain visible light temporal features and multispectral temporal features of the crop to be diagnosed.

[0022] A bidirectional long short-term memory network was used to extract temporal features from the environmental feature sequence to obtain the environmental temporal features of the crop to be diagnosed.

[0023] Furthermore, in step 5, based on diagnostic auxiliary knowledge and visible light temporal characteristics, multispectral temporal characteristics, and environmental temporal characteristics, the nutrient level of the crop to be diagnosed is diagnosed to obtain nutrient diagnosis results, specifically:

[0024] The diagnostic auxiliary knowledge is vectorized to obtain the auxiliary knowledge vector.

[0025] The visible light temporal features, multispectral temporal features, and environmental temporal features are concatenated to obtain a comprehensive feature vector;

[0026] The auxiliary knowledge vector is used as the query vector, and the comprehensive feature vector is used as the key vector and value vector to calculate the feature attention weight;

[0027] Feature attention weights are used to fuse the comprehensive feature vector to obtain fused temporal features;

[0028] Nutrient levels of the crop to be diagnosed are determined based on the fusion of temporal features, resulting in nutrient diagnosis results.

[0029] Furthermore, based on the fusion of temporal features, the nutrient levels of the crop to be diagnosed are analyzed to obtain nutrient diagnosis results, specifically:

[0030] The fused temporal features are input into a long short-term memory network, so that the memory units in the long short-term memory network process the fused temporal features through gating mechanisms and cell states to obtain a hidden state sequence. Each hidden state in the hidden state sequence is obtained by filtering the cell states through the output gate, and each encodes a long-term dependency learned from the sequence history.

[0031] Using the hidden state at the last time step in the hidden state sequence as the query vector, and the hidden state sequence as the key vector and value vector, calculate the temporal attention weights;

[0032] Temporal attention weights are used to weight the hidden state sequence to obtain a temporal fusion vector;

[0033] Nutrient levels of the crop to be diagnosed are determined based on temporal fusion vectors, yielding nutrient diagnosis results.

[0034] Furthermore, after obtaining the nutrient diagnosis results, the method further includes:

[0035] The current growth period and planting information are used as the diagnostic background, and the diagnostic background and nutrient diagnosis results are input into the large language model;

[0036] Using a large language model in a diagnostic context, fertilization recommendations are generated for crops to be diagnosed based on nutrient diagnosis results.

[0037] The present invention also provides a crop nutrient diagnosis device, applied to the above-mentioned crop nutrient diagnosis method, comprising:

[0038] The data acquisition module is used to acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window;

[0039] The growth period determination module is used to determine the current growth period of the crop to be diagnosed based on visible light images;

[0040] The auxiliary knowledge generation module is used to generate diagnostic auxiliary knowledge based on the current growth stage and planting information;

[0041] The feature extraction module is used to extract features from the visible light image, multispectral image and environmental parameters within a preset time window, respectively, to obtain the visible light time-series features, multispectral time-series features and environmental time-series features of the crop to be diagnosed;

[0042] The nutrient diagnosis module is used to diagnose the nutrient levels of the crop to be diagnosed based on diagnostic auxiliary knowledge, visible light time-series characteristics, multispectral time-series characteristics, and environmental time-series characteristics, and obtain nutrient diagnosis results.

[0043] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the crop nutrient diagnosis method as described above.

[0044] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described crop nutrient diagnosis method.

[0045] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described crop nutrient diagnosis method.

[0046] In summary, the present invention has at least one of the following beneficial technical effects:

[0047] 1. It can achieve rapid, non-destructive, and crop-friendly diagnosis of crop nutrients, avoiding the cumbersome, costly, and destructive problems of traditional chemical methods.

[0048] 2. By integrating multimodal time-series data such as visible light images, multispectral images, and environmental parameters, it can overcome the limitations of a single data source, providing a more comprehensive and complementary information foundation for nutrient diagnosis and significantly improving diagnostic accuracy.

[0049] 3. Based on the current growth stage and planting information of crops, it can intelligently generate diagnostic auxiliary knowledge using a large language model, dynamically focusing on the key feature dimensions that best represent nutrient levels, making the diagnostic logic fit agricultural mechanisms, and improving the efficiency and pertinence of analysis.

[0050] 4. It can capture the dynamic evolution and long-term dependence of crop nutrient status through advanced time-series feature extraction and fusion models, enhance the reliability and anti-interference ability of diagnostic results, and adapt to complex field environments.

[0051] 5. After completing nutrient diagnosis, it can further utilize large language models to generate personalized and actionable fertilization recommendations that combine specific diagnostic background (growth period, planting information) and diagnostic results, reducing reliance on expert experience and achieving precision fertilization management. Attached Figure Description

[0052] Figure 1 This is a flowchart of the crop nutrient diagnosis method provided in Embodiment 1 of the present invention;

[0053] Figure 2 This is a flowchart of the crop nutrient diagnosis method provided in Embodiment 2 of the present invention;

[0054] Figure 3 This is a flowchart of a crop nutrient diagnosis method provided according to a specific embodiment;

[0055] Figure 4 This is a schematic diagram of the structure of the crop nutrient diagnosis device provided in Embodiment 3 of the present invention;

[0056] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0058] This invention provides several embodiments, which will be described in detail below;

[0059] Example 1:

[0060] Figure 1 This is a flowchart of a crop nutrient diagnosis method according to Embodiment 1. This embodiment is applicable to situations where the nutritional status of crops is to be diagnosed. The method can be executed by a crop nutrient diagnosis device, which is implemented in hardware and / or software and can be integrated into an electronic device running this system.

[0061] like Figure 1 As shown, the method includes:

[0062] S110: Acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window.

[0063] In this context, "crops to be diagnosed" refers to crop plants that require nutrient level diagnosis. The crop variety for which nutrient levels are to be diagnosed is not limited here and will be determined based on actual business needs. For example, cotton could be a crop to be diagnosed.

[0064] A preset time window refers to a pre-defined time interval used to systematically collect visible light images, multispectral images, environmental parameters, and planting information of crops. Visible light images are crop images captured in the visible light band, reflecting the crop's phenotypic characteristics. Multispectral images are crop images captured in multiple spectral bands, providing spectral and spatial characteristics of the crop. Visible light and multispectral images are acquired using multispectral image sensors deployed in the field. Environmental parameters refer to environmental factors affecting crop root vitality; optional parameters include temperature, humidity, and light intensity. Environmental parameters are acquired using environmental sensors deployed in the field. Planting information refers to data related to crop planting, such as crop variety, planting region, planting season, and irrigation conditions.

[0065] The visible light image, multispectral image, and environmental parameters within the preset time window will be time-aligned.

[0066] S120: Based on the visible light image, determine the current growth stage of the crop to be diagnosed.

[0067] The current growth stage refers to the specific developmental stage of a crop during its growth process, such as the seedling stage, flowering stage, or fruiting stage. Visible light images can intuitively reflect changes in the external morphology of crops, and the current growth stage of the crop to be diagnosed can be accurately determined based on the visible light image of the crop. Optionally, the visible light image of the crop to be diagnosed is input into the growth stage recognition model, and the model outputs the current growth stage of the crop to be diagnosed. The growth stage recognition model is constructed based on a mobile neural network (Mobilenet).

[0068] S130: Based on the current growth stage and the planting information, generate diagnostic auxiliary knowledge for diagnosing the nutrient level of the crop to be diagnosed; the diagnostic auxiliary knowledge is used to determine the key dimensions that can characterize the crop nutrient level among the feature dimensions covered by the visible light image, the multispectral image and the environmental parameters.

[0069] Among them, diagnostic auxiliary knowledge refers to guidance information generated based on the current growth stage and planting information of the crop to be diagnosed, which is used to identify key dimensions that can characterize the crop nutrient level among the feature dimensions covered by visible light images, multispectral images and environmental parameters.

[0070] Key dimensions refer to the feature dimensions most relevant to nutrient levels selected from multiple datasets, such as specific spectral bands or environmental factors. Since crop nutrient requirements and responses vary across different growth stages and planting conditions, diagnostic aids can effectively focus the analysis scope and improve diagnostic efficiency.

[0071] S140: Extract features from the visible light image, multispectral image, and environmental parameters within the preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed.

[0072] Visible light temporal features refer to the time-series features extracted from visible light image sequences, reflecting the dynamic changes in phenotypic characteristics. The visible light image sequence consists of visible light images within a preset time window. Optionally, phenotypic feature sequences are first obtained by sequentially extracting features from each visible light image in the visible light image sequence, and then temporal feature extraction is performed on the phenotypic feature sequences to obtain visible light temporal features.

[0073] Multispectral temporal features refer to the time-series features extracted from multispectral image sequences, reflecting the dynamic changes in spectral characteristics. A multispectral image sequence consists of multispectral images within a preset time window. Optionally, features are first extracted from each multispectral image in the sequence to obtain a spectral feature sequence, and then temporal features are extracted from the spectral feature sequence to obtain the multispectral temporal features.

[0074] Among them, environmental temporal features refer to time-series features extracted from the environmental parameter sequence, reflecting the dynamic changes of environmental characteristics. The environmental parameter sequence consists of environmental parameters within a preset time window. Optionally, features are first extracted from each multispectral image in the multispectral image sequence to obtain a spectral feature sequence, and then temporal features are extracted from the spectral feature sequence to obtain multispectral temporal features.

[0075] S150: Based on the diagnostic aid knowledge, the visible light time series characteristics, the multispectral time series characteristics, and the environmental time series characteristics, the nutrient level of the crop to be diagnosed is diagnosed to obtain nutrient diagnosis results.

[0076] Among them, visible light temporal features, multispectral temporal features, and environmental temporal features comprehensively consider crop physiological states and environmental factors, supporting the simulation of crop growth dynamics from multiple dimensions. Diagnostic auxiliary knowledge, as domain knowledge, is used to optimize feature selection to achieve efficient and accurate nutrient level diagnosis.

[0077] Nutrient diagnostic results refer to the assessment results of crop nutrient levels. These results include whether nutrients are sufficient, deficient, or excessive. Optionally, the nutrient diagnostic results pertain to nitrogen.

[0078] This application's technical solution considers the impact of environmental parameters on crop nutrient absorption, fusing environmental parameters with visible light and multispectral images in a multimodal manner. This overcomes the limitations of single-modal data, allowing multispectral features, phenotypic features, and environmental features to complement each other, providing a comprehensive information foundation for nutrient diagnosis. By dynamically generating diagnostic auxiliary knowledge based on the current growth stage, intelligent focus on key feature dimensions is achieved, ensuring that the nutrient diagnosis logic aligns with agricultural mechanisms and effectively improving the accuracy and efficiency of diagnosis. Simultaneously, through the analysis of temporal features, the gradual process of crop nutrient status is focused on, capturing the evolutionary patterns of features over time, significantly enhancing the reliability and anti-interference ability of diagnostic results. This achieves dynamic and non-destructive diagnosis of crop nutrient status under complex environments, overcoming the limitations of traditional methods that rely on a single data source and static analysis, and realizing accurate and efficient diagnosis of crop nutrient levels.

[0079] In an optional embodiment, generating diagnostic auxiliary knowledge for diagnosing the nutrient level of the crop to be diagnosed based on the current growth stage and the planting information includes: inputting the current growth stage and the planting information as diagnostic background into a large language model; using the large language model to determine key dimensions that can characterize the crop nutrient level from the feature dimensions covered by the visible light image, the multispectral image, and the environmental parameters, respectively, under the diagnostic background; and outputting the key dimensions as the diagnostic auxiliary knowledge through the large language model.

[0080] Diagnostic auxiliary knowledge is structured information generated to guide the analysis process in order to complete a specific diagnostic task. This diagnostic auxiliary knowledge is generated by a large language model based on the diagnostic context. The large language model is an artificial intelligence model trained on massive amounts of data, possessing powerful natural language understanding and generation capabilities. In this application's technical solution, the functionality of the large language model is extended to perform knowledge reasoning and feature dimension decision-making. The diagnostic context is the contextual information upon which the large language model generates diagnostic auxiliary knowledge; it is composed of the current reproductive stage and planting information.

[0081] Diagnostic auxiliary knowledge specifically refers to a set of key dimensions selected from the feature dimensions covered by multimodal data. The feature dimensions covered by multimodal data refer to the different indicators or attributes that can be extracted from each modality of data to describe different aspects of crop status. Key features are feature dimensions that play a decisive role or make a significant contribution to nutrient level assessment in a specific diagnostic context. The specific feature dimensions included in the key features are not limited here and are determined based on the actual situation. For example, for visible light images, key features may include vegetation indices and color features; for multispectral images, key features may include vegetation indices containing red-edge bands and chlorophyll absorption reflectance indices; for environmental parameters, key features may include moisture and pH values.

[0082] The aforementioned technical solution leverages the powerful knowledge understanding and logical reasoning capabilities of large language models to integrate expert knowledge in agriculture and crop growth patterns into the nutrient diagnosis process. Specifically, it inputs the current growth stage and planting information as key diagnostic background into the large language model. This guides the model to intelligently filter key dimensions that characterize crop nutrient levels from the latent features of various modal data, thereby generating targeted diagnostic support knowledge. This is because the representation of crop nutrient status varies significantly across different growth stages and planting patterns, making it difficult for traditional methods to dynamically adapt. By introducing large language models, the diagnostic basis becomes intelligent and contextualized, enabling subsequent feature extraction and diagnostic analysis to focus on core dimensions. This ensures that the nutrient diagnosis logic aligns with agricultural mechanisms, significantly improving the accuracy and efficiency of the diagnosis.

[0083] In an optional embodiment, the step of extracting features from the visible light image, multispectral image, and environmental parameters within a preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed includes: using a residual network as the backbone network to sequentially extract features from the visible light image within the preset time window based on the timestamp of the visible light image, obtaining a phenotypic feature sequence; using a convolutional neural network as the backbone network to sequentially extract features from the multispectral image within the preset time window based on the timestamp of the multispectral image, obtaining a spectral feature sequence; using a fully connected neural network to sequentially extract features from the environmental parameters within the preset time window based on the timestamp of the environmental parameters, obtaining an environmental feature sequence; using a convolutional long short-term memory network to extract temporal features from the phenotypic feature sequence and the spectral feature sequence, respectively, to obtain the visible light temporal features and multispectral temporal features of the crop to be diagnosed; and using a bidirectional long short-term memory network to extract temporal features from the environmental feature sequence, obtaining the environmental temporal features of the crop to be diagnosed.

[0084] The preset time window includes at least two sets of visible light images, at least two sets of multispectral images, and at least two sets of environmental parameters. The visible light images, multispectral images, and environmental parameters are all associated with timestamps, which are used to determine the acquisition order of these images.

[0085] The backbone network is the core network structure responsible for the main feature extraction task. The phenotypic feature sequence is an ordered set of phenotypic features. Phenotypic features are extracted from visible light images using a residual network as the backbone network, and are used to characterize crop morphological and structural features. The order of phenotypic features in the feature sequence corresponds to the order of visible light images within a preset time window. The residual network is a deep learning architecture that effectively alleviates the vanishing gradient problem in deep neural network training by introducing skip connections, and is particularly suitable for image feature extraction.

[0086] A spectral feature sequence refers to an ordered set of spectral features. Spectral features characterize crop physiological and biochemical properties by mining the correlations and spatial distribution patterns between multispectral bands. These spectral features are extracted from multispectral images using a convolutional neural network (CNN) as the backbone. The order of spectral features in the spectral feature sequence corresponds to the order of the multispectral images within a preset time window. A CNN is a neural network specifically designed for processing grid-structured data such as images, extracting spatial features by sliding convolutional kernels across local receptive fields.

[0087] An environmental feature sequence is an ordered set of environmental features used to characterize changes in crop growth environment conditions. These environmental features are extracted from environmental parameters using a fully connected neural network, and the order of the environmental features in the sequence corresponds to the order of the environmental parameters within a preset time window. A fully connected neural network is a classic neural network structure where all neurons in adjacent layers are interconnected, making it suitable for processing structured data.

[0088] The visible light temporal features were extracted using a convolutional long short-term memory (LSTM) network to extract temporal features from the phenotypic feature sequence. The multispectral temporal features were extracted using a convolutional LTM network to extract temporal features from the spectral feature sequence. The convolutional LTM network is a hybrid neural network that combines convolutional operations with long short-term memory networks, specifically designed for processing temporal data with spatial structure. The environmental temporal features were extracted using a bidirectional LTM network to extract temporal features from the environmental feature sequence. The bidirectional LTM network is a variant of the LTM network capable of modeling temporal data simultaneously from both forward and backward directions, thus more comprehensively capturing the contextual dependencies in the time series.

[0089] The aforementioned technical solution employs optimized deep neural network architectures for feature extraction and temporal modeling, tailored to the dynamic changes of different types of data over time. By designing dedicated feature extraction paths for visible light images, multispectral images, and environmental parameters, it is possible to fully explore the static features and dynamic evolution patterns related to crop growth in various data types. Specifically, a convolutional long short-term memory network is used for image sequences to capture their spatiotemporal correlation features, while a bidirectional long short-term memory network is used for environmental parameter sequences to model their forward and backward temporal dependencies. This approach is based on the fact that crop nutrient changes are a continuous physiological process, and its representation in different data modalities exhibits both instantaneous characteristics and temporal cumulative effects. This multi-path temporal feature extraction architecture can comprehensively and accurately capture the evolutionary patterns of crop status over time, providing richer and more reliable temporal feature representations for subsequent precise diagnosis, thereby significantly improving the accuracy of nutrient level diagnosis.

[0090] In an optional embodiment, after diagnosing the nutrient level of the crop to be diagnosed and obtaining a nutrient diagnosis result, the method further includes: using the current growth stage and the planting information as a diagnostic background, and inputting the diagnostic background and the nutrient diagnosis result into a large language model; and generating fertilization suggestions for the crop to be diagnosed based on the nutrient diagnosis result in the diagnostic background using the large language model.

[0091] The diagnostic background refers to the contextual information upon which the large language model generates diagnostic auxiliary knowledge. It is a systematic environmental parameter that provides constraints and logical basis for the large language model's decision-making, defining the scope of reasoning and the premises for decision-making. The diagnostic background consists of the current growth stage and planting information. The current growth stage is used to define the key state markers of the crop's current growth and development stage, determining the crop nutrient requirements standards upon which the large language model bases its fertilization recommendations. Planting information is a set of parameters describing the basic conditions of crop cultivation, providing the large language model with the field environmental constraints needed to formulate feasible fertilization plans.

[0092] Nutrient diagnosis results are conclusive judgments derived from the analysis of multi-source data to assess crop nutrient status. These judgments serve as the core input and adjustment basis for the large language model to generate fertilization recommendations. Fertilization recommendations refer to specific guidance schemes regarding fertilizer type, dosage, timing, and methods generated by the large language model based on the crop nutrient diagnosis results and its growth background.

[0093] Because fertilization decisions depend not only on the absolute nutrient surplus or deficit, but also on the crop's current nutritional requirements and specific growing environment, this method combines diagnostic background and results as input. Leveraging the powerful knowledge fusion and reasoning capabilities of a large language model, it integrates these factors to generate highly context-relevant agronomic management recommendations. Based on its internalized agricultural expertise, the large language model performs comprehensive judgment and decision-making reasoning, outputting not only scientifically accurate but also practically feasible personalized fertilization plans. This significantly reduces reliance on expert experience, providing "tailor-made" precision fertilization guidance for crops with different growth conditions and growing environments. This ensures healthy crop growth while optimizing fertilizer utilization efficiency and reducing production costs and environmental risks.

[0094] The following is an introduction to Example 2, which focuses on the diagnosis of nutrient levels in the crop to be diagnosed based on diagnostic aid knowledge, visible light time-series characteristics, multispectral time-series characteristics, and environmental time-series characteristics.

[0095] Figure 2 This is a flowchart of the crop nutrient diagnosis method provided in Example 2. This example is a further optimization based on Example 1.

[0096] like Figure 2 As shown, the method includes:

[0097] S210: Acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window.

[0098] S220: Based on the visible light image, determine the current growth stage of the crop to be diagnosed.

[0099] S230: Based on the current growth stage and the planting information, generate diagnostic auxiliary knowledge for diagnosing the nutrient level of the crop to be diagnosed; the diagnostic auxiliary knowledge is used to determine the key dimensions that can characterize the crop nutrient level among the feature dimensions covered by the visible light image, the multispectral image and the environmental parameters.

[0100] S240: Extract features from the visible light image, multispectral image, and environmental parameters within the preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed.

[0101] S250: The diagnostic auxiliary knowledge is vectorized to obtain the auxiliary knowledge vector.

[0102] In this context, diagnostic auxiliary knowledge is presented as text, and auxiliary knowledge vectors are presented as vectors. The auxiliary knowledge vectors are vector representations obtained by vectorizing the diagnostic auxiliary knowledge. Optionally, a Sentence Transformer can be used to vectorize the diagnostic auxiliary knowledge.

[0103] S260: The visible light temporal features, the multispectral temporal features, and the environmental temporal features are concatenated to obtain a comprehensive feature vector.

[0104] The comprehensive feature vector is a composite feature representation formed by concatenating multi-source temporal features. Specifically, the comprehensive feature vector is obtained by concatenating visible light temporal features, multispectral temporal features, and environmental temporal features. The comprehensive feature vector covers multi-dimensional nutrient influencing factors.

[0105] S270: Using the auxiliary knowledge vector as the query vector and the comprehensive feature vector as the key vector and value vector, calculate the feature attention weight.

[0106] In this feature attention mechanism, the query vector is the dominant vector used to retrieve key information. The key vector is the reference vector used to calculate the relevance with the query vector. The value vector is the source vector carrying the feature information to be weighted in the attention mechanism. The feature attention weights are the feature importance distribution calculated from the query vector and the key vector. In this application's technical solution, the key vector and value vector are combined feature vectors. The auxiliary knowledge vector is the query vector.

[0107] S280: The feature attention weights are used to fuse the comprehensive feature vector to obtain fused temporal features.

[0108] The fusion of temporal features is obtained by fusing the comprehensive feature vector with feature attention weights. Using feature attention weights to fuse the comprehensive feature vector can strengthen effective features associated with diagnostic auxiliary knowledge and suppress irrelevant features.

[0109] S290: Based on the fused temporal features, the nutrient level of the crop to be diagnosed is diagnosed to obtain the nutrient diagnosis result.

[0110] The fusion of temporal features incorporates both multimodal temporal information and domain knowledge constraints. Using these fused temporal features to diagnose the nutrient levels of crops can ensure the accuracy of nutrient diagnosis results.

[0111] This application's technical solution constructs a knowledge-guided dynamic feature fusion diagnostic model. By introducing diagnostic auxiliary knowledge as the query vector for the attention mechanism, it can automatically filter and strengthen the key information most relevant to crop nutrient levels from multi-source temporal features, while suppressing interference from irrelevant or redundant features. First, it utilizes multimodal data to obtain comprehensive information on crop growth, identifies the growth stage through growth period recognition, and then generates targeted diagnostic knowledge to guide feature selection. Next, it extracts temporal features from various types of data to capture dynamic change patterns. Finally, through an attention-based feature fusion mechanism, it achieves knowledge-guided adaptive feature weighting fusion, thereby completing accurate diagnosis. This is because crop nutrient status has different representational patterns at different growth stages and under different planting environments. By vectorizing domain knowledge and using it as an attention query, it simulates the selective attention behavior of experts during the diagnostic process, ensuring that the model always focuses on the most discriminative feature combination, ultimately significantly improving the accuracy and robustness of nutrient level diagnosis.

[0112] In an optional embodiment, the step of diagnosing the nutrient level of the crop to be diagnosed based on the fused temporal features to obtain a nutrient diagnosis result includes: inputting the fused temporal features into a long short-term memory network (LSTM), so that the memory units in the LSM process the fused temporal features through a gating mechanism and cell states to obtain a hidden state sequence; wherein each hidden state in the hidden state sequence is obtained by filtering and selecting cell states through an output gate, and each encodes a long-term dependency learned from the sequence history; using the hidden state at the last time step in the hidden state sequence as a query vector, and using the hidden state sequence as a key vector and a value vector, calculating a temporal attention weight; using the temporal attention weight to weight the hidden state sequence to obtain a temporal fusion vector; and diagnosing the nutrient level of the crop to be diagnosed based on the temporal fusion vector to obtain a nutrient diagnosis result.

[0113] Long Short-Term Memory (LSTM) networks are a special type of recurrent neural network with memory units and gating mechanisms, enabling them to effectively learn long-range dependencies in time-series data. Memory units are the core components of LTM networks, storing historical information and using gating mechanisms to selectively remember and forget information. The gating mechanism, which controls information flow through the sigmoid activation function and element-wise operations, includes input gates, forget gates, and output gates. Cell states are the information transmission channels throughout the entire time series in LTM networks, carrying filtered historical information. Output gates are the gating units that control which information from the cell states is output to the hidden states.

[0114] The fused temporal features are input into a Long Short-Term Memory (LSTM) network for processing. The LTM network's memory units perform deep temporal modeling of the input features through gating mechanisms and cell states. The gating mechanism refers to the regulatory device that controls information flow through activation functions, while the cell states are the core channels carrying historical information. Each hidden state in the resulting hidden state sequence is generated by filtering cell states through an output gate, encoding long-term dependencies learned from the sequence history. These long-term dependencies refer to temporal association features spanning multiple time steps.

[0115] Using the hidden state at the last time step in the aforementioned hidden state sequence as the query vector, and the entire hidden state sequence as the key and value vectors, a temporal attention weight is calculated using an attention mechanism. The temporal attention weight refers to the relative importance coefficient of each time step feature in the diagnostic task. Subsequently, the hidden state sequence is weighted and fused using the temporal attention weight to highlight and enhance features at key time points, generating a temporal fusion vector. This temporal fusion vector represents the feature representation of the hidden state sequence after importance weighting. The temporal fusion vector characterizes the features at key time points, and the final judgment on crop nutrient status based on the temporal fusion vector is the nutrient diagnosis result.

[0116] Since crop nutrient changes are a continuous physiological process, the contribution of different growth points to the final diagnosis varies. The above-mentioned technical solution, by combining the temporal modeling capabilities of Long Short-Term Memory (LSTM) networks with the dynamic weighting characteristics of temporal attention mechanisms, can both fully learn the long-term patterns of nutrient changes and adaptively focus on the most discriminative key time segments, thereby comprehensively improving diagnostic accuracy. It achieves precise modeling and information extraction of temporal dynamic features.

[0117] Figure 3 This is a flowchart of a crop nutrient diagnosis method provided according to a specific embodiment. See also... Figure 3The crop nutrient diagnosis method comprises three parts: multimodal time-series data acquisition, multimodal time-series feature extraction, and crop nutrient diagnosis. Multimodal time-series data acquisition includes: 1. Installing multispectral image sensors in the field to automatically acquire multispectral images and visible light images in blue, green, red, infrared, and near-infrared bands at set intervals. Crop regions are obtained by threshold segmentation of the multispectral and visible light images within a preset time window, removing background features. 2. Based on a nutrient absorption kinetic model, and focusing on the core mechanism of root activity regulation by environmental parameters such as temperature, humidity, and light, environmental sensors are deployed in the field to automatically acquire environmental parameters such as air temperature, air humidity, and light radiation at set intervals. Missing or outlier values ​​in these parameters are imputed. 3. Using a crop growth stage identification model based on MobileNet, the current growth stage of the crop to be diagnosed is identified based on the visible light images. The current growth stage and planting information are input into the large language model as diagnostic background. In the context of diagnosis, using a large language model, key dimensions that can characterize crop nutrient levels are identified from the feature dimensions covered by visible light images, multispectral images, and environmental parameters. These key dimensions are then output as diagnostic auxiliary knowledge through the large language model.

[0118] The multimodal temporal feature extraction includes: 1. Extracting features from visible light images, multispectral images, and environmental parameters within a preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed. Specifically, for the multispectral images within the preset time window, a convolutional neural network is used as the backbone network to extract spectral features at a single time step, mining the correlations and spatial distribution patterns between multispectral bands to obtain a spectral feature sequence. A convolutional long short-term memory network is used to learn the long- and short-term dependencies of spectral features in the time dimension, obtaining multispectral temporal features. For the visible light images within the preset time window, a residual network is used as the backbone network to extract phenotypic features at a single time step, obtaining a phenotypic feature sequence. A convolutional long short-term memory network is used to mine the temporal patterns of phenotypic features, obtaining visible light temporal features. For the environmental parameters within the preset time window, a fully connected neural network and ReLU are used to extract environmental features at a single time step. The fully connected layer maps the environmental parameters to a high-dimensional feature space, and ReLU introduces nonlinearity to enhance feature expression capabilities, obtaining an environmental feature sequence. 1. By capturing past and future temporal information of environmental features through a bidirectional long short-term memory network, environmental temporal features are obtained. 2. The diagnostic auxiliary knowledge output by the Sentence Transformer large language model is encoded into auxiliary knowledge vectors.

[0119] The multimodal temporal feature fusion includes: 1. Concatenating multispectral temporal features, visible light temporal features, and environmental temporal features to form a comprehensive feature vector covering multidimensional nutrient influencing factors. 2. Constructing a knowledge-guided feature attention mechanism, using the auxiliary knowledge vector as the query vector and the comprehensive feature vector as the key and value vectors. By calculating feature attention weights, effective features associated with diagnostic auxiliary knowledge are strengthened, irrelevant features are suppressed, and the final output is a fused temporal feature that contains both multimodal temporal information and incorporates domain knowledge constraints.

[0120] The crop nutrient diagnosis includes: 1. Processing fused temporal features using a Long Short-Term Memory (LSTM) network to diagnose crop nutrient status during the current growth stage. Specifically, the fused temporal features are input into the LSM network, allowing memory units to process them through gating mechanisms and cell states to obtain a hidden state sequence. Each hidden state in the sequence is filtered by the output gate to encode long-term dependencies learned from sequence history, adapting to the dynamic delay characteristics of nutrient status caused by crop physiological lag, capturing the complex evolution of nutrients over time, and uncovering the logic of nutrient status changes over time. 2. Using the hidden state at the last time step in the hidden state sequence as the query vector, and the hidden state sequence as the key and value vectors, calculating temporal attention weights. These weights are then used to weight the hidden state sequence to obtain a temporal fusion vector. This focuses on key time steps in the evolution of nutrient features, strengthening the feature contribution of abrupt changes affected by physiological lag, and accurately capturing key changes in nutrient status. 3. When compressing the feature dimension of the temporal fusion vector through a fully connected layer, the probability distribution of each category (e.g., sufficient, deficient, or excessive) of crop nutrient level at the current growth stage is output through Softmax.

[0121] Example 3:

[0122] Figure 4 This is a schematic diagram of the crop nutrient diagnostic device provided in Embodiment 3 of this application. This embodiment is applicable to situations where the nutritional status of crops is to be diagnosed. The device can be implemented by software and / or hardware and can be integrated into electronic devices such as smart terminals.

[0123] like Figure 4 As shown, a crop nutrient diagnostic device may include:

[0124] The data acquisition module 410 is used to acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window;

[0125] The growth period determination module 420 is used to determine the current growth period of the crop to be diagnosed based on the visible light image;

[0126] The auxiliary knowledge generation module 430 is used to generate diagnostic auxiliary knowledge for diagnosing the nutrient level of the crop to be diagnosed based on the current growth stage and the planting information; the diagnostic auxiliary knowledge is used to determine the key dimensions that can characterize the nutrient level of the crop among the feature dimensions covered by the visible light image, the multispectral image and the environmental parameters.

[0127] The feature extraction module 440 is used to extract features from the visible light image, multispectral image and environmental parameters within a preset time window, respectively, to obtain the visible light temporal features, multispectral temporal features and environmental temporal features of the crop to be diagnosed;

[0128] The nutrient diagnosis module 450 is used to diagnose the nutrient level of the crop to be diagnosed based on the diagnostic auxiliary knowledge, the visible light time series characteristics, the multispectral time series characteristics, and the environmental time series characteristics to obtain nutrient diagnosis results.

[0129] This application's technical solution considers the impact of environmental parameters on crop nutrient absorption, fusing environmental parameters with visible light and multispectral images in a multimodal manner. This overcomes the limitations of single-modal data, allowing multispectral features, phenotypic features, and environmental features to complement each other, providing a comprehensive information foundation for nutrient diagnosis. By dynamically generating diagnostic auxiliary knowledge based on the current growth stage, intelligent focus on key feature dimensions is achieved, ensuring that the nutrient diagnosis logic aligns with agricultural mechanisms and effectively improving the accuracy and efficiency of diagnosis. Simultaneously, through the analysis of temporal features, the gradual process of crop nutrient status is focused on, capturing the evolutionary patterns of features over time, significantly enhancing the reliability and anti-interference ability of diagnostic results. This achieves dynamic and non-destructive diagnosis of crop nutrient status under complex environments, overcoming the limitations of traditional methods that rely on a single data source and static analysis, and realizing accurate and efficient diagnosis of crop nutrient levels.

[0130] The auxiliary knowledge generation module 430 includes: a diagnostic background input submodule, used to input the current growth period and the planting information as diagnostic background into a large language model; a key dimension determination submodule, used to determine key dimensions that can characterize crop nutrient levels from the feature dimensions covered by the visible light image, the multispectral image and the environmental parameters, respectively, through the large language model under the diagnostic background; and an auxiliary knowledge output submodule, used to output the key dimensions as diagnostic auxiliary knowledge through the large language model.

[0131] The feature extraction module 440 includes: a characterization feature extraction submodule, used to extract features from visible light images within a preset time window based on timestamps of the visible light images using a residual network as the backbone network, to obtain a phenotypic feature sequence; a spectral feature extraction submodule, used to extract features from multispectral images within a preset time window based on timestamps of the multispectral images using a convolutional neural network as the backbone network, to obtain a spectral feature sequence; an environmental feature extraction submodule, used to extract features from environmental parameters within a preset time window based on timestamps of the environmental parameters using a fully connected neural network, to obtain an environmental feature sequence; an image temporal feature extraction submodule, used to extract temporal features from the phenotypic feature sequence and the spectral feature sequence using a convolutional long short-term memory network, respectively, to obtain visible light temporal features and multispectral temporal features of the crop to be diagnosed; and an environmental temporal feature extraction submodule, used to extract temporal features from the environmental feature sequence using a bidirectional long short-term memory network, to obtain environmental temporal features of the crop to be diagnosed.

[0132] The nutrient diagnosis module 450 includes: a vectorization submodule for vectorizing the diagnostic auxiliary knowledge to obtain an auxiliary knowledge vector; a feature splicing submodule for splicing the visible light temporal features, the multispectral temporal features, and the environmental temporal features to obtain a comprehensive feature vector; a feature attention determination submodule for using the auxiliary knowledge vector as a query vector and the comprehensive feature vector as a key vector and a value vector to calculate feature attention weights; a feature fusion submodule for using the feature attention weights to perform feature fusion on the comprehensive feature vector to obtain fused temporal features; and a nutrient diagnosis submodule for diagnosing the nutrient level of the crop to be diagnosed based on the fused temporal features to obtain a nutrient diagnosis result.

[0133] The nutrient diagnosis submodule includes: a hidden state sequence determination unit, used to input the fused temporal features into a long short-term memory network, so that the memory units in the long short-term memory network process the fused temporal features through a gating mechanism and cell states to obtain a hidden state sequence; wherein each hidden state in the hidden state sequence is obtained by filtering and selecting cell states through an output gate, and each encodes a long-term dependency learned from the sequence history; a temporal attention determination unit, used to calculate temporal attention weights using the hidden state at the last time step in the hidden state sequence as a query vector and the hidden state sequence as a key vector and value vector; a weighted processing unit, used to perform weighted processing on the hidden state sequence using the temporal attention weights to obtain a temporal fusion vector; and a nutrient diagnosis unit, used to diagnose the nutrient level of the crop to be diagnosed based on the temporal fusion vector to obtain a nutrient diagnosis result.

[0134] The device further includes: a background and result input module, used to input the current growth stage and planting information as the diagnostic background after obtaining the nutrient diagnosis result from the nutrient level diagnosis of the crop to be diagnosed, and input the diagnostic background and the nutrient diagnosis result into the large language model; and a fertilization suggestion generation module, used to generate fertilization suggestions for the crop to be diagnosed based on the nutrient diagnosis result in the diagnostic background through the large language model.

[0135] The crop nutrient diagnosis device provided in the embodiments of the invention can execute the crop nutrient diagnosis method provided in any embodiment of this application, and has the corresponding performance modules and beneficial effects for executing the crop nutrient diagnosis method.

[0136] Example 4:

[0137] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.

[0138] Figure 5 A schematic diagram of an electronic device 510, which can be implemented using an embodiment, is shown. The electronic device 510 includes at least one processor 511 and a memory, such as a read-only memory (ROM) 512, a random access memory (RAM) 513, etc., communicatively connected to the at least one processor 511. The memory stores computer programs executable by the at least one processor. The processor 511 can perform various appropriate actions and processes based on the computer program stored in the ROM 512 or loaded from storage unit 518 into the RAM 513. The RAM 513 may also store various programs and data required for the operation of the electronic device 510. The processor 511, ROM 512, and RAM 513 are interconnected via a bus 514. An input / output (I / O) interface 515 is also connected to the bus 514.

[0139] Multiple components in electronic device 510 are connected to I / O interface 515, including: input unit 516, such as keyboard, mouse, etc.; output unit 517, such as various types of displays, speakers, etc.; storage unit 518, such as disk, optical disk, etc.; and communication unit 519, such as network card, modem, wireless transceiver, etc. Communication unit 519 allows electronic device 510 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0140] Processor 511 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 511 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 511 performs the various methods and processes described above, such as crop nutrient diagnosis methods.

[0141] In some embodiments, the crop nutrient diagnosis method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 518. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 510 via ROM 512 and / or communication unit 519. When the computer program is loaded into RAM 513 and executed by processor 511, one or more steps of the crop nutrient diagnosis method described above may be performed. Alternatively, in other embodiments, processor 511 may be configured to perform the crop nutrient diagnosis method by any other suitable means (e.g., by means of firmware).

[0142] Embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0145] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0146] Contents not described in detail in this specification are prior art known to those skilled in the art. It is hereby indicated that the above description is intended to help those skilled in the art understand this invention, but does not limit the scope of protection of this invention. Any equivalent substitutions, modifications, improvements, or simplifications of the above descriptions that do not depart from the essential content of this invention fall within the scope of protection of this invention.

Claims

1. A method for diagnosing crop nutrients, characterized in that, include: Step 1: Acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window; Step 2: Based on the visible light image, determine the current growth stage of the crop to be diagnosed using a mobile neural network; Step 3: Based on the current growth stage and planting information, generate diagnostic auxiliary knowledge. This diagnostic auxiliary knowledge is used to determine key dimensions that can characterize crop nutrient levels among the feature dimensions covered by visible light images, multispectral images, and environmental parameters. Specifically, generating diagnostic auxiliary knowledge based on the current growth stage and planting information involves: The current reproductive stage and planting information are used as diagnostic background and input into the large language model; In the context of diagnosis, using a large language model, key dimensions that can characterize crop nutrient levels are identified from the feature dimensions covered by visible light images, multispectral images, and environmental parameters. The key dimensions are output as diagnostic auxiliary knowledge using a large language model. Step 4: Extract features from the visible light image, multispectral image, and environmental parameters within the preset time window to obtain the visible light temporal features, multispectral temporal features, and environmental temporal features of the crop to be diagnosed. Specifically: Using a residual network as the backbone network, features are extracted sequentially from visible light images within a preset time window based on the timestamps of the visible light images to obtain a phenotypic feature sequence. A convolutional neural network is used as the backbone network to extract features from multispectral images within a preset time window based on the timestamps of the multispectral images, thereby obtaining a spectral feature sequence. A fully connected neural network is used to extract features from environmental parameters within a preset time window based on the timestamps of the environmental parameters, resulting in an environmental feature sequence. Convolutional long short-term memory networks were used to extract temporal features from phenotypic and spectral feature sequences, respectively, to obtain visible light temporal features and multispectral temporal features of the crop to be diagnosed. A bidirectional long short-term memory network was used to extract temporal features from the environmental feature sequence to obtain the environmental temporal features of the crop to be diagnosed. Step 5: Based on diagnostic auxiliary knowledge and visible light time series characteristics, multispectral time series characteristics and environmental time series characteristics, the nutrient level of the crop to be diagnosed is diagnosed to obtain nutrient diagnosis results.

2. The method for diagnosing crop nutrients according to claim 1, characterized in that, In step 5, based on diagnostic aid knowledge and visible light time-series characteristics, multispectral time-series characteristics, and environmental time-series characteristics, the nutrient level of the crop to be diagnosed is determined, and the nutrient diagnosis results are obtained, specifically as follows: The diagnostic auxiliary knowledge is vectorized to obtain the auxiliary knowledge vector. The visible light temporal features, multispectral temporal features, and environmental temporal features are concatenated to obtain a comprehensive feature vector; The auxiliary knowledge vector is used as the query vector, and the comprehensive feature vector is used as the key vector and value vector to calculate the feature attention weight; Feature attention weights are used to fuse the comprehensive feature vector to obtain fused temporal features; Nutrient levels of the crop to be diagnosed are determined based on the fusion of temporal features, resulting in nutrient diagnosis results.

3. The method for diagnosing crop nutrients according to claim 2, characterized in that, The nutrient levels of the crop to be diagnosed are determined based on the fusion of temporal features, and the nutrient diagnosis results are as follows: The fused temporal features are input into a long short-term memory network, so that the memory units in the long short-term memory network process the fused temporal features through gating mechanisms and cell states to obtain a hidden state sequence. Each hidden state in the hidden state sequence is obtained by filtering the cell states through the output gate, and each encodes a long-term dependency learned from the sequence history. Using the hidden state at the last time step in the hidden state sequence as the query vector, and the hidden state sequence as the key vector and value vector, calculate the temporal attention weights; Temporal attention weights are used to weight the hidden state sequence to obtain a temporal fusion vector; Nutrient levels of the crop to be diagnosed are determined based on temporal fusion vectors, yielding nutrient diagnosis results.

4. The method for diagnosing crop nutrients according to claim 3, characterized in that, After obtaining the nutrient diagnosis results, the method further includes: The current growth period and planting information are used as the diagnostic background, and the diagnostic background and nutrient diagnosis results are input into the large language model; Using a large language model in a diagnostic context, fertilization recommendations are generated for crops to be diagnosed based on nutrient diagnosis results.

5. A crop nutrient diagnostic device, applied to the crop nutrient diagnostic method according to any one of claims 1-4, characterized in that, include: The data acquisition module is used to acquire visible light images, multispectral images, environmental parameters, and planting information of the crop to be diagnosed within a preset time window; The growth period determination module is used to determine the current growth period of the crop to be diagnosed based on visible light images; The auxiliary knowledge generation module is used to generate diagnostic auxiliary knowledge based on the current growth stage and planting information; The feature extraction module is used to extract features from the visible light image, multispectral image and environmental parameters within a preset time window, respectively, to obtain the visible light time-series features, multispectral time-series features and environmental time-series features of the crop to be diagnosed; The nutrient diagnosis module is used to diagnose the nutrient levels of the crop to be diagnosed based on diagnostic auxiliary knowledge, visible light time-series characteristics, multispectral time-series characteristics, and environmental time-series characteristics, and obtain nutrient diagnosis results.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the crop nutrient diagnosis method as described in any one of claims 1-4.

7. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the crop nutrient diagnosis method as described in any one of claims 1-4.

8. A computer program product comprising a computer program that, when executed by a processor, implements the crop nutrient diagnosis method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Nutrition diagnosis system and method based on tobacco leaves

    CN120446042A

  • Farmland precise fertilization control method based on multi-source data fusion and deep learning

    CN121040281A