Crop disease and insect pest Internet of Things image recognition method and system

By collecting multi-source data packets through IoT sensing nodes and performing illumination characteristic analysis and adaptive enhancement, a feature extraction network and an agricultural pest and disease knowledge base are constructed. This solves the problems of inconsistent image quality and lack of environmental adaptability of identification results in pest and disease monitoring in facility agriculture, and achieves efficient and reliable pest and disease identification and control.

CN121837933APending Publication Date: 2026-04-10JINAN ZHENGZHUANG AGRI TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202512048933.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In facility agriculture, pest and disease monitoring suffers from inconsistent image quality and a lack of environmental adaptability in identification results. Traditional manual inspections are labor-intensive and time-consuming, while existing image recognition methods are not accurate enough under complex lighting conditions and fail to effectively integrate multi-source information.

Method used

By collecting multi-source data packets through IoT sensing nodes, performing light characteristic analysis and adaptive enhancement, constructing a feature extraction network and an agricultural pest and disease knowledge base, and adopting a hierarchical classification strategy and multi-source evidence fusion, accurate identification results are generated and prevention and control suggestions are provided.

Benefits of technology

It optimizes image quality and improves the environmental adaptability of recognition results in complex facility agriculture environments, enhances the reliability and robustness of recognition results, and provides a closed-loop management solution for intelligent pest and disease control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837933A_ABST
    Figure CN121837933A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of facility agriculture intelligent monitoring, and discloses a crop disease and insect pest internet-of-things image recognition method and system, and the method comprises the steps: carrying out the data collection and preprocessing, and building a crop growth file; performing illumination characteristic analysis and adaptive enhancement on the original image; performing quality evaluation on the image subjected to quality optimization, calculating a comprehensive quality score and performing screening; a crop growth stage is identified, and multi-scale features are extracted; constructing an agricultural pest knowledge base and estimating a pest prior probability, projecting the multi-scale feature vector to a discrimination subspace and performing weighted fusion according to the prior probability; carrying out double weighting on the environment adaptive fusion feature vector, and carrying out pest and disease identification through a hierarchical classification strategy; performing multi-source evidence fusion to obtain a final recognition result, and generating prevention and treatment suggestions in combination with an agricultural pest knowledge base; the accuracy and environmental adaptability of pest and disease identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent monitoring of facility agriculture, more particularly, it relates to a method and system for image recognition of crop diseases and insect pests based on the Internet of Things. BACKGROUND

[0002] As an important part of modern agriculture, facility agriculture plays a key role in ensuring the supply of agricultural products and improving the efficiency of agricultural production. However, in the environment of greenhouse and other facility agriculture, due to the suitable conditions of temperature, humidity and other conditions, diseases and insect pests occur frequently and spread rapidly, which seriously affects the yield and quality of crops. Traditional disease and pest monitoring mainly relies on manual inspection, which has the problems of high labor intensity, poor timeliness, strong subjectivity and other problems, and it is difficult to meet the real-time monitoring needs of large-scale planting bases.

[0003] With the development of the Internet of Things and image recognition technology, automatic identification of diseases and insect pests based on images has gradually become a research hotspot. Existing image recognition methods mainly focus on the optimization of algorithm models, but in actual application, they face many challenges. In the environment of facility agriculture, the light conditions are complex and changeable, natural light and artificial light are intertwined, resulting in uneven quality of collected images, affecting the accuracy of recognition. At the same time, the morphological characteristics of crops in different growth stages are obviously different, and the manifestations of diseases and insect pests are various, so a single feature extraction strategy cannot adapt to diversified recognition needs. In addition, the occurrence of diseases and insect pests is closely related to environmental conditions, and relying only on image information for identification ignores the influence of temperature, humidity and other environmental factors, resulting in a lack of environmental adaptability of the recognition results.

[0004] Therefore, there is a need for a method of image recognition of crop diseases and insect pests based on the Internet of Things that can adapt to the complex environment of facility agriculture, integrate multi-source information, and achieve accurate identification, providing technical support for intelligent disease and pest control. SUMMARY

[0005] The present application provides a method and system for image recognition of crop diseases and insect pests based on the Internet of Things, which solves the technical problems of uneven quality of collected images and lack of environmental adaptability of recognition results in related technologies.

[0006] The present application provides a method for image recognition of crop diseases and insect pests based on the Internet of Things, comprising the following steps: Collecting growth parameters based on Internet of Things perception nodes and establishing a growth archive to obtain a multi-source synchronous data packet; Performing illumination characteristic analysis and adaptive enhancement on the original images in the multi-source synchronous data packet to obtain quality-optimized images; Performing quality assessment on the quality-optimized images, calculating a comprehensive quality score and performing screening to obtain a set of quality-qualified screening images; A crop growth stage is identified based on a crop growth archive and a quality-qualified image set, a feature extraction network is constructed, and multi-scale features are extracted to obtain a multi-scale feature vector; An agricultural pest knowledge base is constructed, and a pest prior probability is estimated, and an environment-adaptive fusion feature vector is obtained by weighting and fusing the multi-scale feature vectors based on the prior probability; The environment-adaptive fusion feature vector is double-weighted, a hierarchical classification strategy is used for pest identification, and a preliminary pest identification result is obtained; A final identification result is obtained based on the preliminary pest identification result, and a control suggestion is generated in combination with the agricultural pest knowledge base.

[0007] In a preferred embodiment, the multi-source synchronous data packet comprises: An Internet of Things sensing node is deployed, and an image acquisition module, an illumination monitoring module, an environmental parameter monitoring module, and a location identification module are integrated; A growth archive system is established, image acquisition is performed, growth indicators are extracted, and a growth curve is formed in a time sequence; Simultaneously trigger the sensor to collect data, encapsulate the image data, the illumination intensity value, the environmental parameter value, the time stamp and the spatial coordinate information into a data packet, query the growth archive information and attach it, and form a multi-source synchronous data packet.

[0008] In a preferred embodiment, the quality-optimized image comprises: The original image is processed by blocking, the average brightness, brightness variance and average gradient amplitude of the sub-region are calculated, and a local illumination feature set is obtained; The proportion of overexposed pixels and underexposed pixels is counted, the dynamic range utilization rate and the gray histogram morphological feature vector are calculated; The sub-region is divided into four large areas corresponding to the illumination sensors in four directions, the large area brightness value is calculated, and the correlation analysis is performed with the sensor illumination intensity value to obtain a comprehensive illumination intensity value, and a illumination condition description vector is generated; The illumination type is determined based on the illumination condition description vector, the overall illumination level is lower than the first illumination level threshold to determine the weak light image, the overall illumination level is higher than the second illumination level threshold to determine the strong light image, the brightness of the weak light image is improved, the dynamic range of the strong light image is compressed, and the sub-region adaptive enhancement is used for the illumination non-uniform image. Output enhanced image.

[0009] In a preferred embodiment, the quality-qualified image set comprises: The image sharpness is evaluated, and the variance of the Laplace response value is counted to obtain a sharpness score; The image contrast is evaluated, and the contrast feature is calculated based on the gray level co-occurrence matrix to obtain a contrast score; The color fidelity score is obtained by calculating the difference in the mean values ​​of the color channels of the images before and after enhancement. To assess the noise level of an image, a noise quality score is obtained by calculating the median absolute deviation of the high-frequency subband coefficients. Identify suspected lesion areas, count the proportion of pixels deviating from the healthy color range and the texture complexity to obtain a feature saliency score; The scores are weighted and fused to obtain a comprehensive quality score. Quality thresholds and significance thresholds are set for filtering to obtain a set of filtered images.

[0010] In a preferred embodiment, obtaining the multi-scale feature vector includes: The selected image is segmented into regions. Coarse segmentation is performed using color features, and fine segmentation is performed using a semantic segmentation network. The resulting images are then fused to obtain the crop foreground image. Extract morphological features from the crop foreground image, including overall outline, area, aspect ratio, number of leaves, average leaf area, color and texture features, to form a set of morphological features; By comparing morphological characteristics with growth records, growth stages are classified and growth stage identifiers are output. Select a strategy configuration from the feature extraction strategy library, dynamically construct a feature extraction network, extract feature maps from different depth layers, convert them into feature vectors using global average pooling, and concatenate them to form multi-scale feature vectors.

