Facility agriculture disease and pest prevention and control method and device based on deep learning

By deploying deep learning methods in facility agriculture, and utilizing imaging nodes and three-dimensional convolutional neural networks, dynamic video sequences of pests and diseases are generated. This solves the problems of low efficiency and high misjudgment rate in pest and disease monitoring in facility agriculture, enabling early warning and targeted prevention and control, and improving the accuracy and stability of pest and disease management.

CN121837804AActive Publication Date: 2026-04-10YANAN UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-16
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing technologies for monitoring pests and diseases in facility agriculture suffer from low efficiency, high misjudgment rate, lack of forward-looking control strategies, inability to accurately identify the development stage and transmission dynamics of pests and diseases, resulting in delayed control measures and waste of resources.

Method used

By employing a deep learning-based approach, canopy images are acquired through the deployment of imaging nodes. A lightweight change detection model and a three-dimensional convolutional neural network are used, combined with ambient light intensity compensation and multi-source information fusion, to generate dynamic video sequences of pests and diseases. Spatiotemporal features are extracted and control instructions are generated, achieving closed-loop learning and error correction.

Benefits of technology

It enables early warning of pests and diseases, reduces false alarm rates, provides targeted prevention and control suggestions, improves the accuracy and foresight of pest and disease control, and ensures the efficiency and stability of pest and disease management in facility agriculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121837804A_ABST
    Figure CN121837804A_ABST
Patent Text Reader

Abstract

The invention provides a facility agriculture disease and insect pest prevention and control method and device based on deep learning, and relates to the technical field of agricultural protection.The method comprises the steps that canopy images are collected through imaging nodes in a facility according to a dynamically-adjusted monitoring period, and after illumination compensation, pixel-level difference calculation and noise filtering are conducted, a binary change area graph is output; then, suspicious lesion areas are extracted from three continuous periods, a disease and pest dynamic video sequence is generated, the sequence is input into a three-dimensional convolutional neural network embedded with a time sequence attention enhancement module, and spatio-temporal features are extracted to obtain high-order feature vectors; fusing the environment auxiliary features, outputting a pest and disease classification result through a full-connection classifier, and generating a prevention and control instruction; and finally, based on a continuous learning strategy of a prevention and control effect verification closed loop and experience playback, adaptively optimizing model parameters, and forming a complete prevention and control closed loop.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of agricultural protection technology, in particular to a facility agricultural pest and disease prevention and control method and device based on deep learning. BACKGROUND

[0002] Facility agriculture provides a controllable environment for crop growth, but at the same time forms a closed space that is easy for pests and diseases to spread and outbreak. Traditional pest and disease monitoring relies on manual inspection, which has low efficiency, strong subjectivity, and late discovery, often leading to delayed prevention and control and misuse of pesticides. Visual recognition technology based on deep learning brings hope for automated monitoring. Existing technologies usually collect crop images by deploying cameras and use trained convolutional neural network models to classify single static images to identify whether they contain disease spots or pest symptoms, thereby achieving early warning. This method improves the discovery efficiency to some extent, but its technical paradigm essentially simplifies the dynamic and continuous biological evolution process in the agricultural scene to the recognition of static appearance at a single time point, which has fundamental limitations.

[0003] The implementation path of existing technologies mainly focuses on two aspects: one is to optimize the model itself by using larger data sets and deeper networks to improve the recognition accuracy of static disease spot morphology; the other is to supplement data, such as fusing multispectral information or combining with environmental sensor data such as temperature and humidity, to provide more discriminative basis. However, these improvements do not address the core bottleneck. First, static image classification cannot distinguish whether the disease spot is in the incubation period, the diffusion period, or the stable period, nor can it perceive the development speed, which is crucial for assessing the severity and urgency of pests and diseases. Second, existing methods are not adaptive to frequent changes in lighting conditions within facilities, such as the turning on and off of supplemental lights and cloud cover, and are prone to misjudging pixel differences caused by lighting changes as disease changes, resulting in a large number of false alarms. Third, the model decision-making process is disconnected from the specific environmental causes and pest and disease transmission dynamics within the facility, resulting in the inability to diagnose the cause of the disease while only seeing the symptoms. The output of the prevention and control suggestion often stops at what pesticide to use, rather than adjusting which environmental parameters to eliminate the disease conditions, and the prevention and control strategy lacks foresight and fundamental nature.

[0004] The deficiencies of existing technologies are directly due to the inherent mode of static snapshot analysis. First, in the change detection stage, existing methods lack effective isolation mechanisms for environmental light changes in facilities, and cannot refine time series signals that represent the diffusion direction of pests and diseases from continuous changes. Second, in the feature learning stage, existing models based on single images or simple video frame stacking cannot extract deep spatiotemporal pattern features that can depict how pests and diseases evolve, making it impossible to achieve early warning.

[0005] The above information disclosed in the Background section is only for the purpose of enhancing the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art that is already known to those of ordinary skill in the art. SUMMARY

[0006] The purpose of the present application is to provide a facility agriculture pest and disease prevention and control method and device based on deep learning, to solve the problems raised in the background.

[0007] To achieve the above purpose, the present application provides the following technical solutions: A facility agriculture pest and disease prevention and control method based on deep learning, the specific steps comprising: Step 1: Based on the imaging nodes deployed in the facility agriculture, the crown layer images are collected at a fixed monitoring period, the lightweight change detection model is used to compare the crown layer images of adjacent monitoring periods, the pixel-level difference calculation and noise filtering are performed, and the binary change area image is output, wherein the highlighted pixels represent suspicious lesion change areas; Step 2: The latest three consecutive monitoring period change area images are called, and the suspicious lesion change areas are accumulated and analyzed, respectively generating binary images corresponding to the monitoring period, arranging the three binary images in time sequence to form a three-frame pest and disease dynamic video sequence, which records the dynamic evolution process of the pest and disease in three consecutive monitoring periods; Step 3: The pest and disease dynamic video sequence is input into a three-dimensional convolutional neural network for classification processing, the three-dimensional convolutional neural network extracts the space-time features in the pest and disease dynamic video sequence through a three-dimensional convolution kernel, and obtains a high-order feature vector representing the dynamic change pattern of the pest and disease; Step 4: The high-order feature vector is input into a fully connected classifier, the probability of belonging to each pest and disease category is calculated, the final classification result of the pest and disease dynamic video sequence is output, and the prevention and control instruction is generated according to the final classification result, the newly generated pest and disease dynamic video sequence and its final classification result are added to the training set, and the three-dimensional convolutional network and the classifier parameters are fine-tuned regularly.

[0008] Further, when the lightweight change detection model performs pixel-level difference calculation, the ambient light intensity data synchronously collected in the facility is introduced for illumination compensation, specifically: the crown layer images collected in the adjacent two monitoring periods are obtained, and the ambient light intensity data during imaging is synchronously read, based on the ambient light intensity data, the brightness of the two crown layer images is corrected respectively, the overall brightness difference caused by the change of illumination conditions is eliminated, and two standardized crown layer images with comparable illumination conditions are obtained; The two obtained normalized canopy images are subjected to pixel-by-pixel gray value subtraction operation and taking absolute value to generate an initial difference image reflecting the pixel-level brightness change, a method based on local image statistical features is used to dynamically calculate the binary threshold of each pixel region in the initial difference image, the points with pixel values greater than the corresponding local threshold are preliminarily determined as change pixels to obtain a rough binary change image, morphological opening operation is performed on the rough binary change image to eliminate isolated white points generated by image noise and slight registration error, and then morphological closing operation is performed to fill the cracks and cavities in the real change region caused by uneven illumination and leaf texture, and finally a binary change region image is output, wherein the region composed of pixel points with pixel value of 1 represents the suspected lesion region.

