Method and device for predicting occurrence trend of migratory pest
By constructing a meteorological-pest coupling model and utilizing a bidirectional long short-term memory network and a multi-head attention mechanism layer, the problems of nonlinear coupling and lag effects in the prediction of migratory pests are solved, achieving high-precision prediction and cross-regional adaptation, reducing model migration costs and providing confidence assessment.
Patent Information
- Application Number
- CN202611632210.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-21
- Publication Date
- 2026-11-27
AI Technical Summary
Existing methods for predicting migratory pests are unable to characterize the nonlinear coupling and lag effects of multiple meteorological factors, lose daily meteorological time-series evolution information, and require a large number of labeled samples for cross-regional model migration. The output lacks confidence assessment, resulting in low prediction accuracy, poor adaptability, and easy misleading of prevention and control decisions.
A meteorological-pest coupling model is constructed, which utilizes a bidirectional long short-term memory network and a multi-head attention mechanism layer, combined with a meteorological temporal encoder and a pest trend decoder. The model processes meteorological data through feature engineering and performs supervised training, outputting the probability and confidence of pest occurrence, and designs cross-regional migration and incremental update strategies.
It achieves high-precision prediction of the occurrence trend of migratory pests, rapid cross-regional adaptation and confidence assessment, improves prediction accuracy, reduces model migration costs, and avoids uncertainty from misleading prevention and control decisions.
Smart Images

