AI-based avocado nutrition diagnosis method and system

By integrating multi-source data using AI technology, an avocado nutrition diagnostic system was constructed, which solved the problems of low diagnostic accuracy and insufficient predictive ability in traditional methods. This enabled efficient nutrition management and decision support, and improved the scientific nature and interpretability of fertilization.

CN121938565APending Publication Date: 2026-04-28INST OF TROPICAL & SUBTROPICAL CASH CROP YUNNAN ACAD OF AGRI SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF TROPICAL & SUBTROPICAL CASH CROP YUNNAN ACAD OF AGRI SCI
Filing Date
2026-01-16
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional avocado nutrient management methods suffer from low diagnostic accuracy, significant lag, lack of spatiotemporal prediction capabilities, unscientific fertilization decisions, difficulty in integrating multi-source data, and a lack of interpretability and decision support.

Method used

By employing AI technology and fusing multi-source sensor data and multispectral image data, an intelligent nutrient deficiency identification model is constructed to perform spatiotemporal predictions, formulate intelligent fertilization decisions, and provide interpretable suggestions through a knowledge graph-driven decision support module.

Benefits of technology

It improves the accuracy of nutrient deficiency identification, enables precise prediction of short-term, medium-term, and long-term nutrient status, enhances fertilizer utilization efficiency, reduces fertilization costs, and improves the transparency of the decision-making process and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121938565A_ABST
    Figure CN121938565A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent agriculture and artificial intelligence, and discloses an AI-based avocado nutrition diagnosis method and system.The AI-based avocado nutrition diagnosis method comprises the steps that multi-source sensor data and multispectral image data of an avocado planting area of a farm are collected, and data preprocessing is carried out; carrying out nutrient deficiency intelligent identification; a space-time prediction model is constructed, and the future change trend of the nutrition state is predicted; analyzing nutrition state change reasons, and formulating and implementing a regulation and control strategy and optimizing the regulation and control strategy; constructing a decision support module driven by the knowledge graph and providing interpretable intelligent suggestions; carrying out system integration and real-time optimization; according to the invention, through the four-dimensional space-time prediction model technology based on the Transform architecture, accurate prediction of the future change trend of the nutrition state is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of smart agriculture and artificial intelligence technology, and more specifically, to an AI-based method and system for diagnosing the nutritional status of avocados. Background Technology

[0002] As a highly nutritious economic crop, avocados are experiencing a continuously growing global demand. However, traditional avocado nutrient management methods suffer from numerous technical problems, severely hindering the industry's development.

[0003] Currently, the diagnosis of avocado nutritional status mainly relies on manual experience and regular soil testing, which has the following technical shortcomings: The diagnostic accuracy is low and the delay is significant. Traditional methods mainly rely on observing leaf color changes and soil testing for nutrient diagnosis, which has a low accuracy rate. Moreover, by the time obvious nutrient deficiency symptoms appear in the leaves, the plant has already suffered irreversible damage, missing the best time for intervention. There is a lack of spatiotemporal prediction capabilities; current technologies cannot predict future trends in nutrient status, leading to a lack of foresight in fertilization decisions, often resulting in a reactive, piecemeal approach. Fertilization decisions lack scientific basis; traditional fertilization relies mainly on farmer experience or simple soil test results, failing to comprehensively consider multi-dimensional factors such as plant growth stages, environmental conditions, and historical data, resulting in low fertilizer utilization, high costs, and severe environmental pollution. Multi-source data fusion is difficult; existing systems cannot effectively integrate heterogeneous data from multiple sources such as soil sensor data, multispectral images, and meteorological information, resulting in severe information silos and making it difficult to form a comprehensive and accurate assessment of nutrient status. Finally, there is a lack of interpretability and decision support; the recommendations provided by existing technologies lack scientific basis and explanation, making them difficult for farmers to understand and trust, thus hindering the promotion and application of the technology.

[0004] Therefore, there is an urgent need for an avocado nutrition diagnostic system that can achieve multi-source data fusion, high-precision nutrient deficiency identification, spatiotemporal prediction modeling, and intelligent decision optimization, in order to solve key technical problems such as low diagnostic accuracy, lack of predictive ability, and unscientific fertilization decisions in traditional methods. Summary of the Invention

[0005] This invention provides an AI-based method and system for nutrient diagnosis of avocados, solving the technical problems of low diagnostic accuracy, lack of predictive ability, and unscientific fertilization decisions in traditional methods.

[0006] This invention provides an AI-based method for nutritional diagnosis of avocados, comprising: Multi-source sensor data and multispectral image data of the avocado planting area of ​​the farm were collected, and the data were preprocessed to obtain a standardized multi-source data stream. Intelligent identification of nutrient deficiencies is performed on standardized multi-source data streams to obtain nutrient deficiency probability vectors and confidence scores. A spatiotemporal prediction model is constructed based on the probability vector of nutritional deficiency and the confidence score to predict the future trend of nutritional status and obtain the nutritional status prediction results. Based on the nutritional status prediction results, the causes of nutritional status changes are analyzed, and control strategies are formulated, implemented, and optimized to obtain optimized real-time control strategies. Based on optimized real-time control strategies, a knowledge graph-driven decision support module is constructed and interpretable intelligent suggestions are provided, resulting in an interpretable decision support report. Based on interpretable decision support reports, system integration and real-time optimization are performed to obtain real-time optimized nutrition management plans and system performance evaluation reports.

[0007] In a preferred embodiment, the acquisition of multi-source sensor data and multispectral image data of the avocado growing area of ​​the farm includes: A multi-source sensor network was deployed in the avocado planting area of ​​the farm according to a preset grid pattern. Each grid node was equipped with a soil pH sensor, a soil EC sensor, a soil NPK sensor, a temperature and humidity sensor, and a GPS positioning module. Establish a multispectral image acquisition system, install a multispectral camera system, and configure 5 specific bands; Establish a timed automatic data acquisition mechanism and set the sensor data acquisition frequency and image acquisition frequency; Establish a quality control mechanism, use the three-standard-deviation criterion for outlier detection, and specify the range of data missing rate and outlier proportion.

[0008] In a preferred embodiment, the intelligent identification of nutrient deficiencies from standardized multi-source data streams specifically includes: An improved ResNet-50 residual network architecture was constructed, and an SE module was added after each residual block to optimize the channel attention mechanism. Design a multi-label classifier to simultaneously identify specified nutrient elements, and set classification threshold judgment rules; A multimodal feature fusion mechanism is established. The depth feature vector of RGB image is extracted by improving ResNet-50 residual network, and the spectral feature vector is calculated by vegetation index. A confidence scoring mechanism was established, comprising four dimensions: model prediction confidence, feature quality confidence, data quality confidence, and multimodal consistency confidence. The overall confidence score adopted a multi-dimensional weighted fusion strategy.

[0009] In a preferred embodiment, the prediction of future trends in nutritional status specifically includes: Construct a four-dimensional spatiotemporal prediction model and set the spatial resolution and time axis; Multi-scale time features are extracted from time series data. Periodic features are extracted using the trigonometric function encoding method, and trend features are decomposed using the Hodrick-Prescott filter. Construct a spatiotemporal prediction model based on the Transformer architecture, and design a multi-timescale prediction head to simultaneously output prediction results for short-term, medium-term, and long-term forecasts. Uncertainty estimation is performed, and during the inference phase, random deactivation is retained and forward propagation is repeated a preset number of times to generate confidence intervals.

[0010] In a preferred embodiment, the steps of analyzing the causes of changes in nutritional status, formulating and implementing control strategies, and optimizing specific aspects include: The PC algorithm is used to learn the causal structure, and the causal dependencies between variables are identified through the conditional independence test and the d-separation criterion. A multi-objective optimization model based on NSGA-II was established, taking into account three objectives: nutritional improvement effect, cost control and environmental impact. A reinforcement learning model based on a deep Q-network is constructed for dynamic fertilization decision-making, and an experience replay mechanism and a target network are introduced to stabilize the training process. Establish a time-series fertilization decision model based on Markov decision processes; The Shapley additive explanation method was used to analyze the contribution of each feature to fertilization decisions, and a decision explanation report was generated, including influencing factors, decision logic, and expected effects.

[0011] In a preferred embodiment, the construction of the knowledge graph-driven decision support module and the provision of interpretable intelligent suggestions specifically includes: Entity recognition uses BiLSTM-CRF, and relation extraction uses attention-driven relation classification, which includes the identification of causality, treatment, antagonism, and cooperation. Establish a knowledge graph for avocado nutrition management, with node types covering nutritional elements, symptoms, measures, environment and time, and edge types covering cause and effect, treatment, impact and time sequence; A semantic reasoning engine based on graph neural networks is implemented. The node representation learning adopts an attention mechanism, and the reasoning rules cover transitivity, compositionality, and temporality. To implement multi-hop path reasoning to explore deep associations, breadth-first search is used to expand outwards from the starting node. Construct a historical case retrieval and matching system, calculate environmental similarity, problem similarity, and solution similarity, and perform weighted synthesis according to preset weights to obtain the overall similarity. Develop intelligent query understanding and response, and use a pre-trained bidirectional encoder model for intent recognition and entity extraction.

[0012] In a preferred embodiment, the system integration and real-time optimization specifically include: To enable continuous learning and improvement of the model, and to form a closed loop based on user feedback; Establish a user feedback collection and processing mechanism; feedback analysis includes sentiment analysis and topic extraction. Establish a comprehensive system monitoring framework, with monitoring indicators including data quality indicators, model performance indicators, system resource indicators, and business indicators; Establish a multi-level caching system: L1 cache uses Redis to store hot data, L2 cache uses Memcached to store calculation results, and L3 cache uses local memory to store model parameters; forming a closed loop of evaluation-update-release-re-evaluation.