[0009] Further, the fixed monitoring period is dynamically adjusted according to the growth period of the crops in the facility; when the growth period of the crops in the facility is the seedling stage and the rapid growth stage in which the crop diseases and pests are prone to occur and the growth changes rapidly, the monitoring period one is adopted; when the growth period of the crops in the facility is the mature stable stage in which the growth of the crops tends to be stable and changes slowly, the monitoring period two is adopted, wherein the length of the monitoring period one is less than that of the monitoring period two. The specific logic of generating the binary image is as follows: for the earliest monitoring period in the latest three consecutive monitoring periods, the change region image of the monitoring period is taken as the binary image thereof, for the remaining two monitoring periods in the latest three consecutive monitoring periods, the suspected lesion region of the change region image is superimposed into the binary image of the last monitoring period to serve as the binary image corresponding to the monitoring period, the binary images of the three consecutive monitoring periods are arranged in time sequence, and the binary images are stacked to form a video tensor with a length of 3 in the time dimension, i.e. a dynamic video sequence of crop diseases and pests.

[0010] Further, the three-dimensional convolutional neural network extracts the spatio-temporal features of the dynamic video sequence of crop diseases and pests by embedding a time sequence attention enhancement module, specifically including: the input of the three-dimensional convolutional neural network is the dynamic video sequence of crop diseases and pests, which is a three-dimensional tensor with a height H, a width W and a channel number C, wherein the time step is 3, and each time step stores a single-channel binary image; a first three-dimensional convolutional layer uses multiple 3x3x3 three-dimensional convolutional kernels to perform convolution operation on the spatial and temporal dimensions of the input dynamic video sequence of crop diseases and pests, preliminarily fuses the spatio-temporal information, and outputs an initial three-dimensional feature map. The initial three-dimensional feature map is split into three independent feature slices according to the time step; the feature slice of each time step is subjected to global feature compression to obtain a summary descriptor of each time step; a lightweight parameter network is used to analyze these summary descriptors, calculate and assign a dynamic attention weight reflecting the importance of each time step; each feature slice is weighted according to the weight, and then recombined into a weighted three-dimensional feature map; The weighted three-dimensional feature map is sequentially passed through a three-dimensional batch normalization layer, an activation function layer, and a plurality of feature abstraction modules composed of a three-dimensional convolution layer and a three-dimensional pooling layer in cascade, to gradually extract deeper and more abstract spatio-temporal pattern features, and a three-dimensional feature tensor output by a last feature abstraction module is compressed in space and time dimensions by a global three-dimensional average pooling layer, and is converted into a one-dimensional high-order feature vector.

[0011] Further, the full connection classifier performs multi-source information fusion classification, specifically including: splicing the high-order feature vector and an auxiliary environment feature vector to form a fusion feature vector, the auxiliary environment feature vector being derived from environment sensor data synchronously collected in three monitoring periods constituting the dynamic video sequence of the plant disease and pest, and containing average temperature, average humidity and temperature daily range indexes in the three monitoring periods after standardization processing; the full connection classifier is composed of a plurality of full connection layers, performs multiple nonlinear transformations on the input fusion feature vector, and finally maps the transformation result to a probability value belonging to each preset plant disease and pest category through a Softmax activation function, and takes the plant disease and pest category corresponding to the highest probability value as the final classification result of the dynamic video sequence of the plant disease and pest.

[0012] Further, periodically fine-tuning the parameters of the three-dimensional convolutional network and the classifier specifically adopts an experience replay-based lifelong learning strategy: maintaining a fixed-capacity historical prior sample library for storing data pairs constituted by verified dynamic video sequences of plant diseases and pests and their corresponding real plant disease and pest categories in historical monitoring periods; when periodic fine-tuning is triggered, a batch of data is randomly extracted from the latest collected and verified data, and a batch of historical data is randomly extracted from the historical prior sample library, to jointly constitute a fine-tuning training set for this time, and a round of optimization and update of the parameters of the three-dimensional convolutional neural network and the full connection classifier is performed using the fine-tuning training set, wherein the periodic fine-tuning is triggered when the amount of newly collected and verified data reaches a set threshold.

[0013] Further, after the prevention and control measures are performed according to the final classification result, the evolution state of the original suspicious lesion area corresponding to the dynamic video sequence of the plant disease and pest is continuously monitored in the subsequent two consecutive monitoring periods. If the original suspicious lesion area does not appear again in the subsequent change area map, and the expansion does not conform to the preset pest and disease rule, it is determined that the prevention and control is effective, and the corresponding pest and disease dynamic video sequence and the real pest and disease category are taken as high-confidence samples, and are stored in the training set for fine-tuning with a higher weight; otherwise, it is determined that the prevention and control effect is doubtful, a warning is automatically generated, and the case is marked as a to-be-checked sample, and manual review is proposed; for the to-be-checked sample whose final classification result is confirmed to be wrong by manual review, the real pest and disease category after review and correction is used as a label, and the three-dimensional convolutional neural network and the full connection classifier are trained for error correction; meanwhile, all the prevention and control effect evaluation cases, whether successful or not, are recorded and used to optimize the generation strategy of subsequent prevention and control instructions.

[0014] The application further provides a facility agriculture pest and disease prevention and control device based on deep learning, which is used for executing the facility agriculture pest and disease prevention and control method based on deep learning. The area extraction module is used for collecting canopy images based on imaging nodes deployed in the facility agriculture at a fixed monitoring period, comparing the canopy images of adjacent monitoring periods by using a lightweight change detection model, calculating pixel-level differences and filtering noises, and outputting a binary change area map, wherein the highlighted pixels represent suspicious lesion change areas. The video construction module is used for calling the change area maps of the latest three consecutive monitoring periods, and performing cumulative analysis on the suspicious lesion change areas, generating binary images corresponding to the monitoring periods respectively, arranging the three binary images in time sequence, and forming a three-frame pest and disease dynamic video sequence, which records the dynamic evolution process of the pest and disease in the three consecutive monitoring periods. The feature extraction module is used for inputting the pest and disease dynamic video sequence into a three-dimensional convolutional neural network for classification processing, wherein the three-dimensional convolutional neural network extracts the spatio-temporal features in the pest and disease dynamic video sequence by using a three-dimensional convolution kernel, and obtains a high-order feature vector representing the dynamic change mode of the pest and disease. The output optimization module is used for inputting the high-order feature vector into a full connection classifier, calculating the probability of belonging to each pest and disease category, outputting the final classification result of the pest and disease dynamic video sequence, and generating a prevention and control instruction according to the final classification result, adding the newly generated pest and disease dynamic video sequence and the final classification result into a training set, and regularly fine-tuning the parameters of the three-dimensional convolutional network and the classifier.