Figure CN123180464A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural pest forecasting and prediction technology, and in particular to a method and apparatus for predicting the occurrence trend of migratory pests. Background Technology
[0002] Migratory pests, such as the rice leaf roller, cotton bollworm, and fall armyworm, are among the most destructive insect pests in my country's agricultural production. Taking the rice leaf roller as an example, as the most important migratory pest of rice, its occurrence patterns are becoming increasingly complex, and its outbreak frequency and severity are on the rise due to global climate change and the continued expansion of large-scale rice cultivation. The migration, reproduction, and field dynamics of migratory pests are driven by the coupling of meteorological factors such as temperature, humidity, wind speed, and rainfall. Traditional empirical forecasts or single-factor index methods are insufficient to accurately capture their nonlinear, time-lag, and spatially heterogeneous characteristics. Accurately predicting the occurrence trends (occurrence time and intensity level) of migratory pests is a key technological requirement for implementing a "prevention-oriented, integrated pest management" strategy, reducing reliance on chemical pesticides, and ensuring food security. Existing forecasting methods rely on the field surveys and work experience of plant protection personnel to drive away moths (or insects), which has poor timeliness and narrow coverage. There is an urgent need to introduce deep learning technology to explore the deep coupling patterns between meteorology and insect pests, and to achieve intelligent early warning based on meteorological forecast data.
[0003] Existing methods for predicting the occurrence trends of migratory pests can be mainly divided into the following two categories: I. Traditional Statistical Regression and Indicator Methods This type of method is based on historical insect pest and meteorological data, establishes stepwise regression, discriminant analysis or effective accumulated temperature models, screens significant influencing factors, and sets thresholds for graded forecasts. For example, for rice leaf roller, commonly used influencing factors include the average temperature in July and the rainfall in August; for cotton bollworm, commonly used influencing factors include the overwintering temperature and the rainfall in spring. The core defects of this type of method are: (1) The model assumes that the factors are linearly independent, and cannot characterize the cumulative effect, interaction effect and lag effect of multiple meteorological elements on insect pests (such as the coupling effect of early temperature and late humidity); (2) The threshold depends on empirical determination, and has poor applicability in different regions and years, and weak generalization ability; (3) It does not make full use of time series information, ignores the dynamic modulation effect of continuous weather processes before the peak migration period on the insect population, and the forecast accuracy is generally less than 60%.
[0004] II. Traditional Machine Learning Methods This type of method uses random forests, support vector machines, or BP neural networks, taking static meteorological factors (such as monthly averages) as input and pest levels as output. Compared with statistical models, it is an improvement, but still has significant drawbacks: (1) The input features are mostly monthly or ten-day aggregate values, losing the evolution information of daily meteorological data, and cannot capture the key impact of short-term weather processes (such as continuous southerly winds and gusty rainfall) on migration and landing; (2) The model structure is simple and lacks a dedicated encoder for time-series dependence, making it difficult to establish a long-term meteorological-pest dynamic mapping; (3) The training data requirements are high, and a large number of labeled samples need to be collected again when migrating across regions, resulting in poor adaptability; (4) The model output is only a point estimate and lacks prediction confidence assessment. When the uncertainty of the weather forecast increases, it still gives a deterministic conclusion, which can easily mislead prevention and control decisions.
[0005] In summary, existing technologies for predicting the occurrence trends of migratory pests have significant limitations in terms of accuracy, time-series modeling capabilities, and cross-regional adaptability: traditional statistical methods struggle to capture nonlinear coupling and lag effects, while traditional machine learning methods lose daily evolution information and incur high migration costs. Therefore, there is an urgent need to establish an intelligent prediction method based on a meteorological-pest coupling model to provide intelligent decision support for accurate early warning and green control of migratory pests. Summary of the Invention
[0006] This invention provides a method and apparatus for predicting the occurrence trend of migratory pests, aiming to solve the problems of existing migratory pest prediction methods, which are difficult to characterize the nonlinear coupling and lag effects of multiple meteorological factors on pests, lose daily meteorological time series evolution information, and require a large number of labeled samples for cross-regional model migration and lack confidence assessment of output, resulting in low prediction accuracy, poor adaptability, and easy misleading of prevention and control decisions.
[0007] In a first aspect, the present invention provides a method for predicting the occurrence trend of migratory pests, comprising: Historical daily meteorological data, historical insect pest observation data, and future weather forecast data for the target area are acquired; feature engineering is performed on the historical daily meteorological data and the weather forecast data to extract key meteorological factors driving the migration and reproduction of target pests, and a standardized meteorological feature matrix is generated; based on the standardized meteorological feature matrix, a meteorological-insect coupling model is constructed. The meteorological-pest coupling model is trained under supervision using the historical daily meteorological data and the historical insect infestation observation data; the standardized meteorological feature matrix corresponding to the meteorological forecast data is input into the trained meteorological-pest coupling model, and the probability and intensity level of the occurrence of target pests in the target area within a future preset time window are output.
[0008] Preferably, the feature engineering process includes at least one of the following processes: Calculate the effective accumulated temperature when the daily average temperature exceeds the developmental threshold of the target pest. The number of consecutive days that the relative humidity exceeds the preset humidity threshold is recorded. Based on daily average wind speed, daily maximum wind speed, and daily prevailing wind direction data, the cumulative duration of suitable migration windows with wind speeds below a preset wind speed threshold is calculated throughout the day, and the continuous change trend characteristics of wind direction are extracted.
[0009] Preferably, after performing feature engineering processing on the historical daily meteorological data and the meteorological forecast data respectively, the method further includes: resampling and matrixing the multidimensional features obtained by the feature engineering processing according to a preset time sliding window, and linearly mapping the values of each feature column to a unified interval using the maximum-minimum normalization method.
[0010] Preferably, the meteorological-pest coupling model includes: a meteorological time-series encoder and a pest trend decoder; the meteorological time-series encoder is used to extract time-series features from the standardized meteorological feature matrix, and the pest trend decoder is used to output the discrete probability distribution of the occurrence level of the target pest based on the extracted time-series features.
[0011] Preferably, the meteorological time-series encoder employs a bidirectional long short-term memory network to simultaneously propagate the hidden state forward and backward in the time dimension, outputting a high-dimensional hidden state vector corresponding to each time step.
[0012] Preferably, the meteorological-pest coupling model further includes a multi-head attention mechanism layer, which is set between the meteorological time-series encoder and the pest trend decoder, for adaptively weighting and summing the hidden state output by the encoder at each time step, increasing the feature weight of the key time window that has an indicative effect on the occurrence of pests, and suppressing noise information.
[0013] Preferably, the pest trend decoder is a fully connected multilayer perceptron containing several hidden layers, used to receive a fixed-length feature vector after weighted fusion by the multi-head attention mechanism layer, transform it layer by layer through a nonlinear activation function, and finally map it to the discrete probability distribution of the occurrence level of the target pest through the Softmax output layer.
[0014] Preferably, the supervised training of the meteorological-insect coupling model using the historical daily meteorological data and the historical insect infestation observation data includes: The historical meteorological feature matrix after feature engineering and the corresponding insect occurrence level labels are divided into training set, validation set and test set in chronological order; The sliding time window method is used to construct training samples, with meteorological characteristic time series within a continuous preset time period in the past as model input and pest occurrence level survey results within a preset time period in the future as prediction labels. The focus loss function is used as the optimization objective to iteratively train the meteorological-insect coupling model.
[0015] Preferably, the step of supervising the training of the meteorological-insect coupling model using the historical daily meteorological data and the historical insect infestation observation data further includes: An adaptive moment estimation optimizer is used for parameter iterative updates, and a learning rate decay strategy is configured. When the validation set loss does not decrease for several consecutive training cycles, the learning rate is automatically halved. An early stop monitoring mechanism is activated. When the validation set loss does not reach a new low within a preset number of training cycles, training is terminated early and the model parameters are restored to the state with the minimum validation set loss.
[0016] Preferably, the probability and intensity level of target pest occurrence in the output target area within a future preset time window include: The category with the highest probability value is selected as the result of the occurrence intensity level determination, and the highest probability value is used as the prediction confidence level; When the prediction confidence level is lower than a preset safety threshold, an uncertainty warning flag is triggered; When the prediction confidence level is greater than or equal to the preset safety threshold, a graded early warning message is generated based on the occurrence probability and occurrence intensity level, and pushed to the user terminal.
[0017] Preferably, it further includes: Load the weight file of the meteorological-insect coupling model trained in the source region as the initialization parameters for the new target region model; Set the network weights of the meteorological time-series encoder and the attention weight matrix of the multi-head attention mechanism layer to a frozen, untrainable state; Set the multilayer perceptron weights and biases of the pest trend decoder to a trainable state. The decoder is fine-tuned using labeled samples from the new target region to complete model transfer.
[0018] Preferably, after constructing the meteorological-pest coupling model, the method further includes: Set an incremental update cycle. At each cycle node, add the newly collected insect survey samples that have passed quality review and the meteorological characteristic data of the corresponding time period to the training database. The model parameters are fine-tuned by backpropagation through several rounds using new samples to update the model parameters.
[0019] Secondly, the present invention provides a device for predicting the occurrence trend of migratory pests, comprising: The data acquisition module is used to acquire historical daily meteorological data, historical insect pest observation data, and future weather forecast data for the target area; the feature engineering module is used to perform feature engineering processing on the historical daily meteorological data and the weather forecast data respectively, extract the key meteorological factors driving the migration and reproduction of target pests, and generate a standardized meteorological feature matrix; the model building module is used to build a meteorological-pest coupling model based on the standardized meteorological feature matrix. The supervised training module is used to supervise the training of the meteorological-pest coupling model using the historical daily meteorological data and the historical insect observation data; the prediction module is used to input the standardized meteorological feature matrix corresponding to the meteorological forecast data into the trained meteorological-pest coupling model, and output the probability and intensity level of the occurrence of target pests in the target area within a future preset time window.
[0020] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method provided in the first aspect above.
[0021] Fourthly, the present invention provides a storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the first aspect above.
[0022] Fifthly, the present invention provides a computer program product comprising a computer program that, when executed by a processor, performs the steps of the method provided in the first aspect above.
[0023] As can be seen from the above technical solutions, the present invention has the following advantages: This invention provides a method and apparatus for predicting the occurrence trend of migratory pests. The prediction method includes: acquiring historical daily meteorological data, historical pest observation data, and future weather forecast data for a target area; performing feature engineering on the historical daily meteorological data and the weather forecast data respectively to extract key meteorological factors driving the migration and reproduction of target pests, and generating a standardized meteorological feature matrix; constructing a meteorological-pest coupling model based on the standardized meteorological feature matrix; supervising the training of the meteorological-pest coupling model using the historical daily meteorological data and the historical pest observation data; inputting the standardized meteorological feature matrix corresponding to the weather forecast data into the trained meteorological-pest coupling model, and outputting the probability and intensity level of target pest occurrence in the target area within a preset future time window. This invention, by constructing a deep learning coupling model combining a meteorological time-series encoder and a pest trend decoder, fully captures the temporal dependence of meteorological elements and the multi-level classification output of pest occurrence, achieving high-precision prediction of the occurrence trend of migratory pests, rapid cross-regional migration adaptation, and intelligent early warning with confidence assessment. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart illustrating an embodiment of a method for predicting the occurrence trend of migratory pests according to the present invention. Figure 2 This is a structural block diagram of an embodiment of a device for predicting the occurrence trend of migratory pests according to the present invention.
[0026] Figure 3 This is a schematic diagram comparing the measured values of the occurrence level of rice leaf roller larvae in the field with the values of eight models from 2018 to 2024.
[0027] Figure 4 This is a schematic diagram comparing the measured values of the occurrence level of rice leaf roller larvae in the field with the values of eight models in 2025. Detailed Implementation
[0028] This invention provides a method and apparatus for predicting the occurrence trend of migratory pests, aiming to solve the problems of existing migratory pest prediction methods, which are difficult to characterize the nonlinear coupling and lag effects of multiple meteorological factors on pests, lose daily meteorological time series evolution information, and require a large number of labeled samples for cross-regional model migration and lack confidence assessment of output, resulting in low prediction accuracy, poor adaptability, and easy misleading of prevention and control decisions.
[0029] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0030] Example 1
[0031] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of a method for predicting the occurrence trend of migratory pests according to the present invention; the method includes: Step S101: Obtain historical daily meteorological data, historical insect infestation observation data, and future weather forecast data for the target area; In this embodiment of the application, comprehensive collection of long-term agricultural meteorological and plant protection observation data of the target area is carried out to simultaneously gather three types of basic data sources: the first type is historical daily meteorological observation data covering the target area, including daily average temperature, daily maximum and minimum temperature, daily average wind speed, daily maximum wind speed and daily prevailing wind direction, daily rainfall and relative humidity, etc.; the second type is field systematic survey data of target pests on the corresponding time series, i.e., historical pest observation data, including conventional pest observation indicators such as adult moth trapping quantity and field larval population density; the third type is the future time period daily meteorological element forecast product output by numerical weather prediction model, i.e., future time period meteorological forecast data.
[0032] In an optional implementation, the target pest is a migratory pest, including but not limited to rice leaf roller, cotton bollworm, and fall armyworm.
[0033] Step S102: Perform feature engineering processing on the historical daily meteorological data and the meteorological forecast data respectively, extract the key meteorological factors that drive the migration and reproduction of target pests, and generate a standardized meteorological feature matrix. In this embodiment, the basic data source obtained in step S101 is preprocessed. During the data preprocessing stage, a feature engineering pipeline targeting the pest occurrence mechanism is designed, taking into account the high sensitivity of migratory pests to meteorological conditions. The feature engineering process includes at least one of the following processes: The effective accumulated temperature is calculated when the daily average temperature exceeds the developmental threshold of the target pest for consecutive days, and is used as a physiological time characteristic to characterize the temperature accumulation effect. The number of consecutive days in which the relative humidity exceeds the preset humidity threshold is counted to capture the suitable window of high humidity for adult oviposition and egg hatching. Based on daily average wind speed, daily maximum wind speed, and daily prevailing wind direction data, the cumulative duration of suitable migration windows with wind speeds below a preset wind speed threshold is calculated throughout the day, and the continuous change trend characteristics of wind direction are extracted. For example, if the daily average wind speed is below 2 m / s, it can be approximately considered suitable throughout the day; if the daily maximum wind speed is above 2 m / s but the daily average wind speed is below 2 m / s, the proportion of suitable migration windows can be estimated based on an empirical model.
[0034] Finally, the multidimensional features obtained from the above feature engineering process are resampled and matrix-organized according to a preset time sliding window, and the values of each feature column are linearly mapped to a unified interval using the max-min normalization method to eliminate the interference of different units on model training; optionally, the unified interval is the zero-to-one interval. This feature engineering process transforms the original weather observations into a high-dimensional feature representation that can directly reflect the physiological and ecological response patterns of the target pests.
[0035] Step S103: Based on the standardized meteorological feature matrix, construct a meteorological-insect pest coupling model; In this embodiment, the meteorological-pest coupling model includes a meteorological temporal encoder and a pest trend decoder. The meteorological temporal encoder is used to extract temporal features from the standardized meteorological feature matrix, and the pest trend decoder is used to output a discrete probability distribution of the occurrence level of the target pest based on the extracted temporal features. The meteorological temporal encoder employs a bidirectional long short-term memory network to simultaneously propagate the hidden state forward and backward in the time dimension, outputting a high-dimensional hidden state vector corresponding to each time step.
[0036] Furthermore, the meteorological-pest coupling model also includes a multi-head attention mechanism layer, positioned between the meteorological time-series encoder and the pest trend decoder. This layer adaptively weights and sums the hidden state output by the encoder at each time step, increasing the feature weights of key time windows that are indicative of pest occurrence and suppressing noise. The pest trend decoder is a fully connected multilayer perceptron containing several hidden layers. It receives a fixed-length feature vector after weighted fusion by the multi-head attention mechanism layer, transforms it layer by layer through a nonlinear activation function, and finally maps it to a discrete probability distribution of the target pest occurrence level through a Softmax output layer.
[0037] In a specific implementation, the core network type selected for the meteorological-pest coupling model is a bidirectional long short-term memory (BiLSTM) network combined with a multi-head attention mechanism. The BiLSTM network processes meteorological time series in both forward and backward directions, simultaneously capturing the cumulative and lagging effects of past and future short-term meteorological conditions on the migration and reproduction of target pests, offering advantages over ordinary LSTMs or static networks. The multi-head attention layer adaptively weights the hidden states output at each time step of the BiLSTM network, automatically amplifying the influence weights of short-term weather processes (such as continuous southerly winds or sudden clearing after rain) that play a crucial role in pest outbreaks, while suppressing noise from irrelevant time periods. Finally, a multilayer perceptron (MLP) and a Softmax layer output the probability distribution of light, moderate, and severe outbreak levels. This architecture is specifically designed for the nonlinear dynamic mapping between meteorological and pest outbreaks, and its predictive interpretability and accuracy are superior to traditional machine learning methods.
[0038] The front-end module of the meteorological-pest coupling model is a meteorological time-series encoder, whose basic framework adopts a bidirectional long short-term memory (LSTM) network architecture. The bidirectional LSTM network propagates hidden state forward and backward simultaneously in the time dimension, ensuring that the meteorological feature encoding at each moment not only includes accumulated past meteorological information but also incorporates the meteorological evolution trend in the short term. This provides a unique structural advantage for capturing meteorological signals during sensitive periods before the peak migration of target pests. The meteorological time-series encoder uses the standardized multidimensional meteorological feature matrix generated in step S102 as the input sequence and outputs the corresponding high-dimensional hidden state vector step by step. A multi-head attention mechanism layer is introduced between the meteorological time-series encoder and the pest trend decoder as an information bottleneck layer. The attention mechanism layer adaptively weights and sums the hidden state output by the encoder at each time step, automatically increasing the feature weights of key time windows that strongly indicate pest occurrence (such as the temperature and humidity abrupt change window before the migration peak due to continuous rainfall), while suppressing noise information from irrelevant time periods. The backend module of the meteorological-pest coupling model is a pest trend decoder, which is a fully connected multilayer perceptron containing several hidden layers. The pest trend decoder receives a fixed-length feature vector after attention-weighted fusion, transforms it layer by layer through a nonlinear activation function, and finally maps it to a discrete probability distribution of the occurrence level of the target pest through the Softmax output layer. The occurrence level includes at least three levels: light occurrence, moderate occurrence, and severe occurrence.
[0039] Step S104: Supervised training of the meteorological-insect coupling model is performed using the historical daily meteorological data and the historical insect pest observation data; In this embodiment, after the meteorological-insect pest coupling model architecture is determined, the supervised training phase begins. First, the historical meteorological feature matrix, after feature engineering, and the corresponding insect pest occurrence level labels are divided into three non-overlapping time subsets: a training set, a validation set, and a test set, in chronological order. A sliding time window method is used to construct training samples. Each sample uses the meteorological feature time series of the past several consecutive days as model input and the insect pest occurrence level survey results of the next several days as prediction labels. Considering that the actual distribution of insect pest occurrence levels in the field usually exhibits a severe class imbalance—the number of samples in years with light occurrences is far greater than the number of samples in years with moderate and severe occurrences—this method uses a focus loss function instead of the traditional cross-entropy loss function as the optimization objective for multi-classification tasks. The focus loss function introduces a regulating factor, allowing the model to assign lower loss weights to easily classified light occurrence samples that can be correctly classified with high confidence, while concentrating more training gradient resources on moderate and severe occurrence samples that are difficult to classify correctly, thereby effectively alleviating the model bias prediction problem caused by class imbalance. During supervised training of the meteorological-insect pest coupling model, an adaptive moment estimation optimizer is used for iterative parameter updates, and a learning rate decay strategy is configured. Whenever the validation set loss fails to decrease for several consecutive training epochs, the learning rate is automatically halved to more precisely search for the optimal parameter points. Simultaneously, an early stopping monitoring mechanism is activated. If the validation set loss does not reach a new low within a preset number of training epochs, training is terminated early, and the model parameters are automatically restored to the state with the minimum validation set loss. Optionally, the preset number of epochs is ten.
[0040] Step S105: Input the standardized meteorological feature matrix corresponding to the meteorological forecast data into the trained meteorological-pest coupling model, and output the probability and intensity level of the occurrence of target pests in the target area within a future preset time window. In this embodiment, after the meteorological-pest coupling model training converges and parameters are frozen, it enters the operational prediction and extrapolation stage. The daily meteorological forecast data for future periods output by the numerical weather prediction model undergoes the same feature engineering pipeline processing as the historical training data to generate a standardized future meteorological feature matrix. After inputting the meteorological feature matrix into the trained meteorological-pest coupling model, the model forward propagates and calculates and outputs probability vectors corresponding to each occurrence level. The system selects the category with the highest probability value as the occurrence intensity level determination result for this prediction and outputs this highest probability value as a quantitative indicator of prediction confidence. If the prediction confidence value is lower than the system's preset safety threshold, it indicates a significant difference between the current meteorological input model and the training sample distribution, or a high degree of uncertainty in the model regarding the classification boundary. The system will automatically trigger an uncertainty warning, suggesting that grassroots plant protection technicians conduct manual verification and confirmation based on field investigations, rather than blindly accepting the model's prediction results. For prediction results that meet the confidence level, i.e., when the prediction confidence level is greater than or equal to the preset safety threshold, the system generates graded early warning information based on the probability of occurrence and the intensity level of occurrence. The early warning level can be divided into four levels: Level IV, Level III, Level II, and Level I, corresponding to the risks of light occurrence, moderate occurrence, severe occurrence, and large-scale occurrence, respectively (Level IV has the lowest risk, and Level I has the highest risk). The early warning information, along with the occurrence probability value, the affected area range, and the recommended prevention and control time window, is pushed to the mobile terminal applications of plant protection technicians and large-scale growers through the mobile communication network to assist them in making accurate prevention and control decisions.
[0041] The method for predicting the occurrence trend of migratory pests provided in this embodiment, in addition to the steps described above, also includes a cross-regional migration adaptation step. The cross-regional migration adaptation step includes: loading the weight file of the meteorological-pest coupling model trained in the source region as the initialization parameters of the model in the new target region; setting the network weights of the meteorological time-series encoder and the attention weight matrix of the multi-head attention mechanism layer to a frozen, untrainable state; setting the multilayer perceptron weights and biases of the pest trend decoder to a trainable state; and fine-tuning the decoder using labeled samples from the new target region to complete the model transfer.
[0042] In a specific implementation, when the meteorological-pest coupling model needs to be migrated to a new geographical area, a transfer learning strategy is adopted that freezes the underlying parameters of the encoder and only fine-tunes the pest trend decoder. This allows for rapid adaptation to the meteorological-pest response characteristics of the new area on a small number of labeled samples. Target pests exhibit both commonalities in their migration paths, landing meteorological conditions, and population dynamics across different rice-growing regions of my country, as well as regionally specific differences. Training the model from scratch with data from multiple years in each new area would be prohibitively time-consuming and costly. Therefore, this method designs an efficient cross-regional model migration and adaptation strategy. When deploying a meteorological-pest coupling model already trained in the source region to a new target region, the complete model weight file trained in the source region is first loaded as the initialization parameters for the new region model. Subsequently, the weights of each gating unit in the bidirectional long short-term memory network of the meteorological temporal encoder and the attention weight matrix of the attention layer are all set to a parameter-frozen, untrainable state, while only the weights and biases of each layer of the multilayer perceptron in the pest trend decoder are retained as trainable. The rationale behind this strategy lies in the fact that the meteorological time-series features learned by the bidirectional long short-term memory network, such as the nonlinear transformation law of the influence of temperature accumulation and humidity maintenance on insect development rate, have cross-regional universality and can be reused as a general meteorological feature extractor. Meanwhile, the specific mapping function from meteorological feature vectors to pest occurrence levels learned by the decoder contains the implicit influence of factors such as the regionally specific pest population base, the insect resistance of local rice varieties, and farming systems, requiring targeted adaptation using local data from the target region. After the settings are frozen, only a few rounds of fine-tuning training of the decoder using a small number of labeled samples accumulated in the new region are needed to achieve the preset prediction accuracy requirements on the new region's validation set, thus enabling the model to be rapidly and cost-effectively deployed in the new region.
[0043] The method for predicting the occurrence trend of migratory pests provided in this embodiment, in addition to the steps described above, also includes an incremental update step. The incremental update step includes: setting an incremental update cycle; at each cycle node, adding newly collected and quality-approved pest survey samples and corresponding meteorological characteristic data for the corresponding period to the training database; and using the newly added samples to perform several rounds of backpropagation fine-tuning on the current model parameters to update the model parameters.
[0044] In a specific implementation, after the meteorological-pest coupling model is put into operational use, a regular incremental update mechanism is established to maintain the model's continuous adaptability to interannual climate changes and the dynamic evolution of pest populations. Plant protection monitoring is characterized by its long-term and dynamic nature; as actual pest survey data are acquired each growing season, the historical database will be continuously expanded. This method sets an incremental update cycle triggered weekly. At each cycle node, the system automatically adds newly collected and quality-approved pest survey samples from the past two weeks, along with corresponding meteorological characteristic data, to the training database. Incremental training only uses the newly added samples to fine-tune the current model parameters through several rounds of backpropagation, rather than retraining from scratch. This allows the model to gradually absorb the latest seasonal meteorological-pest coupling pattern information with lower computational resource consumption, maintaining the timeliness and accuracy of the model's predictive capabilities.
[0045] It is understood that the technical solution of this invention is not only applicable to the rice leaf roller, but can also be extended to other migratory pests with similar migratory habits and meteorological response characteristics, such as the cotton bollworm, fall armyworm, and armyworm. Those skilled in the art only need to adaptively adjust the developmental starting temperature and suitable migration wind speed threshold according to the biological characteristics of the target pest to realize the application of this solution to different migratory pest species, without requiring any creative effort.
[0046] The method for predicting the occurrence trend of migratory pests provided in this embodiment has the following advantages compared with the prior art: (1) By extracting key meteorological factors such as temperature accumulation, humidity persistence, wind speed and wind direction sequence, a deep learning coupled model combining meteorological time-series encoder and pest trend decoder is constructed. A multi-head attention mechanism layer is introduced between the encoder and decoder, which can fully capture the time-series dependence, nonlinear coupling effect and lag effect of meteorological elements. Compared with traditional statistical regression model and traditional machine learning method, the prediction accuracy is significantly improved.
[0047] (2) A bidirectional long short-term memory network is used as a meteorological time sequence encoder. By processing meteorological time sequence in both forward and backward directions, it can simultaneously capture the cumulative and lag effects of past and future short-term meteorological conditions on the migration and reproduction of migratory pests. Compared with ordinary LSTM or static networks, it can make fuller use of the evolution information of daily meteorological data and capture the key impact of short-term weather processes (such as continuous southerly winds and gusty rainfall) on migration and landing.
[0048] (3) The focus loss function is used instead of the traditional cross-entropy loss function as the optimization objective of the multi-classification task. By adjusting the factor, the model can concentrate more training gradient resources on the medium-occurrence and recurrence samples that are difficult to classify correctly, which effectively alleviates the model bias prediction problem caused by the class imbalance in the distribution of pest occurrence levels.
[0049] (4) The prediction confidence level is output simultaneously with the intensity level. When the prediction confidence level is lower than the preset safety threshold, the uncertainty warning flag is automatically triggered, and manual review is recommended. This avoids the problem of giving a definite conclusion when the uncertainty of the weather forecast increases, which can mislead the prevention and control decision.
[0050] (5) A transfer learning strategy was designed to freeze the encoder’s underlying parameters and fine-tune the decoder. The meteorological time series features learned by BiLSTM have the characteristic of cross-regional universality. The model transfer can be completed by fine-tuning the decoder on a small number of labeled samples in the new region, which greatly reduces the time and economic cost of deploying the model in different rice-growing areas.
[0051] (6) A regular incremental update mechanism was established, which uses new samples to fine-tune the current model parameters through several rounds of backpropagation, so that the model can gradually absorb the latest seasonal meteorological-pest coupling pattern information, maintain the timeliness and accuracy of the model's predictive ability, and adapt to interannual climate change and the dynamic evolution of pest populations.
[0052] Example 2
[0053] Please see Figure 2 , Figure 2 This is a structural block diagram of an embodiment of a device for predicting the occurrence trend of migratory pests according to the present invention; the device includes: The data acquisition module 201 is used to acquire historical daily meteorological data, historical insect pest observation data, and future weather forecast data for the target area; the feature engineering module 202 performs feature engineering processing on the historical daily meteorological data and the weather forecast data respectively, extracts the key meteorological factors driving the migration and reproduction of target pests, and generates a standardized meteorological feature matrix; the model construction module 203 is used to construct a meteorological-pest coupling model based on the standardized meteorological feature matrix. The supervised training module 204 is used to supervise the training of the meteorological-pest coupling model using the historical daily meteorological data and the historical insect observation data; the prediction module 205 is used to input the standardized meteorological feature matrix corresponding to the meteorological forecast data into the trained meteorological-pest coupling model, and output the probability and intensity level of the occurrence of target pests in the target area within a future preset time window.
[0054] In an optional embodiment, the feature engineering module 202 is further configured to: Calculate the effective accumulated temperature when the daily average temperature exceeds the developmental threshold of the target pest. The number of consecutive days that the relative humidity exceeds the preset humidity threshold is recorded. Based on daily average wind speed, daily maximum wind speed, and daily prevailing wind direction data, the cumulative duration of suitable migration windows with wind speeds below a preset wind speed threshold is calculated throughout the day, and the continuous change trend characteristics of wind direction are extracted.
[0055] In an optional embodiment, it further includes: The linear mapping module is used to resample and matrix-organize the multidimensional features obtained from the feature engineering process according to a preset time sliding window, and to linearly map the values of each feature column to a unified interval using the max-min normalization method.
[0056] In an optional embodiment, the supervised training module 204 includes: The feature partitioning unit is used to divide the historical meteorological feature matrix after feature engineering and the corresponding insect occurrence level labels into training set, validation set and test set in chronological order; The training sample construction unit is used to construct training samples using the sliding time window method. It uses the meteorological characteristic time series within a continuous preset time period in the past as the model input and the pest occurrence level survey results within a preset time period in the future as the prediction label. The training unit is used to iteratively train the weather-insect coupling model using the focus loss function as the optimization objective.
[0057] In an optional embodiment, the supervised training module 204 further includes: The parameter update unit is used to perform iterative parameter updates using an adaptive moment estimation optimizer and to configure a learning rate decay strategy. When the validation set loss does not decrease for several consecutive training cycles, the learning rate is automatically halved. The early stop monitoring unit is used to activate the early stop monitoring mechanism. When the validation set loss does not reach a new low within a preset number of training cycles, the training is terminated early and the model parameters are restored to the state with the minimum validation set loss.
[0058] In an optional embodiment, the prediction module 205 further includes: The level determination unit is used to select the level category with the highest probability value as the occurrence intensity level determination result, and to use the highest probability value as the prediction confidence level. The comparison unit is used to compare the prediction confidence level with a preset safety threshold; when the prediction confidence level is lower than the preset safety threshold, an uncertainty warning flag is triggered; when the prediction confidence level is greater than or equal to the preset safety threshold, a graded warning message is generated based on the occurrence probability and occurrence intensity level, and pushed to the user terminal.
[0059] In an optional embodiment, it further includes: The transfer adaptation module is used to quickly adapt the meteorological-insect response features of the new region to a small number of labeled samples when the meteorological-insect coupling model needs to be transferred to a new geographical region. This is achieved by freezing the underlying parameters of the encoder and only fine-tuning the decoder.
[0060] In an optional embodiment, the migration adaptation module includes: The file loading unit is used to load the weight file of the meteorological-insect coupling model trained in the source region as the initialization parameters of the new target region model. The training state setting unit is used to set the network weights of the meteorological time-series encoder and the attention weight matrix of the multi-head attention mechanism layer to a frozen, untrainable state; and to set the multilayer perceptron weights and biases of the pest trend decoder to a trainable state. The fine-tuning training unit is used to fine-tune the decoder using labeled samples from the new target region to complete model transfer.
[0061] In an optional embodiment, it also includes The model update module is used to establish a regular incremental update mechanism after the model is put into operational use, so as to maintain the model's continuous adaptability to interannual climate change and the dynamic evolution of pest populations.
[0062] In an optional embodiment, the model update module includes: The cycle setting unit is used to set the incremental update cycle. At each cycle node, the newly collected insect survey samples that have passed quality review within the preset time period and the meteorological characteristic data of the corresponding time period are added to the training database. The model update unit is used to fine-tune the current model parameters through several rounds of backpropagation using new samples in order to update the model parameters.
[0063] Example 3
[0064] To verify the predictive effect of the migratory pest occurrence trend proposed in this invention, an 8-year (2018-2025) field comparative verification experiment was conducted in a rice-growing area in South China. The study area has a subtropical monsoon climate, with an annual rice planting area of approximately 32,000 hectares, and is a perennial occurrence area for the rice leaf folder. Daily meteorological observation data (including daily average temperature, daily maximum / minimum temperature, daily average wind speed, daily maximum wind speed and daily prevailing wind direction, daily rainfall, and relative humidity) were collected from January 2018 to December 2025 in this area. This data came from the surface meteorological observation station of the meteorological bureau in the study area. Simultaneously, field systematic survey data on the rice leaf folder (adult moth trappings and field larval population density) were collected during the corresponding periods. The data came from the local plant protection and quarantine station's systematic monitoring network, with a monitoring frequency of once every 5 days.
[0065] Referring to the People's Republic of China agricultural industry standard "Technical Specification for Monitoring and Forecasting of Rice Leaf Roller" (NY / T 2161-2012) and the grading standards of the local plant protection department, the occurrence degree of rice leaf roller is divided into three levels based on the larval population density in the field.
[0066] Table 1:
[0067] To comprehensively evaluate the predictive performance of the model in this invention, the following eight comparative models were set up: Table 2:
[0068] Among them, M1-M3 represent traditional statistical regression and index methods, M4-M6 represent traditional machine learning methods, M7 is the ablation control model, and M8 is the complete model proposed in this invention.
[0069] All deep learning models (M6-M8) use the same training set (data from 2018-2022), validation set (data from 2023), and test set (data from 2024-2025). The input features are all standardized meteorological feature matrices processed by the feature engineering pipeline of this invention (30-day time window, 5-dimensional features, including effective accumulated temperature, number of consecutive days of high humidity, proportion of suitable migration window, average wind direction, and standard deviation of wind direction).
[0070] Figure 3 The results present a year-by-year comparison between the measured values of the occurrence level of rice leaf roller larvae in the field and the predicted values of eight models from 2018 to 2024.
[0071] from Figure 3 It can be seen that the predicted values of the traditional statistical models (M1-M3) deviated significantly from the measured values over the seven years, especially in years with severe outbreaks (such as 2020 and 2023). Both the stepwise regression and effective accumulated temperature models showed significant underestimation, indicating that linear models are unable to capture the cumulative and nonlinear coupling effects of meteorological factors on pests. The prediction accuracy of the traditional machine learning models (M4-M6) has improved. Among them, the BP neural network's prediction trend is relatively close to the measured values in most years, but it still shows a lag in years with abrupt changes in severity (such as 2021 when the severity changed from mild to moderate), reflecting that the static monthly average input features lost information on daily meteorological evolution.
[0072] In contrast, the model (M8) of this invention, during the seven years from 2018 to 2024, except for 2022 when a moderate occurrence was misclassified as a minor occurrence, was completely consistent with the measured severity levels in all other years, achieving a retrospective accuracy of 88.6%. Particularly in the years of severe occurrences in 2020 and 2023, the model accurately predicted the leap in severity level, demonstrating the effective capture of meteorological cumulative and lag effects by BiLSTM bidirectional time-series coding. The accuracy of the ablation control model M7 decreased to 74.3%, verifying that the multi-head attention mechanism plays an irreplaceable role in the adaptive weighting of key meteorological time windows (such as the temperature and humidity abrupt change window before continuous rainfall and clearing skies before the migration peak).
[0073] Figure 4 The results present a monthly comparison between the measured values of the occurrence level of rice leaf roller larvae in the field in 2025 and the predicted values of eight models.
[0074] The 2025 validation results show that the traditional statistical models (M1-M3) have significant monthly prediction biases. M1 and M2 exhibit lag biases of 2-3 levels during the escalation period in July and August, while M3 shows false alarms in June (misclassifying minor occurrences as moderate). The annual complete accuracy (the percentage of months with all predictions correct) for all three models is less than 50%. The traditional machine learning models (M4-M6) show improved performance. The BP neural network (M6) accurately predicts the recurrence period in August, but exhibits some judgment bias during the escalation transition periods in May and October, with an annual complete accuracy of 66.7%. The LSTM single model (M7), after removing the attention mechanism, shows a decreased ability to capture the evolution trend of moderate to severe occurrences in July and August, with an annual complete accuracy of 75.0%.
[0075] In 2025, the model (M8) of this invention, except for September when a moderate occurrence was misjudged as a mild occurrence, achieved a prediction level that was completely consistent with the actual occurrence level for the remaining 11 months, with a monthly prediction accuracy rate of 91.7%. This result fully verifies the good generalization ability of the model of this invention in independent year extrapolation prediction, and also proves that the constructed meteorological-insect coupling model can effectively capture the nonlinear dynamic mapping relationship between meteorological time series characteristics and the occurrence level of rice leaf roller.
[0076] Based on the combined historical backtesting results from 2018 to 2024 and the independent prediction results for 2025, the model of this invention performed optimally in both validation phases: Table 3:
[0077] The above results demonstrate that the model of this invention significantly outperforms existing methods in both historical backtesting and independent extrapolation prediction. In the seven-year backtesting from 2018 to 2024, the accuracy of the model of this invention is 20.0 percentage points higher than the best traditional machine learning method (BP neural network); in the independent prediction in 2025, it is 16.7 percentage points higher than the best deep learning method (LSTM single model).
[0078] In summary, the experimental data of this embodiment fully demonstrate that the method for predicting the occurrence trend of migratory pests proposed in this invention is significantly superior to existing technologies in terms of prediction accuracy, time series modeling ability, and generalization performance, and has good practical value and prospects for promotion and application.
[0079] Example 4
[0080] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of a method for predicting the occurrence trend of migratory pests according to any embodiment.
[0081] Example 5
[0082] This invention also provides a computer storage medium storing a computer program thereon, wherein the computer program, when executed by the processor, implements the steps of a method for predicting the occurrence trend of migratory pests according to any embodiment.
[0083] Example 6
[0084] This invention also provides a computer program product having a computer program stored thereon, wherein when the computer program is executed by the processor, it implements the steps of a method for predicting the occurrence trend of migratory pests according to any embodiment.
[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0086] In the several embodiments provided in this application, it should be understood that the methods, apparatuses, electronic devices, and storage media disclosed in this invention can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0087] 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; that is, 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.
[0088] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0089] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0090] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for predicting the occurrence trend of migratory pests, characterized in that, include: Acquire historical daily meteorological data, historical insect infestation observation data, and future weather forecast data for the target area; The historical daily meteorological data and the meteorological forecast data are subjected to feature engineering processing to extract key meteorological factors that drive the migration and reproduction of target pests, and a standardized meteorological feature matrix is generated; based on the standardized meteorological feature matrix, a meteorological-pest coupling model is constructed. The meteorological-pest coupling model is trained under supervision using the historical daily meteorological data and the historical insect infestation observation data; the standardized meteorological feature matrix corresponding to the meteorological forecast data is input into the trained meteorological-pest coupling model, and the probability and intensity level of the occurrence of target pests in the target area within a future preset time window are output.
2. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, The feature engineering process includes at least one of the following processes: Calculate the effective accumulated temperature when the daily average temperature exceeds the developmental threshold of the target pest. The number of consecutive days that the relative humidity exceeds the preset humidity threshold is recorded. Based on daily average wind speed, daily maximum wind speed, and daily prevailing wind direction data, the cumulative duration of suitable migration windows with wind speeds below a preset wind speed threshold is calculated throughout the day, and the continuous change trend characteristics of wind direction are extracted.
3. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, After performing feature engineering processing on the historical daily meteorological data and the meteorological forecast data respectively, the method further includes: resampling and matrixing the multidimensional features obtained from the feature engineering processing according to a preset time sliding window, and linearly mapping the values of each feature column to a unified interval using the max-min normalization method.
4. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, The meteorological-pest coupling model includes a meteorological time-series encoder and a pest trend decoder. The meteorological time-series encoder is used to extract time-series features from the standardized meteorological feature matrix, and the pest trend decoder is used to output the discrete probability distribution of the occurrence level of the target pest based on the extracted time-series features.
5. The method for predicting the occurrence trend of migratory pests according to claim 4, characterized in that, The meteorological time-series encoder employs a bidirectional long short-term memory network to simultaneously propagate the hidden state forward and backward in the time dimension, outputting a high-dimensional hidden state vector corresponding to each time step.
6. The method for predicting the occurrence trend of migratory pests according to claim 5, characterized in that, The meteorological-pest coupling model further includes a multi-head attention mechanism layer, which is set between the meteorological time-series encoder and the pest trend decoder. This layer is used to adaptively weight and sum the hidden state output by the encoder at each time step, increase the feature weight of the key time window that has an indicative effect on the occurrence of pests, and suppress noise information.
7. The method for predicting the occurrence trend of migratory pests according to claim 6, characterized in that, The pest trend decoder is a fully connected multilayer perceptron containing several hidden layers. It receives a fixed-length feature vector after weighted fusion by the multi-head attention mechanism layer, transforms it layer by layer through a nonlinear activation function, and finally maps it to the discrete probability distribution of the occurrence level of the target pest through the Softmax output layer.
8. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, The supervised training of the meteorological-insect coupling model using the historical daily meteorological data and the historical insect infestation observation data includes: The historical meteorological feature matrix after feature engineering and the corresponding insect occurrence level labels are divided into training set, validation set and test set in chronological order; The sliding time window method is used to construct training samples, with meteorological characteristic time series within a continuous preset time period in the past as model input and pest occurrence level survey results within a preset time period in the future as prediction labels. The focus loss function is used as the optimization objective to iteratively train the meteorological-insect coupling model.
9. The method for predicting the occurrence trend of migratory pests according to claim 8, characterized in that, The supervised training of the meteorological-insect coupling model using the historical daily meteorological data and the historical insect infestation observation data also includes: An adaptive moment estimation optimizer is used for parameter iterative updates, and a learning rate decay strategy is configured. When the validation set loss does not decrease for several consecutive training cycles, the learning rate is automatically halved. An early stop monitoring mechanism is activated. When the validation set loss does not reach a new low within a preset number of training cycles, training is terminated early and the model parameters are restored to the state with the minimum validation set loss.
10. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, The output target area's probability and intensity level of target pest occurrence within a future preset time window includes: The category with the highest probability value is selected as the result of the occurrence intensity level determination, and the highest probability value is used as the prediction confidence level; The predicted confidence level is compared with a preset safety threshold. When the predicted confidence level is lower than the preset safety threshold, an uncertainty warning flag is triggered. When the predicted confidence level is greater than or equal to the preset safety threshold, a graded warning message is generated based on the occurrence probability and occurrence intensity level, and pushed to the user terminal.
11. The method for predicting the occurrence trend of migratory pests according to claim 6, characterized in that, Following the construction of the meteorological-pest coupling model, the following is also included: Load the weight file of the meteorological-insect coupling model trained in the source region as the initialization parameters for the new target region model; Set the network weights of the meteorological time-series encoder and the attention weight matrix of the multi-head attention mechanism layer to a frozen, untrainable state; Set the multilayer perceptron weights and biases of the pest trend decoder to a trainable state. The decoder is fine-tuned using labeled samples from the new target region to complete model transfer.
12. The method for predicting the occurrence trend of migratory pests according to claim 1, characterized in that, Following the construction of the meteorological-pest coupling model, the following is also included: Set an incremental update cycle. At each cycle node, add the newly collected insect survey samples that have passed quality review and the meteorological characteristic data of the corresponding time period to the training database. The model parameters are fine-tuned by backpropagation through several rounds using new samples to update the model parameters.