[0011] In a preferred embodiment, obtaining the environment adaptive fusion feature vector includes: Construct an agricultural pest and disease knowledge base, which includes the occurrence conditions, symptom characteristics, and development patterns of different types of pests and diseases; Environmental parameter records and pest and disease identification records are extracted from historical databases to form a training dataset. A mapping model from environmental parameters to the probability of pest and disease occurrence is established. The environmental parameters are input into the mapping model to obtain the prior probability vector. Discriminant analysis is used to identify feature subspaces related to pest and disease types, and multi-scale feature vectors are projected onto the feature subspaces to obtain feature components. Weight coefficients are assigned to the feature subspace based on the prior probability vector, and the feature components are weighted and fused to obtain the prior knowledge-enhanced feature vector. The design of the gating mechanism balances the prior enhanced features and the original features. The entropy value of the prior probability vector is calculated, and the gating coefficient is calculated based on the entropy value. The prior knowledge enhanced features and the original features are then fused according to the gating coefficient to obtain the environment-adaptive fusion feature vector.

[0012] In a preferred embodiment, obtaining the preliminary identification results of pests and diseases includes: Design a spatial attention module to perform spatial location importance analysis on the feature map, output a spatial attention weight map, and multiply the weight map element-wise with the feature map to obtain a spatially weighted feature map; Design a channel attention module to calculate statistical vectors for each channel, output channel attention vectors, and multiply the channel attention vectors with the feature map channel by channel to obtain the channel weighted feature map; Spatial attention and channel attention modules are applied sequentially to perform global average pooling on the dual-weighted feature map to obtain the attention-enhanced feature vector; A hierarchical classification network is designed. The coarse-grained classifier divides pests and diseases into disease categories and insect pest categories. The fine-grained classifier identifies the species based on the coarse-grained classification results, thus obtaining preliminary identification results of pests and diseases.

[0013] In a preferred embodiment, the step of fusing multi-source evidence based on preliminary pest and disease identification results to obtain the final identification result, and generating prevention and control recommendations in conjunction with an agricultural pest and disease knowledge base, includes: Construct a multi-source evidence system that includes image recognition evidence, environmental parameter evidence, and spatiotemporal correlation evidence; The Dempster-Shafer evidence theory is used for fusion reasoning to assign confidence levels to pest and disease types. The Dempster combination rule is used to combine the types to obtain the comprehensive confidence level. The type with the highest comprehensive confidence level is selected as the fusion identification result. Calculate the maximum and second-largest comprehensive confidence scores. If the difference between the maximum and second-largest comprehensive confidence scores is greater than the confidence score difference threshold, the fused identification result is used as the final pest and disease identification result. If the difference is less than the confidence score difference threshold, a manual review mechanism is triggered, and the manual review result is used as the final pest and disease identification result.

[0014] In a preferred embodiment, the step of generating prevention and control recommendations by combining an agricultural pest and disease knowledge base further includes: Based on the final pest and disease identification results, retrieve control solutions from the agricultural pest and disease knowledge base; Information on growth stages is obtained from growth records, and environmental conditions are obtained from environmental parameter data. Prevention and control plans are then adjusted based on growth stages and environmental conditions. The prevention and control plan is organized into structured prevention and control recommendations and pushed to management personnel through the base management platform.

[0015] This invention provides a system for IoT image recognition of crop diseases and pests, used to perform the above-described method for IoT image recognition of crop diseases and pests, including: The data acquisition module collects growth parameters and establishes growth profiles based on IoT sensing nodes, and obtains multi-source synchronous data packets; The image enhancement module is used to perform illumination characteristic analysis and adaptive enhancement on the original images in multi-source synchronous data packets to obtain images with optimized quality. The image filtering module is used to evaluate the quality of optimized images, calculate the overall quality score, and filter them to obtain a set of qualified images. The feature extraction module identifies crop growth stages based on crop growth records and a set of qualified selected images, constructs a feature extraction network, and extracts multi-scale features to obtain multi-scale feature vectors. The feature fusion module is used to construct an agricultural pest and disease knowledge base and estimate the prior probability of pests and diseases. Based on the prior probability, the multi-scale feature vectors are weighted and fused to obtain the environment-adaptive fusion feature vector. The preliminary identification module is used to perform double weighting on the environmental adaptive fusion feature vector and adopt a hierarchical classification strategy to identify pests and diseases, thereby obtaining preliminary identification results of pests and diseases. The results optimization module integrates multi-source evidence based on the preliminary identification results of pests and diseases to obtain the final identification results, and generates prevention and control suggestions by combining the agricultural pest and disease knowledge base.

[0016] The beneficial effects of this invention are as follows: By constructing a multi-source synchronous data acquisition mechanism, image data is deeply correlated with environmental parameters and crop growth records, achieving integrated spatiotemporal data management. Through light characteristic analysis and adaptive enhancement technology, a refined regional enhancement strategy is adopted to improve image quality and feature saliency in complex light conditions within facility agriculture environments. A growth stage-adaptive feature extraction mechanism dynamically constructs a feature extraction network based on the crop's current growth stage, enabling targeted multi-scale feature representation. An environmental prior probability-guided feature fusion mechanism transforms environmental parameters into prior probabilities of pests and diseases, deeply fusing them with image features to enhance the environmental adaptability of the recognition results.

[0017] By employing a multi-source evidence fusion strategy, integrating image recognition evidence, environmental parameter evidence, and spatiotemporal correlation evidence, the reliability and robustness of the identification results are improved. By combining this with an agricultural pest and disease knowledge base to generate intelligent prevention and control suggestions, a closed-loop management system from identification to control is achieved, providing a complete technical solution for intelligent pest and disease monitoring and control in facility agriculture. This solution has significant practical value and promising prospects for wider application. Attached Figure Description

[0018] Figure 1 This is a flowchart of the main process of an IoT image recognition method for crop diseases and pests according to the present invention; Figure 2 This is a detailed flowchart of a method for IoT image recognition of crop diseases and pests according to the present invention; Figure 3This is a block diagram of an IoT image recognition system for crop diseases and pests according to the present invention. Detailed Implementation

[0019] 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.

[0020] At least one embodiment of the present invention discloses a method for IoT image recognition of crop diseases and pests, such as... Figure 1 - Figure 2 As shown, it includes: Step 1: Collect growth parameters and establish growth profiles based on IoT sensing nodes to obtain multi-source synchronous data packets; Specifically, the following steps are included: Step 1.1, Hardware configuration and spatial deployment of IoT sensing nodes; IoT sensing nodes are deployed within each greenhouse according to a spatial grid layout principle. Specifically, the greenhouse space is divided into several monitoring grids based on its length and width, with the area of ​​each grid controlled within an appropriate range. An IoT sensing node is installed at the center of each grid, ensuring that the node's monitoring range covers the entire grid area. The IoT sensing node adopts a modular design, integrating multiple sensors and data acquisition devices.

[0021] The image acquisition module uses a high-definition camera equipped with autofocus and an adjustable viewing angle, capable of clearly capturing crop leaves, stems, and fruits. The light monitoring module employs a multi-point light intensity sensor array, with one sensor installed in each of the four directions (up, down, left, and right) around the node to capture differences in light intensity from different directions. The environmental parameter monitoring module includes temperature, humidity, and carbon dioxide concentration sensors. The location identification module records the three-dimensional spatial coordinates of the node, including the greenhouse number, grid number, and node height information. All sensors are managed through a unified data acquisition controller, which has a built-in real-time clock chip to ensure time synchronization of data acquisition.

[0022] Step 1.2, Establishment and dynamic updating of crop growth records; To achieve precise tracking of crop growth status, a crop growth record system is established. At the initial stage of crop planting, the planting time, location, variety information, and initial growth parameters of each crop plant are recorded. A regular image acquisition method is used, with comprehensive image collection of crops every few days. The images are taken from three perspectives: front, side, and top, ensuring a complete record of crop growth changes. The acquired growth images are automatically analyzed to extract key growth indicators. Image segmentation algorithms are used to separate the crop from the background, calculate the overall outline area, and determine the aspect ratio based on the outline's height and width. Leaf detection algorithms are used to identify the number of leaves in the image, segmenting each leaf individually and calculating its area, perimeter, and shape parameters. A color space conversion method is used to convert the image from RGB to HSV space, statistically analyzing the hue, saturation, and brightness distribution of the leaf area to obtain leaf color characteristics. The gray-level co-occurrence matrix method is used to analyze leaf texture features, calculating texture parameters such as contrast, correlation, energy, and homogeneity. The extracted growth indicators are organized according to a time series to form a crop growth curve, recording dynamic parameters such as plant height growth rate, leaf number growth rate, and leaf area expansion rate. Growth archive data is stored in a local database and periodically synchronized to a cloud data center for data backup and sharing.