[0015] Compared with the prior art, the application has the following beneficial effects: The application records the appearance and expansion track of the suspicious lesion area in different monitoring periods by binarizing the image sequence, peeling off the environmental background; the three-dimensional convolutional neural network, especially the time sequence attention weighting module, can deeply learn the space-time pattern characteristics of the disease and pest spread from the dynamic sequence, rather than the morphological characteristics of a single frame; it can identify whether the disease and pest is in the early slow infiltration stage or the rapid outbreak stage, thereby realizing early warning and severity assessment of the disease and pest, providing a key decision basis for accurately grasping the prevention and control window period, and changing the prevention and control action from post-repair to intervention. The application greatly eliminates the influence of illumination fluctuation and image noise in the facility on change detection through the technical features of illumination compensation, adaptive threshold and morphological post-processing, ensures the high reliability of the change area graph, and reduces false positives from the source; the multi-source information fusion decision mechanism adopted by the full connection classifier combines the image features representing the dynamics of the disease and pest with the key environmental features inducing the disease and pest, such as temperature and humidity, which makes the final classification result not only tell what disease it is, but also associate why the disease occurs, so that the generated prevention and control instruction can contain targeted environmental parameter adjustment suggestions, such as reducing humidity and adjusting temperature difference, which changes from treating the disease to actively eliminating the cause, and realizes more fundamental and predictive prevention and control.

[0016] The application prevents the model from forgetting old knowledge when learning new samples based on the experience replay-based continuous learning strategy, ensures the stability in different growth stages and seasons, and verifies the closed loop, which takes the actual effect of each prevention and control action as a feedback signal for checking and correcting the model; when the prevention and control is effective, the related data is used as high-quality positive samples to strengthen the model; when the prevention and control is ineffective, artificial review and model correction are triggered, which makes the whole application not a static classification tool, and the diagnosis accuracy and decision effectiveness can be continuously improved in long-term operation, and finally realizes the closed loop of crop health management. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 It is a whole method flowchart of the application; Figure 2 It is an area net change weight fitting curve graph of the application; Figure 3 It is a sample weight-wave sample weight comparison graph of the application; Figure 4 It is a whole device structure flowchart of the application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical scheme and advantages of the application more clear and explicit, the application is further described in detail below in combination with specific embodiments.

[0019] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the present application shall have the usual meaning understood by one of ordinary skill in the art to which the present application pertains. The terms "first", "second", and similar terms used in the present application do not denote any order, number, or importance, but are only used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connected" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "up", "down", "left", "right", and the like are only used to represent relative positional relationships, and when the absolute positions of the described objects change, the relative positional relationships can also change accordingly.

[0020] Embodiments: Please refer to Figures 1-3 The present application provides a technical solution: A facility agriculture pest control method based on deep learning, the specific steps comprising: Step 1: Based on the imaging node deployed in the facility agriculture, the crown layer image is collected according to the fixed monitoring period, the light weight change detection model is used to compare the crown layer images of adjacent monitoring periods, the pixel level difference calculation and noise filtering are carried out, and the binary change area image is output, wherein the highlighted pixels represent suspicious lesion area; When the light weight change detection model carries out pixel level difference calculation, the ambient light intensity data synchronously collected in the facility is introduced for illumination compensation, specifically: the crown layer images collected in two adjacent monitoring periods are obtained, and the ambient light intensity data during imaging is synchronously read, based on the ambient light intensity data, the brightness of the two crown layer images is corrected respectively, the overall brightness difference caused by the change of illumination condition is eliminated, and two standardized crown layer images with comparable illumination conditions are obtained; In the specific embodiment of the present application, considering that the illumination conditions inside the facility agriculture are significantly affected by the regulation of the light supplement lamp and the change of natural light, directly comparing the canopy images collected at different times will misjudge the light fluctuation as the change of the crops themselves, therefore, illumination compensation operation must be performed, the purpose of illumination compensation is to eliminate the overall or local brightness difference of the image introduced by the change of the intensity of the external light source, so that the subsequent image difference calculation can truly reflect the apparent change of the crop canopy caused by diseases and pests, in specific implementation, the imaging node collects the canopy image each time, and synchronously records the quantized value representing the light intensity at that moment measured by the ambient light sensor; for the two canopy images to be compared, the corresponding light intensity values thereof are read respectively; the calculation method of the illumination normalization coefficient is to divide the light intensity value corresponding to each image by a predefined standard illumination reference value, the standard illumination reference value is set according to the statistical average value of the historical illumination data of the period in the facility; then the original brightness value of each pixel of each canopy image is divided by the corresponding illumination normalization coefficient, this process is mathematically equivalent to normalizing all images to the response under the same standard illumination intensity, thereby obtaining two standardized canopy images with comparable illumination conditions, at this time, the pixel difference between the images mainly comes from the reflectivity change of the crops themselves; The two obtained standardized canopy images are subjected to pixel-by-pixel gray value subtraction operation and take absolute value to generate an initial difference image reflecting the pixel-level brightness change, a method based on local image statistical features is used to dynamically calculate the binary threshold value of each pixel region in the initial difference image, the points with pixel values greater than the corresponding local threshold value are preliminarily determined as changed pixels to obtain a rough binary change image, morphological opening operation is performed on the rough binary change image to eliminate isolated white points generated by image noise and small registration errors, and morphological closing operation is then performed to fill the cracks and cavities in the real change region caused by uneven illumination and leaf texture, finally, a binary change region image is output, wherein the region composed of pixel points with pixel value of 1 represents the suspicious lesion area; The above two standardized canopy images are subjected to pixel-level difference calculation, the purpose is to quantify the change degree of each pixel position in the time dimension, the specific operation is to ensure that the two images are strictly aligned in space, then for each pixel coordinate point, the absolute difference value of the gray value in the two images is calculated to generate an initial difference image, each pixel value of the image represents the absolute change amount of the position in the adjacent two monitoring periods; Due to the complex structure of crop canopy and the noise in the image, not all changes in the initial difference image are disease and pest signals. In order to distinguish the real suspicious disease from the noise, an adaptive threshold segmentation method is needed to convert the gray difference image into a binary image. The core of this method is that the threshold is not globally fixed, but dynamically calculated according to the statistical characteristics of the local neighborhood of each pixel. Specifically, for each pixel in the initial difference image, a fixed-size local window is defined with it as the center, for example, a square region with a side length of fifteen pixels. The average value and standard deviation of the gray values of all pixels in the window are calculated. The segmentation threshold of the center pixel is set to the average value plus several times of the standard deviation. This multiple is called the sensitivity coefficient, which is set between 1.5 and 3 according to experience. If the gray value of the center pixel is greater than the dynamic threshold calculated according to the local neighborhood, it is determined that the point is a changed pixel, otherwise it is a non-changed pixel. In this way, a rough binary change map can be formed, which can preliminarily identify the set of pixel points that have changed significantly relative to their surrounding background. The rough binary change map still contains a large number of discrete noise points and small broken areas caused by leaf texture edges, reflections, etc. In order to extract the suspicious disease area with complete shape and connectivity, morphological noise filtering is needed. Morphological opening and closing operations are two continuous image processing operations, which both rely on a preset shape template called a structure element. The commonly used one is a circular structure element with a radius of three pixels. First, perform morphological opening operation, which can eliminate all isolated white spots in the image with an area smaller than the structure element. These spots correspond to image noise or small registration errors. At the same time, the opening operation can smooth the edges of larger white areas. Then perform morphological closing operation, which can fill the small holes in the white area caused by uneven lighting or leaf texture contrast, and connect adjacent white pixel blocks that are very close, thereby forming more full and connected regions. After a series of morphological filtering, the final output image is a binary change area map. In this map, all pixels are assigned a value of 0 or 1. The region with a pixel value of 0 represents the background, i.e. the healthy crop area or static background that has not changed significantly. The connected region composed of all pixels with a value of 1 is defined as the suspicious disease area that appeared in this monitoring period. In actual visualization display, the value 1 is often mapped to high-light white (i.e. gray value 255) to facilitate manual observation and interpretation. These identified regions are the fundamental basis for subsequent construction of disease and pest dynamic evolution sequence and identification. The area quantification formula of the suspicious disease area in a single monitoring period is: wherein To quantify the output, the total area of the suspicious lesion change region in the tth monitoring period is represented, which is the core data for drawing the time series graph of the disease and pest spread trend, and can directly reflect the outbreak intensity and spread rate of the disease and pest in each monitoring period; For input data, the value of the original binary change region map obtained after change detection in the tth monitoring period at pixel is represented (1 represents that the pixel is detected to change in the monitoring period, and 0 represents no change).