[0013] In a preferred embodiment, synchronizing the timestamps of the multi-source sensor network includes: Deploy a time synchronization server on the local network and periodically calibrate it with an international standard time server; Accurate three-dimensional coordinates are established for each sensor node and image acquisition point. The geographic coordinates are converted into planar coordinates using the UTM projection coordinate system. The entire planting area is divided into regular grids and the network specifications are defined. A unique identifier is assigned to each grid.

[0014] In a preferred embodiment, the classification threshold determination rule includes: When the probability of nutrient deficiency is greater than the first threshold, it is considered a severe deficiency; when the probability is between the second and first thresholds, it is considered a moderate deficiency; when the probability of nutrient deficiency is between the third and second thresholds, it is considered a mild deficiency; when the probability of nutrient deficiency is between the fourth and third thresholds, it is considered a borderline state; and when the probability of nutrient deficiency is less than the fourth threshold, it is considered an adequate state.

[0015] In a preferred embodiment, an AI-based avocado nutrition diagnosis system is used to perform the aforementioned AI-based avocado nutrition diagnosis method, comprising: The multi-source data acquisition module is used to collect multi-source sensor data and multispectral image data from the avocado planting area of ​​the farm, perform data preprocessing, and obtain a standardized multi-source data stream. The nutrient deficiency identification module is used to intelligently identify nutrient deficiencies in standardized multi-source data streams, and obtain nutrient deficiency probability vectors and confidence scores. The spatiotemporal prediction modeling module constructs a spatiotemporal prediction model based on the nutrient deficiency probability vector and confidence score to predict the future trend of nutrient status and obtain the nutrient status prediction results. The real-time control strategy module analyzes the causes of changes in nutritional status based on the nutritional status prediction results, formulates and optimizes control strategies, and obtains an optimized real-time control strategy. The decision support module, based on optimized real-time control strategies, constructs a knowledge graph-driven decision support module and provides interpretable intelligent suggestions, resulting in interpretable decision support reports. The system integration and optimization module, based on interpretable decision support reports, performs system integration and real-time optimization to obtain real-time optimized nutrition management plans and system performance evaluation reports.

[0016] The beneficial effects of this invention are as follows: by improving the multimodal feature fusion technology of ResNet-50 residual network combined with SE attention mechanism, the problems of low diagnostic accuracy and serious lag in traditional methods are solved, and the accuracy of nutrient deficiency identification is improved; by using a four-dimensional spatiotemporal prediction model based on Transformer architecture, the problem of lack of spatiotemporal prediction capability in existing technologies is solved, and comprehensive nutritional status prediction in the short, medium and long term is achieved, with improved prediction accuracy.

[0017] The intelligent decision-making technology, which combines NSGA-II multi-objective optimization with DQN reinforcement learning, solves the problem of lack of scientific basis for fertilization decisions, thereby improving fertilizer utilization efficiency and reducing fertilization costs. The real-time monitoring technology, which combines multi-source sensor networks with high-resolution image acquisition, solves the problem of difficulty in multi-source data fusion, and enables effective integration and real-time processing of heterogeneous data such as sensor data, multispectral images, and environmental parameters.

[0018] By using a knowledge graph-driven semantic reasoning engine and SHAP interpretability analysis technology, the problem of the lack of interpretability and decision support in existing technologies has been solved, realizing transparency in the decision-making process and user-friendly explanation output, thus improving user satisfaction. Through a cloud-edge collaborative distributed computing architecture and online learning mechanism, the system availability has been improved, response time has been reduced, and continuous optimization capabilities have been developed, providing important technical support for the digital transformation of modern agriculture. Attached Figure Description

[0019] Figure 1 This is a flowchart of an AI-based avocado nutritional diagnosis method according to the present invention; Figure 2 This is a block diagram of an AI-based avocado nutrition diagnostic system according to the present invention. Detailed Implementation

[0020] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.

[0021] At least one embodiment of the present invention discloses an AI-based method for nutritional diagnosis of avocados, such as... Figure 1 As shown, it includes: Step 1: Collect multi-source sensor data and multispectral image data from the avocado planting area of ​​the farm, perform data preprocessing, and obtain a standardized multi-source data stream; Step 1.1: Construct a multi-source data acquisition system and perform data standardization preprocessing. Data acquisition is conducted using a combination of multi-source sensor networks and high-resolution image acquisition, specifically as follows: A multi-source sensor network was deployed in a 1m×1m grid pattern within the avocado planting area of ​​the farm. Each grid node was equipped with a soil pH sensor, soil EC sensor, soil NPK sensor, temperature and humidity sensor, and GPS positioning module to monitor changes in soil physicochemical properties in real time and record the UTM coordinates of each sensor. Comprehensive data collection was achieved through this multi-source sensor network deployed throughout the avocado planting area. pH, soil electrical conductivity (EC), NPK, temperature, and relative humidity data were standardized to map them to the 0-1 range.

[0022] Step 1.2: Establish a multispectral and visible light image acquisition system. Establish a multispectral image acquisition system to obtain visual characteristic information of plants; install a multispectral camera system, configured with five specific wavelengths: blue light (475nm), green light (560nm), red light (668nm), red-edge (717nm), and near-infrared (840nm). The multispectral camera system employs automatic exposure control and white balance correction functions, and shooting times are avoided during periods of strong direct sunlight to reduce the impact of shadows and overexposure.

[0023] Simultaneously, a high-resolution RGB camera is configured to acquire visible light images, capturing detailed features of avocado leaves, fruits, and branches. The visible light image acquisition adopts a fixed shooting angle and distance, with the camera 1.5 to 2.0 meters away from the target plant and the shooting angle maintained at a 45-degree downward view. At the same time, the camera records metadata such as GPS coordinates, timestamps, weather conditions, and light intensity.

[0024] Step 1.3: Establish an automated data acquisition and data transmission mechanism. Sensor data acquisition frequency is set to once every 10 minutes, and image acquisition frequency is set to once every 2 hours, increasing to once per hour during critical growth periods (flowering and fruit development). Data transmission utilizes a combination of 4G / 5G wireless networks and LoRaWAN low-power wide area networks to ensure stable communication in remote farm environments. All data transmission processes employ end-to-end encryption. Local storage devices are configured as backups, allowing data acquisition and local storage to continue even when the network connection is interrupted, and automatic synchronization to the cloud server upon network recovery. A time synchronization system based on the NTP protocol is established to ensure all sensors use a unified timestamp, with data acquisition frequency set to once per minute to form time-series data. In conjunction with time synchronization, RTK-GPS differential positioning technology is used to establish precise 3D coordinates for each sensor node and image acquisition point. The spatial coordinate system adopts the UTM projected coordinate system, converting geographic coordinates into planar coordinates. The entire planting area is divided into regular grids, each 5m × 5m in size, with a unique identifier assigned to each grid.

[0025] Step 1.4: Establish a data quality control and outlier detection mechanism. The quality control mechanism includes sensor data quality control and image data quality control. Sensor data quality control includes outlier detection, data integrity checks, and sensor status monitoring; image data quality control includes image sharpness detection, exposure assessment, and color consistency checks. Outlier detection uses a three-standard-deviation criterion for identification, and quality control requires a data missing rate of less than 5% and an outlier ratio of less than 3%.

[0026] Step 1.5: Perform data standardization verification and image correction calibration. Statistical standardization verification and rescaling are performed on the preprocessed sensor values. Image data is corrected and calibrated to obtain a standardized multi-source data stream. Standardization verification, based on the preprocessed sensor data, calculates the overall average and standard deviation of various sensors, and performs Z-score standardization to make each feature center close to 0 and the fluctuation scale consistent. Image correction includes white balance correction to eliminate color deviation, geometric correction to reduce lens distortion, and radiometric calibration to convert the original digital signal into standardized radiance values.

[0027] Step 1.6: Construct a unified data storage and management system. A unified data storage and management system is established. Sensor data is stored in JSON format, containing information such as timestamps, location coordinates, and sensor values. Each record includes fields such as device ID, acquisition time, GPS coordinates, sensor type, measurement value, and data quality identifier, facilitating subsequent data querying and analysis. Image data is stored in GeoTIFF format, containing geographic coordinate information and spectral band data. Each image file embeds complete metadata information, including shooting parameters, geographic location, time information, and camera settings, ensuring the traceability and integrity of the image data.

[0028] Step 1.7: Establish a real-time reliable data transmission mechanism. A real-time data transmission mechanism based on the Message Queuing Telemetry Transport (MQTT) protocol is adopted to achieve reliable data transmission from sensor nodes in the avocado growing area of ​​the farm to the central database. During data transmission, the MQTT protocol is used to ensure reliable data transmission with an end-to-end latency of ≤30 seconds. Considering the network bandwidth limitations in the avocado growing area of ​​the farm, the system compresses the transmitted data using the LZ4 compression algorithm to reduce network transmission load while ensuring data integrity. The central database adopts a distributed architecture, supporting the storage and concurrent access of massive amounts of data. A data backup and recovery mechanism is also established to ensure data security and reliability.

[0029] This step outputs a standardized multi-source data stream, including sensor data, multispectral image data, spatial coordinate data, and timestamp sequences.

[0030] Step 2: Perform intelligent identification of nutrient deficiencies on the standardized multi-source data stream to obtain a nutrient deficiency probability vector and confidence score; Step 2.1: Perform depth preprocessing and data augmentation on the leaf images. Based on the standardized multi-source data stream provided in Step 1, the leaf RGB images are adjusted by bicubic interpolation to achieve a standardized size of 224×224 pixels, and the pixel values ​​are normalized and mapped to the 0-1 floating-point range. Data augmentation includes random rotation (±15°), horizontal flip (probability 0.5), and brightness adjustment (±20%) to improve the model's adaptability to different shooting conditions.