[0023] Step 1.3: Synchronous acquisition and spatiotemporal correlation binding of multi-source data; A sensor array based on IoT sensing nodes enables synchronous acquisition of multi-source data. The data acquisition controller triggers data acquisition tasks according to a preset acquisition strategy, which includes two modes: timed acquisition and event-triggered acquisition. In timed acquisition mode, the controller triggers a complete data acquisition process at set time intervals to ensure continuous monitoring of crop status. In event-triggered acquisition mode, when environmental parameters change significantly, such as changes in light intensity exceeding a set threshold or abnormal fluctuations in temperature or humidity, the controller immediately triggers data acquisition to capture the impact of sudden environmental changes on crops.

[0024] During data acquisition, a real-time clock chip generates a precise timestamp to record the acquisition time. Simultaneously, the controller triggers all sensors to acquire data: cameras capture crop images, light sensors in four directions measure light intensity, temperature and humidity sensors measure ambient temperature and humidity, and carbon dioxide sensors measure gas concentration. All sensor acquisition actions are completed within a short time, ensuring data consistency. After acquisition, the controller reads the spatial coordinates from the location identification module, including greenhouse number, grid number, and node height. The image data, light intensity values ​​in four directions, temperature values, humidity values, carbon dioxide concentration values, timestamps, and spatial coordinates are encapsulated into a data packet. A unique identifier is added to the header of the data packet for subsequent data traceability and correlation analysis. The controller queries the crop growth record database for the crop corresponding to the current monitoring location, including planting time, variety information, and the most recently recorded growth indicators, and appends this growth record information to the data packet. Through this process, a multi-source synchronous data packet containing image data, environmental parameter data, and growth monitoring data is formed.

[0025] In some embodiments, differences in response speed and data transmission latency among different sensors may lead to incomplete synchronization of data acquisition time. Timestamp calibration and data interpolation methods can be used to improve synchronization accuracy. The aim is to ensure accurate alignment of multi-source data in the time dimension and avoid data association errors caused by time deviations. Specifically, during system initialization, time synchronization calibration is performed on all sensors, measuring the delay time from triggering to data return for each sensor and establishing a delay compensation model. During actual acquisition, the timestamps of each sensor are corrected according to the delay compensation model, unifying the timestamps of all data to the same reference time. For sensors with different acquisition frequencies, linear interpolation or spline interpolation methods are used to generate interpolated data at the target time, achieving time alignment of data at different frequencies. Through timestamp calibration and data interpolation, the time synchronization accuracy of multi-source data is improved, ensuring the accuracy of data association.

[0026] Step 2: Perform illumination characteristic analysis and adaptive enhancement on the original image in the multi-source synchronization data packet to obtain an image with optimized quality; Specifically, the following steps are included: Step 2.1, Comprehensive assessment of lighting conditions for image content analysis; A comprehensive analysis of the illumination characteristics of the acquired raw images is performed, and the illumination conditions are evaluated at multiple levels from local to global perspectives.

[0027] Image segmentation and local illumination feature extraction are performed. The acquired raw image is segmented into blocks using a fixed-size segmentation strategy. Based on the image resolution, the image is uniformly divided into multiple sub-regions, each of equal size. The color images of the sub-regions are converted to grayscale images, with grayscale values ​​reflecting the brightness level of the region. The average grayscale value of all pixels within a sub-region is calculated to obtain the average brightness of that region. The variance of the pixel grayscale values ​​within a sub-region is calculated; the variance reflects the degree of brightness fluctuation within the region. A large variance indicates significant brightness variations within the region, while a small variance indicates uniform brightness. The brightness gradient of the sub-region is calculated using the Sobel operator to calculate the gradients in the horizontal and vertical directions, and the average gradient magnitude reflects the drastic brightness changes within the region. The average brightness, brightness variance, and average gradient magnitude of each sub-region are combined to form the local illumination feature vector of that region, resulting in a set of local illumination features for multiple sub-regions.

[0028] Step 2.2, Analysis of overall image illumination characteristics; Based on the pixel statistics of the original image, the overall illumination characteristics of the image are analyzed. The image is converted to a grayscale image. Pixels with grayscale values ​​greater than a set overexposure threshold are defined as overexposed pixels, and pixels with grayscale values ​​less than a set underexposure threshold are defined as underexposed pixels. The proportion of overexposed and underexposed pixels to the total number of pixels in the image is counted. The dynamic range utilization of the image is calculated by counting the number of different grayscale values ​​appearing in the image. The grayscale histogram of the image is calculated, and the distribution characteristics of the histogram are analyzed. By calculating statistical parameters such as the number of peaks, skewness, and kurtosis of the histogram, the distribution shape of the histogram is quantified, and the histogram shape feature vector is obtained.

[0029] Step 2.3, Spatial correlation analysis between sensor data and image content; Based on multi-point illumination intensity sensor data and local illumination features of image blocks, a spatial correspondence between sensor measurements and image content is established. Multiple sub-regions of the image are divided into four major regions—upper, lower, left, and right—according to their spatial locations, corresponding to illumination sensors in the upper, lower, left, and right directions, respectively. The average brightness of all sub-regions within each major region is calculated to obtain a representative brightness value for that region. A correlation analysis is performed between this representative brightness value and the illumination intensity values ​​measured by sensors in the corresponding directions to calculate the correlation coefficient. Based on the correlation coefficient, a confidence weight is assigned to the sensor data in each direction. Finally, the illumination intensity values ​​from the four directions are weighted and fused to obtain a comprehensive illumination intensity value.

[0030] Based on the above analysis, a multi-dimensional illumination description vector is generated. This vector contains seven dimensions: overall illumination level, represented by a weighted average of the overall illumination intensity and the average brightness of the image, reflecting the overall brightness of the image; illumination uniformity, represented by the standard deviation of the average brightness of multiple sub-regions, with a smaller standard deviation indicating uniform illumination and a larger standard deviation indicating uneven illumination; dynamic range utilization, directly using the dynamic range utilization value; overexposure, represented by the proportion of overexposed pixels; underexposure, represented by the proportion of underexposed pixels; illumination distribution pattern, determined based on histogram morphology characteristics, categorized into three types: uniform distribution, bimodal distribution, and skewed distribution, represented using one-hot encoding; and local illumination complexity, represented by the average of the brightness gradients of all sub-regions, reflecting the drastic changes in illumination in the image. The values ​​of each dimension are normalized, unifying the numerical range to between 0 and 1, resulting in a normalized multi-dimensional illumination description vector.

[0031] In some embodiments, the presence of special light sources such as artificial supplemental lighting and reflective materials in facility agriculture environments leads to complex spatial patterns in light distribution. Light source type identification and regional lighting modeling methods can be employed to improve the accuracy of lighting assessment. The aim is to identify the impact of different types of light sources on images and perform targeted lighting analysis and compensation. Specifically, light source types are analyzed based on the color characteristics of the image. Natural light typically exhibits a continuous spectral distribution, while artificial supplemental lighting, such as LED lights or fluorescent lights, has specific spectral peaks. By analyzing the energy distribution of the image in different color channels, the light source type is identified. For mixed light source scenarios, the image is divided into naturally light-dominated areas and artificial light-dominated areas, and lighting models are established for each. For naturally light-dominated areas, considering factors such as solar altitude angle and cloud cover, a lighting prediction model based on time and weather is established. For artificial light-dominated areas, considering the location, power, and illumination angle of the lighting fixtures, a lighting calculation model based on light source parameters is established. Regional modeling improves the precision and accuracy of lighting condition assessment.

[0032] Step 2.4, Refined adaptive image enhancement based on illumination condition description vector; Based on the illumination condition description vector, a refined adaptive strategy is used to enhance the original image.

[0033] The image's lighting type is determined based on the overall illumination level, with two illumination level thresholds distinguishing between low light, normal light, and strong light. If the overall illumination level is below the first threshold, it is classified as a low-light image; if the overall illumination level is between the first and second thresholds, it is classified as a normal-light image; and if the overall illumination level is above the second threshold, it is classified as a strong-light image.

[0034] Based on the dimension of illumination uniformity, it is determined whether local adaptive processing is needed. An illumination uniformity threshold is set. If the uniformity is below the threshold, a global enhancement strategy is adopted; if it is above the threshold, a regional adaptive enhancement strategy is adopted.