[0021] Step 2: Call the latest three consecutive monitoring period change region maps, and cumulatively analyze the suspicious lesion change regions to generate a binary image corresponding to the monitoring period. Arrange the three binary images in chronological order to form a three-frame disease and pest dynamic video sequence, which records the dynamic evolution process of the disease and pest in the three consecutive monitoring periods. In the specific embodiment, the purpose of step two is to convert the discrete, time-point-distributed binary change region map output in step one into a sequence of data that can intuitively reflect the spatiotemporal spread dynamics of the disease and pest, i.e., a disease and pest dynamic video sequence. The essence of the disease and pest dynamic video sequence is a three-dimensional digital tensor, of which two spatial dimensions record the shape and position of the suspicious lesion change region, and the third time dimension records the appearance and evolution process of the region at consecutive time points, thereby providing structured input for subsequent spatiotemporal pattern recognition based on deep learning. The fixed monitoring period is dynamically adjusted according to the growth period of the crops in the facility. When the crops in the facility are in the seedling stage and rapid growth stage, which are prone to crop diseases and pests and have rapid growth changes, monitoring period one is used. When the crops in the facility are in the mature stable stage, which is a stable growth period with slow changes, monitoring period two is used, wherein the length of monitoring period one is less than that of monitoring period two. First of all, it needs to be clear that the length of the monitoring period is not fixed. Considering that the sensitivity of crops to diseases and pests and the development speed of diseases and pests are different at different growth stages, the present application introduces a dynamic adjustment mechanism for the monitoring period. Specifically, a complete growth cycle of crops is divided into two main stages: the first stage is the stage prone to diseases and pests and the plant morphology changes rapidly, including the seedling stage and the rapid growth stage; the second stage is the stage where the plant morphology and physiological state tend to be stable, i.e., the mature stable stage. For the former, a shorter monitoring interval, referred to as monitoring period one, is used, for example, every two hours; for the latter, a longer monitoring interval, referred to as monitoring period two, is used, for example, every six hours. The length of monitoring period one is always less than that of monitoring period two. This differentiated scheduling strategy ensures that more detailed disease and pest germination timing information can be captured during the high-risk period, and energy consumption and data processing load can be reduced during the stable period. The specific logic for generating binarized images is as follows: For the earliest monitoring period within the latest three consecutive monitoring periods, the change area map of that monitoring period is used as its binarized image. For the other two monitoring periods within the latest three consecutive monitoring periods, the suspicious lesion areas of their change area maps are superimposed onto the binarized image of the previous monitoring period to serve as the binarized image corresponding to that monitoring period. The binarized images of the three consecutive monitoring periods are arranged in chronological order and stacked to form a video tensor with a length of 3 in the time dimension, i.e., a dynamic video sequence of pests and diseases. The generation of dynamic video sequences of pests and diseases described in this invention follows an intuitive and efficient time-series cumulative overlay logic. This logic is based on a clear premise: the change area map output in step one, where the highlighted pixels (i.e., pixel values ​​of 1) represent suspected lesion areas within the current monitoring period, and do not contain any historical change information. Based on this, the generation of dynamic video sequences of pests and diseases aims to synthesize these newly added areas that appear independently on a periodic basis into an image sequence that can clearly show the entire process of the gradual expansion of pest and disease areas over time. For the earliest monitoring period among the three monitoring periods (denoted as period t-2), directly use the change area map output from step one. The binarized image corresponding to this monitoring period is denoted as... , The initial occurrence areas of pests and diseases were recorded. For the remaining two monitoring periods out of the three monitoring periods (i.e., the two later monitoring periods), the method for generating their binarized images was no longer to directly use the change area map of the current monitoring period. For the second monitoring period that immediately followed in time (denoted as period t-1), the method for generating its binarized image was to perform region overlay, specifically: overlaying the change area map of the current monitoring period (period t-1). All pixels identified as suspicious lesion areas are superimposed on the binarized image generated in the previous monitoring period (period t-2). This superimposition operation is mathematically equivalent to performing a logical OR operation on the two binary images. This operation superimposes the newly appearing lesion pixels in period t-1 onto the lesion areas already recorded in period t-2. The resulting image is the binarized image corresponding to period t-1, which contains the cumulative sum of all identified suspicious lesion areas up to the end of period t-1. The rule for the logical OR operation is: for each pixel position, if at least one pixel in the two input images has a value of 1, then the output result is 1. This operation superimposes newly appearing lesion pixels within period t-1 onto the lesion area already recorded in period t-2. The resulting image is the binarized image corresponding to period t-1, denoted as [image of the binary image]. Therefore: ,frame represents the cumulative total of all identified suspicious lesion change regions up to the end of period t-1; For the third latest monitoring period (denoted as period t), the same logic as the previous step is adopted: the change region map of period t is , the binary image generated in the previous period (period t-1) Logical OR operation is performed, and the operation result image is the binary image corresponding to period t: This image contains the complete cumulative total of all identified suspicious lesion change regions up to the end of period t; The three images generated according to this recursive rule , are stacked in chronological order, forming a dynamic video sequence of plant diseases and insect pests. Each frame in this sequence itself is a complete image of the cumulative lesion area up to the end of its corresponding period. Through the above continuous accumulation logic based on frame-to-frame logical OR operation, the dynamic video sequence of plant diseases and insect pests generated by the present application has each frame representing the complete spatial range of plant diseases and insect pests up to the corresponding time point. By sequentially displaying the growth and expansion of lesion areas from the initial occurrence , to the cumulative state containing changes in the previous two periods , to the final cumulative state containing changes in all three periods , the spatiotemporal evolution process of suspicious lesion change regions dynamically growing and expanding over time is intuitively and completely depicted. This structured time series data provides crucial and highly relevant context information for subsequent three-dimensional convolutional neural networks to extract spatiotemporal pattern features of plant diseases and insect pests.

