A method and system for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution.
By combining multispectral temporal features with dynamic convolutional networks, the accuracy and generalization problems of UAV remote sensing technology in crop nitrogen content monitoring are solved, realizing efficient and interpretable nitrogen diagnosis and cross-modal adaptation, supporting precision nutrient control in smart agriculture.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF AGRI RESOURCES & ENVIRONMENT HEBEI ACADEMY OF AGRI & FORESTRY SCI
- Filing Date
- 2026-01-23
- Publication Date
- 2026-07-17
AI Technical Summary
Existing UAV remote sensing technology for monitoring crop nitrogen content suffers from several limitations. Model accuracy is greatly affected by soil background, canopy coverage, and environmental differences. It also lacks generalization ability across control modes, making it difficult to achieve timely and accurate nitrogen diagnosis.
By employing multispectral temporal features and dynamic convolution, multispectral images are acquired by UAVs, spectral and texture features are extracted, and a dynamic convolutional prototype network is used for nitrogen state diagnosis to achieve cross-control mode migration and adaptation.
It improves the accuracy and robustness of nitrogen diagnosis, has the ability to migrate across control modes, supports dynamic decision-making, and achieves efficient and interpretable nitrogen monitoring.
Smart Images

Figure CN121640100B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the interdisciplinary field of smart agriculture and information technology, specifically relating to a method and system for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution. Background Technology
[0002] Plant nitrogen content is one of the most critical physiological indicators for characterizing crop nitrogen nutrition status and guiding precise nitrogen application decisions in the field. Achieving rapid and accurate monitoring of this content is of great significance for improving nitrogen fertilizer use efficiency, reducing environmental pollution, and ensuring crop yield and quality.
[0003] Traditional methods for determining plant nitrogen content mainly rely on destructive field sampling followed by laboratory chemical analysis, such as the Kjeldahl method. While this method offers high accuracy, it has significant drawbacks: the sampling process is destructive, making continuous observation of the same plant impossible; the process is time-consuming, labor-intensive, and costly; and it only provides data from discrete points, failing to reflect the spatial heterogeneity within the field and thus unable to meet the demands of modern smart agriculture for large-scale, high-timeliness monitoring.
[0004] In recent years, with the development of remote sensing technology, especially the widespread use of unmanned aerial vehicle (UAV) remote sensing platforms, a new technical approach has been provided for the non-destructive and rapid monitoring of crop nitrogen content. Existing technologies typically utilize UAVs equipped with multispectral or hyperspectral sensors to acquire canopy images. A statistical regression model is then established between nitrogen-sensitive spectral vegetation indices and ground-measured nitrogen content to achieve inversion. However, this single technical approach based on spectral characteristics faces a series of bottlenecks in practical applications: First, spectral reflectance information is easily affected by factors such as soil background, canopy coverage, solar illumination angle, and atmospheric conditions, especially in the early stages of crop growth or under sparse canopies, where model accuracy significantly decreases. Second, when crops enter their vigorous growth period and the canopy becomes denser, many broadband vegetation indices are prone to "saturation," reducing their sensitivity to further changes in nitrogen content and leading to prediction failure. More importantly, most existing models are constructed under specific field control practices, and their model parameters and feature relationships are highly dependent on the environment in which the training data is located. When attempting to directly apply a trained model to a field under a different control mode, the model's predictive performance often deteriorates significantly due to differences in canopy structure, growth dynamics, and stress response, indicating a severe lack of generalization ability across control modes.
[0005] Therefore, there is currently a lack of a plant nitrogen content diagnostic method that can effectively integrate multi-dimensional information, overcome the limitations of single-spectral methods, and possess strong adaptability and transferability across control modes. This has become one of the core obstacles restricting the large-scale and routine application of UAV remote sensing technology in actual agricultural production. Summary of the Invention
[0006] To address the aforementioned technical issues, this application provides a method and system for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution.
[0007] The specific details of the invention are as follows:
[0008] A method for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution includes the following steps:
[0009] S1: Multi-temporal image acquisition and preprocessing: During at least two consecutive key growth periods of crops, a multispectral camera mounted on a drone is used to acquire temporal multispectral image sequences of farmland at preset time intervals; the image sequences are preprocessed by radiometric calibration, stitching, orthorectification and growth period alignment to generate surface reflectance images at each sampling time point;
[0010] S2: Multi-dimensional temporal feature extraction: For each sampling time point, extract spectral and texture features from its reflectance image within a preset region of interest; the spectral features include reflectance in multiple bands and vegetation index, and the texture features are calculated based on the spatial relationship of image pixels;
[0011] S3: Temporal feature evolution coding: Features extracted from the same region of interest at different time points are arranged in chronological order to form the multispectral temporal feature trajectory of the region;
[0012] S4: Nitrogen state diagnosis based on dynamic convolutional prototype network: The multispectral temporal feature trajectory is input into the dynamic convolutional prototype network. The network learns and generates dynamic prototype feature trajectories corresponding to different nitrogen states through trajectory convolution and prototype alignment algorithm. By calculating the matching degree between the input trajectory and each prototype, the diagnosis result of crop nitrogen content state and its confidence level are output.
[0013] S5: Diagnostic Result Generation and Transfer: Using a trained dynamic convolutional prototype network, the temporal image of the region to be diagnosed is processed to generate a spatial distribution map of its nitrogen content state; the network has the ability to transfer and adapt the state prototype learned in one control mode to another control mode.
[0014] Preferably, the core of the dynamic convolutional prototype network described in step S4 lies in using a trajectory convolution and prototype alignment algorithm for processing. The execution process of this algorithm includes:
[0015] S41: Trajectory Convolution: Using a set of learnable one-dimensional convolution kernels to perform sliding convolution operations on the input temporal feature trajectory, aiming to capture the local evolution patterns and key turning points of features in the time dimension, and output the deep temporal feature trajectory after convolution.
[0016] S42: Dynamic Prototype Generation: The network maintains a basic prototype vector for each preset nitrogen state category; when processing the input trajectory, the algorithm dynamically generates a set of offsets based on the global context information of the input trajectory, which are used to fine-tune the basic prototype vector, thereby generating a dynamic prototype that is more compatible with the current input.
[0017] S43: Distance Measurement and Alignment: Calculate the feature space distance between the deep feature representation of the input trajectory and the dynamic prototype of each class; the network optimizes the objective function to simultaneously reduce the distance between the trajectory of the same class and its corresponding dynamic prototype, and increase the distance between the trajectory of different classes, thereby achieving accurate classification.
[0018] Preferably, in step S42, the dynamic prototype generation process is as follows: a lightweight context-aware sub-network is designed, which takes the statistics of the deep temporal feature trajectory in step S41 or the features of the selected time point as input, and outputs the offset vector of each basic prototype to achieve dynamic adjustment of the input dependency of the prototype.
[0019] Preferably, in step S2, the texture features are extracted based on the gray-level co-occurrence matrix or local binary pattern method.
[0020] Preferably, after completing step S3 and before starting step S4, a feature selection step is also included: using variance analysis or mutual information methods based on time-series trajectories to screen out features that are sensitive to changes in nitrogen state over time, for use in constructing time-series feature trajectories.
[0021] Preferably, the crop nitrogen content status includes three categories: "deficient", "suitable", and "excessive", which are classification labels determined comprehensively based on the measured value of plant nitrogen content, SPAD reading of leaf color value and canopy growth image characteristics.
[0022] Preferably, the network's transferability is achieved by fixing the parameters of its trajectory convolution part when applying the network to a new control mode, and using only the labeled samples of the new mode to fine-tune the basic prototype vector in the dynamic prototype generation module.
[0023] A system for diagnosing crop nitrogen content, implementing the method described in any one of the above, comprising:
[0024] The temporal image acquisition and control module is used to plan and execute multiple UAV flight missions and to preprocess and align the images.
[0025] The temporal feature trajectory construction module is used to extract the spectral and texture features of images from each period and combine them into temporal feature trajectories;
[0026] The dynamic convolutional prototype network diagnostic module has the dynamic convolutional prototype network model built in, which is used to analyze the input temporal feature trajectory and output the nitrogen state diagnostic results.
[0027] The visualization and decision support module is used to generate diagnostic reports, status distribution maps, and zoning and phased fertilization recommendations.
[0028] Preferably, the diagnostic module supports incremental learning and prototype fine-tuning.
[0029] Preferably, it also includes a prototype visualization unit for visualizing prototype feature trajectories of different nitrogen states.
[0030] The benefits of this invention are that it systematically solves the three core bottlenecks of traditional remote sensing nitrogen diagnosis methods: static nature, low interpretability, and weak generalization ability. Specifically, the technical solution leaps from single-temporal static analysis to multi-temporal dynamic tracking. By constructing multispectral temporal characteristic trajectories of key crop growth stages, it is the first to treat the continuous evolution of nitrogen stress, rather than isolated states, as the diagnostic object, fundamentally improving the ability to characterize the dynamic laws of crop nitrogen nutrition. The proposed dynamic convolutional prototype network algorithm is the core driver of this progress. Its trajectory convolution module is specifically designed to extract local evolution patterns and key phenological turning points in the temporal trajectory, and can automatically identify sensitive stages such as the rapid nitrogen demand during the jointing stage, breaking through the dependence of traditional methods on global statistical features. Even more groundbreaking is its dynamic prototype mechanism, which learns and visualizes typical temporal trajectory prototypes of different nitrogen states, providing an intuitive physical explanation of diagnostic conclusions that aligns with agronomic knowledge, achieving a crucial leap from a "black box" to a "white box" model. Furthermore, this architecture innovatively decouples the basic prototype from dynamic offsets, enabling the model to rapidly fine-tune the prototype using only a small number of samples from the target region to adapt to specific local varieties or control practices. This inherently provides powerful cross-control mode transfer capabilities at the algorithm level, completely overcoming the performance drop problem caused by environmental differences in traditional models. Ultimately, this technology not only achieves higher accuracy and more robust nitrogen surplus / deficit diagnosis but also provides an interpretable, transferable, and dynamic decision-making-supporting complete technical paradigm, offering a systematic solution from theory to practice for precision nutrient control in smart agriculture. Attached Figure Description
[0031] Figure 1 : Overall flowchart of crop nitrogen diagnosis technology based on temporal UAV imagery and dynamic prototype network;
[0032] Figure 2 : Aerial view illustration Figure 1 ;
[0033] Figure 3 : Aerial view illustration Figure 2 ;
[0034] Figure 4 Detailed diagram of the core architecture of the dynamic convolutional prototype network;
[0035] Figure 5 System composition and prototype decision visualization diagram;
[0036] Figure 6 : Comprehensive diagram of the model's diagnostic performance in the source domain (FP mode);
[0037] Figure 7 Performance space comparison chart of model transfer to the target domain (EI mode);
[0038] Figure 8 Comparison of multispectral temporal characteristic trajectories of typical units in different management zones;
[0039] Figure 9 Schematic diagram of the differences in nitrogen dynamic trajectory under different control modes;
[0040] Figure 10 : Schematic diagram of variable fertilization decision-making and execution closed loop;
[0041] Figure 11 Comparison chart of the benefits of traditional uniform fertilization and the zoned management scheme of this invention. Detailed Implementation
[0042] The following embodiments illustrate the present invention in detail. All raw materials and equipment used in the present invention are commercially available products and can be directly obtained through market purchase.
[0043] The present application will be further described in detail below with reference to embodiments, comparative examples and performance test results. These embodiments should not be construed as limiting the scope of protection claimed in this application.
[0044] In the following description of the embodiments, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.
[0045] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0046] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0047] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0048] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0049] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0050] Example 1
[0051] Reference Appendix Figure 1 Technical process
[0052] Step S1: Multi-temporal image acquisition and preprocessing
[0053] The purpose of this step is to acquire high-quality, spatiotemporally aligned crop growth sequence image data.
[0054] Reference Appendix Figure 2 and 3 Data acquisition: During at least two consecutive key growth stages of the target crop, such as the jointing stage, heading stage, and grain-filling stage, drones equipped with multispectral cameras are used to take aerial photos at preset, fixed time intervals to acquire a temporal multispectral image sequence covering the entire farmland area.
[0055] Preprocessing flow:
[0056] 1. Radiometric calibration: Converting the raw DN values recorded by the camera into physically meaningful surface reflectance, eliminating the influence of the sensor itself. The formula can be expressed as:
[0057]
[0058] in, For band reflectivity, and This is the calibration coefficient for this band.
[0059] 2. Stitching and Orthorectification: Multiple images acquired in a single flight are stitched together into a complete orthophoto image to eliminate geometric distortions caused by terrain and camera perspective.
[0060] 3. Alignment of growth period: Since there may be slight differences in the phenological process of crops in different fields or years, it is necessary to align the image sequences collected in different years or fields to a unified "relative growth period" time axis based on information such as phenological period or accumulated temperature to ensure the consistency of time series analysis.
[0061] Step S2: Multi-dimensional temporal feature extraction
[0062] For the reflectance images at each preprocessed time point, two types of features are extracted within the predefined region of interest (ROI, typically a single tree or plot canopy):
[0063] Spectral characteristics:
[0064] Band reflectance: Directly extract the reflectance values of each band of the multispectral camera, such as blue, green, red, red edge, and near-infrared.
[0065] Vegetation index: Calculated through band combination, used to enhance or capture specific biophysical and chemical properties.
[0066] Normalized Difference Vegetation Index:
[0067] Optimize soil to regulate vegetation index:
[0068] Red-edged chlorophyll index:
[0069] Texture features: Calculated based on the spatial relationships of image pixels, reflecting the roughness and uniformity of the canopy structure. Based on the gray-level co-occurrence matrix (GLCM), it can be calculated as follows:
[0070] Contrast:
[0071] Correlation:
[0072] entropy:
[0073] in, Pixel pairs in GLCM The probability of occurrence and These are the mean and standard deviation, respectively.
[0074] S2.1: Feature Optimization and Dimensionality Reduction
[0075] To select the most nitrogen-responsive and low-redundancy key feature subset from the extracted high-dimensional multi-source features, thereby improving model efficiency, preventing overfitting, and enhancing interpretability, this invention employs a two-step feature optimization and dimensionality reduction strategy. The specific implementation steps of this strategy are as follows:
[0076] Step 1: Initial Dimensionality Reduction and Feature Transformation Based on Principal Component Analysis (PCA)
[0077] Data standardization: Standardize all the initial features extracted in step S2 to eliminate the influence of dimensions.
[0078] Principal Component Extraction: Principal Component Analysis (PCA) is performed on the standardized feature matrix. The top M principal components (PCs) whose cumulative variance contribution exceeds a preset threshold are retained. These principal components are linear combinations of the original features and can represent most of the variation in the original data with minimal information loss.
[0079] Feature transformation: The original high-dimensional feature vector of each sample is projected onto these M principal components to obtain a new feature representation after dimensionality reduction, namely the principal component scores (PCScores). This set of scores constitutes an information-condensed, low-redundancy "primary fusion feature set".
[0080] Step 2: Key Feature Selection Based on Machine Learning Feature Importance
[0081] Model Training and Importance Assessment: Using the principal component scores obtained in the first step as input and the measured plant nitrogen content as output, a random forest regression model is trained. The built-in feature importance assessment function of the random forest is used to calculate the relative importance of each principal component for predicting nitrogen content.
[0082] Key feature subset determination: Based on importance ranking, the top N principal components with the highest importance scores (example: the first 6-10) are selected to form the final "optimized feature subset". These principal components represent the comprehensive patterns of spectral, textural, and interaction effects that most effectively drive changes in nitrogen content.
[0083] Inverse mapping and physical interpretation: To further clarify the contribution of the original features, the loading matrices of these N key principal components can be analyzed. Original features with large absolute loading values indicate a significant contribution to the formation of that principal component, and are therefore also key original features sensitive to nitrogen. Example: The analysis results might show that "the first principal component is mainly dominated by red-edge band reflectance and red-edge vegetation index," which provides a basis for agronomic interpretation.
[0084] Step S3: Temporal Feature Evolution Coding
[0085] The same ROI at all time points The features extracted above are assumed to be common. The dimensions are arranged in chronological order to form a temporal feature trajectory matrix. .
[0086]
[0087] In this matrix, rows represent time points, and columns represent feature dimensions. This matrix is the core input for subsequent deep learning models.
[0088] Step S4: Refer to Appendix Figure 4 Nitrogen State Diagnosis Based on Dynamic Convolutional Prototype Network
[0089] This is the core innovative module of this solution. The model aims to learn a mapping function. Mapping temporal feature trajectories to nitrogen state label space The parameters can be found in Table 1.
[0090] Table 1: Core Configuration Parameters of Dynamic Convolutional Prototype Network
[0091]
[0092] S41: Trajectory Convolution
[0093] Using a set of learnable one-dimensional convolutional kernels , The kernel size is [size]. The number of output channels corresponds to the number of input channels. Perform convolution operations in the time dimension to capture the local evolution patterns of features.
[0094] For the Each output channel in time eigenvalues The calculation is as follows:
[0095]
[0096] in, It is a non-linear activation function. This is the bias term. The output is the deep temporal feature trajectory. .
[0097] S42: Dynamic Prototype Generation
[0098] 1. Basic Prototype: The network is for each nitrogen state category Maintain a learnable basic prototype vector .
[0099] 2. Context Awareness and Dynamic Offset: Design a lightweight sub-network (such as a multilayer perceptron, MLP) as the context perceptron. It uses deep feature trajectories... Global pooling characteristics: mean over time. As input.
[0100]
[0101] in, The parameter is A context-aware network that, for each category Generate a specific offset .
[0102] 3. Dynamic Prototype: Add an offset to the base prototype to obtain a dynamic prototype that is related to the current input context.
[0103]
[0104] in, It is a scaling factor that controls the adjustment range. This allows the prototype to adaptively fine-tune based on the overall features of the input samples, making it more flexible.
[0105] S43: Distance Measurement and Alignment
[0106] 1. Input representation: Similarly, for deep feature trajectories Perform global average pooling to obtain the global feature representation of the input sample. .
[0107] 2. Distance Calculation: Calculate the representation of the input sample. With dynamic prototypes for each category The distance between them. Usually, the square of the Euclidean distance is used:
[0108]
[0109] 3. Classification and Training: The distance is converted into the probability of belonging to each class using the softmax function.
[0110]
[0111] The network's training objective function is to minimize the negative log-likelihood loss.
[0112]
[0113] Through backpropagation, this objective function simultaneously drives:
[0114] Trajectory convolutional layers learn effective temporal patterns.
[0115] Dynamic prototype generation networks learn how to adjust prototypes appropriately based on context.
[0116] The basic prototype vectors converge toward the feature centers of similar samples and separate from other class prototypes.
[0117] Step S5: Refer to Appendix Figure 5 Diagnostic result generation and migration
[0118] Result generation: After processing the time-series images of the farmland to be diagnosed through S1-S3, the images are input into the trained model, which outputs the nitrogen state category and confidence level for each spatial cell. This leads to the generation of a state-space distribution map of nitrogen content across the entire region.
[0119] Model transfer: When applying a model to new control modes, such as different varieties or fertilization regimes:
[0120] 1. Freeze the parameters of the trajectory convolution.
[0121] 2. Using only a small number of labeled samples under the new model, fine-tune the base prototype vectors for each state category. and context-aware networks The parameters enable the model to quickly adapt to the feature distribution center under the new model, achieving low-cost and high-efficiency cross-domain transfer.
[0122] S6: To quantitatively verify the superiority of this invention (denoted as Method-Ours) over existing methods, we designed the following three sets of control experiments, all of which were conducted on the same test set:
[0123] Comparison Method 1 (Baseline-Spectral): Random Forest Model Based on Single-Phase Spectral Features. This represents the most widely used existing technique. The random forest model is trained using only five original band reflectance values and five commonly used vegetation indices (NDVI, GNDVI, RVI, OSAVI, CIrededge) during the jointing stage (critical growth period).
[0124] Comparison Method 2 (Baseline-Static): A network based on multi-temporal features but using a static prototype. It uses the same temporal feature trajectories as in this invention as input, but replaces the "dynamic prototype generation module" in DCPN with a static learnable prototype (i.e., a context-aware network, prototype). (This is fixed). This comparison is used to verify the effectiveness of the "dynamic prototype" mechanism.
[0125] Methods: The complete method of this invention. The temporal feature trajectories optimized by S2.1 are input into the complete DCPN model configured in Table 1. Quantitative comparison results on the winter wheat dataset are shown in Table 2.
[0126] Table 2 Comparison Results Data Table
[0127]
[0128] Results analysis:
[0129] Accuracy Improvement: This invention (Method-Ours) improves core prediction metrics. It significantly outperformed both control methods in terms of RMSE and overall performance. Compared to the baseline method using only single-phase spectra, This represents a 28.7% improvement and a 74.2% reduction in RMSE. This demonstrates the significant advantages of combining multi-temporal feature fusion with advanced network architecture.
[0130] Architectural effectiveness: Method-Ours is superior to Baseline-Static ( (The improvement of 9.0%) proves that the dynamic prototype generation mechanism can adjust the category center according to the specific input, which is more flexible and discriminative than the static prototype.
[0131] Generalization ability: In cross-control mode transfer tasks (from FP to EI), the method of this invention maintains a high accuracy of 92.1% with only minimal fine-tuning, far exceeding the control methods. This highlights the powerful feature learning and domain adaptation capabilities of the DCPN model (especially its prototype representation).
[0132] Example 2
[0133] Using wheat as an example, this invention focuses on demonstrating the dynamic diagnosis and transfer capabilities of its method across different field management practices.
[0134] S1: Time-series image acquisition and preprocessing.
[0135] The experiment was conducted in a winter wheat-growing area of the North China Plain during the 2023-2024 crop year, targeting two typical control models:
[0136] Farmer practice model field (FP model): adopts local conventional high-yield management, with a total nitrogen application rate of 260. It is applied in three stages: base fertilizer, top dressing for greening, and top dressing for jointing.
[0137] Ecologically intensive farming model (EI model): adopts nitrogen reduction and efficiency enhancement management, with a total nitrogen application rate of 190. Inhibitors were applied, and irrigation regimes were adjusted.
[0138] In both types of fields, simultaneous aerial photography was conducted using a DJI P4 Multispectral drone (using the same waveband as in Example 1) at the greening stage (March 20), jointing stage (April 15), heading stage (May 1), and mid-grain filling stage (May 20). The flight altitude was uniformly 60 meters, with a ground resolution of 4.2 cm. After processing with professional software, high-precision reflectivity orthophotos were generated, and precise alignment of multiple images and spatial positions between different fields was ensured through the deployment of GCPs.
[0139] S2 and S3: Multi-dimensional temporal feature extraction and encoding.
[0140] Within each control mode, 30 representative monitoring points (60 points in total) were selected as ROIs. Spectral and textural features similar to those in Example 1 were extracted and calculated to construct a [4, feature number] temporal feature trajectory for each monitoring point. Particular attention was paid to the dynamic changes in the Red Edge Position Index (REIP) and Canopy Chlorophyll Index (CCC), which are sensitive to nitrogen management responses.
[0141] S4: Nitrogen state diagnosis and model training based on dynamic convolutional prototype networks.
[0142] Training data: See attached document Figure 6 Complete time-series data (a total of 120 time-series samples) from 30 monitoring points across all FP model fields, along with corresponding measured leaf nitrogen content values at key growth stages (jointing and heading), were used as labels to train a dynamic convolutional prototype network. The network structure was similar to that in Example 1, with three prototype categories: "deficient," "critical," and "suitable."
[0143] Model performance: The trained model performs well on the independent validation set in FP mode.
[0144] The model's diagnostic results (categories) showed high consistency with the measured nitrogen nutrient status, with an overall accuracy of 94.2% and a Kappa coefficient of 0.89. The model-predicted leaf nitrogen content values matched the measured values. It reached 0.95.
[0145] S5: Reference Appendix Figure 7 and 8 Cross-control mode migration diagnostic applications.
[0146] Core verification: The DCPN model fully trained with FP-mode data as described above is directly applied to 30 monitoring points of EI-mode fields that were not involved in the training.
[0147] Direct transfer performance: Without any structural adjustment, the overall diagnostic accuracy of the model for EI-mode fields is 84.1%. This is significantly better than traditional models (usually below 70%), demonstrating the basic generalization ability of the architecture of the present invention.
[0148] Efficient fine-tuning transfer: To further improve performance, the transfer strategy proposed in the present invention is adopted. The parameters of the trajectory convolution module of DCPN are frozen, and only the time-series data and their labels of 5 randomly selected monitoring points (accounting for about 16.7%) in the EI-mode fields are used to fine-tune the basic prototype vectors of the three categories (learning rate 0.0005, 10 iterations).
[0149] Performance after fine-tuning: After fine-tuning with a very small number of samples, the diagnostic accuracy of the model on the remaining 25 EI-mode monitoring points is quickly improved to 91.5%. A comparison of the spatial distribution maps of the diagnostic results of the heading-stage nitrogen status of EI-mode fields before and after model transfer is shown. It can be seen that the model after fine-tuning can more accurately identify the local nitrogen critical regions caused by the differences in water-nitrogen coupling under the EI mode.
[0150] Example 3
[0151] Based on the diagnostic results of Example 2, a closed-loop of precise decision-making and execution is demonstrated.
[0152] S1 - S4: The same as in Example 2, obtain the nitrogen balance diagnostic results of all fields in the target demonstration area at the heading stage (decision point). The results are output in 10m×10m grid cells, and each cell contains the status category and the Euclidean distance (normalized to a confidence index, CI, ranging from 0 to 1) from the "suitable prototype".
[0153] S5: Refer to Appendix Figure 9 and 10 , generate a decision prescription map and integrate the system.
[0154] 1. Decision-making logic: The built-in decision rule library in the system triggers different operations according to the status and confidence:
[0155] Nitrogen deficiency (CI > 0.7): Recommended topdressing amount . Where is the normalized distance value (0.7 corresponds to 0, 1.0 corresponds to 1). Example: For a certain cell with CI = 0.85, the calculated topdressing amount = (0.540 + 20) = 40 .
[0156] Nitrogen deficiency (0.5 < CI ≤ 0.7): Recommended topdressing amount .
[0157] Adequate nitrogen: Recommended intake .
[0158] Excess nitrogen: A red alert is generated. The farm also sends agricultural tips such as "Pay attention to controlling excessive growth and preventing diseases" to the farm's control app.
[0159] 2. Prescription diagram generation: The system generates a variable topdressing prescription diagram in GeoTIFF format, with each pixel value corresponding to the recommended amount of fertilizer.
[0160] 3. Integrated Execution: The prescription map is uploaded to the "Smart Agriculture Cloud" platform deployed on the farm via wireless network and then distributed to tractors equipped with Beidou navigation automatic driving system and hydraulic variable fertilizer system. Operational data from 2023 shows that compared with traditional uniform fertilization, the application of this decision-making system in the demonstration area achieved a 12.7% reduction in nitrogen fertilizer application, while the average yield of rice increased by 3.2%, and nitrogen fertilizer partial productivity increased by 18.1%.
[0161] Example 4
[0162] This invention demonstrates how it enables efficient and accurate diagnosis and generates executable zoning management schemes in large-scale, topographically complex, and poorly managed winter wheat producing areas, highlighting the practicality and scalability of the technology.
[0163] S1: Time-series image acquisition and preprocessing.
[0164] This study was conducted on a large-scale family farm in the dryland rainfed region of the Loess Plateau in Northwest China. The farm covers approximately 85 hectares, with significant topographic relief (an elevation difference of about 60 meters) and scattered plots. During the 2023-2024 crop year, aerial photography was conducted at three growth stages that best reflect the nitrogen limitation and recovery capacity of dryland wheat: the overwintering period (December 10th, assessing basic soil fertility), the greening-tillering period (March 25th, diagnosing early spring nitrogen stress), and the flowering period (May 5th, assessing late-season nitrogen supply). A DJI Mavic 3M multispectral drone was used, employing terrain-following flight capabilities to accommodate the topographic relief. The relative flight altitude was set at 50 meters to ensure consistent ground resolution (approximately 3.5 cm). To address the issue of large-area coverage, multiple flight routes were planned, with a total flight time of approximately 2.5 hours. After image processing, orthophotos with topographic correction were generated. Specifically, the generated digital surface model (DSM) was used to calculate the topographic moisture index (TWI) as an auxiliary environmental feature.
[0165] S2 and S3: Multi-dimensional temporal feature extraction and encoding.
[0166] To accommodate large-scale analysis, the entire farm was divided into 15m x 15m management units (approximately 3780 units) as ROIs. Spectral characteristics (focusing on the moisture sensitivity index MSAVI and nitrogen sensitivity index NDRE) and textural features of each unit at different stages were extracted. Considering phenological differences caused by topography, the effective accumulated temperature (GDD) during the growing season was introduced as a time axis. Features were interpolated to align all units to three standard physiological time points: GDD=800 (greening), GDD=1200 (development), and GDD=1800 (flowering), thus eliminating the impact of uneven development caused by slope aspect and altitude.
[0167] S4: Nitrogen state diagnosis and zoning based on prototype networks.
[0168] Diagnostic model application: The DCPN model trained in the plain area (Example 1) will be directly applied to the aligned time-series feature data of this farm. The model outputs the nitrogen state evolution trajectory from overwintering to flowering and the final diagnostic category for each 15m cell.
[0169] Diagnostic Results and Zoning: The diagnostic results showed significant spatial heterogeneity of nitrogen in the farm. Based on the diagnostic results at the flowering stage and the trajectory morphology throughout the entire growth period, the farm was divided into four management zones:
[0170] Persistent nitrogen deficiency zone (accounting for 18% of the area): Nitrogen levels are low throughout the growing season, mainly distributed in barren plots at the top of slopes.
[0171] Early spring stress-late recovery zone (accounting for 35% of the area): lack of greening period, but the flowering period becomes suitable, overlapping with the medium slope and areas with better water and fertilizer retention.
[0172] Continuously suitable zone (accounting for 32% of the area): Nitrogen supply is good throughout the growing season, distributed in fertile plots at the bottom of the gully.
[0173] Potential excess zone (15% of the area): Excessive nitrogen levels during overwintering and greening periods, mainly located near farmyard manure storage areas.
[0174] Performance validation: Fifty validation points were evenly selected within the farm, and the nitrogen content of plants during the flowering period was measured. The overall consistency between the model diagnostic results and the measured classifications reached 87.6%. Figure 2 The study presents a comparison of the characteristic time-series trajectories of typical units in the "early spring stress-late recovery zone" and the "persistent lack zone," clearly reflecting the different dynamic patterns of the two types of problems.
[0175] S5: Reference Appendix Figure 11 Prescription generation and benefit analysis for tiered management.
[0176] Based on the zoning results, the farm decision-making system generates differentiated topdressing management prescriptions:
[0177] For areas with persistent nitrogen deficiency: a higher recommended nitrogen application rate (45g) is suggested during the greening period. It is recommended to apply more organic fertilizer to improve the soil during autumn sowing.
[0178] Early spring stress - late recovery period: It is recommended to apply mild to moderate topdressing (25g) during the greening period. This is to meet the needs of the critical nitrogen demand period.
[0179] Suitable for continuous growth: Topdressing with nitrogen fertilizer is not recommended.
[0180] Potential over-fertilization zone: Topdressing is not recommended, and this zone should be marked as requiring attention to the risk of lodging and disease in the later stages.
[0181] Based on the actual implementation by the farm, 35% of the total amount of fertilizer was applied uniformly across the entire farm in previous years. In comparison, in 2024, despite a 22% reduction in total topdressing nitrogen, the average yield across the entire farm remained stable, and nitrogen fertilizer partial productivity (PFPN) increased by 28%. More importantly, by identifying and precisely managing the "persistent deficiency zone" and the "early spring stress zone," the yields in these two types of areas increased by 12% and 8% respectively compared to previous years, achieving the goal of reducing fertilizer use while maintaining stable and balanced yields.
[0182] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution, characterized in that, Includes the following steps: S1: Multi-temporal image acquisition and preprocessing: During at least two consecutive key growth periods of crops, a multispectral camera mounted on a drone is used to acquire temporal multispectral image sequences of farmland at preset time intervals; the image sequences are preprocessed by radiometric calibration, stitching, orthorectification and growth period alignment to generate surface reflectance images at each sampling time point; S2: Multi-dimensional temporal feature extraction: For each sampling time point, extract spectral and texture features from its reflectance image within a preset region of interest; the spectral features include reflectance in multiple bands and vegetation index, and the texture features are extracted based on gray-level co-occurrence matrix or local binary mode method; S3: Temporal feature evolution coding: Features extracted from the same region of interest at different time points are arranged in chronological order to form the multispectral temporal feature trajectory of the region; Feature selection steps: Using variance analysis or mutual information methods based on time-series trajectories, features that are sensitive to changes in nitrogen state over time are selected to construct time-series feature trajectories. S4: Nitrogen State Diagnosis Based on Dynamic Convolutional Prototype Network: The multispectral temporal feature trajectories are input into a dynamic convolutional prototype network, which learns an embedding space in which temporal feature trajectories of the same nitrogen state category are tightly clustered around the prototype vector of that category, while prototype vectors of different categories are far apart. Specifically, the network performs the following operations: S41: Trajectory Convolution: Using a set of learnable one-dimensional convolution kernels, a sliding convolution operation is performed on the input temporal feature trajectory to capture the local evolution pattern and key turning points of the features in the time dimension and output deep temporal feature trajectory. S42: Dynamic Prototype Generation: Maintain a learnable basic prototype vector for each preset nitrogen state category; Based on the global pooling features of deep temporal feature trajectories, dynamically generate a set of offsets through a lightweight context-aware sub-network to fine-tune the basic prototype vector and obtain a dynamic prototype that matches the current input. S43: Distance Measurement and Alignment: Calculate the feature space distance between the deep feature representation of the input trajectory and the dynamic prototype of each class. By optimizing the objective function, the distance between the trajectory of the same class and its corresponding dynamic prototype is reduced and the distance between the trajectory of different classes is increased, so as to realize the classification based on distance measurement and output the diagnostic results of crop nitrogen content status and its confidence level. S5: Diagnostic Result Generation and Transfer: Using the trained dynamic convolutional prototype network, the temporal image of the region to be diagnosed is processed to generate a spatial distribution map of its nitrogen content state; the network has the ability to transfer and adapt the state prototype learned in one control mode to another control mode; the network's transfer capability is achieved in the following way: when applying the network to a new control mode, the parameters of its trajectory convolution part are fixed, and only the labeled samples of the new mode are used to fine-tune the basic prototype vector in the dynamic prototype generation module.
2. The method for diagnosing crop nitrogen content based on multispectral temporal features and dynamic convolution according to claim 1, characterized in that, The crop nitrogen content status is classified into three categories: "deficient", "adequate", and "excessive". These classification labels are determined based on the measured nitrogen content of the plant, the SPAD reading of the leaf color value, and the characteristics of the canopy growth image.
3. A system for diagnosing crop nitrogen content, implementing the method as described in claim 1 or 2, characterized in that, include: The temporal image acquisition and control module is used to plan and execute multiple UAV flight missions and to preprocess and align the images. The temporal feature trajectory construction module is used to extract the spectral and texture features of images from each period and combine them into temporal feature trajectories; The dynamic convolutional prototype network diagnostic module has a built-in dynamic convolutional prototype network model, which is used to analyze the input temporal feature trajectory and output nitrogen state diagnostic results. The visualization and decision support module is used to generate diagnostic reports, status distribution maps, and zoning and phased fertilization recommendations.
4. The system for diagnosing crop nitrogen content according to claim 3, characterized in that, The diagnostic module supports incremental learning and prototype fine-tuning.
5. A system for diagnosing crop nitrogen content according to claim 3, characterized in that, It also includes a prototype visualization unit for visualizing prototype feature trajectories of different nitrogen states.