[0035] For images identified as low-light, the brightness enhancement method is selected based on dynamic range utilization. When dynamic range utilization is low, histogram equalization is used to expand the dynamic range; when dynamic range utilization is normal but the overall image is too dark, gamma correction is used to enhance brightness, with the gamma value dynamically determined based on the overall illumination level. For color images, the RGB image is converted to the HSV color space, and gamma correction is performed only on the V channel, while maintaining hue and saturation.

[0036] Images identified as having strong light are processed using a dynamic range compression algorithm. When the proportion of overexposed pixels is high, an adaptive tone mapping algorithm is used for dynamic range compression. The logarithmic mean brightness of the image is calculated as a reference, and each pixel is non-linearly compressed based on its offset relative to the mean brightness. For color images, the V channel is processed in the HSV color space.

[0037] For images with uneven illumination, a region-based adaptive enhancement strategy is employed. Based on the local illumination characteristics of multiple sub-regions obtained in step 2.1, each sub-region is enhanced independently. Sub-regions are divided into dark, normal, and bright areas according to average brightness, with two brightness thresholds set: sub-regions with average brightness below the first threshold are considered dark areas, those with average brightness between the two thresholds are considered normal areas, and those with average brightness above the second threshold are considered bright areas. Dark areas undergo gamma correction to enhance brightness, bright areas undergo brightness compression, and normal areas have their grayscale range stretched to enhance contrast. Transition bands are set at the boundaries of each sub-region, using linear interpolation or Gaussian weighting to smooth the transition and eliminate boundary effects.

[0038] After brightness and contrast adjustments, a non-sharpening mask algorithm is used for sharpening, with the sharpening coefficient dynamically adjusted according to the local lighting complexity. A bilateral filtering algorithm is used for noise suppression, and a white balance algorithm is used for color correction.

[0039] After the above processing, the output is a lighting condition description vector and an enhanced image with improved quality.

[0040] Step 3: Evaluate the quality of the optimized images, calculate the overall quality score, and filter them to obtain a set of qualified images. Specifically, the following steps are included: Step 3.1, Multi-dimensional image quality assessment; The quality assessment of enhanced images, which comprehensively measures their usability and value, includes the following steps: Image sharpness is evaluated using a gradient-based method. The Laplacian response value of each pixel in the image is calculated; the absolute value of the response reflects the intensity of the gradient change at that pixel. The variance of the Laplacian response values ​​for the entire image is calculated. A large variance indicates rich edges and details in the image, resulting in high image sharpness; a small variance indicates a smooth image lacking detail, resulting in low sharpness. The Laplacian variance is normalized to a range of 0 to 1 to obtain a sharpness score.

[0041] Image contrast is evaluated using the gray-level co-occurrence matrix (GLCM) method. The GLCM is calculated in four directions: horizontal, vertical, diagonal, and anti-diagonal. For each direction, the frequency of gray-level combinations between adjacent pixels is counted. Based on the GLCM, contrast features are calculated, defined as the weighted sum of squared differences between gray levels, reflecting the drastic degree of gray-level changes in the image. The average of the contrast features in the four directions is taken to obtain the overall image contrast. The contrast values ​​are then normalized to the range of 0 to 1 to obtain a contrast score.

[0042] The color fidelity during image enhancement is evaluated to ensure the enhanced image has realistic and natural colors. Both the original and enhanced images are converted to the Lab color space. The Lab space separates luminance and chrominance; the L channel represents luminance, the a channel represents the red and green chrominance components, and the b channel represents the yellow and blue chrominance components. The mean and standard deviation of the a and b channels for the images before and after enhancement are calculated, and the differences are compared. The difference between the a channel mean and the b channel mean is calculated; the sum of the absolute values ​​of these two differences reflects the degree of color shift. A color shift metric is calculated; the smaller the metric, the closer the enhanced image's colors are to the original image, and the higher the fidelity. The color shift metric is normalized and inverted to obtain a color fidelity score, ranging from 0 to 1; a higher score indicates better color fidelity.

[0043] Wavelet transform is used to assess the noise level of an image. Wavelet decomposition divides the enhanced image into sub-bands of different frequencies. The high-frequency sub-band mainly contains image edges, details, and noise components. The highest-frequency sub-band is extracted, as it is most sensitive to noise. The median absolute deviation of the high-frequency sub-band coefficients is calculated, and this statistic can robustly estimate the standard deviation of noise. Based on the median absolute deviation, an estimate of the image noise level is calculated. The noise level is normalized and inverted to obtain a noise quality score, ranging from 0 to 1. A higher score indicates a lower noise level and better image quality.

[0044] Color and texture anomaly detection methods are used to identify suspected lesion areas. Images are converted to the HSV color space, and the tonal distribution is analyzed. Healthy crop leaves are typically green, with corresponding tonal values ​​within a specific range. Pixels deviating from the healthy green tonal range are counted; these pixels may correspond to lesions, pests, or other abnormal areas. The proportion of abnormal tonal pixels is calculated as a color anomaly measure. Texture features are analyzed using the local binary pattern method. Healthy leaves have relatively uniform texture, while lesion areas typically exhibit irregular patterns. Texture complexity is calculated; areas with high texture complexity may contain pests or diseases. Combining color anomaly measurement and texture complexity, a pest / disease feature significance score is calculated. If significant color or texture anomalies are present in the image, a high significance score indicates that the image is likely to contain pest / disease information and has high analytical value. The significance score is normalized to a range of 0 to 1 to obtain the feature significance score.

[0045] Step 3.2: Combine quality scoring with intelligent screening; A weighted summation method was used to fuse the sharpness score, contrast score, color fidelity score, noise quality score, and feature saliency score. The weight coefficients for each dimension were determined using the analytic hierarchy process (AHP), comprehensively considering the importance of each dimension to pest and disease identification. Sharpness and feature saliency had the greatest impact on identification results and were assigned higher weights; contrast and noise levels were assigned secondary weights and medium weights; color fidelity had a relatively smaller impact and was assigned a lower weight. The weighted sum was calculated to obtain the overall image quality score, ranging from 0 to 1.

[0046] A quality threshold and a saliency threshold are set. The quality threshold filters images that are of unacceptable overall quality, while the saliency threshold filters images that do not contain obvious pest or disease features. Images with an overall quality score below the quality threshold are marked as low-quality images and filtered out, not proceeding to further processing. Images with an overall quality score above the quality threshold but a feature saliency score below the saliency threshold are marked as low-value images and filtered out, because these images, while of acceptable quality, do not contain useful pest or disease information. Images that meet both the overall quality score and feature saliency score requirements are retained and proceed to further processing.

[0047] Based on the overall quality score and feature saliency score of each image, a priority score is calculated. The priority score is equal to the weighted average of the overall quality score and the feature saliency score. The retained images are then sorted from highest to lowest priority score, with higher-priority images proceeding first to the subsequent feature extraction and recognition processes. This ensures that computational resources are prioritized for processing the most valuable images. Through this intelligent filtering process, a set of qualified images and their priority information are obtained.

[0048] Step 4: Identify crop growth stages based on crop growth records and a set of qualified screening images, construct a feature extraction network and extract multi-scale features to obtain multi-scale feature vectors; Specifically, the following steps are included: Step 4.1, accurate identification of crop growth stages; By analyzing crop morphological characteristics and comparing growth records, the current growth stage of the crop can be accurately identified.

[0049] The selected images are segmented into crop regions to separate the crops from the background. Coarse segmentation is performed using color features, the image is converted to the HSV color space, and pixels that match the crop color criteria are extracted. Fine segmentation is performed using a lightweight semantic segmentation network, outputting pixel-level classification results. The two segmentation results are fused to obtain an accurate crop region mask, from which the crop foreground image is extracted.

[0050] Based on the foreground image of the crop, morphological features are extracted. The overall outline, area, and aspect ratio of the crop are calculated; leaves are identified and their number and average area are counted; the color and texture features of the leaves are analyzed; and the overall morphological features and leaf features are combined to form a set of crop morphological features.

[0051] The extracted morphological features are compared with the crop growth profile established in step 1. The growth amount and growth rate of each indicator are calculated, the growth curve is analyzed, and the actual growth status of the crop is evaluated.