[0022] Step 3: input the dynamic video sequence of plant diseases and insect pests into a three-dimensional convolutional neural network for classification processing. The three-dimensional convolutional neural network extracts spatiotemporal features in the dynamic video sequence of plant diseases and insect pests through a three-dimensional convolution kernel, obtaining a high-order feature vector representing the dynamic change pattern of plant diseases and insect pests; ​In the specific embodiment, the core task of step three is to analyze the pest and disease dynamic video sequence generated in step two, extract the spatio-temporal pattern features of the occurrence and development of pests and diseases contained therein through a specially designed three-dimensional convolutional neural network, and convert them into a dense mathematical expression suitable for classification tasks, i.e. a high-order feature vector; the pest and disease dynamic video sequence is a four-dimensional tensor, and the four dimensions are batch size, image height, image width, and the combination of time step and channel number in order; as for the input of the present application, the batch size represents the number of samples processed at a time, the image height and width correspond to the pixel size of the binary image at each time step, the time step is fixed at three, representing three consecutive monitoring periods, and the channel number is one because each time step image is a single-channel binary image. For simplicity of description, when describing the single-sample processing process, the batch dimension is ignored, and the input is regarded as a three-dimensional tensor with dimensions height H, width W, time step three, and channel number one. The three-dimensional convolutional neural network extracts the spatio-temporal features of the pest and disease dynamic video sequence by embedding a time-series attention enhancement module, which specifically includes: the input of the three-dimensional convolutional neural network is the pest and disease dynamic video sequence, which is a three-dimensional tensor with dimensions height H, width W, and channel number C, where the time step is 3 and each time step stores a single-channel binary image; the first three-dimensional convolutional layer uses multiple 3x3x3 three-dimensional convolutional kernels to perform convolution operations simultaneously on the spatial and temporal dimensions of the input pest and disease dynamic video sequence, preliminarily fusing the spatio-temporal information and outputting an initial three-dimensional feature map. The three-dimensional convolutional neural network is the core architecture for spatio-temporal feature extraction in the present application, and the first layer is a three-dimensional convolutional layer with multiple 3x3x3 three-dimensional convolutional kernels. These convolutional kernels perform sliding calculations within the three-dimensional space of the input tensor while performing convolution operations on two spatial dimensions and one temporal dimension. This operation can directly capture spatial texture patterns within the pixel neighborhood and temporal change patterns between adjacent time steps, achieving preliminary fusion of spatio-temporal information and outputting an intermediate result called an initial three-dimensional feature map. To further enhance the network's ability to perceive key stages of pest and disease evolution, the network embeds a time-series attention enhancement module. The purpose of this module is to automatically assess and strengthen the importance of information contained in different time steps of the pest and disease dynamic video sequence. Its processing flow is as follows: first, the initial three-dimensional feature map is disassembled along the time dimension to obtain three independent two-dimensional feature slices, each of which retains all the spatial features at that time step; a global spatial average pooling operation is performed on each two-dimensional feature slice, which averages the values of all spatial positions in each feature channel of the slice, thereby compressing each high-dimensional two-dimensional feature slice into a low-dimensional, summary descriptor that represents the statistical summary of the overall features at that time step. The initial three-dimensional feature map is split into three independent feature slices according to time steps; global feature compression is performed on each feature slice of each time step to obtain a summary descriptor of each time step; a lightweight parameter network is used to analyze the summary descriptors, calculate and assign a dynamic attention weight reflecting the importance of each time step; each feature slice is weighted according to the dynamic attention weight, and then recombined into a weighted three-dimensional feature map; The three summary descriptors are sent to a lightweight parameter network, i.e., a weight generation subnetwork, which is generally composed of several fully connected layers, and its function is to analyze and synthesize the summary information of the three time steps and calculate three original importance scores; in order to convert these scores into comparable weights, they are normalized by Softmax, so that the sum of the three output values is 1 and each value is between 0 and 1; the three values are dynamic attention weights, and the size of each dynamic attention weight value directly reflects the network's judgment of the importance of the corresponding time step feature; The three two-dimensional feature slices separated earlier are multiplied by the three dynamic attention weights calculated, and this multiplication operation is mathematically equivalent to globally scaling all feature values of each feature slice; the feature values in the slice with high dynamic attention weight are enhanced, and the feature values in the slice with low dynamic attention weight are suppressed; finally, the three weighted two-dimensional feature slices are re-stacked in the time dimension according to the original time sequence, thereby generating an attention-modulated and weighted three-dimensional feature map, which focuses more on the key time step information in the disease and pest evolution process; The weighted three-dimensional feature map is sequentially passed through a three-dimensional batch normalization layer, an activation function layer, and multiple feature abstraction modules composed of three-dimensional convolution layers and three-dimensional pooling layers, to gradually extract deeper and more abstract spatio-temporal pattern features; the three-dimensional feature tensor output by the last feature abstraction module is compressed in space and time dimensions by a global three-dimensional average pooling layer and converted into a one-dimensional high-order feature vector; The weighted three-dimensional feature map will enter the feature abstraction stage, which first passes through a three-dimensional batch normalization layer to stabilize the data distribution and speed up the training process, then passes through a nonlinear activation function layer to increase the model's expression ability, and then sequentially passes through multiple cascaded feature abstraction modules; each feature abstraction module is composed of a three-dimensional convolution layer and a three-dimensional pooling layer; the three-dimensional convolution layer is responsible for further extracting and combining more complex spatio-temporal features, while the three-dimensional pooling layer gradually reduces the spatial size of the feature map and expands the feature receptive field, enabling the network to capture more global and abstract patterns; after multiple such modules, the detailed information in the feature map is gradually abstracted into high-level and semantic spatio-temporal pattern features; The three-dimensional feature tensor output by the last feature abstraction module is sent to a global three-dimensional average pooling layer. The layer performs average operation on the last two spatial dimensions and the time dimension of the feature tensor at the same time, compresses the entire three-dimensional tensor into a single one-dimensional vector, and the one-dimensional vector is the high-order feature vector described in this step. The high-order feature vector highly concentrates the core spatiotemporal feature information of the entire pest dynamic video sequence and discards redundant position and timing details, providing direct and effective input for the final classification decision.