[0031] Step 2.2: Constructing an improved ResNet-50 network architecture with an integrated attention mechanism. Based on the complete data preparation of image size normalization and data augmentation, the system constructs an improved ResNet-50 residual network architecture specifically for nutrient deficiency identification. Addressing the feature extraction requirements of avocado leaf RGB images, the system constructs an improved ResNet-50 residual network architecture. This architecture solves the gradient vanishing problem in deep network training by introducing residual connections. The specific calculation logic is as follows: The input leaf image feature map is taken as the original input. The features are transformed through convolutional layers and activation functions to obtain the transformed features. The transformed features are then added element-wise to the original input to obtain the final output. This ensures that the improved ResNet-50 residual network architecture learns feature transformations rather than direct mappings, guaranteeing that gradients can propagate directly to shallower layers, thus supporting effective training of a 50-layer deep network without performance degradation.

[0032] To further enhance the ResNet-50 residual network's ability to capture subtle nutrient deficiency features in avocado leaves, a Squeeze-and-Excitation (SE) module is added after each residual block for channel attention mechanism optimization. The SE module performs adaptive recalibration based on the channel features of the leaf image. The Squeeze operation compresses the spatial dimension through global average pooling, while the Excitation operation learns the nonlinear interaction relationships between channels through two fully connected layers. This two-layer fully connected design can learn complex dependencies between channels while effectively controlling model complexity. The entire computation process involves the channel descriptor vector sequentially undergoing weight matrix transformation and ReLU activation in the first fully connected layer, followed by weight matrix transformation in the second fully connected layer, and finally outputting the importance weight of each channel through the Sigmoid activation function.

[0033] Specifically, adaptive recalibration recalibrates the original features through element-wise multiplication. The specific implementation method is as follows: the learned channel weights are broadcast multiplied with the original feature map, that is, the weight value of each channel is multiplied with the pixel value of each spatial location in the feature map of that channel, so as to reweight the entire channel features. The larger the weight value, the more important the channel is for nutrient deficiency identification, thereby enhancing useful features and suppressing irrelevant features. This improved ResNet-50 residual network plus attention combination architecture is specifically optimized for the feature representation of the nutrient status of avocado leaves.

[0034] Step 2.3: Design a multi-label classifier and configure an optimized training strategy. The improved ResNet-50 residual network has approximately 25.6M parameters, and the feature extraction layer output dimension is 2048. A multi-label classifier is designed, with 15 neurons in the output layer corresponding to 15 nutrients (nitrogen, phosphorus, potassium, calcium, magnesium, sulfur, iron, manganese, zinc, copper, boron, molybdenum, chlorine, nickel, and cobalt). A Sigmoid activation function is used to output probability scores between 0 and 1. The classification threshold is determined as follows: a probability greater than 0.7 indicates a deficiency state, 0.3 to 0.7 indicates a marginal state, and less than 0.3 indicates a sufficient state. A binary cross-entropy loss function and weighted loss are used to handle class imbalance. The optimizer uses the Adam algorithm with a learning rate of 0.001, a batch size of 32, 100 training epochs, and an early stopping patience value of 10 epochs.

[0035] Step 2.4: Extract vegetation indices from multispectral data to construct a spectral feature vector. While extracting features from RGB images, the system fully utilizes the advantages of multispectral data for spectral feature analysis, quantifying the physiological state of plants by calculating multiple vegetation indices. The system calculates conventional vegetation indices such as NDVI, SAVI, and EVI, as well as the GNDVI (Green Normalized Difference Vegetation Index), optimized for avocado nutrient diagnosis. The GNDVI calculation method is as follows: obtain the reflectance values ​​of the near-infrared and green light bands; subtract the green light band reflectance from the near-infrared band reflectance to obtain the numerator; add the green light band reflectance to the near-infrared band reflectance to obtain the denominator; and divide the numerator by the denominator to obtain the GNDVI value. The system extracts a total of 12 vegetation indices, forming a spectral feature vector with a dimension of 128.

[0036] Step 2.5: Establish a multimodal feature fusion model based on an attention mechanism. RGB images are used to extract 2048-dimensional depth feature vectors through an improved ResNet-50, and spectral data are used to calculate 128-dimensional spectral feature vectors through vegetation indices. After L2 normalization of the two feature vectors, they are mapped to a 512-dimensional unified feature space through a linear transformation.

[0037] An attention fusion mechanism is adopted, and the calculation of attention weights uses an adaptive weight allocation strategy. Specifically, the attention scores of RGB features and spectral features are calculated separately. The attention scores are obtained by performing matrix multiplication between the corresponding weight matrix and the projected feature vector. Then, an exponential function is applied to the two attention scores for nonlinear transformation. Next, the exponential value of the RGB feature is divided by the sum of the two exponential values ​​to obtain the attention weight of the RGB feature. The attention weight of the spectral feature is calculated by subtracting the attention weight of the RGB feature from one. This calculation method ensures that the sum of the two weights is equal to 1, thus realizing a normalized attention allocation mechanism.

[0038] The multimodal feature fusion mechanism employs a weighted summation strategy for feature calculation. Specifically, the attention weights of the RGB features are multiplied element-wise with the preprocessed RGB feature vector to obtain weighted RGB features. Similarly, the attention weights of the spectral features are multiplied element-wise with the preprocessed spectral feature vector to obtain weighted spectral features. The two weighted feature vectors are then summed element-wise to obtain the final fused feature vector. A fully connected layer reduces the dimensionality of the fused features to 512 dimensions to accommodate subsequent processing requirements. The importance of different modal features is adaptively adjusted, and weights are dynamically allocated based on the characteristics of the current input data, thereby improving the quality of feature representation and discriminative ability.

[0039] Step 2.6: Constructing the mapping from fused features to nutrient deficiency probabilities. After feature fusion, the system establishes a precise mapping relationship from fused features to nutrient deficiency states. The system constructs a mapping relationship between feature vectors and nutrient deficiency patterns, using training data to learn the mapping function, transforming the 512-dimensional fused feature vector into a 15-dimensional nutrient deficiency probability vector, with each dimension corresponding to the probability of deficiency of a nutrient element. Since the mapping function involves complex nonlinear transformations and multi-layer network structures, relevant parameters need to be preprocessed to ensure training stability and convergence. Batch normalization is performed on the input features. Specifically, the mean and variance of all sample features in the current batch are calculated, the batch mean is subtracted from the feature value of each sample, and then divided by the batch standard deviation plus a small value to avoid division by zero error. This normalization effectively accelerates network training and improves numerical stability.

[0040] The mapping function is implemented using a multilayer perceptron network structure to achieve nonlinear mapping. The 512-dimensional fused features are input into the first fully connected layer and reduced to 256 dimensions. The ReLU activation function is applied to introduce a nonlinear transformation. The second fully connected layer reduces the dimensions to 128 dimensions and applies ReLU activation again. The output layer is mapped to a 15-dimensional nutrient deficiency probability space and the Softmax function is applied to ensure that the sum of the output probabilities is 1. Throughout the process, Dropout regularization is used with a dropout rate of 0.5 to prevent overfitting.

[0041] The mapping network employs a layer-by-layer dimensionality reduction structure, decreasing the input dimension from 512 to 256, then to 128, ultimately outputting a 15-dimensional nutrient deficiency probability. Using ReLU activation and Dropout regularization, this mapping network can learn complex relationships between features and nutrients, achieving accurate conversion from visual features to nutrient status. A complete model inference process and a scientific threshold determination system are established. The inference process follows the sequence from input image to feature extraction, feature fusion, and probability prediction, ensuring data flow and processing quality at each stage. The threshold determination rules adopt a hierarchical evaluation system: a deficiency probability greater than 0.8 indicates a severe deficiency; between 0.7 and 0.8 indicates a moderate deficiency; between 0.5 and 0.7 indicates a mild deficiency; between 0.3 and 0.5 indicates a borderline state; and less than 0.3 indicates an adequate state. This hierarchical determination system provides precise nutrient management guidance and decision support for agricultural production.

[0042] Step 2.7: Establish a multi-dimensional confidence assessment model. A confidence scoring mechanism is established to evaluate the reliability of predictions and quantify the reliability of each prediction result. The confidence score calculation adopts a multi-factor comprehensive assessment method, including four dimensions: model prediction confidence, feature quality confidence, data quality confidence, and multimodal consistency confidence. The model prediction confidence is calculated by taking the maximum value of the probability of deficiency of a certain nutrient element minus one, effectively reflecting the degree of certainty in the model prediction. When the prediction probability is close to 0 or 1, the confidence is high, indicating strong certainty in the model prediction result; when the prediction probability is close to 0.5, the confidence is low, indicating uncertainty in the model prediction. The feature quality confidence is calculated by calculating the negative value of the variance of the feature vector and then taking the exponential function value to reflect the stability of the feature. The smaller the variance, the more stable the feature and the higher the confidence; the larger the variance, the greater the feature fluctuation and the lower the confidence. The confidence score for data quality is calculated by subtracting the missing data rate from 1, then multiplying by 1 and subtracting the noise level. This comprehensively considers two key factors: data integrity and quality. The lower the missing data rate and noise level, the higher the confidence score, indicating better data quality and more reliable prediction results. The confidence score for multimodal consistency is calculated by subtracting the absolute difference between the RGB mode prediction probability and the spectral mode prediction probability from 1. This reflects the degree of consistency between prediction results from different modes. The smaller the difference, the more consistent the prediction results from different data sources and the more reliable the prediction. The larger the difference, the more likely there is intermodal conflict that requires further verification.

[0043] The overall confidence score employs a multi-dimensional weighted fusion strategy: Before weighted fusion, standardized preprocessing is required to ensure the comparability of each indicator. Min-maximum normalization is performed on each confidence level, and the standardized overall confidence score is calculated. The model prediction confidence, feature quality confidence, data quality confidence, and multimodal consistency confidence are multiplied by their respective weight coefficients, and the four weighted values ​​are summed to obtain the overall confidence score. The weights are set to 0.4, 0.2, 0.2, and 0.2, respectively. The final confidence score ranges from 0 to 1, with higher values ​​indicating more reliable predictions.