[0052] Based on morphological feature sets and growth status assessment results, growth stages are classified. Crop growth stages are subdivided into six stages: early seedling stage, late seedling stage, early growth stage, late growth stage, flowering stage, and fruiting stage. The classification process employs a two-level judgment strategy: coarse classification is based on leaf quantity, with fewer leaves indicating the seedling stage, a moderate number of leaves indicating the growth stage, and the appearance of flowers or fruits after the leaf quantity reaches its peak indicating the flowering or fruiting stage; fine classification is based on leaf average area, height-to-width ratio, color characteristics, etc., distinguishing between early and late stages within the same stage, and outputting the specific growth stage identifier of the crop.

[0053] Step 4.2, Adaptive feature extraction strategy configuration and network construction during the growth phase; Based on the identified growth stage identifier, the corresponding strategy configuration is selected from the feature extraction strategy library. The strategy library predefines feature extraction schemes for different growth stages, including the selection of regions of interest, network structure parameters, convolutional kernel size, receptive field range, etc.

[0054] The feature extraction schemes for different growth stages are as follows: In the early seedling stage, the number and area of ​​crop leaves are small, and pests and diseases mainly manifest as minor lesions on the leaves. A shallow network and small convolutional kernels are used, focusing on detailed features at the center and edges of the leaves. In the late seedling stage, the number and area of ​​leaves increase, and pest and disease characteristics become more pronounced. The number of network layers is appropriately increased to expand the receptive field. In the early growth stage, the crop enters a rapid growth phase, and pests and diseases may appear on both leaves and stems. A medium-layer network and medium-sized convolutional kernels are used, focusing on both leaf and stem areas. In the late growth stage, crop growth tends to stabilize, and pest and disease types become more diverse. The network depth is further increased to extract richer semantic features. During the flowering stage, the crop has leaves, stems, and flowers simultaneously, and the pest and disease characteristics of different parts vary significantly. A multi-branch network is used, with each branch extracting features from leaves, stems, and flowers separately, and then merging them. In the fruiting stage, the fruit becomes the main focus. The disease features on the fruit surface are large-scale. A deep network and large convolutional kernels are used to focus on large-area lesions and texture features on the fruit surface. By configuring adaptive strategies for different growth stages, the feature extraction network can be ensured to capture the most obvious pest and disease features at the current stage.

[0055] Step 4.3, Dynamic construction of the feature extraction network and extraction of regions of interest; The feature extraction network is dynamically constructed based on the strategy configuration. The network adopts a convolutional neural network architecture, and parameters such as the number of layers, kernel size, and number of channels are dynamically set according to the configuration. Shallow networks contain fewer convolutional layers, such as 3-5 layers, with the number of channels increasing layer by layer, for example, from 32 to 128; medium-level networks contain a moderate number of convolutional layers, such as 6-9 layers, with the number of channels further increasing, for example, to 256 or 512; deep networks contain more convolutional layers, such as more than 10 layers, and use residual connection structures to avoid gradient vanishing; multi-branch networks contain multiple parallel branches, each using different kernel sizes and network depths, and feature fusion is performed at the end.

[0056] Simultaneously, regions of interest (ROIs) are located according to the strategy configuration. When focusing on leaves, a leaf detection algorithm is used to locate the leaves and extract their bounding boxes; when focusing on fruits, a fruit detection algorithm is used to locate the fruits; when focusing on the whole crop, the entire foreground area is taken as the ROI. The extracted image patches are then normalized and scaled to a uniform size.

[0057] Step 4.4, Multi-scale feature pyramid construction and feature dimensionality reduction; During the forward propagation of the feature extraction network, a multi-scale feature pyramid is constructed. Feature maps are extracted from different depth layers of the network, and the outputs of several layers are selected as multiple levels of the pyramid. Shallow feature maps have high spatial resolution, suitable for identifying early-stage diseases and small-area lesions; deep feature maps have high semantic abstraction, suitable for identifying typical diseases and large-area lesions. Global average pooling is applied to the feature maps of each level to convert the multi-channel feature maps into feature vectors. The feature vectors from multiple levels are concatenated to form a multi-scale feature vector.

[0058] Feature selection and dimensionality reduction are performed on the multi-scale feature vectors. A feature importance assessment method is used to calculate the contribution of each feature dimension to pest and disease classification, retaining feature dimensions with high importance scores. Principal component analysis is then used for further dimensionality reduction, selecting principal components whose cumulative variance contribution rate reaches a set proportion. The feature vectors are then projected onto the principal component space to obtain multi-scale feature vectors that are adaptive to the growth stage.

[0059] Step 5: Construct an agricultural pest and disease knowledge base and estimate the prior probability of pests and diseases. Based on the prior probability, weighted fuse of multi-scale feature vectors to obtain an environment-adaptive fusion feature vector. Specifically, the following steps are included: Step 5.1, dynamic estimation of prior probabilities of pests and diseases; An agricultural pest and disease knowledge base is constructed, containing expert knowledge on the occurrence conditions, symptoms, and development patterns of different pest and disease types. Data sources for the knowledge base include agricultural research literature, pest and disease control manuals, agricultural expert experience, and historical pest and disease records. For each pest and disease, its suitable environmental conditions are recorded, including parameters such as temperature range, humidity range, light conditions, and carbon dioxide concentration. This knowledge is stored in a structured format, with each pest and disease corresponding to a set of environmental parameter thresholds and an occurrence probability model. Pest and disease knowledge relevant to the current crop variety is extracted from the knowledge base to form a targeted knowledge subset.

[0060] A mapping model between environmental parameters and pest / disease probabilities is constructed. Environmental parameter records and corresponding pest / disease identification records are extracted from historical databases to form a training dataset. Statistical learning methods, such as logistic regression, Naive Bayes, or random forest, are used to establish the mapping model from environmental parameters to pest / disease occurrence probabilities. The model's input includes environmental parameters such as temperature, humidity, and carbon dioxide concentration, and the output is the occurrence probability of each pest / disease type. For newly established bases lacking historical data, a knowledge transfer strategy is employed. Mapping models with similar environments are selected from the knowledge base as source models. Through similarity evaluation and parameter adjustment, an initial mapping model adapted to the target environment is obtained. As local data accumulates, the weight of local data is gradually increased to achieve a smooth transition from the transferred model to the localized model.

[0061] Based on the current environmental parameters, prior probabilities are calculated. The environmental parameters collected in step 1 are input into the mapping model, and the model outputs the occurrence probability of each pest type. For knowledge transfer-based models, the model output is fused with expert knowledge in the knowledge base, and the posterior probability is calculated using a Bayesian method as the final prior probability. The prior probabilities of each pest type are organized into a vector and normalized to obtain the prior probability vector guided by environmental parameters.

[0062] In some embodiments, due to the time lag effect between environmental parameters and pest occurrence, current environmental parameters may not immediately reflect pest occurrence. Time-series environmental parameter analysis and lag effect modeling can be used to improve the accuracy of prior probability estimation. The aim is to consider the historical trends and cumulative effects of environmental parameters to more accurately predict the probability of pest occurrence. Specifically, not only are current environmental parameters used, but also sequences of environmental parameters over a past period are extracted, such as temperature and humidity change curves over the past 7 or 14 days. Statistical characteristics of environmental parameters are calculated, including mean, variance, maximum, minimum, and trend. The cumulative effects of environmental parameters, such as cumulative temperature and cumulative humidity duration, are analyzed, as these cumulative amounts are closely related to pest occurrence. A time-series mapping model is established, using recurrent neural networks or long short-term memory networks. The input is the time-series sequence of environmental parameters, and the output is the probability of pest occurrence. The time-series model can capture the dynamic change patterns and lag effects of environmental parameters, improving the accuracy of prior probability estimation.

[0063] Step 5.2: Adaptive adjustment of feature weights guided by prior probability and fusion of multimodal features; Based on multi-scale feature vectors and prior probability vectors, an adaptive adjustment mechanism for feature weights guided by prior probability is adopted to achieve deep fusion of image features and prior environmental knowledge.

[0064] Feature space decomposition and feature subspace construction are performed. Based on the multi-scale feature vectors obtained in step 4, discriminant analysis is used to identify feature subspaces associated with different pest and disease types. For each pest and disease type, sample features are extracted from the training dataset, and linear discriminant analysis is used to find the optimal discrimination direction, constructing the discriminant subspace for that type. The original multi-scale feature vectors are projected onto each feature subspace to obtain the feature components of each subspace.