[0023] Step 4: input the high-order feature vector into a fully connected classifier, calculate the probability of belonging to each pest category, output the final classification result of the pest dynamic video sequence, and generate a prevention and control instruction according to the final classification result. The newly generated pest dynamic video sequence and the final classification result are added to the training set, and the parameters of the three-dimensional convolutional network and the classifier are fine-tuned regularly. In the specific implementation, step four undertakes the core functions of from feature to decision and self-evolution. This step receives the high-order feature vector generated by step three, makes a pest judgment through the classifier, and guides the prevention and control action and model optimization based on the judgment result, forming a complete intelligent decision and learning closed loop. The fully connected classifier performs multi-source information fusion classification, specifically including: splicing the high-order feature vector and an auxiliary environment feature vector to form a fusion feature vector, the auxiliary environment feature vector is derived from the environment sensor data collected synchronously with the three monitoring periods constituting the pest dynamic video sequence, and after standardization processing, contains the average temperature, average humidity and temperature daily range indexes in the three monitoring periods; the fully connected classifier is composed of multiple fully connected layers, which performs multiple nonlinear transformations on the input fusion feature vector, and the final layer maps the transformation result to the probability value belonging to each preset pest category through the Softmax activation function, and takes the pest category corresponding to the highest probability value as the final classification result of the pest dynamic video sequence; The full connection classifier is a component for performing final pest discrimination, and the input of the full connection classifier is not a single high-order feature vector, but a fusion feature vector after multi-source information fusion. Specifically, the high-order feature vector is spliced with an auxiliary environmental feature vector in the dimension direction. The auxiliary environmental feature vector is constructed from environmental sensing data, which is strictly synchronized with the three monitoring periods on which the current pest dynamic video sequence is generated. Generally, at least the average temperature value, the average humidity value and the temperature range value in the three monitoring periods are collected. The temperature range value refers to the difference between the maximum temperature and the minimum temperature in the same monitoring day, which can reflect the fluctuation range of the temperature and is a key meteorological factor affecting the occurrence of some pests. These raw sensing data need to be standardized to eliminate dimensional differences, and then spliced into a numerical vector, i.e. the auxiliary environmental feature vector, in a fixed order. This fusion method makes the classification decision not only rely on the visual time series pattern, but also combine the key environmental context that induces pests, thereby improving the accuracy of classification. The fusion feature vector is then input into the full connection classifier, which is composed of multiple sequentially connected full connection layers. Each full connection layer performs linear transformation on its input vector and applies a nonlinear activation function. This process realizes multiple nonlinear transformations and abstraction of the fusion features. The number of neurons in the last full connection layer is equal to the total number of preset pest categories, and the output is processed by an activation function called Softmax. The Softmax function maps the output values of all neurons to a probability distribution, so that each value is between 0 and 1, and the sum of all values is 1. These values represent the probabilities that the input pest dynamic video sequence belongs to each pest category. The category corresponding to the highest probability value is selected as the final classification result output by this analysis. Based on this final classification result, a specific physical or chemical control instruction can be generated, such as starting the spraying system in a specific area or adjusting the environmental parameters. The parameters of the three-dimensional convolutional network and the classifier are periodically fine-tuned using an experience replay-based continuous learning strategy. A fixed-capacity historical prior sample library is maintained to store verified data pairs from historical monitoring periods, which are composed of pest dynamic video sequences and their corresponding real pest categories. When periodic fine-tuning is triggered, a batch of data is randomly selected from the latest collected and verified data, and a batch of historical data is randomly selected from the historical prior sample library to form a fine-tuning training set. The parameters of the three-dimensional convolutional neural network and the full connection classifier are updated using the fine-tuning training set. The periodic fine-tuning is triggered when the amount of newly collected and verified data reaches a certain threshold. The periodic fine-tuning is not performed at fixed time intervals, but a dynamic triggering mechanism based on data accumulation is adopted, specifically, when the number of newly collected and verified pest and disease dynamic video sequences and their final classification result data pairs reaches a preset threshold, the fine-tuning process is automatically triggered once; the rationality of this technical design is based on the following four core considerations: 1) the parameter update of the deep learning model needs sufficient data support for effective gradient estimation, if the amount of new data is insufficient, the gradient estimation of the loss function of the model on new samples will have a large variance, at this time, parameter update is easy to cause overfitting of the model on a small number of new samples, and the gradient direction is unstable, which damages the memory of historical knowledge; setting a reasonable data amount threshold (for example, 100 new samples) can ensure that each fine-tuning provides statistically significant gradient signals; 2) the occurrence of pests and diseases is sudden, seasonal and intermittent, during the high incidence period, a large number of new samples will be collected in a short time; while in the stable period, new samples are produced slowly, and a fixed time period (such as once a week) cannot adapt to this non-uniform data flow: in the high incidence period, the model update will lag behind, and in the stable period, the data will be insufficient and the update will be inefficient or even harmful, the data amount-based triggering mechanism makes the model update rhythm adaptive to the actual situation, and responds quickly in the high incidence period and patiently accumulates in the stable period; 3) each model fine-tuning involves forward propagation, loss calculation, back propagation and parameter update, which consumes computing resources, if the new data accumulation is insufficient, the marginal benefit of fine-tuning is low, which will cause resource waste, only when the amount of new data reaches the threshold, it means that there is enough new knowledge to be learned, and the fine-tuning is resource-efficient, which is especially suitable for scenarios deployed on edge computing devices; 4) the core of this strategy is to train new and old samples, the new data batch (set to N samples) and the old data batch (set to M samples) sampled from the historical prior sample library together constitute the fine-tuning training set, if N is too small, the new and old sample ratio in the mixed training set is unbalanced (for example, N:M = 10:100), the main gradient direction of the model is still dominated by old data, and it is difficult to effectively absorb new knowledge, by setting the threshold of N (for example, N >= 50), it can be ensured that the new knowledge has enough weight in the new and old sample mixing, and the balance of new and old knowledge is realized; In order to adapt to the long-term changes of the facility environment and the new forms of occurrence of pests and diseases, the application introduces a continuous learning strategy based on experience replay to realize the periodic fine-tuning of the model, and a historical prior sample library with a fixed storage capacity is maintained during the operation, which is used to save the verified and high-quality samples in history, each sample is a data pair composed of a pest and disease dynamic video sequence and a real pest and disease category label verified by artificial or reliable mechanism; Periodic fine-tuning is not triggered by fixed clock cycles, but by the amount of newly collected and verified valid data reaching a preset threshold, which ensures that each update has enough new knowledge for the model to learn; when fine-tuning is triggered, the following operations are performed: first, a batch of samples is randomly extracted from the newly collected and verified data; at the same time, a batch of old samples is randomly extracted from the historical prior sample library, and the two batches of samples are mixed to form a fine-tuning training set for this fine-tuning; then, using this fine-tuning training set, all or part of the parameters of the three-dimensional convolutional neural network and the fully connected classifier are optimized and updated, and the core purpose of this mixed new and old sample training method is to enable the model to absorb new knowledge from new data while firmly remembering important patterns learned from historical data, thereby effectively alleviating the common catastrophic forgetting problem in machine learning and achieving stable and continuous self-evolution.

[0024] Further, after the prevention and control measures are performed according to the final classification result, the evolution state of the original suspicious lesion change area corresponding to the pest dynamic video sequence is continuously monitored in the subsequent two consecutive monitoring periods; To further improve reliability and decision accuracy, the application designs a prevention and control effect verification and model closed-loop optimization mechanism after step four, which does not end the attention to the case immediately after performing the prevention and control operation according to the final classification result, but starts an effect tracking period of at least two monitoring periods, during which the original suspicious lesion change area that triggered the alarm is continuously monitored to observe its dynamics in the subsequent newly generated change area map; If the original suspicious lesion change area does not appear again in the subsequent change area map, it is determined that the prevention and control is effective, and the corresponding pest dynamic video sequence and its true pest category are stored as high-confidence samples with higher weights in the training set for fine-tuning; otherwise, it is determined that the prevention and control effect is questionable, a warning is automatically generated and the case is marked as a to-be-reviewed sample, which is submitted for manual review; for the to-be-reviewed sample whose final classification result is confirmed to be wrong by manual review, the true pest category after review and correction is used as the label to perform error correction training on the three-dimensional convolutional neural network and the fully connected classifier; at the same time, all prevention and control effect evaluation cases, whether successful or not, are recorded and used to optimize the generation strategy of subsequent prevention and control instructions; The sample weight assignment formula after prevention and control effect verification is: , Where is the quantized output representing the sample weight of the i-th sample in the loss function, i is the index of the sample, is the basic reward coefficient, an adjustable hyperparameter representing the basic reward intensity for the fact that the prevention and control is effective, for example ; is the decay coefficient, controlling the speed of decay of the reward with the expansion of the region; is the core input variable, representing the net change of the area of the pest region corresponding to the ith training sample after the implementation of the prevention and control measures in the subsequent observation period, wherein is the area before prevention and control, is the area after prevention and control, when the effective area does not increase or decrease); is the exponential decay term, which is larger when the prevention and control is extremely effective ( is negative and has a large absolute value, i.e., the pest is significantly reduced); when the prevention and control can only suppress the growth ( ), the value of this term is about 1, which realizes the fine adjustment that the better the prevention and control effect, the higher the sample weight reward, rather than a fixed weight; According to the formula wherein , , a random fluctuation within the range of is added to the calculated value of the sample weight to simulate the noise in actual observation; part of the sample number and sample weight data is shown in Table 1.

