Crop disease and insect pest identification and pathology follow-up method, equipment and medium
Through multi-stage feature processing and dynamic distillation technology, the problems of low recognition accuracy and poor cross-regional adaptability of traditional pest recognition models in complex environments are solved, and high accuracy and cross-regional adaptability of crop pest recognition and prediction are achieved.
Patent Information
- Application Number
- CN202510637614.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-05-19
AI Technical Summary
Traditional crop pest and disease identification models are difficult to accurately identify pests and diseases in complex growth environments, especially in the case of overlapping leaves, reflective/dew interference, the recognition accuracy is low and lacks cross-regional adaptability.
Multi-stage feature processing methods are adopted, including obtaining preliminary feature data, generating diagnostic assumptions, fusion feature representations, dynamic distillation of student models, constructing disease development prediction models, and simulating disease diffusion processes, and adjusting the spread rate in combination with environmental data.
It improves the accuracy of pest identification and cross-regional adaptability, can accurately predict the development trend and spread probability map of the disease, help plant protection personnel to take prevention and control measures in advance, and reduce the harm of pests and diseases to crops.
Smart Images

Figure CN120182832A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of crop pest and disease identification, and particularly to a method, device, and medium for crop pest and disease identification and pathological follow-up. Background Art
[0002] The threat of crop pests and diseases to agricultural production cannot be underestimated. It seriously affects the yield and quality of crops and restricts the sustainable development of the agricultural economy. In actual agricultural production, the growth environment of crops is complex and changeable, and situations such as overlapping leaves, reflection / dew interference often occur, which pose great challenges to pest and disease identification.
[0003] In related technologies, the growth environment of crops is complex and changeable, and situations such as overlapping leaves, reflection / dew interference often occur. This makes it difficult for traditional pest and disease identification models to accurately extract the characteristics of pests and diseases, resulting in a low identification accuracy. For example, overlapping leaves will block some pest and disease symptoms, and reflection and dew will affect the quality of images, making the model unable to obtain clear pest and disease information. There are differences in crop varieties, pest and disease types, and environmental conditions in different regions. Traditional pest and disease identification models are often trained based on data from specific regions and lack the generalization ability for data from different regions. When the model is migrated to a new region, due to the change in data distribution, the performance of the model will drop significantly, and it cannot accurately identify local pests and diseases. Summary of the Invention
[0004] The present invention provides a method for crop pest and disease identification and pathological follow-up, which can realize the detection and diagnosis of crop pests and diseases, and can also trace the pest and disease transmission path and recommend root cause blocking measures.
[0005] The method includes: S101: Obtain preliminary feature data of crop pests and diseases; S102: Generate a diagnostic hypothesis based on the preliminary feature data, and encode the diagnostic hypothesis in text format into a vector representation of a fixed dimension; S103: Adopt a gating mechanism to fuse the preliminary feature data and the vector representation to form a comprehensive feature representation; S104: Use a teacher model to perform dynamic distillation on the original pest and disease identification student model. Through a multi-stage strategy, the teacher model generates soft labels and uses the soft labels as supervision information to guide the student model; S105: Train the student model, save the model checkpoint during the training process, and use the validation set to evaluate the performance of the student model; S106: Build a disease development prediction model based on the trained student model to predict the development condition parameters of various diseases; S107: Simulate the diffusion process of diseases in the spatial grid through convolution operations, and adjust the propagation rate in combination with environmental data to obtain the propagation probability map for the next N days; S108: Based on the student model generated by dynamic distillation, combined with the disease propagation conditions and development condition parameters, generate the propagation probability map for the next N days by simulating the propagation process of crop diseases and pests in the spatial grid, and use it to evaluate the development trend of crop diseases and pests.
[0006] Further, it should be noted that step S104 also includes: Collect a multi-source training sample set, including the composite feature input composed of visible light images, multi-spectral data, and environmental sensing parameters; The constructed learning model includes a feature extraction unit and a feature enhancement unit, and the feature enhancement unit performs random masking processing on the extracted features; Process the training samples through the feature extraction unit and generate primary representations, so that the learning model generates corrected representations with masking interference through the feature enhancement unit.
[0007] Further, it should be noted that calculate the difference degree between the corrected representation and the reference representation generated by the comparison model, and establish a representation alignment loss function; Dynamically adjust the model parameters based on the representation alignment loss, and terminate the optimization process when the number of training iterations reaches the preset threshold or the loss value converges to a stable interval; Transfer the optimized learning model parameters to the pest and disease recognition student model as the initialization benchmark for dynamic distillation.
[0008] Further, it should be noted that step S105 specifically includes: Set the training objective and loss function, and clarify the training objective, and define the loss function to measure the difference between the prediction result of the student model and the target feature; Dynamically adjust the knowledge distillation strategy according to the learning progress of the student model; Based on the optimized loss function and distillation strategy, train the student model and update the parameters using the gradient descent algorithm.
[0009] Further, it should be noted that evaluate the performance of the student model through the validation set and monitor its adaptability in complex scenarios; Select the model with the best performance on the validation set from the saved checkpoints as the candidate model, fine-tune the candidate model, adjust the model structure to enhance its ability to capture local features, and finally determine the optimized model as the final version of the student model.
[0010] Further, it should be noted that step S107 specifically includes the following steps: Construct a two-dimensional grid space to simulate the spatial relationship between farmlands; Design an individual movement algorithm based on the regenerative influence of dynamic location resources to simulate the spread of pests and diseases in farmland; Construct a resource regeneration module and set a resource regeneration force algorithm based on the number of grid crops and the crop infection status; Establish a dynamic location resource regeneration influence model. Resources affect the spread of pests and diseases by influencing the recovery rate of pests and diseases; construct a pest and disease spread module and apply the SIS model to a two-dimensional grid space; construct the SIS model on the farmland network, and describe the changes in the number of uninfected crops and infected crops in the fields using ordinary differential equations.
[0011] It should be further noted that step S108 specifically includes: constructing a two-dimensional grid system including crop distribution, soil characteristics, and environmental parameters, and each grid cell records the basic infection rate of pests and diseases, the coverage rate of disease-resistant crops, and the soil nutrient content; Calculate the amount of disease-resistant resource regeneration in each unit based on the planted area of disease-resistant crops and the rotation strategy within the grid cell; Integrate environmental parameters such as temperature, humidity, wind speed, and planting density to construct a dynamic influence factor set; Use the SIS model to describe the spread process of pests and diseases between grids, and define the dynamic conversion equations of infected and disease-resistant crops; Define nine transmission paths based on the grid neighborhood relationship, design a probability transition matrix based on environmental influence factors, and use the Monte Carlo method to simulate the disease diffusion trajectory in the next N days to generate a dynamic map including the probability of transmission paths and risk hotspots; When it is monitored that the preset grid resource regeneration amount reaches the threshold, automatically trigger the resource transfer protocol for adjacent grids. Dynamically adjust the resource allocation weight according to the disease spread direction to form an optimized spatial configuration plan for disease-resistant resources.
[0012] According to another embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method for identifying crop pests and diseases and following up the pathology are implemented.
[0013] According to still another embodiment of the present application, a storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for identifying crop pests and diseases and following up the pathology are implemented.
[0014] It can be seen from the above technical solutions that the present invention has the following advantages: The method for identifying crop pests and diseases and pathological follow-up provided by this application improves the accuracy of pest and disease identification through multi-stage feature processing. For example, preliminary feature data is used to generate diagnostic hypotheses, which are encoded as vectors and fused with the preliminary features. At the same time, a teacher model is used to dynamically distill the student model. The model performs excellently in cross-regional adaptability. During the dynamic distillation process, the powerful knowledge reserve of the teacher model is used to guide the student model to learn, enabling the student model to better adapt to the pest and disease characteristics and environmental conditions in different regions, and expanding the application scope of the model. Based on the trained student model, a disease development prediction model is constructed, and the diffusion process of the disease in the spatial grid is simulated through convolution operations. By combining environmental data to adjust the propagation rate, the development condition parameters of the disease and the propagation probability map for the next N days can be accurately predicted. This helps plant protection personnel understand the development trend of the disease in advance, take preventive measures in a timely manner, and reduce the damage of pests and diseases to crops. Brief Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions of the present invention, the accompanying drawings required for description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0016] Figure 1 It is a flowchart of the method for identifying crop pests and diseases and pathological follow-up; Figure 2 It is a flowchart of an embodiment of the method for identifying crop pests and diseases and pathological follow-up; Figure 3 It is a schematic diagram of an electronic device. Detailed Embodiments
[0017] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of this application. However, those skilled in the art should clearly understand that this application can also be implemented in other embodiments without these specific details.
[0018] It should be understood that when used in the specification of this application, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations. The terms "comprising", "including", "having", and their variants all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0019] Statements such as "an embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of this application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different parts of this application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.
[0020] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0021] Please refer to Figure 1 The following is a flowchart of a method for identifying crop pests and diseases and following up on the pathology in a specific embodiment. The method includes: S101: Obtain preliminary feature data of crop pests and diseases.
[0022] In some embodiments, through hyperspectral cameras, temperature and humidity sensors, soil detectors, etc. deployed in farmland, crop images and environmental data are collected in real time. The image data needs to be preprocessed, including denoising, illumination equalization, and leaf area segmentation, to extract visual features such as lesion shape and color distribution; the environmental data includes parameters such as temperature, humidity, wind speed, and soil pH value, which are transformed into a feature vector with a unified dimension through standardization processing.
[0023] S102: Generate a diagnostic hypothesis based on the preliminary feature data and encode the diagnostic hypothesis in text format into a vector representation with a fixed dimension.
[0024] Specifically, based on the preliminary feature data, a pre-trained pest and disease knowledge graph is used to generate a diagnostic hypothesis (such as "wheat powdery mildew, moderately infected"). The text hypothesis is encoded into a 256-dimensional vector through the Sentence-BERT model, and the cosine similarity is used to calculate the matching degree with the historical case library, and the top-3 similar cases are selected as diagnostic references. The attention mechanism is introduced in the encoding process to focus on strengthening the semantic weights of pathogen feature keywords.
[0025] S103: Adopt a gating mechanism to fuse the preliminary feature data and the vector representation to form a comprehensive feature representation.
[0026] In some embodiments, a two-layer fusion network including GRU units and attention gates is constructed. The first layer of GRU processes the original image features, and the second layer of gated units dynamically assigns the fusion weights of the image features and the environmental features according to the semantic importance of the diagnostic hypothesis vector. For example, in the dew interference scenario, the weight coefficient of the environmental humidity feature is automatically increased to 0.7 to suppress the influence of image noise.
[0027] The teacher model is a pre-trained pest and disease identification model that uses the ResNet-50 deep learning model to perform dynamic distillation on the student model. The teacher model predicts the training samples to generate soft labels in the form of probability distributions. The teacher model dynamically adjusts the generation method of soft labels at different training stages to gradually guide the student model to learn more refined feature representations. The role of the teacher model is to transfer knowledge to the student model through the dynamic distillation strategy, improving the diagnostic ability and robustness of the student model.
[0028] The comprehensive feature representation is formed by fusing the preliminary feature data with the embedded form of the soft labels generated by the teacher model through a gating mechanism. The fused feature representation serves as supplementary information for the input data in the subsequent training of the student model, indirectly improving the diagnostic ability of the model.
[0029] S104: Use the teacher model to perform dynamic distillation on the original pest and disease identification student model. Through a multi-stage strategy, the teacher model generates soft labels, and uses the soft labels as supervision information to guide the student model.
[0030] The learning model is a component in the dynamic distillation process. Its role is to process the multi-source training sample set to generate primary representations and corrected representations with masked interference. The relationship between the learning model and the teacher model is that the training samples are processed through the feature extraction unit and the feature enhancement unit to generate primary representations and corrected representations. The teacher model uses the representations generated by the learning model for prediction, generates soft labels, and uses them as supervision information to guide the student model. The feature enhancement unit of the learning model simulates the data noise in the real scenario, helping the teacher model generate more robust soft labels.
[0031] In some embodiments, a progressive distillation strategy is adopted: in the first stage, hard labels are generated by the teacher model in the first 100 epochs; in the second stage, it switches to soft labels, and the temperature parameter T linearly decays from 3.0 to 0.5 to smooth the probability distribution; in the third stage, adversarial training is introduced to enhance the robustness of the model through the gradient penalty term. The teacher model is based on the ResNet-50 backbone network, and the student model uses the lightweight MobileNetV3 structure.
[0032] S105: Train the student model, save the model checkpoints during the training process, and use the validation set to evaluate the performance of the student model.
[0033] Specifically, a transfer learning strategy is adopted, and the initial weights are loaded from the ImageNet pre-trained model. The loss function is Focal Loss to alleviate class imbalance, and the optimizer is AdamW with β1 = 0.9 and β2 = 0.999. Checkpoints are saved every 5 epochs of training, and the early stopping mechanism is triggered when the validation set loss does not decrease for 3 consecutive times.
[0034] S106: Construct a disease development prediction model based on the trained student model to predict the development condition parameters of various diseases.
[0035] In some embodiments, based on the improved Logistic growth model, a disease development equation is defined: dI / dt = rI(1 - I / K) – αIP; where I is the proportion of the infected area, r is the disease growth rate, K is the environmental carrying capacity limit, and α is the control coefficient. The parameters are determined by fitting historical data, and the input variables of the model are corrected by combining meteorological forecasts. The meteorological forecasts can be the rainfall and the day-night temperature difference in the next 7 days.
[0036] S107: Simulate the diffusion process of the disease in the spatial grid through convolution operations, and adjust the propagation rate by combining environmental data to obtain the propagation probability map within the next N days.
[0037] In some embodiments, the crop planting area is divided into spatial grids. With the current disease spot distribution as the initial state, two-dimensional convolution operations are used to simulate the diffusion of the disease in the spatial grid. According to the environmental data such as temperature, humidity, and wind speed obtained in real time, the weights of the convolution kernels are adjusted, thereby adjusting the disease propagation rate, and the disease propagation probability map within the next N days is calculated.
[0038] S108: Based on the comprehensive feature representation, the performance optimization of the student model, and the development condition parameters, and combined with the disease process prediction results generated by the disease propagation conditions, it is used to evaluate the development trend of crop pests and diseases.
[0039] Specifically, a three-level early warning index system is established: Level 1 (red): It is expected that the infected area will expand by more than 30% within 3 days; Level 2 (orange): 15% - 30%; Level 3 (yellow): < 15%; Combined with the propagation simulation results, a prevention and control plan is generated. For example: it is recommended to immediately spray tebuconazole suspension (concentration 0.3%) on the grid area A5 - B7, and implement unmanned aerial vehicle spraying on adjacent grids to complete the operation within 72 hours.
[0040] In some specific embodiments, an unknown disease occurred in a major wheat production area. The monitoring system captured abnormal leaf images on May 10. Sensor data showed that the field humidity reached 85%, the temperature was 22°C, and the southeast wind was at level 3. The image feature extraction module identified spindle-shaped lesions, and the color histogram showed a predominance of grayish-white. The diagnosis module generated the hypothesis "initial infection of Fusarium head blight in wheat", and the matching degree of the encoded vector with cases in Jiangsu region in 2019 reached 89%.
[0041] The teacher model (ResNet-50) generated soft labels based on historical data, with the initial temperature T = 2.5. The student model (MobileNetV3) gradually focused on key features during training: at the 50th epoch, the gating network increased the humidity feature weight to 0.68, and at the 120th epoch, adversarial training reduced the misjudgment rate of the model for reflective leaves by 18%. The validation set evaluation showed that the accuracy of the improved model in the overlapping leaf scenario increased from 82.3% to 94.1%.
[0042] The disease development prediction module input the current proportion of infected area at 8%, combined with the weather forecast (rainfall in the next 5 days), and calculated the disease growth rate r = 0.22 / d. The spatial spread simulation showed that the pathogen would spread along the southeast wind direction and affect 3 adjacent grids (about 45 mu) within 48 hours. The system generated a level-three warning, recommended setting up a biological isolation belt (planting garlic) at the grid junction, and suggested completing the foliar spraying of pyraclostrobin before May 13.
[0043] In actual prevention and control, farmers set up traps in key areas as recommended. Three days later, the monitoring showed that the number of new cases decreased by 62%. The system updated the recovery rate parameter μ = 0.18 according to the feedback data, and after recalculation, the warning level dropped to level two. This case verified the effectiveness of the technical solution in a complex farmland environment. It took only 5 days from the discovery of the disease to the control of its spread, shortening the disposal cycle by 40% compared with traditional methods.
[0044] In some specific embodiments, such as Figure 2 shown, the method for crop pest and disease identification and pathology follow-up uses Sentence-BERT to encode text hypotheses into 256-dimensional vectors, and fuses the original features and hypothesis features through a gating mechanism.
[0045] This embodiment is based on a large model database as the teacher model to dynamically distill the original pest and disease identification model, adopts a multi-stage distillation strategy to generate high-quality soft labels, and then transfers these soft labels as supervision information to the student model. During the distillation process, the temperature parameter is dynamically adjusted to control the smoothness of the soft labels. During the training process, model checkpoints are saved regularly, and the performance of the student model is evaluated through the validation set. Through dynamic distillation, the accuracy of the inference model can be continuously optimized, and the inference hit rate in the face of different complex situations can be improved.
[0046] In the part of pathological follow-up and decision optimization, the disease development prediction model first needs to comprehensively consider the development conditions of various diseases and make a reasonable prediction of the disease process. Here, a part of the code for the spatio-temporal propagation model implemented in Python is shown. Such models are usually used to predict the spread of diseases, information, or phenomena in the spatio-temporal dimension. Common models include diffusion models based on partial differential equations (PDEs), cellular automata (CA), agent-based models (ABM), and combinations of deep learning methods such as convolutional neural networks (CNNs) or recurrent neural networks (RNNs).
[0047] In the context of agricultural pests and diseases, the spatio-temporal propagation model needs to consider the ways of disease spread among crops, such as airborne spread, soil-borne spread, and vector-borne spread, and at the same time combine environmental factors (temperature, humidity, wind speed, etc.) and time factors (different stages of disease development).
[0048] The model uses convolution operations to simulate the spread of diseases in the spatial grid and adjusts the propagation rate in combination with environmental data. The advantage of this method is high computational efficiency, which can handle rasterized spatial data and is suitable for large-scale farmland monitoring.
[0049] def disease_spread_prediction(current_state): # Input: Current disease lesion distribution matrix (10x10 grid) # Output: Future N-day propagation probability map # Propagation constraints based on physical mechanisms kernel = np.array([[0,1,0], [1,0,1], [0,1,0]]) # Four-neighbor propagation # DeepSeek environmental factor correction env_factor = deepseek.query("Current wind speed 2.3m / s, plant spacing 0.4m, calculate spore diffusion coefficient") adjusted_kernel = kernel * env_factor['diffusion_coeff'] # Convolution prediction return convolve2d(current_state, adjusted_kernel, mode='same').
[0050] After disease prediction and pathological follow-up, the method optimization for multi-dimensional decision generation is carried out for the above reasoning results. At the same time, the NSGA-II multi-objective genetic algorithm is used for Pareto front search.
[0051] In some embodiments, the original static image analysis and recognition operation is abandoned, and a transparent chain of "feature - mechanism - decision" is constructed. The detection and diagnosis of crop diseases and pests are not only limited to symptom recognition, but also can trace back to the disease and pest transmission path and recommend root cause blocking measures.
[0052] The difference in recognition accuracy before and after in complex scenarios: Leaf overlap scenario: 82.3% -> 94.1% (an increase of 11.8%); Reflective / dew interference scenario: 68.7% -> 89.5% (an increase of 20.8%); Adaptability across regions: The F1 value of the model migrated to a new area: 0.61 -> 0.87 (an increase of 42.6%).
[0053] By integrating a large language model for interactive Q&A during decision-making, and using multi-objective optimization and dynamic distilled knowledge graphs, the autonomous evolution of "practical feedback -> model iteration -> strategy optimization" is realized, and the diagnostic success rate under various conditions and the decision-making friendliness for different situations are improved synchronously.
[0054] In an exemplary embodiment, step S104 further includes the following steps: S1041: Collect a multi-source training sample set, including a composite feature input composed of visible light images, multi-spectral data, and environmental sensing parameters: To enable the model to learn rich and comprehensive crop features, data needs to be collected from multiple dimensions.
[0055] In this embodiment, a high-definition camera is used to obtain visible light images of crops. Such images can intuitively present visual features such as the color, shape, and texture of crops. The multi-spectral sensor collects data in different spectral bands. Crops in different health states have different reflection and absorption characteristics in each spectral band, and thus the disease information that is difficult to detect with the naked eye can be captured.
[0056] S1042: Construct a heterogeneous model architecture, where the learning model includes a feature extraction unit and a feature enhancement unit, and the feature enhancement unit performs random masking on the extracted features; the comparison model only retains the same feature extraction unit structure and initialization parameters as the learning model: construct two models with different structures. The learning model includes a feature extraction unit and a feature enhancement unit. The feature extraction unit is responsible for extracting key features from multi-source training samples; the feature enhancement unit will perform random masking on the extracted features to simulate partial data loss or interference that may occur in actual applications, and prompt the model to learn more robust and general feature expressions.
[0057] S1043: Generate a primary representation by processing training samples through the feature extraction unit, and the learning model additionally generates a modified representation with masking interference through the feature enhancement unit.
[0058] In this embodiment, multi-source training samples are input into the feature extraction units of the learning model and the comparison model. The feature extraction unit analyzes and processes the sample data to generate a primary representation, which contains the basic feature information of crop pests and diseases.
[0059] For the learning model, after the primary representation is generated by the feature extraction unit, it is also input into the feature enhancement unit. The feature enhancement unit performs masking on some features in the primary representation according to a preset random rule, thereby generating a modified representation with masking interference to simulate scenarios of data loss or interference.
[0060] S1044: Calculate the difference degree between the modified representation and the reference representation generated by the comparison model, and establish a representation alignment loss function, whose mathematical form is: L = ||f_s (X)⊙M - f_t (X)||². Where, M is a random masking matrix, and f_s and f_t respectively represent the representation outputs of the learning model and the comparison model.
[0061] Compare the modified representation obtained by processing the learning model through the feature enhancement unit with the reference representation generated by the comparison model. Use the representation alignment loss function to quantify the difference degree between the two.
[0062] S1045: Dynamically adjust the model parameters based on the representation alignment loss, and terminate the optimization process when the number of training iterations reaches a preset threshold or the loss value converges to a stable interval.
[0063] In this embodiment, the representation alignment loss value is used as a feedback signal, and the parameters of the learning model are dynamically adjusted using the stochastic gradient descent algorithm and its variants.
[0064] In each training iteration, the algorithm adjusts the model parameters according to the magnitude of the loss value and the gradient direction, so that the difference between the corrected representation generated by the learning model and the reference representation of the contrast model gradually decreases. Continuing this process, when the number of training iterations reaches a pre-set threshold, or the loss value converges to a stable interval, it indicates that the model has learned a relatively stable and effective feature representation, and at this time, the optimization process is terminated.
[0065] S1046: Transfer the optimized learning model parameters to the pest and disease identification student model as the initialization benchmark for dynamic distillation.
[0066] In this embodiment, the learning model parameters optimized through the above steps are passed to the pest and disease identification student model as the initialization parameters for the student model during the dynamic distillation process. Through this parameter transfer, the student model can utilize the effective feature representations and knowledge learned by the learning model during the previous training to converge to a better state faster, improving the efficiency and effect of dynamic distillation.
[0067] It can be seen that the multi-source data used in model training greatly enriches the feature dimensions, enabling the model to capture crop pest and disease information. The application of random masking processing and the representation alignment loss function enhances the robustness of the model, enabling it to accurately identify pests and diseases even in the face of complex situations such as data loss and noise interference. Moreover, during the dynamic distillation process, the student model can better learn the knowledge of the teacher model, further improving the accuracy of pest and disease identification.
[0068] Step S105 of this embodiment specifically includes: clarifying the training objectives of the student model. For example, if the purpose is to identify specific types of crop pests and diseases, the training objectives may include accurately classifying the types of pests and diseases, evaluating the severity of the disease, etc. Define one or more loss functions to measure the difference between the prediction results of the student model and the actual target features. Commonly used loss functions include cross-entropy loss (for classification tasks), mean squared error (for regression tasks), etc. This helps to guide the model to learn the correct patterns and rules.
[0069] This embodiment dynamically adjusts the knowledge distillation strategy according to the learning progress of the student model: during the knowledge distillation process, the knowledge of the teacher model is passed to the student model through soft labels. As the learning progress of the student model advances, the specific knowledge distillation strategy can be dynamically adjusted, such as changing the way or proportion of the teacher model generating soft labels, to adapt to the learning state of the student model. This adaptive strategy helps to accelerate the learning process of the student model and improve its final performance.
[0070] Based on the optimized loss function and distillation strategy, train the student model and update the parameters using the gradient descent algorithm: The model is trained using the selected loss function and a knowledge distillation strategy adjusted according to the learning progress of the student model. In each iteration, calculate the loss between the current model output and the target value, and update the model parameters using the gradient descent method to minimize the loss function. This step is the core part of model training and determines whether the model can learn effective feature representations from the data.
[0071] Evaluate the performance of the student model through the validation set and monitor its adaptability in complex scenarios: To ensure that the model not only performs well on the training set but also maintains good generalization ability on unseen data, an independent validation set is usually used to evaluate the model's performance. In addition, a series of complex scenarios can be designed to test the model's adaptability and robustness to ensure that the model can handle various actual situations.
[0072] Select the model with the best performance on the validation set from the saved checkpoints as the candidate model, fine-tune the candidate model, adjust the model structure to enhance its ability to capture local features, and finally determine the optimized model as the final version of the student model: During the entire training process, the model's state (i.e., checkpoint) is saved regularly. After training, select the model version with the best performance on the validation set as the basis for further optimization. In this embodiment, the model can be fine-tuned, especially for optimizing its ability to capture local features, such as adjusting the convolution kernel size, adding attention mechanisms, etc., to further improve the model's performance. Finally, determine the optimized model as the completed student model.
[0073] In step S107 of this embodiment, it includes simulating the diffusion process of diseases in the spatial grid through convolution operations and adjusting the propagation rate in combination with environmental data to obtain the propagation probability map for the next N days.
[0074] Step S107 of this embodiment specifically involves the following steps: S701: Construct a two-dimensional grid space to simulate the spatial relationship between farmlands. Establish a rectangular two-dimensional lattice network with side lengths W and H to simulate the real farmland area. There are a total of W×H grids in the network. Each grid represents a small piece of farmland and records attributes related to crops, such as crop type, health status, environmental parameters, etc.
[0075] S702: Design an individual movement algorithm based on the influence of dynamic location resource regeneration to simulate the spread of pests and diseases between farmlands.
[0076] In this embodiment on the two-dimensional grid, pests and diseases can only make nine simple movements between adjacent grids. Each pest spreads according to the probability based on the influence of dynamic location resource regeneration in the above nine directions.
[0077] S703: Construct a resource regeneration module and set a resource regeneration force algorithm based on the number of grid crops and the crop infection status. Considering that the uninfected crops in the field at each time point are capable of participating in photosynthesis and nutrient absorption, a farmland resource regeneration force algorithm based on the number of uninfected crops at a location is proposed to calculate the resource regeneration force of the farmland at each time step.
[0078] S704: When the amount of resources in the field is excessive, in order to effectively utilize the resources, the field can donate the resources to other surrounding fields. When the amount of regenerated resources in the field exceeds a certain amount, a willingness to donate resources will be generated, and the willingness of the field to donate resources is quantified.
[0079] S705: Establish a dynamic location resource regeneration influence model. The location resource regeneration force reflects the ability of the field to resist the spread of pests and diseases by generating resources. The resource regeneration force of the field changes over time and affects the decision-making behavior of organisms.
[0080] Resources affect the spread of pests and diseases by influencing the recovery rate of pests and diseases. The stronger the resource regeneration force of the field, the greater the amount of resources produced, and the easier it is to control the spread of pests and diseases.
[0081] S706: Construct a pest and disease spread module and apply the SIS model to the two-dimensional grid space.
[0082] Construct the SIS model on the farmland network. The changes in the number of uninfected crops and infected crops in the field can be described by ordinary differential equations. Considering that in reality, the infection rate of a certain field is affected by various factors, such as soil fertility, irrigation conditions, etc., and is negatively correlated with the scale of the field, that is, the larger the scale of a field, the lower the corresponding infection rate.
[0083] It can be seen that this embodiment aims to enhance the function of the disease development prediction model based on S106. By introducing a resource management and allocation mechanism and a grid-based spatial spread model, it simulates the spread process of pests and diseases between farmlands and improves the prediction accuracy.
[0084] In step S108 of this embodiment, a two-dimensional grid system including crop distribution, soil characteristics, and environmental parameters is constructed. Each grid cell records the basic infection rate of pests and diseases, the coverage rate of disease-resistant crops, and the soil nutrient content. A mapping relationship between the grid coordinates and the actual geographical location is established to form the topological structure of the farmland ecological spread network.
[0085] In this embodiment, based on the disease-resistant crop planting area and rotation strategy within grid cells, the amount of disease-resistant resource regeneration in each cell is calculated. A quantitative relationship model between the resource regeneration amount and the disease suppression effect is established, and when the resource amount exceeds a preset threshold, a cross-grid resource allocation mechanism is triggered. Environmental parameters such as temperature, humidity, wind speed, and planting density are integrated to construct a dynamic influence factor set. The correction coefficient of each factor on the disease transmission rate is determined through a weighted algorithm, and a non-linear relationship between the transmission probability and the environmental impact factors is established.
[0086] This embodiment also uses the SIS model to describe the spread process of pests and diseases between grids, and defines the dynamic conversion equations of infected and disease-resistant crops. The resource regeneration amount is introduced as a recovery rate correction parameter, and a differential equation system including spatial diffusion and resource allocation is established. Nine propagation paths are defined based on the grid neighborhood relationship, and a probability transition matrix based on environmental influence factors is designed. The Monte Carlo method is used to simulate the disease spread trajectory in the next N days, and a dynamic map including the propagation path probability and risk hot spots is generated. During the simulation process, meteorological prediction data is superimposed in real time to dynamically correct the diffusion rate parameters.
[0087] When it is monitored that the resource regeneration amount in a specific grid reaches the threshold, the resource transfer protocol of adjacent grids is automatically triggered. The resource allocation weight is dynamically adjusted according to the disease transmission direction to form an optimal spatial allocation scheme of disease-resistant resources. A resource transportation cost model is established, and the optimal allocation path is selected through a path planning algorithm to ensure the balance of resource timeliness and economy.
[0088] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0089] As Figure 3 shown, the present application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored on the memory and executable on the processor 101. When the processor 101 executes the program, it implements the steps of the method for identifying crop pests and diseases and following up the pathology.
[0090] In the embodiments of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.
[0091] In the embodiments of the present application, the processor 101 may be implemented by using at least one of an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to execute the functions described herein. In some cases, such an implementation may be implemented in a controller. For a software implementation, an implementation of a process or function may be implemented with a separate software module that allows execution of at least one function or operation. The software code may be implemented by a software application (or program) written in any suitable programming language. The software code may be stored in a memory and executed by a controller.
[0092] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, and the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0093] The memory 102 may be used to store software programs and various data. The memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0094] The present application also provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for identifying crop pests and diseases and pathological follow-up are implemented.
[0095] The storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0096] The foregoing description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for identifying crop diseases and insect pests and for following up on pathology, characterized in that: Methods include: S101: Obtain preliminary characteristic data of crop pests and diseases; S102: Generate a diagnostic hypothesis based on the preliminary feature data, and encode the diagnostic hypothesis in text format into a vector representation of a fixed dimension; S103: using a gating mechanism to fuse the preliminary feature data and the vector representation to form a comprehensive feature representation; S104: Use the teacher model to dynamically distill the original pest and disease recognition student model. Through a multi-stage strategy, the teacher model generates soft labels, which are used as supervision information to guide the student model. S105: Train the student model, save model checkpoints during the training process, and use the validation set to evaluate the student model performance; S106: construct a disease development prediction model based on the trained student model to predict the development condition parameters of various diseases; S107: Simulate the disease diffusion process in the spatial grid through convolution operation, and adjust the propagation rate in combination with environmental data to obtain the propagation probability map within the next N days; S108: Based on the student model generated by dynamic distillation, combined with the disease transmission conditions and development condition parameters, by simulating the spread process of pests and diseases in the spatial grid, a propagation probability map within the next N days is generated, which is used to evaluate the development trend of crop pests and diseases.
2. The method for identifying crop diseases and insect pests and following up pathology according to claim 1, characterized in that: Step S104 also includes: Collect multi-source training sample sets, including composite feature inputs composed of visible light images, multi-spectral data, and environmental sensing parameters; The constructed learning model includes a feature extraction unit and a feature enhancement unit, and the feature enhancement unit implements random masking processing on the extracted features; The training samples are processed by the feature extraction unit and a primary representation is generated, so that the learning model generates a corrected representation with masking interference through the feature enhancement unit.
3. The method for identifying crop diseases and insect pests and following up pathology according to claim 2, characterized in that: Calculate the difference between the corrected representation and the baseline representation generated by the comparison model, and establish the representation alignment loss function; Dynamically adjust model parameters based on representation alignment loss, and terminate the optimization process when the number of training iterations reaches a preset threshold or the loss value converges to a stable range; The optimized learning model parameters are transferred to the pest and disease identification student model as the initialization benchmark for dynamic distillation.
4. The method for identifying crop diseases and insect pests and following up pathology according to claim 1, characterized in that: Step S105 specifically includes: Set the training goal and loss function, and clearly define the training goal and the loss function to measure the difference between the student model prediction results and the target features; Dynamically adjust the knowledge distillation strategy according to the learning progress of the student model; Based on the optimized loss function and distillation strategy, the student model is trained and the gradient descent algorithm is used to update the parameters.
5. The method for identifying crop diseases and insect pests and following up pathology according to claim 4, characterized in that: The performance of the student model is evaluated through the validation set, and its adaptability in complex scenarios is monitored; the model with the best performance on the validation set is selected from the saved checkpoints as the candidate model, and the candidate model is fine-tuned to adjust the model structure to enhance its ability to capture local features, and finally the optimized model is determined as the final student model.
6. The method for identifying crop diseases and insect pests and following up pathology according to claim 1, characterized in that: Step S107 specifically includes the following steps: Construct a two-dimensional grid space to simulate the spatial relationship between farm fields; Design an individual movement algorithm based on the influence of dynamic location resource regeneration to simulate the spread of pests and diseases among farmlands; Construct a resource regeneration module and set the resource regeneration algorithm based on the number of grid crops and crop infection status; A dynamic location resource regeneration influence model is established, and resources affect the spread of pests and diseases by affecting the recovery rate of pests and diseases. A pest and disease transmission module is constructed to apply the SIS model to a two-dimensional grid space. The SIS model is constructed on the farmland network, and the changes in the number of uninfected crops and the number of infected crops in the field are described by ordinary differential equations.
7. The method for identifying crop diseases and insect pests and following up pathology according to claim 1, characterized in that: Step S108 specifically includes: constructing a two-dimensional grid system including crop distribution, soil characteristics and environmental parameters, with each grid unit recording the basic infection rate of pests and diseases, coverage rate of disease-resistant crops and soil nutrient content; Based on the planting area of disease-resistant crops and crop rotation strategies within the grid unit, the regeneration amount of disease-resistant resources in each unit is calculated; Integrate temperature, humidity, wind speed and planting density parameters to construct a dynamic influencing factor set; The SIS model is used to describe the spread of pests and diseases between grids, and the dynamic transformation equations between infected and disease-resistant crops are defined. Nine propagation paths are defined based on the grid neighborhood relationship, a probability migration matrix based on environmental influence factors is designed, and the Monte Carlo method is used to simulate the disease diffusion trajectory in the next N days to generate a dynamic map containing the propagation path probability and risk hotspot areas; When it is monitored that the preset grid resource regeneration amount reaches the threshold, the resource transfer protocol of the adjacent grid is automatically triggered, and the resource allocation weight is dynamically adjusted according to the direction of disease propagation to form a spatial optimization configuration plan for disease-resistant resources.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the crop disease and insect pest identification and pathology follow-up method as claimed in any one of claims 1 to 7 are implemented.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the crop disease and insect pest identification and pathology follow-up method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Underground pipeline surrounding 360-degree ground penetrating radar data cross fusion reconstruction method
CN117214856A
Electronic equipment and computer program product for forecasting mine water disasters
CN118297414A
Intelligent substation real-time monitoring system and method based on big data
CN119921477A
Method for adaptation of a surrogate model describing a dynamic system and its application to system optimization
WO2024061504A1
Cited By
Crop disease and pest intelligent monitoring system based on image recognition and machine learning
CN120526228A
Intelligent monitoring system for crop diseases and insect pests based on image recognition and machine learning
CN120526228B
Tobacco black shank refined intelligent early warning method and system
CN120765067A
Early disease prediction method and system driven by remote sensing change information of wheat stripe rust
CN121009293A
Early disease prediction method and system of wheat stripe rust remote sensing change information driven
CN121009293B