[0044] Step 2.8: Integrate multi-source information to generate the current nutrient state vector. After completing nutrient deficiency identification and comprehensive confidence scoring, based on the standardized multi-source data stream from Step 1, for each 5m×5m grid at the current time t, calculate the contributions of direct sensor measurements (NPK and soil physicochemical index sufficiency mapping), spectral inversion (elemental response driven by vegetation indices), and diagnostic probability (adjusted according to confidence level) based on source quality and consistency, and integrate them according to confidence level. If laboratory test data is available, it is added as a high-reliability source and its weights are redistributed. The fusion result is unified to the grid center by ordinary kriging interpolation, and then robustly smoothed using a sliding window of approximately 168 hours to form a 15-dimensional current nutrient state vector with a scale of 0 to 1, which is then written into the time series database.

[0045] This step outputs a nutrient deficiency probability vector and a confidence score.

[0046] Step 3: Construct a spatiotemporal prediction model based on the nutrient deficiency probability vector and confidence score to predict the future trend of nutrient status and obtain the nutrient status prediction results. Step 3.1: Construct and standardize a four-dimensional spatiotemporal coordinate system. Based on the nutrient deficiency probability vector and confidence score, a four-dimensional spatiotemporal prediction model is constructed to predict future trends in nutrient status. Since the avocado planting area on the farm is a 1m×1m grid, the grid coordinate system adopts the UTM coordinate system, with each grid cell recording its three-dimensional coordinate position.

[0047] The grid index calculation adopts a three-dimensional linear mapping method, and the specific steps are as follows: determine the index position of the grid in the three directions of x, y, and z, and denot it as i, j, and k respectively; calculate the unique identifier according to the three-dimensional arrangement of the grid, multiply i by the number of grids in the y direction, multiply by the number of grids in the z direction, add j multiplied by the number of grids in the z direction, and add the value of k to obtain the unique identifier of the grid, ensuring that each three-dimensional grid unit has a unique numerical identifier, which facilitates the indexing and management of spatial data by the system.

[0048] The spatial resolution is set to 1m×1m in the horizontal direction and 0.5m layers in the vertical direction (10 layers in the height range of 0-5m); based on the spatial grid division, the system establishes a complete four-dimensional spatiotemporal tensor structure to uniformly represent the spatiotemporal distribution of trophic states.

[0049] The four-dimensional spatiotemporal tensor uses a multi-dimensional array structure to uniformly represent the spatiotemporal distribution of trophic states. Its dimensions consist of three spatial axes, one time axis, and one trophic element axis. Specifically, the three spatial axes cover the length, width, and height range of the farm, respectively; the time axis uses hours as the basic unit, covering up to the specified maximum prediction time; and the trophic element axis corresponds to fifteen trophic elements. Each axis is discretized according to a predetermined grid step size and time scale. Instead of using symbolic dimension notation, the discretization granularity is directly described by "number of grids in the x-direction," "number of grids in the y-direction," "number of layers in the z-direction," and "number of time increments." This structure completely stores the distribution information of trophic states in four-dimensional spatiotemporal space and facilitates subsequent analysis and retrieval.

[0050] Step 3.2 maps nutrient status data to a four-dimensional spatiotemporal tensor. The data mapping process directly assigns the nutrient deficiency probability vector to the tensor elements corresponding to the spatial grid locations. Specifically, it determines the spatial grid coordinates (i, j, k) of the current sampling point and the current time, and assigns the 15 element values ​​of the nutrient deficiency probability vector to the corresponding nutrient element dimensions of the tensor T at that spatiotemporal location. This mapping method establishes a direct correspondence between nutrient status data and four-dimensional spatiotemporal coordinates, providing a structured data foundation for subsequent spatiotemporal predictive analysis.

[0051] Step 3.3: Extract multi-scale time series features. Multi-scale time features are extracted from the time series data to represent periodicity and trend information, capturing the temporal patterns of nutrient status changes. Periodic feature extraction employs a trigonometric function encoding method, specifically including hourly, daily, monthly, and seasonal feature extraction. Each feature generates two complementary periodic feature values: sine and cosine. Discrete time points are mapped to a continuous numerical space through a pair of complementary periodic trajectories. The phase is determined by the relative position of time within a natural cycle; low-frequency components describe long-term patterns, while high-frequency components describe local details. This approach ensures continuity at boundaries (e.g., 23:00 is adjacent to 0:00) while preserving periodic patterns, enabling the model to learn intraday, intra-year, and seasonal variation patterns.

[0052] Trend characteristics are analyzed using a Hodrick-Prescott filter to decompose the time series into trend and periodic components. The filter's optimization aims to make the trend curve closely resemble the original sequence while limiting the rate of change between adjacent time periods to avoid excessive fluctuations. This is achieved using an equivalent linear system solution or an iterative numerical method, alternately evaluating and updating the trend under a given smoothing level until the improvement in the overall indicator falls below a threshold. The smoothing level is set to 1600, a common setting for monthly data. The resulting trend component is used to represent long-term changes.

[0053] The original sequence is then de-trended to obtain the de-trended periodic component. Finally, the four types of periodic codes—hourly, daily, monthly, and seasonal—are combined with the obtained trend and periodic components in a predetermined order to form a comprehensive time feature vector that covers both short-term and long-term trends while maintaining numerical stability.

[0054] Step 3.4: Calculate and construct the spatial distribution feature vector. In conjunction with temporal feature extraction, based on the UTM coordinates and regular grid division (1m×1m horizontally, 0.5m vertically) provided in Step 1, calculate the unified spatial distribution features for each nutrient element in the four-dimensional spatiotemporal tensor at each time step: compare the state value differences between the grid and its adjacent grids in the x, y, and z directions, and scale them according to the grid spacing to obtain the spatial change rates in the three directions, forming a spatial gradient vector to reflect the direction and intensity of change at that location; then, accumulate the absolute values ​​of the state value differences between the grid and its 6 adjacent faces and 26 adjacent individuals to form spatial variability to measure local inhomogeneity; simultaneously, based on the adjacency relationship (adjacent weighted 1, non-adjacent weighted 0) and the global average level, accumulate the consistency of adjacent grid deviations from the average value and standardize it with the overall deviation scale to obtain Moran's I spatial autocorrelation index between -1 and 1, used to express the degree of spatial clustering; finally, concatenate the three-directional spatial gradients, adjacency difference, and Moran's I in a predetermined order to form a unified spatial feature vector.

[0055] Step 3.5: Construct a Transformer-based spatiotemporal prediction model architecture. Based on the extracted spatial and temporal features, the system constructs a Transformer-based spatiotemporal prediction model to achieve high-precision nutrient state prediction. The multi-head attention mechanism is a core component of Transformer, which captures different types of dependencies by mapping the input to multiple different representation subspaces.

[0056] The multi-head attention mechanism first maps the input features into three sets of vector representations: one for initiating matching, one for being matched, and one for carrying information. It then calculates the matching degree between each position and all other positions, pairing the corresponding components and accumulating them to form a relevance score. To prevent the relevance score from being too large and affecting subsequent normalization, the score is smoothly scaled according to the vector length. Next, a normalization function is used to convert these scores into weights, ensuring that the sum of weights for all positions is controlled. Finally, the information vectors are weighted and combined according to the weights to obtain new feature representations that highlight relevant positions.

[0057] Location encoding provides positional information for each location in time and spatial sequences. By combining multiple frequencies, it makes the encoded vectors of nearby locations more similar, while the encoded vectors of distant locations differ more significantly. This includes temporal location encoding and spatial location encoding. The temporal location encoding process involves constructing a fixed set of waveform descriptions for each location. Even-numbered components adopt a rising-falling pattern, while odd-numbered components adopt a complementary pattern. The waveform frequency of each component gradually increases with the component index, allowing low-index components to express long-period trends and high-index components to express short-period details. Specifically, the location index is scaled according to the scale determined by the component index and then fed into the corresponding waveform, thus forming a multi-frequency combined vector. The spatial location encoding process involves generating a pair of complementary waveform descriptions for each axis of the three-dimensional coordinate system (the two phases of that axis differ by a quarter-period). The phase of each pair is determined by the position of the coordinate on that axis at a uniform scale. The six values ​​obtained from the three axes are then concatenated sequentially to obtain the spatial code for that location.

[0058] The spatiotemporal prediction model has a 6-layer encoder, with each layer containing multi-head attention and a feedforward network. The feedforward network uses a two-layer fully connected network, specifically implemented as follows: the input is mapped to a higher-dimensional space (hidden layer dimension 2048) through the first linear layer, non-linearity is introduced by applying the ReLU activation function, and then it is mapped back to the original dimension through the second linear layer.

[0059] Step 3.6: Design multi-timescale prediction heads to output prediction results for different periods. Design multi-timescale prediction heads to simultaneously output short-term, medium-term, and long-term prediction results, obtaining multi-timescale nutrient status prediction results. Design three independent prediction heads to handle different timescales: a short-term prediction head (1–7 days), where the training error is obtained by adding two parts: the first part measures the mean squared deviation between the predicted and actual values, and the second part measures the mean absolute deviation between the predicted and actual values ​​with a weight of 0.1; a medium-term prediction head (1–12 weeks), where the training error is also obtained by adding two parts: the first part is the mean squared deviation, and the second part uses a smoothed absolute deviation measure with a weight of 0.05 (growing squarely for small errors and linearly for large errors); and a long-term prediction head (1–12 months), where the training error is obtained by adding the mean squared deviation to a robust error measure with a weight of 0.02. This robustness measure applies a squared penalty for small errors and a linear penalty for large errors to improve robustness to outliers.