[0025] Table 1: Sample weight statistical data table Through the analysis of the first 15 rows of data, it is observed that there is a certain correlation between different characteristic parameters, for example, from the data, it can be seen that there is a significant positive correlation between the net change of the area and the sample weight, when the negative value of the net change of the area increases, i.e., the prevention and control measures significantly reduce the area of the pest region, the corresponding sample weight also increases; for example, the net change of the area of sample No. 13 is negative 9.800, and its sample weight reaches 2.008, while the net change of the area of sample No. 9 is negative 0.900, and its sample weight is 1.615, which indicates that the more significant the effect of the prevention and control measures, the more the pest area is reduced, the more important the sample is in the subsequent model learning; When analyzing the relationship between the sample weight and the area after prevention and control, it is found that as the area after prevention and control decreases, the sample weight shows a gradually increasing trend, because the smaller the area after prevention and control, the more thorough the effect of pest elimination or suppression, and such successful cases have greater guiding significance for the training model; for example, the area after prevention and control of sample No. 3 is 91.800, and its sample weight is 1.960, while the area after prevention and control of sample No. 14 is 97.500, and its sample weight is 1.694, the linkage between the prevention and control effect and the sample weight should be fully considered to optimize the strategy of continuous learning of the model, so that it can focus more on learning truly effective prevention and control experience.

[0026] The standard for effect evaluation is based on the basic law of disease and pest development: effective prevention and control should be able to inhibit the spread of diseases and pests; therefore, if in the subsequent monitoring, the original area does not appear significant expansion in area or shape in line with the corresponding disease and pest growth law, it is determined that this time of prevention and control intervention is effective; at this time, the disease case corresponding to the disease and pest dynamic video sequence and its real disease and pest category label will be regarded as a high-confidence sample; a high-confidence sample means that its data and label correspondence has been verified twice by the actual prevention and control effect, has extremely high teaching value, the sample will be given a higher weight, and stored in the training data pool for subsequent fine-tuning, so as to produce stronger influence in future model updating; On the contrary, if the original area continues to expand or the shape changes in line with the law of disease and pest during the tracking period, it is determined that the prevention and control effect is not as expected, and a warning is automatically generated, and at the same time, this case will be marked as a to-be-checked sample and submitted to an agricultural expert for manual review; the focus of manual review is to confirm whether the initial automatic classification result is correct, and for the samples whose classification is confirmed to be wrong after review, the expert will give the corrected real category label, and then use these corrected sample data and labels to perform a corrective training on the three-dimensional convolutional neural network and the fully connected classifier, to timely correct the cognitive bias of the model; Finally, all the evaluation cases of the prevention and control effect, whether successful or not, their processing process and results will be completely recorded by the system, and these feedback data from the actual production are used to continuously analyze and optimize the generation strategy of the prevention and control instructions, for example, adjusting the concentration of the drug or the length of the physical intervention corresponding to a specific disease and pest, so that the entire decision logic becomes more and more accurate and efficient with the accumulation of practice.

[0027] Please refer to Figure 4 The application further provides a facility agricultural disease and pest prevention and control device based on deep learning, which is used to execute the facility agricultural disease and pest prevention and control method based on deep learning. The area extraction module is used to collect canopy images based on imaging nodes deployed in the facility agriculture at a fixed monitoring period, compare the canopy images of adjacent monitoring periods using a lightweight change detection model, calculate the pixel-level difference and filter noise, and output a binary change area graph, wherein the highlighted pixels represent suspicious disease change areas. The video construction module is used to call the change area graphs of the latest three consecutive monitoring periods, and perform cumulative analysis on the suspicious disease change areas thereof, respectively generate binary images corresponding to the monitoring periods, arrange the three binary images in chronological order, and form a three-frame disease and pest dynamic video sequence, which records the dynamic evolution process of the disease and pest in the three consecutive monitoring periods. The feature extraction module is used to input the dynamic video sequence of pests and diseases into a three-dimensional convolutional neural network for classification processing. The three-dimensional convolutional neural network extracts the spatiotemporal features in the dynamic video sequence of pests and diseases through three-dimensional convolutional kernels to obtain a high-order feature vector that represents the dynamic change pattern of pests and diseases. The output optimization module is used to input high-order feature vectors into a fully connected classifier, calculate the probability of each pest and disease category, output the final classification result of the dynamic video sequence of pests and diseases, generate prevention and control instructions based on the final classification result, add the newly generated dynamic video sequence of pests and diseases and its final classification result to the training set, and periodically fine-tune the parameters of the three-dimensional convolutional network and classifier.

[0028] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.

[0029] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.

[0030] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0031] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A method for controlling pests and diseases in facility agriculture based on deep learning, characterized in that, The specific steps include: Step 1: Based on the imaging nodes deployed in the facility agriculture, canopy images are collected at fixed monitoring cycles. A lightweight change detection model is used to compare canopy images from adjacent monitoring cycles. Through pixel-level difference calculation and noise filtering, a binarized change area map is output, in which the bright pixels represent areas of suspected lesions. Step 2: Retrieve the change area maps of the latest three consecutive monitoring cycles, and perform cumulative analysis on the suspected lesion areas to generate binarized images for the corresponding monitoring cycles. Arrange these three binarized images in chronological order to form a three-frame dynamic video sequence of pests and diseases. This dynamic video sequence of pests and diseases records the dynamic evolution of pests and diseases in three consecutive monitoring cycles. Step 3: Input the dynamic video sequence of pests and diseases into a three-dimensional convolutional neural network for classification processing. The three-dimensional convolutional neural network extracts the spatiotemporal features in the dynamic video sequence of pests and diseases through three-dimensional convolutional kernels to obtain a high-order feature vector representing the dynamic change pattern of pests and diseases. Step 4: Input the high-order feature vector into the fully connected classifier, calculate the probability of it belonging to each pest category, output the final classification result of the dynamic video sequence of pests and diseases, generate prevention and control instructions based on the final classification result, add the newly generated dynamic video sequence of pests and diseases and its final classification result to the training set, and fine-tune the parameters of the three-dimensional convolutional network and classifier periodically.

2. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 1, characterized in that: When performing pixel-level difference calculations in the lightweight change detection model, ambient light intensity data synchronously collected within the facility is introduced for illumination compensation. Specifically, canopy images collected in two adjacent monitoring cycles are acquired, and ambient light intensity data during imaging is read synchronously. Based on the ambient light intensity data, brightness correction is performed on the two canopy images to eliminate the overall brightness difference caused by changes in illumination conditions, resulting in two standardized canopy images with comparable illumination conditions. The two standardized canopy images were subjected to pixel-by-pixel grayscale subtraction, and the absolute values ​​were taken to generate an initial difference image reflecting pixel-level brightness changes. A method based on local image statistical features was used to dynamically calculate the binarization threshold of each pixel region in the initial difference image. Pixels with values ​​greater than their corresponding local thresholds were initially identified as changing pixels, resulting in a coarse binary change map. Morphological opening operations were performed on the coarse binary change map to eliminate isolated white spots caused by image noise and minor registration errors. Then, morphological closing operations were performed to bridge the breaks and voids in the real change areas caused by uneven lighting and leaf texture. Finally, a binary change area map was output, in which the area formed by pixels with a pixel value of 1 represents the suspected lesion area.

3. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 2, characterized in that: The fixed monitoring cycle is dynamically adjusted according to the growth stage of the crops in the facility. When the crops in the facility are in the seedling stage and rapid growth stage, which are prone to crop diseases and pests and have rapid growth changes, monitoring cycle one is adopted. When the crops in the facility are in the mature and stable stage, which is when crop growth tends to be stable and changes are slow, monitoring cycle two is adopted, wherein the duration of monitoring cycle one is shorter than that of monitoring cycle two. The specific logic for generating binarized images is as follows: For the earliest monitoring period within the latest three consecutive monitoring periods, the change area map of that monitoring period is used as its binarized image. For the other two monitoring periods within the latest three consecutive monitoring periods, the suspicious lesion areas of their change area maps are superimposed onto the binarized image of the previous monitoring period to serve as the binarized image corresponding to that monitoring period. The binarized images of the three consecutive monitoring periods are arranged in chronological order and stacked to form a video tensor with a length of 3 in the time dimension, i.e., a dynamic video sequence of pests and diseases.

4. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 3, characterized in that: A 3D convolutional neural network (CNN) extracts spatiotemporal features from dynamic video sequences of pests and diseases by embedding a temporal attention enhancement module. Specifically, the input to the CNN is a dynamic video sequence of pests and diseases, which is a 3D tensor with dimensions of height H × width W × number of channels C, where the time step is 3, and each time step stores a single-channel binarized image. The first 3D convolutional layer uses multiple 3×3×3 3D convolutional kernels to perform convolution operations simultaneously on the spatial and temporal dimensions of the input dynamic video sequence of pests and diseases, initially fusing spatiotemporal information and outputting an initial 3D feature map. The initial 3D feature map is split into three independent feature slices according to time steps; global feature compression is performed on the feature slices of each time step to obtain the summary descriptor of each time step; these summary descriptors are analyzed through a lightweight parametric network to calculate and assign a dynamic attention weight that reflects the importance of each time step; the feature slices are weighted according to this weight and then recombined into a weighted 3D feature map. The weighted 3D feature map is passed sequentially through a 3D batch normalization layer, an activation function layer, and multiple feature abstraction modules consisting of cascaded 3D convolutional layers and 3D pooling layers to gradually extract deeper and more abstract spatiotemporal pattern features. The 3D feature tensor output by the last feature abstraction module is then passed through a global 3D average pooling layer to compress the spatial and temporal dimensions and convert it into a one-dimensional high-order feature vector.

5. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 1, characterized in that: The fully connected classifier performs multi-source information fusion classification, specifically including: concatenating a high-order feature vector with an auxiliary environmental feature vector to form a fused feature vector. The auxiliary environmental feature vector originates from environmental sensor data collected synchronously with the three monitoring cycles constituting the dynamic video sequence of pests and diseases. After standardization, it includes the average temperature, average humidity, and daily temperature range indices within the three monitoring cycles. The fully connected classifier consists of multiple fully connected layers, which perform multiple nonlinear transformations on the input fused feature vector. The final layer uses a Softmax activation function to map the transformation result to a probability value belonging to each preset pest and disease category. The pest and disease category corresponding to the highest probability value is taken as the final classification result of the dynamic video sequence of pests and diseases.

6. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 1, characterized in that: The periodic fine-tuning of the 3D convolutional network and classifier parameters specifically adopts a continuous learning strategy based on experience playback: a fixed-capacity historical prior sample library is maintained to store verified data pairs consisting of dynamic video sequences of pests and diseases and their corresponding real pest and disease categories from historical monitoring periods; when periodic fine-tuning is triggered, a batch is randomly selected from the latest collected and verified data, and a batch of historical data is randomly selected from the historical prior sample library to form the current fine-tuning training set. The parameters of the 3D convolutional neural network and the fully connected classifier are optimized and updated using the fine-tuning training set. The periodic fine-tuning is triggered when the amount of newly collected verified data reaches a set threshold.

7. The method for controlling pests and diseases in facility agriculture based on deep learning according to claim 1, characterized in that: After implementing prevention and control measures based on the final classification results, the evolution of the original suspected lesion areas corresponding to the dynamic video sequences of pests and diseases will be continuously monitored for two consecutive monitoring cycles. If the original suspected lesion area does not expand in accordance with the preset pest and disease pattern in the subsequent change area map, the control is deemed effective. The corresponding pest and disease dynamic video sequence and its actual pest and disease category are used as high-confidence samples, given higher weights and stored in the training set for fine-tuning. Conversely, if the prevention and control effect is questionable, an early warning will be automatically generated and the case will be marked as a sample to be verified, and manual review will be requested. For samples to be verified that are confirmed to have incorrect final classification results after manual review, the actual pest and disease category after verification and correction will be used as the label to perform error correction training on the three-dimensional convolutional neural network and the fully connected classifier. At the same time, all prevention and control effect evaluation cases, whether successful or not, will be recorded and used to optimize the generation strategy of subsequent prevention and control instructions.

8. A deep learning-based device for controlling pests and diseases in facility agriculture, characterized in that: The device is used to execute a deep learning-based method for the prevention and control of pests and diseases in facility agriculture as described in any one of claims 1-7, comprising: The region extraction module is used to collect canopy images at fixed monitoring cycles based on imaging nodes deployed in facility agriculture. It uses a lightweight change detection model to compare canopy images from adjacent monitoring cycles. Through pixel-level difference calculation and noise filtering, it outputs a binarized change region map, where the bright pixels represent areas of suspected lesions. The video construction module is used to retrieve the change area map of the latest three consecutive monitoring cycles, and perform cumulative analysis on the suspected lesion areas to generate binarized images for the corresponding monitoring cycles. These three binarized images are arranged in chronological order to form a three-frame dynamic video sequence of pests and diseases. This dynamic video sequence of pests and diseases records the dynamic evolution process of pests and diseases in three consecutive monitoring cycles. The feature extraction module is used to input the dynamic video sequence of pests and diseases into a three-dimensional convolutional neural network for classification processing. The three-dimensional convolutional neural network extracts the spatiotemporal features in the dynamic video sequence of pests and diseases through three-dimensional convolutional kernels to obtain a high-order feature vector that represents the dynamic change pattern of pests and diseases. The output optimization module is used to input high-order feature vectors into a fully connected classifier, calculate the probability of each pest and disease category, output the final classification result of the dynamic video sequence of pests and diseases, generate prevention and control instructions based on the final classification result, add the newly generated dynamic video sequence of pests and diseases and its final classification result to the training set, and periodically fine-tune the parameters of the three-dimensional convolutional network and classifier.

Citation Information

Patent Citations

  • Image processing-based leaf disease and pest identification method and system

    CN119992233A

  • Intelligent pest and disease damage identification and targeted spraying method and system based on machine vision

    CN120472280A

  • Agricultural scene adaptive multi-modal feature extraction and fusion method and system

    CN120808085A

  • Fruit and vegetable disease and insect pest spectrum database dynamic evolution updating method based on model confidence feedback driving

    CN120913003A

  • Crop disease diffusion prediction method and system based on multi-modal fusion

    CN121236600A