[0065] Dynamic weight allocation based on prior probability is performed. Based on the prior probability vector obtained in step 5.1, dynamic weight coefficients are assigned to each feature subspace. Each weight coefficient consists of two parts: a basic weight and a prior weight. The basic weight ensures that all pest and disease types receive minimum attention, while the prior weight is proportional to the prior probability of that type. Through dynamic weight allocation, the feature representation can adaptively adjust according to current environmental conditions, enhancing its sensitivity to high-probability pest and disease features.

[0066] A weighted feature fusion and gating mechanism are implemented to balance the effects of prior knowledge. The feature components of each feature subspace are weighted and fused to obtain a feature vector enhanced by prior knowledge. To avoid over-reliance on prior knowledge, a gating mechanism is designed to dynamically balance the contributions of the enhanced prior features and the original features. The entropy value of the prior probability vector is calculated, reflecting the uncertainty of the probability distribution. Based on the entropy value, a gating coefficient is calculated, and the enhanced prior knowledge features and the original features are weighted and fused according to the gating coefficient to obtain the final environment-adaptive fused feature vector. Through the gating mechanism, the system can fully utilize prior information when prior knowledge is reliable, and rely more on image evidence when prior knowledge is uncertain, achieving an intelligent balance between image features and environmental prior knowledge.

[0067] In some embodiments, since the construction of the feature subspace depends on the quality and quantity of training data, the feature subspace may not be accurate enough for pest types with few samples. Data augmentation and synthetic minority class oversampling techniques can be used to balance the training data and improve the reliability of the feature subspace. The aim is to increase the number and diversity of minority class samples, enabling the feature subspace to better represent the feature distribution of that type. Specifically, for pest types with few samples, data augmentation techniques are used to generate more training samples. Data augmentation methods include rotation, flipping, scaling, cropping, color jittering, etc., which transform the original samples to generate new samples with different perspectives and lighting conditions. Synthetic minority class oversampling techniques are used, which generate synthetic samples by interpolating minority class samples in the feature space. A minority class sample is selected, and its nearest neighbor samples in the feature space are found. Linear interpolation is performed between this sample and its nearest neighbor samples to generate new synthetic samples. Through data augmentation and oversampling, the number of minority class samples is increased, making the number of samples of each type more balanced, and improving the accuracy and robustness of the feature subspace construction.

[0068] Step 6: Double-weight the environmental adaptive fusion feature vector and use a hierarchical classification strategy to identify pests and diseases, and obtain preliminary identification results of pests and diseases. Specifically, the following steps are included: Step 6.1, Feature enhancement of the dual attention mechanism; Design a cascaded combination of spatial attention and channel attention to achieve dual weighted enhancement.

[0069] A spatial attention module is designed. Spatial importance analysis is performed on the feature maps corresponding to the fused feature vectors. A global information aggregation method is used to calculate the maximum and average values ​​of each spatial location across all channels, resulting in two statistical feature maps. These statistical feature maps are concatenated and input into a small convolutional network, outputting a spatial attention weight map. The weight map is then multiplied element-wise with the original feature map to obtain a spatially weighted feature map, highlighting areas with obvious pest and disease characteristics while suppressing background and irrelevant areas.

[0070] A channel attention module is designed, employing global average pooling and global max pooling methods to calculate a statistical vector for each channel. This statistical vector is then input into a shared multilayer perceptron, outputting a channel attention vector. The channel attention vector is then multiplied channel-by-channel with the feature map to obtain a channel-weighted feature map, thus strengthening the feature channels that contribute significantly to pest and disease identification.

[0071] A dual attention cascade is performed, applying spatial attention and channel attention modules sequentially, with the feature map being weighted simultaneously by both spatial and channel dimensions. Global average pooling is then applied to the double-weighted feature map to obtain an attention-enhanced feature vector, which serves as the input to the classification network.

[0072] Step 6.2, Pest and disease identification using hierarchical classification networks; We designed a hierarchical classification network and adopted a coarse-to-fine classification strategy to improve the accuracy and efficiency of recognition.

[0073] The hierarchical classification network includes coarse-grained and fine-grained classification branches. The coarse-grained classifier divides pests and diseases into two main categories: diseases and pests. It uses fully connected layers and a Softmax activation function, taking attention-enhanced feature vectors as input and outputting probability scores for the two categories. This coarse-grained classification quickly determines the major pest and disease categories, narrowing the search scope for subsequent fine-grained classification.

[0074] Fine-grained classifiers are trained separately for each major category. Based on the coarse-grained classification results, the appropriate fine-grained classifier is selected for specific species identification. The fine-grained classifier also uses fully connected layers and the Softmax activation function, outputting the probability scores of each specific species within that major category. The species with the highest probability score is selected as the final identification result, and its corresponding probability score is used as the identification confidence score. Through hierarchical classification, the complex multi-classification problem is decomposed into multiple simple sub-problems, reducing model complexity and improving classification accuracy and efficiency. Preliminary identification results of pests and diseases and their confidence scores are obtained.

[0075] Step 7: Based on the preliminary identification results of pests and diseases, multi-source evidence fusion is performed to obtain the final identification results, and prevention and control suggestions are generated by combining the pest and disease knowledge base; Specifically, the following steps are included: Step 7.1: Multi-source evidence fusion and identification result optimization; A multi-source evidence system, including image recognition evidence, environmental parameter evidence, and spatiotemporal correlation evidence, is constructed in a cloud data center, and fusion reasoning is performed using evidence theory.

[0076] A multi-source evidence system was constructed. Image recognition evidence came from the preliminary recognition results and confidence scores obtained at the edge computing node in step 6, which were uploaded to the cloud via the Internet of Things network. Environmental parameter evidence came from the prior probability vector calculated in step 5 based on sensor data such as temperature, humidity, and carbon dioxide concentration in the greenhouse. Spatiotemporal correlation evidence was obtained by querying the historical pest and disease identification record database of the base, and statistically analyzing the historical occurrence probability of each type of pest and disease in the current greenhouse location, current season, and time period. For example, the identification records of the greenhouse in the past 7 days were queried to analyze the occurrence frequency of common pests and diseases such as early blight, late blight, and gray mold in tomatoes.

[0077] The Dempster-Shafer evidence theory is used to fuse three types of evidence for inference. For each type of evidence, a basic probability assignment function is defined to assign a confidence level to each pest / disease type. Image recognition evidence uses the confidence score output in step 6, environmental parameter evidence uses the prior probability vector output in step 5, and spatiotemporal correlation evidence uses historical occurrence probabilities, all normalized to serve as the confidence level for each type. The Dempster combination rule is used to combine the three types of evidence, calculate the comprehensive confidence level for each type, obtain the comprehensive confidence level for each pest / disease type, and select the type with the highest comprehensive confidence level as the fused recognition result.

[0078] The reliability of the identification results is assessed, and ambiguity is addressed. The maximum and second-largest values ​​of the overall confidence score are calculated, and a confidence score difference threshold is set. If the difference between the maximum and second-largest values ​​exceeds this threshold, the identification result is considered reliable, and the cloud system directly uses the fused identification result as the final pest and disease identification result. If the difference is less than the threshold, the identification result is considered ambiguous, and the system triggers a manual review mechanism. Information such as the image, environmental parameters, and preliminary identification results of the ambiguous sample are pushed to agricultural experts at the base or a remote expert team for final judgment. The manual review result is used as the final pest and disease identification result. Simultaneously, the system stores this sample as a high-quality labeled sample in the base's continuous learning sample library for subsequent model optimization.

[0079] Step 7.2: Generate intelligent prevention and control suggestions based on the pest and disease knowledge base; Based on the final pest and disease identification results, combined with the agricultural pest and disease knowledge base established in step 5 and the current environmental conditions, targeted prevention and control suggestions are generated.

[0080] Consult the pest and disease knowledge base to obtain control solutions. Based on the final pest and disease identification results, search the agricultural pest and disease knowledge base established in step 5 for corresponding control solutions, and obtain recommended control methods and pesticide information. The knowledge base contains detailed information on various pests and diseases, including pest and disease name, symptom description, occurrence pattern, degree of damage, control methods, recommended pesticides, application concentration, application time, and precautions.

[0081] Optimize the control plan by combining crop growth stage and environmental conditions. Obtain the current crop growth stage information from the crop growth record in Step 1, such as seedling stage, growth stage, flowering stage, or fruiting stage; obtain the current greenhouse environmental conditions such as temperature and humidity from the environmental parameter data in Step 1; adjust the control plan according to the crop growth stage, for example, prioritize low-toxicity and low-residue biological pesticides during the flowering and fruiting stages to avoid affecting pollination and fruit quality; adjust the application time and method according to environmental conditions, for example, under high temperature and high humidity conditions, it is recommended to apply pesticides in the morning or evening to avoid phytotoxicity and reduced efficacy.