[0060] Step 3.7 integrates sliding window, uncertainty quantification, and optimized training configuration. A sliding window mechanism is employed, using the past 168 hours as input. Monte Carlo Dropout is used for uncertainty estimation, generating a 95% confidence interval. Training utilizes the AdamW optimizer with a learning rate of 0.0001, coupled with cosine annealing scheduling. The total number of cycles is 100, the lower bound is 0.000001, the batch size is 16, the number of training epochs is 200, and the early stopping tolerance is 20. Dropout 0.1 and label smoothing 0.1 are used to improve generalization and calibration. These elements work together on the short-term, medium-term, and long-term prediction heads, ensuring both the timeliness and stability of predictions in sliding update scenarios and providing quantifiable confidence information for agricultural decision-making.

[0061] This step outputs nutritional status prediction results, including short-term, medium-term, and long-term predictions.

[0062] Step 4: Based on the nutrient status prediction results, analyze the causes of nutrient status changes, formulate and optimize the implementation of control strategies to obtain optimized real-time control strategies. Step 4.1: Construct a causal analysis model for fertilization decisions. Based on the nutrient status prediction results output in Step 3, analyze the causal relationship between historical fertilization decisions and changes in nutrient status. The causal variables are defined as fertilization variables and response variables; the fertilization variables include four dimensions: fertilizer type, fertilizer amount, fertilization time, and fertilization method; the response variable is the change in nutrient status, which is equal to the 15-dimensional nutrient vector at the future time minus the 15-dimensional nutrient vector at the current time, with the time interval set according to the prediction requirements.

[0063] The causal variable quantification adopts a linear regression model to characterize the corresponding strength of fertilization factors and changes in each nutrient element with a linear relationship. The fitting includes a constant term to characterize the baseline level and introduces a non-systematic bias to accommodate unexplained disturbances. Fertilizer type, application rate, fertilization time and fertilization method each correspond to an influence coefficient. The magnitude of the coefficient indicates the strength of the factor's effect on the response. The coefficients are estimated from historical data.

[0064] The Peter–Clark algorithm (PC) was used to learn the causal structure using data related to nutrient status prediction results as the variable set. The causal dependencies between variables were identified through conditional independence tests and the d-separation criterion. Historical fertilization decision records (fertilizer type, fertilization amount, fertilization time, and fertilization method) were input as causal variables; the current nutrient status was used as the baseline; short-term changes in nutrient status prediction results were used to define response variables and lag relationships; and environmental parameters and growth stage characteristics were included as potential confounding variables. The PC algorithm consists of three main stages: skeleton discovery, conditional independence testing, and V-structure identification. Specifically, the skeleton discovery stage constructs a completely undirected graph through marginal independence testing, performing independence tests on each pair of variables; if independent, no edges are connected. The conditional independence testing stage progressively removes edges through conditional independence testing. For adjacent variables X and Y, it finds a condition set S such that X and Y are independent given S. It compares the deviation between actual observations and theoretical expectations for each category, proportionalizes the deviation, and accumulates a statistic across categories. This statistic is compared to a critical value at a significance level of 0.05; if it exceeds the critical value, the two variables are considered not independent. The edge orientation stage identifies V-structures, specifically those of the form X→Z←Y, where X and Y are conditionally independent but not independent given Z. This structure is detected, and causal directions are determined by applying direction propagation rules. The edge orientation stage determines the direction of causal edges based on the V-structure and orientation rules, ultimately constructing a causal graph containing a set of variables and a set of directed edges. The output is a partially directed acyclic graph, and the stability of the edges is evaluated through approximately 1000 self-sampling iterations to provide confidence levels.

[0065] Step 4.2: Generate candidate strategies. Based on causal analysis results and combined with nutrient status prediction results and nutrient deficiency probability vectors, a multi-objective optimization model with NSGA-II (Non-dominated Sorting Genetic Algorithm II) as its core is established. This model considers three objectives: nutrient improvement effect, cost control, and environmental impact. Non-dominated sorting and crowding distance mechanisms maintain the diversity and convergence of solutions. Non-dominated sorting stratifies the population according to Pareto dominance: a candidate is considered to "dominate" another candidate when it is not inferior in all objectives and is better in at least one objective. In this model, selection operations combine non-dominance levels and crowding distance for tournament selection, crossover operations use SBX (Simulated Binary Crossover), and mutation operations use Polynomial Mutation. The population size is set to 100, the number of generations is 500, the crossover probability is 0.9, and the mutation probability is 0.1. The algorithm output is a well-covered set of non-dominated solutions (Pareto front approximation). Each individual corresponds to a candidate fertilization strategy, which will be selected as the optimized real-time control strategy after subsequent DQN evaluation and constraint review.

[0066] Crowding distance is used to maintain the uniformity of solution distribution: On each target dimension, the index difference between the individual and its adjacent individuals is calculated and scaled up according to the value range of the dimension; then the scaled differences of each dimension are accumulated to obtain the crowding distance of the individual. The larger the distance, the sparser the region where it is located.

[0067] The objective functions of the multi-objective optimization model include nutrient improvement, cost control, and environmental impact objectives. The nutrient improvement objective is to maximize the nutrient improvement effect by calculating the difference between the target level and the current level of each nutrient element, assigning weights to the differences according to the importance of each element, and summing the weighted results of each element into an overall improvement score. The cost control objective is to minimize fertilization costs by summing the unit price and corresponding application rate of various fertilizers to obtain the total cost and minimizing it during the search process. The environmental impact objective is to minimize negative environmental impacts by weighting and synthesizing environmental indicators such as soil, runoff, and greenhouse gases according to preset impact factors to form a total impact score and minimizing it as much as possible.

[0068] The constraints are set based on the quality control mechanism, outlier detection, classification threshold determination rules, and short-term, medium-term, and long-term prediction ranges established in step 1. The constraints include fertilizer application rate constraints (the application rate of each fertilizer must not be negative and must not exceed the allowable upper limit for that category), nutrient balance constraints (the levels of each nutrient element after fertilization must fall within the specified allowable range for that element), and time window constraints (the fertilization time must be within a pre-set allowable window, not earlier than the earliest possible application time and not later than the latest possible application time). Step 4.3: Perform dynamic fertilization decisions. To achieve dynamic intelligent decision-making, a reinforcement learning model based on DQN (Deep Q-Network) is constructed for dynamic fertilization decisions. The high-dimensional state space is handled by approximating the Q-function through a neural network. An experience replay mechanism (capacity of approximately 10,000) and a target network (synchronized approximately every 1,000 steps) are introduced to stabilize the training process. Experience replay breaks data correlation by storing historical experience and randomly sampling, while the target network reduces fluctuations in target values ​​by periodically updating.

[0069] After completing the NSGA-II multi-objective optimization and undergoing DQN strategy evaluation and updating, the system selects the candidate that satisfies the constraints and has the best comprehensive score at the current time t, thus obtaining the real-time control strategy.

[0070] Since the state space and action space contain data of different types and dimensions, unified data preprocessing is required to ensure learning efficiency and stability. State space preprocessing requires no additional processing; environmental parameters use a uniform scale; growth stages are represented using unique heat; historical fertilization records are processed using a sliding window and range mapping, taking the records from the most recent thirty days and converting each day's record to a scale value between zero and one based on the minimum and maximum application rates during this period, thus eliminating dimensional differences. Action space preprocessing includes: fertilizer type is represented by category index, and stable indexes are assigned to nitrogen, phosphorus, potassium and other categories in a preset order for model identification of different types; fertilizer amount level is discretized into ten intensity levels, from zero to full amount, with a step of one-tenth, so as to express different application intensities in discrete action space; time window is encoded in 24-hour format, dividing the day into 24 time periods, and locating each fertilization action to the corresponding time period.

[0071] The state space contains four types of information: current nutrient status, environmental conditions, growth stage, and historical fertilization records. The action space consists of three parts: fertilization type, fertilization amount level, and fertilization time period. The fertilization type covers commonly used categories such as nitrogen, phosphorus, potassium, and compound fertilizers. The amount level is represented by discrete levels, and the time period is divided into 24-hour periods. The reward function adopts a weighted combination of three parts: nutrient improvement reward, cost as penalty, and environmental cost as penalty. The three are combined to form an immediate reward, which is used to guide strategy optimization. In this embodiment, the nutrient improvement reward has a weight of 0.6, the cost as penalty has a weight of 0.2, and the environmental cost as penalty has a weight of 0.2.

[0072] Step 4.4: Establish a time-series fertilization decision model based on Markov Decision Process (MDP). A time-series fertilization decision model is established based on MDP to handle time-series decision problems. State transition probabilities are learned from historical data using the maximum likelihood estimation method, calculated by dividing the number of occurrences of a specific state transition by the total number of occurrences of the initial state and action combination. The value function represents the expected cumulative reward of following the optimal policy in state s, calculated by weighting and summing the rewards at all future times using a discount factor of 0.9. Policy optimization uses a value iteration algorithm, iteratively updating the value function for each state. The calculation method involves selecting the action that maximizes the immediate reward plus the discounted value of subsequent states for all possible actions. This time-series decision model can consider the long-term impact and time dependence of decisions.

[0073] Step 4.5: Establish an online learning system to continuously optimize the decision-making model. The online learning system continuously optimizes the decision-making model based on actual fertilization results, using an incremental learning algorithm to update model parameters. The parameter update method involves adding the learning rate multiplied by the gradient of the loss function with respect to the parameters to the current parameters. The calculation method is the mean squared error plus an L2 regularization term. Model performance is evaluated using a sliding window method to calculate recent prediction accuracy. When the accuracy falls below a threshold, model retraining is triggered.

