An intelligent identification method for migratory insects based on the construction of a database assisted by an insect attracting lamp and radar
The temporal and spatiotemporal distribution characteristics of insects were obtained through the all-polarized insect radar and DBSCAN algorithm, combined with insect luring lamp data and time-frequency analysis, and the CL-GC-Swin Transformer network model was used to identify insect species, solving the identification problem in insect migration monitoring and achieving efficient and robust insect species recognition.
Patent Information
- Application Number
- CN202510111754.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The prior art is difficult to identify the flight dynamics and spatiotemporal distribution of insects in real-time during insect migration monitoring, and radar-based insect species recognition faces the difficulties of data set establishment and automated identification algorithms.
The fully polarized insect radar was used to collect spatiotemporal distribution characteristics, combined with the DBSCAN insect swarm segmentation algorithm and insect trapping lamp statistics, and insect species identification was performed through time-frequency analysis and CL-GC-Swin Transformer network model.
Real-time identification of insect species is achieved, the requirements for radar system accuracy and calibration are reduced, and the adaptability and robustness of identification are improved.
Smart Images

Figure CN119559449B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of insect identification, and in particular to an intelligent identification method for migratory insects based on insect-attracting lamp-assisted radar database building. Background Art
[0002] Insect migration is one of the key behaviors for many insect populations to survive and reproduce, and has a significant impact on agriculture, ecosystems, and the spread of pests and diseases. With global climate change and the intensification of human activities, the study of insect migration has become increasingly important, and how to effectively monitor and identify the species of migratory insects has become a scientific challenge.
[0003] Traditional insect monitoring methods, such as insect traps, can effectively attract nocturnal migratory insects, especially at the peak of migration, and can capture dominant populations on a large scale. However, insect traps can only provide passively captured insect samples and cannot monitor the flight dynamics of insects in real time, which limits the comprehensive understanding of the spatiotemporal distribution and behavioral characteristics of insect migration. In recent years, the application of radar technology in insect migration monitoring has gradually increased. Through the reflection of electromagnetic waves, radar can obtain the biological characteristics of insects such as flight altitude, speed, weight, body length, and wing beat frequency in real time. Nevertheless, due to the wide variety of insect species, similar body shapes and easy overlap, and the complex electromagnetic scattering characteristics, insect species identification based on radar signals has become a challenge.
[0004] At present, radar-based insect species identification faces the following two major challenges: First, the establishment of insect data sets is heavily dependent on laboratory equipment or field measurement experiments, and usually requires manual measurement of a large number of insect samples, which is not only costly, time-consuming and complex to operate, but also difficult to adapt to large-scale real-time monitoring needs; second, there is a lack of an efficient and robust automatic identification algorithm. Existing radar identification algorithms mostly rely on strict calibration of the radar cross section (RCS) of insects to assist species identification by estimating the body size of insects. Or statistical analysis of key features of radar monitoring data spanning a long period of time. These methods usually require a lot of post-processing analysis and therefore cannot meet real-time requirements. Therefore, there is an urgent need for an intelligent identification method for migratory insects based on insect trap light-assisted radar database construction, and an intelligent insect identification algorithm that does not rely on complex calibration and post-processing analysis to meet the needs of long-term operational monitoring. Summary of the invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present invention provides an intelligent identification method for migratory insects based on insect-attracting light-assisted radar database building.
[0006] The present invention provides an intelligent identification method for migratory insects based on insect-attracting lamp-assisted radar database building, comprising:
[0007] S100: Uses full polarization insect radar to collect the spatiotemporal distribution characteristics of insects, and uses the insect swarm segmentation algorithm based on DBSCAN to separate different insect populations in the three-dimensional space of time-height-weight, thereby obtaining the spatiotemporal distribution data of insect populations;
[0008] S200: combining insect data collected by the insect trap lamp to match the insect population monitored by the fully polarized insect, and associating the insect population detected by the fully polarized insect with the actual insect species based on the biological parameters of the insect population; wherein the biological parameters of the insect population include body weight, body length, and wing beat frequency;
[0009] S300: Processes insect radar echo signals through time-frequency analysis technology, uses short-time Fourier transform to extract insect flight characteristics, and generates insect full polarization time-frequency feature maps;
[0010] S400: Constructing a CL-GC-Swin Transformer network model for insect species identification; the CL-GC-Swin Transformer network model includes: a contrastive learning module, a global context block and a Swin Transformer block, which are respectively used for feature extraction, feature fusion and multi-scale information capture; using a training set containing a fully polarized time-frequency feature map to train and evaluate the CL-GC-Swin Transformer network model, and during the training process of the CL-GC-Swin Transformer network model, a composite loss function combining cross entropy loss and contrast loss is used to optimize the performance of the CL-GC-Swin Transformer network model.
[0011] Furthermore, the steps of the DBSCAN-based swarm segmentation algorithm include:
[0012] S110, calculating the dense number of migratory insects per minute during the observation time, and setting the MinPts value based on the dense value;
[0013] S120, calculate the Eps value:
[0014] S121, normalizing the observed spatiotemporal distribution characteristics and body weight of the insects to obtain normalized spatiotemporal distribution characteristics and body weight of the insects;
[0015] S122, for each normalized spatiotemporal distribution feature and weight of an insect, calculate the distance to the point closest to the spatiotemporal distribution feature and weight of the insect by the MinPts-1th order, and re-sort them to obtain a density change curve of the observation data set;
[0016] S123, performing a first-order difference on the density change curve, then performing a smoothing process, and then performing a maximum value process to obtain a density change curve difference curve;
[0017] S124, calculating the mean μ and standard deviation σ of the data in the range of 5% to 95% of the horizontal coordinate in the difference curve of the density change curve, and intercepting the difference curve based on the threshold μ+3σ;
[0018] S125, selecting multiple ordinate values in the intercepted curve as Eps; wherein the larger the threshold μ+3σ is, the more forward ordinate values are selected as Eps;
[0019] S130, using the DBSCAN algorithm, clustering the normalized data set according to MinPts and different Eps.
[0020] Furthermore, the clustering results of S130 are optimized, including:
[0021] S141, remove edge sparse targets: calculate the intersection degree p between the lowest density cluster and other clusters in the clustering result of S3, and if p>0.1, delete the lowest density cluster;
[0022] S142, swarm fusion: if the degree of intersection of two swarms p> 0.25 and the difference in the normalized average weight of the two swarms does not exceed 0.2, then merge the two swarms;
[0023] S143, perform expansion operation on the edge of the swarm.
[0024] Furthermore, step S200 includes: determining the statistical results of biological parameters of insect populations separated by the DBSCAN-based insect swarm segmentation algorithm within any time period; obtaining the statistical results of the capture of various types of insects by insect traps within the same time period; when the number of dominant populations of the two is consistent, comparing and matching the biological parameters of the insect population monitored by the fully polarized insect radar with the reference biological parameters of the dominant population captured by the insect trap recorded in the literature, and associating the insect population detected by the radar with the actual insect species.
[0025] Furthermore, in step S300, the window length used by the short-time Fourier transform sliding window function is 15 data points, and the signal in each window is interpolated 50 times to balance the time-frequency resolution and improve the frequency resolution;
[0026] The generated time-frequency matrix is normalized to range, and adjust to The uniform size of pixels is adapted to the input requirements of the CL-GC-SwinTransformer network model; the final insect full polarization time-frequency feature map of each insect sample is , where dimension 4 represents four polarization modes: HH polarization, HV polarization, VH polarization and VV polarization.
[0027] Furthermore, in step S300, the spectrum maximum is located and the center frequency is calculated through a spectrum shifting algorithm, and then a spectrum shifting factor is constructed to concentrate the spectrum near the zero frequency, thereby standardizing the spectrum distribution and avoiding errors caused by frequency drift.
[0028] Furthermore, the working process of the CL-GC-Swin Transformer network model includes the following four stages:
[0029] Phase 1: The input insect full polarization time-frequency feature map is first divided into non-overlapping blocks through the Patch Partition module, and the data of each block is mapped to a lower-dimensional feature space through a linear embedding layer, and preliminary feature extraction is performed in combination with the contrastive learning module; the features of the blocks of the insect full polarization time-frequency feature map are processed by two Swin Transformer blocks, which capture local spatial patterns and long-range dependencies through a displacement window mechanism, laying the foundation for subsequent deeper feature extraction;
[0030] Phase 2: After the first phase, the extracted feature maps are downsampled through the Patch Merging operation to reduce the spatial resolution and expand the channel dimension; the global context block is introduced to aggregate the global semantic information of the feature map, thereby making up for the limitation of the local processing of the Swin Transformer block; the global context block ensures a comprehensive understanding of the global context by integrating long-range dependency information into the feature map; and the next two additional Swin Transformer blocks further process the features of the fused long-range dependency information to prepare for the subsequent stages;
[0031] The third stage: Multiple Swin Transformer blocks and global context blocks are used alternately in the deep network to further refine the features and capture multi-scale information;
[0032] Stage 4: After a Patch Merging operation to reduce the resolution, the global context block is applied again to ensure full utilization of global context information; the remaining two Swin Transformer blocks complete feature extraction and generate rich and discriminative feature representations; finally, the feature representation is fed into the classification head to predict the insect species using the learned features.
[0033] Furthermore, the global context block divides the input into three branches:
[0034] Two branches are used for context modeling, and global attention pooling is implemented through 1×1 convolution and Softmax function. Extract global attention from:
[0035] ;
[0036] Global attention and one input After multiplication, we get context modeling:
[0037] ;
[0038] Bottleneck transformation is implemented through 1×1 convolution, layer normalization, ReLU activation function, and 1×1 convolution to capture channel-level dependencies for context modeling:
[0039] ;
[0040] Context modeling channel-level dependencies with the last input Additive combination incorporates global context features.
[0041] Furthermore, the Swin Transformer block includes a window attention W-MSA of a residual structure, the window attention of the residual structure is followed by a feedforward network MLP of a residual structure, the feedforward network MLP of the residual structure is followed by a displacement window attention SW-MSA of the residual structure, and the displacement window attention SW-MSA of the residual structure is followed by the feedforward network MLP of the residual structure; layer normalization LayerNorm is set before the window attention W-MSA, the displacement window attention SW-MSA and the feedforward network MLP.
[0042] Furthermore, during the training of the CL-GC-Swin Transformer network model, the optimizer uses the Adam algorithm and the initial learning rate is set to 1×10 - ³, the batch size is set to 64, and the ReduceLROnPlateau scheduler is used to automatically reduce the learning rate when the training loss stagnates; to prevent overfitting, L2 regularization and early stopping strategy are applied, and the patience value is set to 10 training cycles.
[0043] The above technical solution provided by the embodiment of the present invention has the following advantages compared with the prior art:
[0044] This application first integrates the insect monitoring data of insect traps and radars in the same night period, and establishes an insect data set by matching the two, effectively overcoming the difficulties in data collection in the traditional insect data set construction method; secondly, a CL-GC-Swin Transformer network model is proposed. By introducing a contrast learning module and a global context block in Swin Transformer, the full polarization time-frequency feature map of insects is used for training, which significantly enhances the network's ability to characterize the insect time-frequency feature map, and can effectively improve the accuracy of insect species identification. The present invention directly uses the flight characteristics of insects for identification, no longer relying on complex scattering feature calculations and precise radar calibration, greatly reducing the requirements for radar system accuracy and calibration, and can improve the adaptability and robustness of identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0047] Figure 1 A flowchart of a method for intelligently identifying migratory insects based on insect trap lights assisted by radar database building provided by an embodiment of the present invention;
[0048] Figure 2 A scatter plot of insect time-height-weight from 18:00 on July 8, 2021 to 6:00 on July 9, 2021 provided in an embodiment of the present invention;
[0049] Figure 3 A scatter plot of insect time-height-weight from 18:00 on July 8, 2021 to 6:00 on July 9, 2021 after clustering provided by an embodiment of the present invention;
[0050] Figure 4 A statistical diagram of the types and numbers of insects captured by insect trapping lights from 18:00 on July 8, 2021 to 6:00 on July 9, 2021 provided in an embodiment of the present invention;
[0051] Figure 5 An example of a HH polarization time-frequency characteristic diagram of a certain insect HH polarization radar echo signal after short-time Fourier transform analysis and quantization provided in an embodiment of the present invention;
[0052] Figure 6Another example of an HH polarization time-frequency characteristic diagram of an insect HH polarization radar echo signal after short-time Fourier transform analysis and quantization provided in an embodiment of the present invention;
[0053] Figure 7 A structural diagram of the CL-GC-Swin Transformer network model provided in an embodiment of the present invention;
[0054] Figure 8 A schematic diagram of a global context block structure provided by an embodiment of the present invention;
[0055] Fig. 9 A schematic diagram of the Swin Transformer block structure provided by an embodiment of the present invention;
[0056] Fig.10 A confusion matrix diagram of insect identification provided by an embodiment of the present invention;
[0057] Fig.11 A schematic diagram of an intelligent identification device for migratory insects based on insect-attracting light-assisted radar database building provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0060] Example 1
[0061] like Figure 1 As shown, the technology of the present invention realizes an intelligent identification method of migratory insects based on insect-attracting lamp-assisted radar database building, including:
[0062] S100: Use a fully polarized insect radar to collect the spatiotemporal distribution characteristics of insects, and use a DBSCAN-based insect swarm segmentation algorithm to separate different insect populations in the three-dimensional space of time-height-weight, thereby obtaining the spatiotemporal distribution data of insect populations.
[0063] Through high distance resolution and high data update rate, the fully polarized insect radar can monitor the spatiotemporal distribution characteristics and migration trends of insects in real time. However, since different insect populations may migrate in similar time and space ranges, it is difficult to effectively distinguish insect populations simply by relying on time-space distribution. This application introduces weight, one of the important characteristics for distinguishing different insect populations, and analyzes the aggregation phenomenon of individual insects in the three-dimensional distribution of time-height-weight to accurately divide different insect populations. Taking the fully polarized insect radar actually deployed in a certain place as an example, the night monitoring data from 18:00 on July 8 to 6:00 on July 9 of a certain year, Figure 2 The distribution of insect individuals in the three-dimensional space of time, height and weight is shown. Figure 2 In the data set shown, the distribution of insect individuals in this three-dimensional space shows a significant clustering phenomenon.
[0064] In order to further accurately divide different insect populations, the insect swarm segmentation algorithm based on DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is used to identify and separate insect population data in groups based on the clustering of individual insects in the three-dimensional space of time, height and weight. The steps of the insect swarm segmentation algorithm based on DBSCAN include:
[0065] S110, set MinPts value:
[0066] Calculate the dense number of migratory insects per minute during the observation time, and set the MinPts value based on the dense value; the larger the dense value, the larger the MinPts value is set;
[0067] S120, calculate the Eps value:
[0068] S121, normalizing the observed spatiotemporal distribution characteristics and body weight of the insects to obtain normalized spatiotemporal distribution characteristics and body weight of the insects;
[0069] S122, for each normalized spatiotemporal distribution feature and weight of an insect, calculate the distance to the point closest to the spatiotemporal distribution feature and weight of the insect by the MinPts-1th order, and re-sort them to obtain a density change curve of the observation data set;
[0070] S123, performing a first-order difference on the density change curve, then performing a smoothing process, and then performing a maximum value process to obtain a density change curve difference curve;
[0071] S124, calculating the mean μ and standard deviation σ of the data of 5% to 95% of the horizontal coordinates in the difference curve of the density change curve, and intercepting the difference curve based on the threshold μ+3σ;
[0072] S125, selecting multiple ordinate values in the intercepted curve as Eps; wherein the larger the threshold μ+3σ is, the more forward ordinate values are selected as Eps;
[0073] S130, using the DBSCAN algorithm to cluster the normalized data set according to MinPts and different Eps;
[0074] S140, optimizes the clustering results of S130, including:
[0075] S141, remove edge sparse targets: calculate the intersection degree p between the lowest density cluster and other clusters in the clustering result of S3, and if p>0.1, delete the lowest density cluster;
[0076] S142, swarm fusion: if the degree of intersection of two swarms p> 0.25 and the difference in the normalized average weight of the two swarms does not exceed 0.2, then merge the two swarms;
[0077] S143, perform expansion operation on the edge of the swarm.
[0078] Figure 3 Demonstrated the use of DBSCAN-based insect swarm segmentation algorithm Figure 2 The example shown shows the result of insect swarm segmentation. The results show that during the night monitoring process, three migratory insect swarms were identified, including:
[0079] The active time of population 1 is from 18:00 on July 8 to 3:00 on July 9, and the active altitude is 150~600 meters; the active time of population 2 is from 4:00 to 6:00 on July 9, and the active altitude is 500~750 meters; the active time of population 3 is from 2:30 to 6:00 on July 9, and the active altitude is 150~300 meters.
[0080] This step effectively extracts the spatiotemporal distribution characteristics of different insect populations from the fully polarized insect radar data through the application of the DBSCAN algorithm, providing a high-quality data foundation for subsequent insect species identification.
[0081] S200: Match the insect population monitored by the full polarization insect radar in combination with the statistical data of the insect trap lamp, and associate the insect population with the actual insect species based on the biological parameters of the insect population, wherein the biological parameters of the insect population include body weight, body length, and wing beat frequency.
[0082] In any time period, determine the statistical results of the biological parameters of the insect populations separated by the DBSCAN insect population segmentation algorithm. Figure 2 As shown in the figure, from 18:00 on July 8 to 6:00 on July 9, three different insect populations were effectively distinguished using the DBSCAN-based insect swarm segmentation algorithm. The following table shows the statistical results of the mean and standard deviation of the weight, body length and wing beat frequency of the three insect populations monitored by the full polarization insect radar during this period. Specifically, the weight of population 1 is mainly concentrated between 10 and 20 mg, the body length is concentrated between 5 and 12 mm, and the wing beat frequency is concentrated between 15 and 40 Hz; the weight of population 2 is distributed between 80 and 120 mg, the body length is 14 to 18 mm, and the wing beat frequency is 40 to 60 Hz; the weight of population 3 is distributed between 20 and 40 mg, the body length is concentrated between 10 and 15 mm, and the wing beat frequency is concentrated between 20 and 45 Hz.
[0083]
[0084] In the same time period, the statistical results of the number of insects captured by the insect trap lamp are obtained. In the same time period, the statistical results of the number of insects captured by the insect trap lamp are as follows: Figure 4 As shown in the figure. The number of cotton bollworms, corn borers and beet armyworms captured accounted for more than 92% of the total capture, while other insects, such as white-striped armyworms, flies, oriental mole crickets, spodoptera exigua and elm borers, accounted for a relatively small proportion, less than 8%. This result shows that the dominant populations of the main migratory insects during the monitoring period are cotton bollworms, corn borers and beet armyworms, which are highly consistent with the three insect populations monitored by the fully polarized insect radar.
[0085] When the number of dominant populations of the two is consistent, the biological parameters of the insect population monitored by the full polarization insect radar are compared and matched with the reference biological parameters of the dominant population captured by the insect trap lamp recorded in the literature, and the insect population detected by the radar is associated with the actual insect species. The biological parameters of the insect population monitored by the full polarization insect radar are compared with the reference biological parameters of cotton bollworm, corn borer and beet armyworm recorded in the literature. Through observation, it was found that the weight, body length and wing beat frequency parameters of population 1 are similar to those of corn borer, the parameters of population 2 are consistent with those of cotton bollworm, and the parameters of population 3 match those of beet armyworm. Therefore, through the analysis of the biological parameters of weight, body length and wing beat frequency, population 1, population 2 and population 3 can be accurately identified as corn borer, cotton bollworm and beet armyworm, respectively. The following table records the reference values of the biological parameters of the three dominant populations of insects:
[0086]
[0087] Through this method, the biological parameters monitored by the full-polarization insect radar are combined with the insect data statistically obtained by the insect trap lamp, and the insect population monitored by the full-polarization insect radar can be effectively matched with the actual insect species, providing a reliable basis for subsequent insect species identification.
[0088] S300: Use time-frequency analysis technology to process insect radar echo signals, use short-time Fourier transform to extract insect flight characteristics, and obtain the insect's full polarization time-frequency feature map.
[0089] In order to achieve efficient insect species identification, the present invention directly extracts the dynamic characteristics of insect flight from the insect radar echo, abandoning the traditional practice of relying on accurate full-polarization insect radar scattering cross section (RCS) calibration. The insect radar echo signal received by the full-polarization insect radar is processed by time-frequency analysis technology to generate time-frequency images, which can accurately show the flight characteristics of insects, such as wing beat frequency and posture changes.
[0090] The present invention uses short-time Fourier transform (STFT) to analyze the time-frequency characteristics of insect radar echo signals. Short-time Fourier transform can fully characterize the dynamic changes of signals and display the local characteristics of signals through distribution in the time and frequency domains. Specifically, for a given insect radar echo signal, its short-time Fourier transform is defined as follows:
[0091] ;
[0092] in, Indicates at time and frequency The frequency component strength of the signal, It is a sliding window function used to capture the local characteristics of the signal within the time window. By reasonably selecting the window function and its width, the short-time Fourier transform can effectively balance the time and frequency resolution. In the present invention, in order to accurately extract the dynamic flight characteristics of insects, the window length of the short-time Fourier transform is set to 15 data points to ensure a high time resolution. At the same time, the signal in each window is interpolated 50 times to improve the frequency resolution while maintaining the details of the time-frequency distribution. The short-time Fourier transform analyzes the insect radar echo signal frame by frame through the sliding window function operation to generate a time-frequency matrix containing rich dynamic information. The time axis corresponds to the time range of the sliding of the dynamic serial port function, and the frequency axis presents the interpolated frequency components, which are used to identify the characteristic frequencies of insects. In order to eliminate the influence of the center frequency drift of the spectrum on the analysis results, the present invention introduces the spectrum shifting technology. Specifically, by locating the maximum value of the spectrum and calculating the center frequency, and then constructing the spectrum shifting factor, the spectrum is concentrated near the zero frequency, thereby standardizing the spectrum distribution and avoiding the error caused by frequency drift. The generated time-frequency matrix is normalized to after complex modulus calculation and normalization. range, and adjust to The uniform size of pixels is adapted to the input requirements of the CL-GC-SwinTransformer network model. Since the radar used in the present invention can obtain the fully polarized radar echo of insects, the form of the insect fully polarized time-frequency characteristic map of each insect sample in the present invention is , where dimension 4 represents four polarization modes: HH polarization, HV polarization, VH polarization and VV polarization. Figure 5 The time-frequency image of the HH polarization radar echo signal of an insect after short-time Fourier transform analysis and quantization is shown. Figure 6Another HH polarization time-frequency characteristic diagram of an insect HH polarization radar echo signal provided by an embodiment of the present invention after short-time Fourier transform analysis and quantization clearly captures the flight characteristics of the insect. The main components of the time-frequency characteristic diagram are the main Doppler effect and the micro-Doppler effect. The main Doppler effect reflects the overall flight speed of the insect, which is usually manifested as a stable frequency band in the time-frequency characteristic diagram, while the micro-Doppler effect is related to the vibration and micro-movement of the insect's wings, and is manifested as a slight fluctuation and expansion of the frequency over time. These micro-motion features are presented as changes in the frequency band and slight frequency shifts in the time-frequency characteristic diagram, revealing the micro-movements and posture changes in the insect's flight. The color depth in the time-frequency characteristic diagram represents the change in signal strength, the blue area indicates a lower signal strength, and the red area indicates a higher signal strength. As the speed and posture of the insect change during flight, the change in frequency will affect the strength of the signal, thereby presenting different color distributions in the time-frequency diagram. The color change can intuitively analyze the characteristics and micro-motion characteristics of the insect's flight. Therefore, through the time-frequency characteristic diagram, not only can the flight characteristics of the insect be extracted, but also the types and behaviors of different insects can be further distinguished. These two insect time-frequency characteristic images show the frequency characteristics of different insects during flight. Figure 5 The frequency band in is relatively stable, and the frequency changes are small, indicating that the insect's flight is relatively stable; Figure 6 The frequency fluctuation of is larger and the frequency band shape is more dispersed, indicating that the flight of this insect has higher dynamic changes. By comparing these differences, the flight characteristics of insects, such as frequency bandwidth, frequency fluctuation amplitude, etc., can be extracted, and these characteristics can be trained using the proposed deep learning algorithm to achieve the recognition of different insect species.
[0093] S400: constructing a CL-GC-Swin Transformer network model for insect species recognition. The CL-GC-Swin Transformer network model includes a contrastive learning module, a global context block and a Swin Transformer block, which are respectively used for feature extraction, feature fusion and multi-scale information capture.
[0094] In order to achieve efficient and robust insect species recognition, this paper proposes a SwinTransformer network enhanced by contrastive learning (CL) and global context (GC) modules - CL-GC-Swin Transformer network model. The CL-GC-Swin Transformer network model combines the advantages of contrastive learning in feature separation, the ability of global context blocks in feature fusion, and the powerful expressiveness of SwinTransformer in capturing multi-scale information. The overall framework of the CL-GC-SwinTransformer network model and the design and implementation of the core modules will be described in detail below.
[0095] The overall framework of the CL-GC-Swin Transformer network model is as follows Figure 7 As shown in the figure. The CL-GC-Swin Transformer network model takes the insect full polarization time-frequency feature map sequence as input. The CL-GC-Swin Transformer network model includes: Patch Partition module, contrastive learning module, global context block and Swin Transformer block, and finally realizes insect species recognition through the classification head. The working process of the CL-GC-Swin Transformer network model includes the following stages:
[0096] Phase 1: Preliminary feature extraction via contrastive learning.
[0097] In the first stage, the input insect full polarization time-frequency feature map is first divided into non-overlapping blocks through the Patch Partition module, and the data of each block is mapped to a lower-dimensional feature space through a linear embedding layer. In order to enhance the network's ability to distinguish insect species, a contrastive learning module is introduced in the first stage. By constructing positive and negative sample pairs, the contrastive learning module effectively improves the robustness of feature learning and enhances the separability between categories. Next, the features of the blocks of the insect full polarization time-frequency feature map are processed by two Swin Transformer blocks. The Swin Transformer block captures local spatial patterns and long-range dependencies through a displacement window mechanism, laying the foundation for subsequent deeper feature extraction.
[0098] Phase 2: Global context integration and multi-scale feature learning.
[0099] After the first stage, the extracted feature maps are downsampled through the Patch Merging operation to reduce the spatial resolution and expand the channel dimension. At this point, the global context block is introduced to aggregate the global semantic information of the feature map, thereby making up for the limitation of the local processing of the Swin Transformer block. The global context block ensures a comprehensive understanding of the global context by integrating long-range dependency information into the feature map. The next two additional Swin Transformer blocks further process the features that incorporate long-range dependency information to prepare for the subsequent stages.
[0100] Stage 3: Deep feature refinement via global context.
[0101] Multiple Swin Transformer blocks and global context blocks are used alternately in the deep network to further refine features and capture multi-scale information; Stage 3 marks the deepening of the network, where the feature map is passed through six consecutive Swin Transformer blocks, and global context blocks are added alternately between each Swin Transformer block. In this stage, the network focuses on fine-grained feature extraction while maintaining global semantic information. The multi-scale attention mechanism in the Swin Transformer block is combined with the long-range information provided by the global context block to further refine features and capture details and broader semantic relationships.
[0102] Stage 4: Final feature extraction and classification.
[0103] In the fourth stage, after a Patch Merging operation to reduce the resolution, the global context block is applied again to ensure full utilization of global context information. The remaining two Swin Transformer blocks complete feature extraction and generate rich and discriminative feature representations. Finally, the feature representation is fed into the classification head to predict the insect species using the learned features.
[0104] like Figure 8 As shown, the global context block divides the input into three branches:
[0105] Two branches are used for context modeling, and global attention pooling is achieved through 1×1 convolution and Softmax function. Extract global attention from:
[0106] ;
[0107] Global attention and one input After multiplication, we get context modeling:
[0108] ;
[0109] Bottleneck transformation is implemented through 1×1 convolution, layer normalization, ReLU activation function, and 1×1 convolution to capture channel-level dependencies for context modeling:
[0110] ;
[0111] Context modeling channel-level dependencies with the last input Additive combination incorporates global context features.
[0112] like Fig. 9 As shown, the Swin Transformer block includes a window attention W-MSA of a residual structure, the window attention of the residual structure is followed by a feedforward network MLP of a residual structure, the feedforward network MLP of the residual structure is followed by a displacement window attention SW-MSA of the residual structure, and the displacement window attention SW-MSA of the residual structure is followed by a feedforward network MLP of the residual structure.
[0113] For example, in the training process of the CL-GC-Swin Transformer network model, a composite loss function combining classification cross entropy loss and contrast loss of enhanced feature representation is used for optimization. The optimizer uses the Adam algorithm, and the initial learning rate is set to 1×10 - ³, the batch size is set to 64, and the ReduceLROnPlateau scheduler is used to automatically reduce the learning rate when the training loss stagnates. To prevent overfitting, L2 regularization and early stopping strategy are applied, and the patience value is set to 10 training cycles.
[0114] Based on the method of the present invention, a radar data set containing five common migratory pests was established, covering species including: corn borer, beet armyworm, cotton bollworm, two-spotted cutworm and diamondback moth. 3000 groups of full-polarization time-frequency feature map data sets were randomly selected for each species and divided into training set and test set in a ratio of 7:3, where the training set was used for CL-GC-SwinTransformer network model training, and the test set was used to evaluate the recognition accuracy. Each experiment was repeated 10 times, and the average value was finally taken to ensure the stability and reliability of the results. The experimental results show that the CL-GC-Swin Transformer network model proposed in the present invention has an average recognition rate of 87.61% in the recognition tasks of the above five insect species. The recognition confusion matrix is as follows Fig.10 As shown, labels 1 to 5 represent Ostrinia furnacalis, Spodoptera exigua, Helicoverpa armigera, Spodoptera exigua and Plutella xylostella, respectively, which fully demonstrates the effectiveness and reliability of the method of the present invention.
[0115] Example 2
[0116] See also Fig.11As shown, an embodiment of the present invention provides an intelligent identification device for migratory insects based on insect-attracting lamps assisted by radar database building, comprising: at least one processing unit, the processing unit is connected to a storage unit, a radar unit and an insect-attracting lamp unit through a bus unit, the storage unit is a computer-readable storage medium, and can be used to store software programs, computer executable programs and modules, such as the software programs, computer executable programs and modules corresponding to the intelligent identification method for migratory insects based on insect-attracting lamps assisted by radar database building in the embodiment of the present invention. The processing unit implements the above-mentioned intelligent identification method for migratory insects based on insect-attracting lamps assisted by radar database building by running the software programs, computer executable programs and modules stored in the storage unit, comprising:
[0117] S100: Uses full polarization insect radar to collect the spatiotemporal distribution characteristics of insects, and uses the insect swarm segmentation algorithm based on DBSCAN to separate different insect populations in the three-dimensional space of time-height-weight, thereby obtaining the spatiotemporal distribution data of insect populations;
[0118] S200: combining insect data collected by the insect trap lamp to match the insect population monitored by the fully polarized insect, and associating the insect population detected by the fully polarized insect with the actual insect species based on the biological parameters of the insect population; wherein the biological parameters of the insect population include body weight, body length, and wing beat frequency;
[0119] S300: Processes insect radar echo signals through time-frequency analysis technology, uses short-time Fourier transform to extract insect flight characteristics, and generates insect full polarization time-frequency feature maps;
[0120] S400: Constructing a CL-GC-Swin Transformer network model for insect species identification; the CL-GC-Swin Transformer network model includes: a contrastive learning module, a global context block and a Swin Transformer block, which are respectively used for feature extraction, feature fusion and multi-scale information capture; using the fully polarized time-frequency feature map to train the CL-GC-Swin Transformer network model, during the training process of the CL-GC-Swin Transformer network model, a composite loss function combining cross entropy loss and contrast loss is used to optimize the performance of the CL-GC-Swin Transformer network model.
[0121] Of course, the computer program stored in the storage unit of the device for intelligent identification of migratory insects based on insect-attracting light-assisted radar database building provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the method for intelligent identification of migratory insects based on insect-attracting light-assisted radar database building provided in any embodiment of the present invention.
[0122] Example 3
[0123] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed, the method for intelligently identifying migratory insects based on insect-attracting light-assisted radar database building is implemented, including:
[0124] S100: Uses full polarization insect radar to collect the spatiotemporal distribution characteristics of insects, and uses the insect swarm segmentation algorithm based on DBSCAN to separate different insect populations in the three-dimensional space of time-height-weight, thereby obtaining the spatiotemporal distribution data of insect populations;
[0125] S200: combining insect data collected by the insect trap lamp to match the insect population monitored by the fully polarized insect, and associating the insect population detected by the fully polarized insect with the actual insect species based on the biological parameters of the insect population; wherein the biological parameters of the insect population include body weight, body length, and wing beat frequency;
[0126] S300: Processes insect radar echo signals through time-frequency analysis technology, uses short-time Fourier transform to extract insect flight characteristics, and generates insect full polarization time-frequency feature maps;
[0127] S400: Constructing a CL-GC-Swin Transformer network model for insect species identification; the CL-GC-Swin Transformer network model includes: a contrastive learning module, a global context block and a Swin Transformer block, which are respectively used for feature extraction, feature fusion and multi-scale information capture; using the fully polarized time-frequency feature map to train the CL-GC-Swin Transformer network model, during the training process of the CL-GC-Swin Transformer network model, a composite loss function combining cross entropy loss and contrast loss is used to optimize the performance of the CL-GC-Swin Transformer network model.
[0128] A computer-readable storage medium provided in an embodiment of the present invention stores a computer program which is not limited to the method operations described above, but can also execute related operations in a method for intelligent identification of migratory insects based on insect-attracting light-assisted radar database building provided in any embodiment of the present invention.
[0129] In the embodiments provided by the present invention, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, structures or units, which can be electrical, mechanical or other forms.
[0130] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0132] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be 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. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. An intelligent identification method for migratory insects based on insect trap light assisted radar database building, characterized in that: include: S100: Uses full polarization insect radar to collect the spatiotemporal distribution characteristics of insects, and uses the insect swarm segmentation algorithm based on DBSCAN to separate different insect populations in the three-dimensional space of time-height-weight, thereby obtaining the spatiotemporal distribution data of insect populations; S200: combining insect data collected by the insect trap lamp to match the insect population monitored by the fully polarized insect, and associating the insect population detected by the fully polarized insect with the actual insect species based on the biological parameters of the insect population; wherein the biological parameters of the insect population include body weight, body length, and wing beat frequency; S300: Processes insect radar echo signals through time-frequency analysis technology, uses short-time Fourier transform to extract insect flight characteristics, and generates insect full polarization time-frequency feature maps; S400: constructing a CL-GC-Swin Transformer network model for insect species recognition; the CL-GC-Swin Transformer network model includes: a contrastive learning module, a global context block and a Swin Transformer block, which are respectively used for feature extraction, feature fusion and multi-scale information capture; using a training set containing a full polarization time-frequency feature map to train and evaluate the CL-GC-Swin Transformer network model, and in the training process of the CL-GC-Swin Transformer network model, using a composite loss function combining cross entropy loss and contrast loss to optimize the performance of the CL-GC-Swin Transformer network model; Among them, the working process of the CL-GC-Swin Transformer network model includes the following four stages: Phase 1: The input insect full polarization time-frequency feature map is first divided into non-overlapping blocks through the Patch Partition module, and the data of each block is mapped to a lower-dimensional feature space through a linear embedding layer, and preliminary feature extraction is performed in combination with the contrastive learning module; the features of the blocks of the insect full polarization time-frequency feature map are processed by two Swin Transformer blocks, which capture local spatial patterns and long-range dependencies through a displacement window mechanism, laying the foundation for subsequent deeper feature extraction; Phase 2: After the first phase, the extracted feature maps are downsampled through the Patch Merging operation to reduce the spatial resolution and expand the channel dimension; the global context block is introduced to aggregate the global semantic information of the feature map, thereby making up for the limitation of the local processing of the Swin Transformer block; the global context block ensures a comprehensive understanding of the global context by integrating long-range dependency information into the feature map; and the next two additional Swin Transformer blocks further process the features of the fused long-range dependency information to prepare for the subsequent stages; The third stage: Multiple Swin Transformer blocks and global context blocks are used alternately in the deep network to further refine the features and capture multi-scale information; Phase 4: After a Patch Merging operation to reduce the resolution, the global context block is applied again to ensure full utilization of global context information; the remaining two Swin Transformer blocks complete feature extraction and generate rich and discriminative feature representations; finally, the feature representations are fed into the classification head to predict insect species using the learned features; The global context block involved in each stage divides the input into three branches, two of which are used for context modeling, and global attention pooling is realized through 1×1 convolution and Softmax function. Extract global attention from: ; Global attention and one input After multiplication, we get context modeling: ; Bottleneck transformation is implemented through 1×1 convolution, layer normalization, ReLU activation function, and 1×1 convolution to capture channel-level dependencies for context modeling: ; Context modeling channel-level dependencies with the last input Additive combination incorporates global context features.
2. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: The steps of the DBSCAN-based swarm segmentation algorithm include: S110, calculating the dense number of migratory insects per minute during the observation time, and setting the MinPts value based on the dense value; S120, calculate the Eps value: S121, normalizing the observed spatiotemporal distribution characteristics and body weight of the insects to obtain normalized spatiotemporal distribution characteristics and body weight of the insects; S122, for each normalized spatiotemporal distribution feature and weight of an insect, calculate the distance to the point closest to the spatiotemporal distribution feature and weight of the insect by the MinPts-1th order, and re-sort them to obtain a density change curve of the observation data set; S123, performing a first-order difference on the density change curve, then performing a smoothing process, and then performing a maximum value process to obtain a density change curve difference curve; S124, calculating the mean μ and standard deviation σ of the data in the range of 5% to 95% of the horizontal coordinate in the difference curve of the density change curve, and intercepting the difference curve based on the threshold μ+3σ; S125, selecting multiple ordinate values in the intercepted curve as Eps; wherein the larger the threshold μ+3σ is, the more forward ordinate values are selected as Eps; S130, using the DBSCAN algorithm, clustering the normalized data set according to MinPts and different Eps.
3. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 2 is characterized in that: Optimize the clustering results of S130, including: S141, remove edge sparse targets: calculate the intersection degree p between the lowest density cluster and other clusters in the clustering result of S3, and if p>0.1, delete the lowest density cluster; S142, swarm fusion: if the degree of intersection of two swarms p> 0.25 and the difference in the normalized average weight of the two swarms does not exceed 0.2, then merge the two swarms; S143, perform expansion operation on the edge of the swarm.
4. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: Step S200 includes: determining the statistical results of biological parameters of insect populations separated by the DBSCAN insect swarm segmentation algorithm within any time period; obtaining the statistical results of the capture of various types of insects by insect traps within the same time period; when the number of dominant populations of the two is consistent, comparing and matching the biological parameters of the insect population monitored by the full polarization insect radar with the reference biological parameters of the dominant population captured by the insect trap recorded in the literature, and associating the insect population detected by the radar with the actual insect species.
5. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: In step S300, the window length used by the sliding window function of the short-time Fourier transform is 15 data points, and the signal in each window is interpolated 50 times to balance the time-frequency resolution and improve the frequency resolution; The generated time-frequency matrix is normalized to range, and adjust to The uniform size of pixels is adapted to the input requirements of the CL-GC-SwinTransformer network model; the final insect full polarization time-frequency feature map of each insect sample is , where dimension 4 represents four polarization modes: HH polarization, HV polarization, VH polarization and VV polarization.
6. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: In step S300, the spectrum maximum is located and the center frequency is calculated through the spectrum shifting algorithm, and then the spectrum shifting factor is constructed to concentrate the spectrum near the zero frequency, thereby standardizing the spectrum distribution and avoiding errors caused by frequency drift.
7. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: The Swin Transformer block includes a window attention W-MSA of a residual structure, the window attention of the residual structure is followed by a feedforward network MLP of a residual structure, the feedforward network MLP of the residual structure is followed by a displacement window attention SW-MSA of the residual structure, and the displacement window attention SW-MSA of the residual structure is followed by a feedforward network MLP of the residual structure; layer normalization LayerNorm is set before the window attention W-MSA, the displacement window attention SW-MSA and the feedforward network MLP.
8. The intelligent identification method of migratory insects based on insect trap light assisted radar database building according to claim 1 is characterized in that: During the training of the CL-GC-Swin Transformer network model, the optimizer uses the Adam algorithm and the initial learning rate is set to 1×10 - ³, the batch size is set to 64, and the ReduceLROnPlateau scheduler is used to automatically reduce the learning rate when the training loss stagnates; to prevent overfitting, L2 regularization and early stopping strategy are applied, and the patience value is set to 10 training cycles.
Citation Information
Patent Citations
Insect population adaptive segmentation method based on DBSCAN three-dimensional parameter space
CN117493919A
Unmanned aerial vehicle and bird intelligent classification method based on time-frequency micro-motion characteristics
CN117636023A
Steel surface defect detection method based on deep learning
CN117670844A
Cultivated land remote sensing image segmentation method and device, medium and equipment
CN118447250A
Cited By
Method and system for identifying migrated insects in air based on insect radar and high-altitude lamp
CN120544238A
Method and system for identifying aerial migrating insects based on insect radar and high altitude light
CN120544238B