[0082] Generate structured prevention and control recommendations. Organize the optimized prevention and control plan into structured recommendations, including pest / disease name, damage assessment, recommended control methods, specific pesticide name, application concentration, application time, application method, expected effects, and precautions. For results with high confidence, mark them as "Confirmed Pest / Disease," recommending immediate control measures; for results with medium confidence, mark them as "Suspected Pest / Disease," recommending enhanced monitoring and preventative pesticide application; for pest / disease types appearing for the first time in the greenhouse, mark them as "New Pest / Disease," recommending close monitoring and timely reporting.

[0083] Prevention and control recommendations are pushed through the base management platform. The final pest and disease identification results and control recommendations are pushed to the managers of the corresponding greenhouses via the base management platform. Push methods include mobile app notifications, SMS reminders, and management platform messages. The pushed information includes detailed information such as the greenhouse number where the pest or disease occurred, the location of the outbreak, the identification time, the type of pest or disease, the degree of damage, and control recommendations, along with images of the pest or disease and symptom comparison charts to facilitate quick confirmation and handling by managers. For pests or diseases with high damage levels or rapid spread, the system automatically triggers an emergency warning, prioritizing push notifications to the base manager and technical personnel. Managers can provide feedback on the control effects through the platform, and the system records control measures and effect evaluations to optimize the knowledge base and improve the accuracy of control recommendations. Through the above process, the final pest and disease identification results and control recommendations are obtained, achieving closed-loop management from identification to control.

[0084] A system for IoT-based image recognition of crop diseases and pests, used to execute the aforementioned method for IoT-based image recognition of crop diseases and pests, such as... Figure 3 As shown, it includes: The data acquisition module collects growth parameters and establishes growth profiles based on IoT sensing nodes, and obtains multi-source synchronous data packets; The image enhancement module is used to perform illumination characteristic analysis and adaptive enhancement on the original images in multi-source synchronous data packets to obtain images with optimized quality. The image filtering module is used to evaluate the quality of optimized images, calculate the overall quality score, and filter them to obtain a set of qualified images. The feature extraction module identifies crop growth stages based on crop growth records and a set of qualified selected images, constructs a feature extraction network, and extracts multi-scale features to obtain multi-scale feature vectors. The feature fusion module is used to construct an agricultural pest and disease knowledge base and estimate the prior probability of pests and diseases. Based on the prior probability, the multi-scale feature vectors are weighted and fused to obtain the environment-adaptive fusion feature vector. The preliminary identification module is used to perform double weighting on the environmental adaptive fusion feature vector and adopt a hierarchical classification strategy to identify pests and diseases, thereby obtaining preliminary identification results of pests and diseases. The results optimization module integrates multi-source evidence based on the preliminary identification results of pests and diseases to obtain the final identification results, and generates prevention and control suggestions by combining the agricultural pest and disease knowledge base.

[0085] In one embodiment of the present invention, a specific example is provided: A modern tomato planting base located in North China covers an area of ​​300 mu (approximately 20 hectares) and includes 50 intelligent greenhouses. The tomato variety grown at this base is the pink tomato, with a growth cycle of approximately 120 days. The base has deployed the IoT-based pest and disease image recognition system of this invention, with 6 IoT sensing nodes installed in each greenhouse, totaling 300 nodes, forming a monitoring network covering the entire base.

[0086] A 30-day field test was conducted in greenhouses No. 3 and No. 15. During the test, 12 IoT sensing nodes were deployed, covering an area of ​​approximately 12 acres, encompassing two key stages: the late growth stage and the flowering stage of tomatoes. A total of 8,640 valid data samples were collected during the test, and 127 cases of pests and diseases were successfully identified, achieving a system identification accuracy rate of 92.3%.

[0087] Table 1 shows a set of typical data collected at node 2 inside greenhouse 3 at 10:00 AM on July 15, 2025: Table 1: A set of typical data collected at node 2 inside greenhouse 3;

[0088] Based on the data in Table 1, the system performed a complete recognition process.

[0089] Image Enhancement and Quality Assessment: The illumination assessment results show that the overall illumination level of the image is normal, but the illumination uniformity is low, with significant differences in illumination between the top and bottom. The system adopted a region-specific adaptive enhancement strategy, increasing the brightness of the dark areas in the lower part of the image and moderately compressing the bright areas in the upper part. The enhanced image achieved a quality score of 0.89 and a feature significance score of 0.76, passing the quality screening.

[0090] Growth stage identification and feature extraction: The growth stage identification results showed that the crop was in the late growth stage. The system selected the corresponding feature extraction strategy, adopted a mid-level network structure, and focused on the area covered by leaves and stems.

[0091] Prior probability estimation: Environmental parameter analysis results show that under the current conditions of 28 degrees Celsius and 85% humidity, the prior probability of early blight in tomatoes is 0.45, the prior probability of late blight is 0.25, the prior probability of gray mold is 0.15, and the combined prior probability of other diseases and pests is 0.15. The system adaptively adjusts the feature weights based on the prior probabilities, enhancing the weight of features related to early blight.

[0092] Multi-source evidence fusion and final identification: The identification results show that image recognition evidence supports early blight with a confidence level of 0.82, environmental parameter evidence supports early blight with a confidence level of 0.45, and spatiotemporal correlation evidence shows that there are two early blight identification records in the greenhouse in the past 7 days, with a support confidence level of 0.60. After multi-source evidence fusion, the overall confidence level is 0.88, and the final identification result is tomato early blight, with a high confidence level, requiring no manual verification.

[0093] Prevention and Control Recommendations and Results: The system pushed the identification results to the base management personnel and provided prevention and control recommendations, including spraying with a 500-fold dilution of 70% mancozeb wettable powder, once every 7 days, for 2-3 consecutive applications. The management personnel promptly implemented the prevention and control measures based on the recommendations. Subsequent monitoring showed that after 3 days of treatment, the disease in the area was effectively controlled and no large-scale spread occurred.

[0094] Table 2 shows another set of typical data collected at node 5 inside greenhouse 15 at 3 PM on July 28, 2025: Table 2: Another set of typical data collected at node 5 in greenhouse No. 15;

[0095] Based on the data in Table 2, the system performed the identification process.

[0096] Image Enhancement and Quality Assessment: The illumination assessment results show that the overall illumination level of the image is strong, and the illumination uniformity is good. The system uses a dynamic range compression algorithm for image enhancement, and the enhanced image quality score reaches 0.91, with a feature significance score of 0.82.

[0097] Growth stage identification and feature extraction: The growth stage identification results showed that the crop was in the flowering stage. The system selected a multi-branch network structure to extract features of leaves, stems and flowers respectively.

[0098] Prior probability estimation: Environmental parameter analysis results show that under the current conditions of 32 degrees Celsius and 78% humidity, the prior probability of tomato leaf mold is 0.38, the prior probability of tomato gray mold is 0.28, the prior probability of tomato powdery mildew is 0.20, and the total prior probability of other diseases and pests is 0.14.

[0099] Multi-source evidence fusion and final identification: The identification results showed that image recognition evidence supported leaf mold with a confidence level of 0.79, environmental parameter evidence supported leaf mold with a confidence level of 0.38, and spatiotemporal correlation evidence showed that the greenhouse had one leaf mold identification record in the past 7 days, with a support confidence level of 0.45. After multi-source evidence fusion, the overall confidence level was 0.85, and the final identification result was tomato leaf mold, with a high confidence level, requiring no manual verification.

[0100] Prevention and Control Recommendations and Results: The system provided prevention and control recommendations. Considering the current flowering period, the use of biological pesticides, such as a 500-fold dilution of 2% kasugamycin aqueous solution, was prioritized for spraying to avoid affecting pollination and fruit quality. After the management adopted the recommendations, the disease was effectively controlled and did not affect the normal flowering and fruiting of tomatoes.

[0101] As can be seen from this application example, the method of the present invention can operate effectively in actual facility agriculture environments. It can adaptively adjust the identification strategy according to different growth stages and environmental conditions, realize accurate identification and timely early warning of pests and diseases, and provide strong technical support for agricultural production.