[0074] Step 4.6: Apply the SHAP method to analyze feature contribution and improve decision interpretability. The SHAP (Shapley Additive Explanations) method is used to analyze the contribution of each feature to the fertilization decision. SHAP is a game theory-based model interpretation method that quantifies feature importance by calculating the marginal contribution of each feature to the prediction result. Its theoretical basis comes from the concept of Shapley value in cooperative game theory. SHAP values ​​satisfy four important axioms: efficiency (the sum of the SHAP values ​​of all features equals the difference between the model output and the baseline); symmetry (features that contribute the same amount to the prediction have the same SHAP value); virtuality (features that do not affect the prediction have a SHAP value of 0); and additivity (the SHAP value of the composite model equals the sum of the SHAP values ​​of each sub-model). The SHAP value calculation method is as follows: For feature i, iterate through all feature subsets that do not contain feature i, calculate the difference between the model output when feature i is included and when it is not included, and perform a weighted average according to the weights determined by the subset size and the total number of features. In practical applications, the TreeSHAP algorithm is used for efficient approximate calculations to generate decision explanation reports, including key influencing factors, decision logic, and expected effects, thereby improving the interpretability and credibility of decisions.

[0075] Step 4.7: Establish multi-scenario decision-making models to provide personalized management recommendations. Specialized decision-making models are established for different farm sizes, crop varieties, and climate conditions to provide personalized management recommendations. Scenario classification uses clustering algorithms to categorize farms into three types: small-scale intensive management, medium-scale standardized management, and large-scale mechanized management. Each scenario uses different model parameters and decision-making strategies. Model selection automatically matches the most suitable decision-making model based on scenario characteristics, ensuring the relevance and practicality of fertilization recommendations. This multi-scenario adaptability enables the system to serve different types of agricultural production needs.

[0076] This step outputs an optimized real-time control strategy, including four parts: a detailed fertilization plan, an implementation schedule, a risk assessment report, and expected results.

[0077] This step outputs a nutrient deficiency probability vector and a confidence score. The deficiency probability vector contains 15 elements, each corresponding to one of the 15 nutrients. Each element has a value ranging from 0 to 1, representing the probability of deficiency for the corresponding nutrient. The confidence score also contains 15 elements, representing the credibility of each prediction result.

[0078] Step 5: Based on the optimized real-time control strategy, construct a knowledge graph-driven decision support module and provide interpretable intelligent suggestions to obtain an interpretable decision support report. Step 5.1: Construct a knowledge graph for avocado nutrition management based on entity and relation extraction. To align with the structured representation of the optimized real-time control strategy and facilitate subsequent reasoning, the structured representation consists of state, action, sequence, constraint, and goal. Structured knowledge is extracted from expert documents and scientific literature. Entity recognition uses BiLSTM-CRF, where the text sequence is read simultaneously in both forward and reverse directions, forming a context-sensitive representation at each position. A conditional random field layer comprehensively considers the constraints between adjacent labels, selecting the most reasonable label path that conforms to the labeling rules for the entire sequence. Dynamic programming is used for both training and decoding to ensure optimal path and valid constraints. After entity and relation extraction, the entity scope covers 15 nutrient elements, deficiency symptoms (such as yellowing leaves, slow growth, leaf edge scorching, leaf curling, and fruit deformity), and treatment measures (such as root fertilization, foliar spraying, soil improvement, and water management). Relation extraction uses attention-driven relation classification to identify causal, therapeutic, antagonistic, and synergistic relationships, organized in a "subject, relation, object" triplet format.

[0079] Based on the above extraction results, the system establishes a knowledge graph for avocado nutrition management to unify the organization and management of agricultural knowledge. The knowledge graph adopts an attribute graph model, including a set of nodes, edges, and attributes. Node types cover nutrient elements, symptoms, measures, environment (temperature, humidity, light, etc.), and time (growth stage, season, etc.). Edge types cover causality (symptoms caused by element deficiency), treatment (measures address symptoms), influence (environmental factors affect nutrient absorption), and temporality (early stages connect to later stages). Node attributes include importance, confidence level, and timeliness. Edge attributes include relationship strength, applicable conditions, and time constraints, thus comprehensively expressing the complex relationships of agricultural knowledge. A knowledge integration and verification mechanism is established, utilizing an agronomic expert knowledge base to gather expert rules, standardized diagnostic processes, and best practice cases. Expert review and cross-validation are used to verify the effectiveness of knowledge. Confidence level is assessed based on expert authority, knowledge consistency, and practical verification results. Online submission and revision are supported, and conflicts are resolved through a combination of voting and evidence weighting.

[0080] Step 5.2: Semantic reasoning of the knowledge graph is implemented based on graph neural networks and multi-hop path reasoning. On top of the constructed knowledge graph, the system implements a semantic reasoning engine based on graph neural networks. Node representation learning employs an attention mechanism, establishing learnable matching scores for each node and its neighbors, and compressing the scores to a stable range using a nonlinear function. Subsequently, the scores of all neighbors are normalized, so that the weights of each neighbor are summed to 1. The neighbor features are weighted and aggregated according to the obtained weights, and then updated with a nonlinear transformation. This process is layered into three layers, each using 128 hidden units, supplemented by residual connections and layer normalization to improve training stability. Reasoning rules cover transitivity (inferring indirect causality from known chains), combinatoriality (combining multiple symptoms for joint diagnosis), and temporality (extrapolating future trends from historical states). Reasoning confidence is reflected by multiplying the confidence of the rules by the credibility of the evidence and then merging them, indicating the strength of support from multiple pieces of evidence. The semantic reasoning engine thus mines implicit relationships and effective paths in the knowledge graph.

[0081] Building upon the semantic reasoning results described above, to discover complex causal relationships, the system implements multi-hop path reasoning to explore deep associations: It uses breadth-first search to expand outwards from the starting node, limiting the maximum search depth to 5 hops; for each candidate path, it first calculates the weight product of the edges along the path, then applies a penalty coefficient (0.1) based on the path length to obtain a comprehensive score; only the top 10 paths with the highest scores are retained as valid candidates; subsequently, attention weights are assigned to each path based on its representation, and these attention weights are combined with the path scores to synthesize the final reasoning result. This process can identify indirect causal chains that are difficult to capture using traditional methods.

[0082] Step 5.3: Combining historical case retrieval and user profiling, construct personalized nutrition management recommendations. The final reasoning results and evidence are translated into actionable solutions. The system constructs a historical case retrieval and matching mechanism. Environmental similarity (vector similarity based on farm environment characteristics), problem similarity (cross-union ratio similarity based on symptom sets), and solution similarity (edit similarity based on the sequence of treatment measures) are calculated separately. These are weighted and synthesized according to preset weights to obtain the overall similarity. The top 5 cases are selected as recommendations from highest to lowest, and the effectiveness of each case is evaluated based on the improvement in nutritional status before and after treatment. After completing the retrieval and effectiveness evaluation, the system constructs personalized nutrition management recommendations to provide customized suggestions, supported by a knowledge graph. User profiling covers dimensions such as farm size, crop variety, climate region, management level, and historical problems. Similarity calculation uses "directional consistency" to measure the closeness of two user vectors: the length and directional features of each vector are calculated separately, the compatibility at the component level is evaluated, and the results are normalized to a range of 0 to 1. When collaborative filtering predicts preferences, it first calculates the difference between the ratings of similar users and their own average ratings, then weights these differences using similarity as a weight, and combines this with the target user's average rating to obtain the predicted value. Content filtering provides a matching score based on entity similarity in the knowledge graph. Therefore, the final recommendation score is a combination of these three parts with weighted coefficients of 0.4, 0.3, and 0.3, corresponding to collaborative filtering, content filtering, and knowledge graph scoring, respectively. This process can generate more suitable nutrition management plans based on user characteristics.

[0083] Step 5.4 establishes an intelligent query response and interpretable report generation mechanism and constructs a real-time knowledge service system. The intelligent query understanding and response mechanism ensures that recommendation and reasoning results are presented to users in a user-friendly and interactive manner. A pre-trained bidirectional encoder model is used for intent recognition and entity extraction, and after domain-specific fine-tuning, it supports natural language queries and professional terminology. Query categories cover diagnosis, treatment, prevention, and knowledge types. The response phase combines knowledge graph reasoning and case retrieval to generate structured answers, including problem analysis, solutions, relevant cases, and precautions, ensuring comprehensiveness and accuracy. Building upon the aforementioned interactions, to enhance the system's interpretability, the system generates interpretable decision support reports to help users understand the results: It visually displays the reasoning chain from symptoms to causes; the strength of evidence is calculated through a "item-by-item combination and aggregation" approach, first combining the weight of each piece of evidence with its confidence level to form a single contribution, then aggregating all contributions to obtain the total strength; uncertainty is expressed using probability ranges and confidence intervals; alternative solutions are provided through multi-path search of a knowledge graph, offering alternative reasoning and measures; risk assessment considers the consequences of potential misjudgments and proposes avoidance suggestions; the report template consists of modules such as diagnostic conclusions, evidence support, confidence levels, risk assessments, and recommended measures, thereby enhancing the transparency of the results and supporting robust decision-making.

[0084] Furthermore, a real-time knowledge service system was built to support online query and reasoning needs. This system supports online querying and reasoning, uses the Neo4j graph database for knowledge graph storage, optimizes queries using indexing and caching mechanisms, supports concurrent access by multiple users, keeps response time within 100ms, provides both RESTful and GraphQL APIs, and monitors metrics such as query performance, system load, and error rate. Load balancing uses round-robin and weighted round-robin strategies, and fault tolerance mechanisms include retries, degradation, and circuit breakers to ensure the system can quickly respond to user query requests.