[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. A method for IoT image recognition of crop diseases and pests, characterized in that, Includes the following steps: Based on the collection of growth parameters and the establishment of growth profiles by IoT sensing nodes, multi-source synchronous data packets are obtained. Illumination characteristics analysis and adaptive enhancement are performed on the original images in multi-source synchronization data packets to obtain images with optimized quality. The optimized images are evaluated for quality, a comprehensive quality score is calculated and filtered to obtain a set of qualified images. Based on crop growth records and a set of qualified selected images, the crop growth stages are identified, a feature extraction network is constructed, and multi-scale features are extracted to obtain multi-scale feature vectors. A knowledge base for agricultural diseases and pests is constructed and the prior probabilities of diseases and pests are estimated. Based on the prior probabilities, multi-scale feature vectors are weighted and fused to obtain an environment-adaptive fusion feature vector. The environmental adaptive fusion feature vector is double-weighted, and a hierarchical classification strategy is used to identify pests and diseases, resulting in preliminary identification results. The final identification result is obtained by fusing multi-source evidence based on the preliminary identification results of pests and diseases, and prevention and control suggestions are generated by combining the agricultural pest and disease knowledge base.

2. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The obtained multi-source synchronization data packets include: Deploy IoT sensing nodes, integrating image acquisition modules, light monitoring modules, environmental parameter monitoring modules, and location identification modules; Establish a growth record system, acquire images, extract growth indicators, and organize them into growth curves according to time series. Simultaneously, the sensors are triggered to collect data, encapsulating image data, light intensity values, environmental parameter values, timestamps, and spatial coordinate information into data packets, querying growth record information and attaching it to form a multi-source synchronous data packet.

3. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The image with optimized quality includes: The original image is divided into blocks, and the average brightness, brightness variance and average gradient magnitude of each sub-region are calculated to obtain a set of local illumination features. The proportion of overexposed and underexposed pixels is statistically analyzed, and the dynamic range utilization and grayscale histogram morphological feature vector are calculated. The sub-region is divided into four large areas, corresponding to the light sensors in four directions. The brightness value of the large area is calculated and correlated with the light intensity value of the sensor. The weighted fusion is then used to obtain the comprehensive light intensity value and generate a light condition description vector. The illumination type is determined based on the illumination condition description vector. If the overall illumination level is lower than the first illumination level threshold, it is determined to be a weak light image. If the overall illumination level is higher than the second illumination level threshold, it is determined to be a strong light image. The brightness of the weak light image is increased, the dynamic range of the strong light image is compressed, and the image with uneven illumination is enhanced by regional adaptive enhancement. The enhanced image is then output.

4. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The obtained qualified image set includes: To assess image sharpness, a sharpness score is obtained by calculating the variance of the Laplacian response values. To evaluate image contrast, a contrast score is obtained by calculating contrast features based on the gray-level co-occurrence matrix. The color fidelity score is obtained by calculating the difference in the mean values ​​of the color channels of the images before and after enhancement. To assess the noise level of an image, a noise quality score is obtained by calculating the median absolute deviation of the high-frequency subband coefficients. Identify suspected lesion areas, count the proportion of pixels deviating from the healthy color range and the texture complexity to obtain a feature saliency score; The scores are weighted and fused to obtain a comprehensive quality score. Quality thresholds and significance thresholds are set for filtering to obtain a set of filtered images.

5. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The obtained multi-scale feature vector includes: The selected image is segmented into regions. Coarse segmentation is performed using color features, and fine segmentation is performed using a semantic segmentation network. The resulting images are then fused to obtain the crop foreground image. Extract morphological features from the crop foreground image, including overall outline, area, aspect ratio, number of leaves, average leaf area, color and texture features, to form a set of morphological features; By comparing morphological characteristics with growth records, growth stages are classified and growth stage identifiers are output. Select a strategy configuration from the feature extraction strategy library, dynamically construct a feature extraction network, extract feature maps from different depth layers, convert them into feature vectors using global average pooling, and concatenate them to form multi-scale feature vectors.

6. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The obtained environment adaptive fusion feature vector includes: Construct an agricultural pest and disease knowledge base, which includes the occurrence conditions, symptom characteristics, and development patterns of different types of pests and diseases; Environmental parameter records and pest and disease identification records are extracted from historical databases to form a training dataset. A mapping model from environmental parameters to the probability of pest and disease occurrence is established. The environmental parameters are input into the mapping model to obtain the prior probability vector. Discriminant analysis is used to identify feature subspaces related to pest and disease types, and multi-scale feature vectors are projected onto the feature subspaces to obtain feature components. Weight coefficients are assigned to the feature subspace based on the prior probability vector, and the feature components are weighted and fused to obtain the prior knowledge-enhanced feature vector. The design of the gating mechanism balances the prior enhanced features and the original features. The entropy value of the prior probability vector is calculated, and the gating coefficient is calculated based on the entropy value. The prior knowledge enhanced features and the original features are then fused according to the gating coefficient to obtain the environment-adaptive fusion feature vector.

7. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The preliminary identification results of the diseases and pests obtained include: Design a spatial attention module to perform spatial location importance analysis on the feature map, output a spatial attention weight map, and multiply the weight map element-wise with the feature map to obtain a spatially weighted feature map; Design a channel attention module to calculate statistical vectors for each channel, output channel attention vectors, and multiply the channel attention vectors with the feature map channel by channel to obtain the channel weighted feature map; Spatial attention and channel attention modules are applied sequentially to perform global average pooling on the dual-weighted feature map to obtain the attention-enhanced feature vector; A hierarchical classification network is designed. The coarse-grained classifier divides pests and diseases into disease categories and insect pest categories. The fine-grained classifier identifies the species based on the coarse-grained classification results, thus obtaining preliminary identification results of pests and diseases.

8. The method for IoT image recognition of crop diseases and pests according to claim 1, characterized in that, The final identification result is obtained by fusing multi-source evidence based on the preliminary identification results of pests and diseases, and prevention and control suggestions are generated by combining the agricultural pest and disease knowledge base, including: Construct a multi-source evidence system that includes image recognition evidence, environmental parameter evidence, and spatiotemporal correlation evidence; The Dempster-Shafer evidence theory is used for fusion reasoning to assign confidence levels to pest and disease types. The Dempster combination rule is used to combine the types to obtain the comprehensive confidence level. The type with the highest comprehensive confidence level is selected as the fusion identification result. Calculate the maximum and second-largest comprehensive confidence scores. If the difference between the maximum and second-largest comprehensive confidence scores is greater than the confidence score difference threshold, the fused identification result is used as the final pest and disease identification result. If the difference is less than the confidence score difference threshold, a manual review mechanism is triggered, and the manual review result is used as the final pest and disease identification result.

9. The method for IoT image recognition of crop diseases and pests according to claim 8, characterized in that, The method of generating prevention and control suggestions by combining the agricultural pest and disease knowledge base also includes: Based on the final pest and disease identification results, retrieve control solutions from the agricultural pest and disease knowledge base; Information on growth stages is obtained from growth records, and environmental conditions are obtained from environmental parameter data. Prevention and control plans are then adjusted based on growth stages and environmental conditions. The prevention and control plan is organized into structured prevention and control recommendations and pushed to management personnel through the base management platform.

10. A system for IoT image recognition of crop diseases and pests, characterized in that, A method for performing an IoT image recognition of crop diseases and pests as described in any one of claims 1-9 includes: The data acquisition module collects growth parameters and establishes growth profiles based on IoT sensing nodes, and obtains multi-source synchronous data packets; The image enhancement module is used to perform illumination characteristic analysis and adaptive enhancement on the original images in multi-source synchronous data packets to obtain images with optimized quality. The image filtering module is used to evaluate the quality of optimized images, calculate the overall quality score, and filter them to obtain a set of qualified images. The feature extraction module identifies crop growth stages based on crop growth records and a set of qualified selected images, constructs a feature extraction network, and extracts multi-scale features to obtain multi-scale feature vectors. The feature fusion module is used to construct an agricultural pest and disease knowledge base and estimate the prior probability of pests and diseases. Based on the prior probability, the multi-scale feature vectors are weighted and fused to obtain the environment-adaptive fusion feature vector. The preliminary identification module is used to perform double weighting on the environmental adaptive fusion feature vector and adopt a hierarchical classification strategy to identify pests and diseases, thereby obtaining preliminary identification results of pests and diseases. The results optimization module integrates multi-source evidence based on the preliminary identification results of pests and diseases to obtain the final identification results, and generates prevention and control suggestions by combining the agricultural pest and disease knowledge base.

Citation Information

Cited By

  • Methods and devices for risk assessment of pests and diseases in facility agriculture

    CN122311896A