[0085] Step 5.5 establishes a dynamic update, quality control, and multilingual fusion mechanism for the knowledge graph. A dynamic update mechanism is established, with new knowledge sources covering expert feedback, literature updates, experimental data, and user behavior. Quality assessment is conducted from multiple dimensions: accuracy is described as the proportion of true hits; completeness is described as the percentage of covered entities; consistency is described as the complementary value of the proportion of conflicting relationships; and timeliness is described as a score that decays exponentially with the update interval (with a decay coefficient of 0.1). Knowledge fusion employs a voting and confidence-weighted approach. Conflict resolution follows a hierarchical strategy prioritizing experts, time, and confidence, ensuring the graph continuously evolves and remains consistent with the latest agricultural knowledge. During the update process, to ensure the quality of the knowledge graph, a comprehensive quality control system is established to guarantee reliability: at the data level, entity duplication detection, relationship conflict identification, and attribute value verification are performed; at the logical level, ontology reasoning is used for consistency checks; at the time level, the validity period of knowledge is monitored regularly; and at the process level, experts are invited to review the data, and unit and integration tests are used to verify the reasoning results.

[0086] The final quality score is obtained through a weighted composite of four dimensions: consistency, completeness, accuracy, and timeliness, assigned weights of 0.3, 0.2, 0.3, and 0.2 respectively, to ensure the stability and reliability of the knowledge graph quality. After completing the quality assurance loop, to expand the knowledge coverage, the system integrates multilingual agricultural knowledge resources to enrich the content of the knowledge graph, forming a unified multilingual knowledge graph, thereby expanding the system's knowledge base.

[0087] This step outputs an interpretable decision support report to guide users in implementing the control strategies in step 4, while also collecting user feedback. The interpretable decision support report includes five parts: specific control recommendations, explanation of the decision basis, risk warnings, operational guidance, and visualization content.

[0088] Step 6: Based on the interpretable decision support report, perform system integration and real-time optimization to obtain a real-time optimized nutrition management plan and system performance evaluation report; Step 6.1: Establish a distributed computing architecture and microservice system. Establish a distributed computing architecture, adopting a hybrid architecture combining edge computing and cloud computing. Edge nodes are responsible for data preprocessing and real-time monitoring, while the cloud cluster handles computationally intensive tasks. Construct a microservice architecture, including core services such as data acquisition, image processing, spatiotemporal prediction, risk assessment, decision support, and knowledge graphs, using a multi-database architecture to store different types of data.

[0089] Step 6.2: Construct a streaming data processing pipeline and an end-to-end data pipeline. Based on the computing architecture, a high-throughput streaming data processing pipeline is built to handle real-time data streams. Apache Kafka and Flink are used to construct the streaming data processing pipeline. The data stream processing flow includes raw data acquisition, Kafka producer, Kafka broker, Flink consumer, data cleaning, feature extraction, model inference, and result output. Latency optimization achieves end-to-end latency of less than 1 second through measures such as a dedicated network with 1Gbps bandwidth, Avro serialization format, and JVM heap memory optimization. This streaming processing architecture ensures that the system can respond to dynamic changes in the farm in real time. This module performs real-time processing in the streaming pipeline based on the strategy and inference context in the decision support report, generating optimized nutrient management plans and ensuring low-latency transmission.

[0090] An end-to-end data processing pipeline is established to achieve efficient data flow. The data acquisition layer collects multi-source heterogeneous data through an IoT gateway; the data preprocessing layer performs cleaning, standardization, and quality checks; the feature extraction layer uses a deep learning model to extract multimodal features; the data fusion layer integrates spatiotemporal features and expert knowledge; the model inference layer performs nutritional status prediction and risk assessment; the decision generation layer generates personalized management suggestions; and the results display layer provides a visual interface and reports. The entire pipeline supports both real-time and batch processing modes, with data latency controlled within seconds and batch processing throughput reaching TB levels. This data pipeline ensures efficient processing from data acquisition to result output. Based on decision support reports, this module structures the report content in the decision generation and results display layers, ultimately outputting a nutritional management plan and performance evaluation report.

[0091] Step 6.3: Build a unified model management framework and compress and optimize the models. Construct a unified model management and inference framework that supports frameworks such as TensorFlow, PyTorch, and ONNX, uses MLflow for version management, and employs Docker and Kubernetes for containerized deployment.

[0092] The deep learning model is compressed and optimized: the model pruning adopts a structured pruning strategy, pruning by 30% per channel; quantization optimization converts FP32 to INT8; knowledge distillation uses ResNet-50 as the teacher model and MobileNetV3 as the student model.

[0093] Step 6.4: Establish a full-stack monitoring, performance optimization, and multi-level caching system. Establish a full-stack system covering monitoring, alerting, performance optimization, and caching acceleration to ensure stable and efficient operation; establish a comprehensive system monitoring system, monitoring metrics including data quality metrics (completeness, accuracy, timeliness), model performance metrics (prediction accuracy, inference latency, throughput), system resource metrics (CPU utilization, memory utilization, disk I / O, network bandwidth), and business metrics (user activity, decision adoption rate, system availability). The monitoring tool stack uses Prometheus for metric collection and storage, Grafana for visualization dashboards, AlertManager for alert management, and ELK. Stack log collection and analysis includes alerting rules triggered by conditions such as high CPU utilization and decreased model accuracy. Automatic recovery mechanisms include service restarts, load balancing, and model rollbacks. Based on this, a comprehensive performance monitoring and optimization system is established. System monitoring uses Prometheus and Grafana, application performance monitoring uses APM tools, and log management uses the ELK technology stack. Performance metrics include response time, throughput, error rate, and resource utilization. The alerting mechanism supports multiple notification methods. Performance optimization includes database index optimization, query optimization, code optimization, and architecture optimization. Load testing uses JMeter and Gatling. Capacity planning is based on historical data and growth forecasts, and automatic scaling is based on CPU and memory utilization. Simultaneously, continuous system performance optimization supports business expansion. Performance benchmarks require API response time of less than 200ms, support for 1000 concurrent users, and system availability greater than 99.9%. Scaling strategies... The system supports both horizontal and vertical scaling. Its microservice architecture facilitates independent expansion. Cache optimization utilizes a Redis cluster to cache frequently accessed data. Multi-level caching includes L1, L2, and L3 caches, employing an LRU eviction policy. Cache preheating loads frequently used data at system startup, and a Bloom filter prevents cache penetration. To further improve system response performance, a multi-level caching system is designed. The L1 cache uses Redis to store frequently accessed data with a 1-hour cache duration and a 95% hit rate target. The L2 cache uses Memcached to store calculation results with a 24-hour cache duration. The L3 cache uses local memory to store model parameters, employing an LRU algorithm. Cache preheating loads frequently accessed data at system startup, and cache consistency is guaranteed through a message queue. Cache monitoring includes metrics such as hit rate, response time, and memory usage. Cache capacity planning supports dynamic expansion. These monitoring, optimization, and caching strategies work together to ensure system stability, low latency, and elastic scalability. Based on decision support reports, this module monitors performance and quality and drives optimization throughout the nutrition management plan generation, delivery, and adoption process, while also generating a system performance evaluation report.

[0094] Step 6.5: Implement a closed loop of continuous model learning and user feedback, and carry out comprehensive data security and compliance protection. To achieve continuous model learning and improvement, a closed loop is formed based on user feedback. This includes an incremental learning strategy that maintains a buffer of the most recent 10,000 samples. Learning is triggered when 1,000 new samples accumulate or model performance drops by 5%. Cosine annealing is used for learning rate scheduling, Git LFS is used for model version management, A / B testing compares the performance of new and old models, and canary releases are gradually expanded starting with 10% traffic. The federated learning framework supports local training on each farm, and the FedAvg algorithm aggregates model parameters. Differential privacy technology protects farm data privacy. Simultaneously, a user feedback collection and processing mechanism is established. Feedback collection channels include in-app feedback (satisfaction ratings, suggestion adoption status), regular surveys (monthly user satisfaction surveys), and the customer service system (collecting user questions and suggestions). Feedback analysis uses the BERT model for sentiment analysis and the LDA model to extract key topics, ranking feedback based on frequency and impact. System improvements include functional optimization, new feature development, and interface improvements. The above online / federated learning and feedback analysis together form a closed loop of "evaluation—update—release—re-evaluation". This module takes the report as input and uses the report content and user adoption behavior as learning signals to drive model updates and canary releases.

[0095] Step 6.6: Establish a data backup and recovery mechanism and an intelligent operation and maintenance system. A comprehensive data backup and recovery mechanism is established to address potential system failures and data loss. Backup strategies include weekly full backups, daily incremental backups, and real-time backups of critical data. The storage solution employs a triple protection system: local RAID 10 array, off-site data center, and cloud storage. Recovery tests are conducted quarterly, with a recovery time target of less than 4 hours and a recovery point target of less than 1 hour. This backup and recovery mechanism ensures high system availability and data security. This module, based on decision support reports, ensures that the nutrition management plan and system performance evaluation reports and their associated data meet the RTO / RPO recovery targets in disaster scenarios.

[0096] Build a software quality assurance and intelligent operation and maintenance system, establish a sound software quality assurance process, require unit test coverage of over 80%, and adopt strategies such as continuous integration, code review, and blue-green deployment; build an intelligent operation and maintenance management system that supports automated deployment, container orchestration, monitoring and alarms, and fault self-healing.

[0097] This step outputs a complete intelligent nutrition diagnostic system, which includes five parts: hardware infrastructure, software platform, AI model set, user interface, and comprehensive evaluation system.

[0098] An AI-based avocado nutrition diagnostic system, such as Figure 2As shown, an AI-based avocado nutritional diagnosis method for performing the above-mentioned procedure includes: The multi-source data acquisition module is used to collect multi-source sensor data and multispectral image data from the avocado planting area of ​​the farm, perform data preprocessing, and obtain a standardized multi-source data stream. The nutrient deficiency identification module is used to intelligently identify nutrient deficiencies in standardized multi-source data streams, and obtain nutrient deficiency probability vectors and confidence scores. The spatiotemporal prediction modeling module constructs a spatiotemporal prediction model based on the nutrient deficiency probability vector and confidence score to predict the future trend of nutrient status and obtain the nutrient status prediction results. The real-time control strategy module analyzes the causes of changes in nutritional status based on the nutritional status prediction results, formulates and optimizes control strategies, and obtains an optimized real-time control strategy. The decision support module, based on optimized real-time control strategies, constructs a knowledge graph-driven decision support module and provides interpretable intelligent suggestions, resulting in interpretable decision support reports. The system integration and optimization module, based on interpretable decision support reports, performs system integration and real-time optimization to obtain real-time optimized nutrition management plans and system performance evaluation reports.

[0099] In one embodiment of the present invention, a specific example is provided: A 180-day field test was conducted at a large avocado plantation in City B, Province A. During the test, a complete intelligent nutrition diagnostic system was deployed, including 50 multispectral sensor nodes, 20 high-definition cameras, one edge computing device, and a cloud-based AI analysis platform. The test area covered 100 hectares of avocado orchards, involving the two main varieties, Hass and Fuerte.

[0100] Table 1 shows an example of multi-source data acquisition results: Table 1: Examples of multi-source data acquisition results; As shown in Table 1, the system successfully collected multi-dimensional data from different locations and times; the soil pH value varied between 5.8 and 6.5, the EC value reflected the soil salinity, the leaf NDVI and SAVI indices reflected the plant health status, and the environmental parameters showed typical tropical climate characteristics; the data collection frequency was twice a day (once in the morning and once in the evening), ensuring the continuity and integrity of the time series.

[0101] Table 2 shows examples of nutritional diagnostic results and decision recommendations: Table 2: Examples of Nutritional Diagnostic Results and Decision Recommendations; Table 2 illustrates the nutritional diagnostic capabilities and decision support functions of the AI ​​system. The system accurately identifies the main nutrient deficiencies in different regions: region A01 is mainly deficient in phosphorus (probability 0.72), region A02 is mainly deficient in nitrogen (probability 0.68), region A03 is mainly deficient in calcium (probability 0.65), and region A04 is mainly deficient in potassium (probability 0.78); the confidence scores are all above 0.87, indicating that the diagnostic results are reliable; the system also provides targeted fertilization suggestions and expected improvement timelines, providing a scientific basis for precision agricultural management.

[0102] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.

Claims

1. An AI-based method for nutritional diagnosis of avocados, characterized in that, include: Multi-source sensor data and multispectral image data of the avocado planting area of ​​the farm were collected, and the data were preprocessed to obtain a standardized multi-source data stream. Intelligent identification of nutrient deficiencies is performed on standardized multi-source data streams to obtain nutrient deficiency probability vectors and confidence scores. A spatiotemporal prediction model is constructed based on the probability vector of nutritional deficiency and the confidence score to predict the future trend of nutritional status and obtain the nutritional status prediction results. Based on the nutritional status prediction results, the causes of nutritional status changes are analyzed, and control strategies are formulated, implemented, and optimized to obtain optimized real-time control strategies. Based on optimized real-time control strategies, a knowledge graph-driven decision support module is constructed and interpretable intelligent suggestions are provided, resulting in an interpretable decision support report. Based on interpretable decision support reports, system integration and real-time optimization are performed to obtain real-time optimized nutrition management plans and system performance evaluation reports.

2. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The multi-source sensor data and multispectral image data collected from the avocado planting area of ​​the farm include: A multi-source sensor network was deployed in the avocado planting area of ​​the farm according to a preset grid pattern. Each grid node was equipped with a soil pH sensor, a soil EC sensor, a soil NPK sensor, a temperature and humidity sensor, and a GPS positioning module. Establish a multispectral image acquisition system, install a multispectral camera system, and configure 5 specific bands; Establish a timed automatic data acquisition mechanism and set the sensor data acquisition frequency and image acquisition frequency; Establish a quality control mechanism, use the three-standard-deviation criterion for outlier detection, and specify the range of data missing rate and outlier proportion.

3. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The intelligent identification of nutrient deficiencies from standardized multi-source data streams specifically includes: An improved ResNet-50 residual network architecture was constructed, and an SE module was added after each residual block to optimize the channel attention mechanism. Design a multi-label classifier to simultaneously identify specified nutrient elements, and set classification threshold judgment rules; A multimodal feature fusion mechanism is established. The depth feature vector of RGB image is extracted by improving ResNet-50 residual network, and the spectral feature vector is calculated by vegetation index. A confidence scoring mechanism was established, comprising four dimensions: model prediction confidence, feature quality confidence, data quality confidence, and multimodal consistency confidence. The overall confidence score adopted a multi-dimensional weighted fusion strategy.

4. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The predicted future trends in nutritional status specifically include: Construct a four-dimensional spatiotemporal prediction model and set the spatial resolution and time axis; Multi-scale time features are extracted from time series data. Periodic features are extracted using the trigonometric function encoding method, and trend features are decomposed using the Hodrick-Prescott filter. Construct a spatiotemporal prediction model based on the Transformer architecture, and design a multi-timescale prediction head to simultaneously output prediction results for short-term, medium-term, and long-term forecasts. Uncertainty estimation is performed, and during the inference phase, random deactivation is retained and forward propagation is repeated a preset number of times to generate confidence intervals.

5. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The analysis of the causes of changes in nutritional status, the formulation and implementation of control strategies, and optimization specifically include: The PC algorithm is used to learn the causal structure, and the causal dependencies between variables are identified through the conditional independence test and the d-separation criterion. A multi-objective optimization model based on NSGA-II was established, taking into account three objectives: nutritional improvement effect, cost control and environmental impact. A reinforcement learning model based on a deep Q-network is constructed for dynamic fertilization decision-making, and an experience replay mechanism and a target network are introduced to stabilize the training process. Establish a time-series fertilization decision model based on Markov decision processes; The Shapley additive explanation method was used to analyze the contribution of each feature to fertilization decisions, and a decision explanation report was generated, including influencing factors, decision logic, and expected effects.

6. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The construction of a knowledge graph-driven decision support module and the provision of explainable intelligent suggestions specifically include: Entity recognition uses BiLSTM-CRF, and relation extraction uses attention-driven relation classification, which includes the identification of causality, treatment, antagonism, and cooperation. Establish a knowledge graph for avocado nutrition management, with node types covering nutritional elements, symptoms, measures, environment and time, and edge types covering cause and effect, treatment, impact and time sequence; A semantic reasoning engine based on graph neural networks is implemented. The node representation learning adopts an attention mechanism, and the reasoning rules cover transitivity, compositionality, and temporality. To implement multi-hop path reasoning to explore deep associations, breadth-first search is used to expand outwards from the starting node. Construct a historical case retrieval and matching system, calculate environmental similarity, problem similarity, and solution similarity, and perform weighted synthesis according to preset weights to obtain the overall similarity. Develop intelligent query understanding and response, and use a pre-trained bidirectional encoder model for intent recognition and entity extraction.

7. The AI-based nutritional diagnosis method for avocados according to claim 1, characterized in that, The system integration and real-time optimization specifically include: To enable continuous learning and improvement of the model, and to form a closed loop based on user feedback; Establish a user feedback collection and processing mechanism; feedback analysis includes sentiment analysis and topic extraction. Establish a comprehensive system monitoring framework, with monitoring indicators including data quality indicators, model performance indicators, system resource indicators, and business indicators; Establish a multi-level caching system: L1 cache uses Redis to store hot data, L2 cache uses Memcached to store calculation results, and L3 cache uses local memory to store model parameters; forming a closed loop of evaluation-update-release-re-evaluation.

8. The AI-based nutritional diagnosis method for avocados according to claim 2, characterized in that, The timestamps for synchronizing the multi-source sensor network include: Deploy a time synchronization server on the local network and periodically calibrate it with an international standard time server; Accurate three-dimensional coordinates are established for each sensor node and image acquisition point. The geographic coordinates are converted into planar coordinates using the UTM projection coordinate system. The entire planting area is divided into regular grids and the network specifications are defined. A unique identifier is assigned to each grid.

9. The AI-based nutritional diagnosis method for avocados according to claim 3, characterized in that, The classification threshold determination rules include: When the probability of nutrient deficiency is greater than the first threshold, it is considered a severe deficiency; when the probability is between the second and first thresholds, it is considered a moderate deficiency; when the probability of nutrient deficiency is between the third and second thresholds, it is considered a mild deficiency; when the probability of nutrient deficiency is between the fourth and third thresholds, it is considered a borderline state; and when the probability of nutrient deficiency is less than the fourth threshold, it is considered an adequate state.

10. An AI-based avocado nutrition diagnostic system, characterized in that, A method for performing an AI-based avocado nutritional diagnosis according to any one of claims 1-9 includes: The multi-source data acquisition module is used to collect multi-source sensor data and multispectral image data from the avocado planting area of ​​the farm, perform data preprocessing, and obtain a standardized multi-source data stream. The nutrient deficiency identification module is used to intelligently identify nutrient deficiencies in standardized multi-source data streams, and obtain nutrient deficiency probability vectors and confidence scores. The spatiotemporal prediction modeling module constructs a spatiotemporal prediction model based on the nutrient deficiency probability vector and confidence score to predict the future trend of nutrient status and obtain the nutrient status prediction results. The real-time control strategy module analyzes the causes of changes in nutritional status based on the nutritional status prediction results, formulates and optimizes control strategies, and obtains an optimized real-time control strategy. The decision support module, based on optimized real-time control strategies, constructs a knowledge graph-driven decision support module and provides interpretable intelligent suggestions, resulting in interpretable decision support reports. The system integration and optimization module, based on interpretable decision support reports, performs system integration and real-time optimization to obtain real-time optimized nutrition management plans and system performance evaluation reports.