Butterfly monitoring and identification system and method based on edge computing
Patent Information
- Application Number
- CN202611179150.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]人工调查高度依赖人员专业能力与时间投入,受区域可达性限制明显,监测范围与频次有限,无法实现全天候连续监测;固定式抓拍设备为被动等待模式,仅能捕捉随机进入视野的目标,无主动引诱能力,有效蝴蝶图像的捕获效率极低,难以满足大范围常态化监测的需求
[0087]1、本发明通过视觉与嗅觉双重引诱机制主动吸引蝴蝶进入监测区域,配合雷达触发的自动化图像采集,替代人工踏查与被动抓拍模式,无需人员现场作业即可实现大范围、全天候的连续监测,显著提升有效蝴蝶数据的捕获率。
Smart Images

Figure CN122990756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of monitoring and identification technology, specifically a butterfly monitoring and identification system and method based on edge computing. Background Technology
[0002] Butterflies are important environmental indicator species in ecosystems, and their population diversity and distribution data are core evidence for regional ecological quality assessment and biodiversity conservation. Currently, butterfly monitoring mainly adopts three mainstream methods: manual transect surveys, fixed image capture, and mobile device image recognition. Manual surveys are conducted by professionals who observe and record data along designated sample areas and transects. Fixed equipment mainly uses infrared sensor-triggered cameras to capture images. Mobile solutions use mobile devices to take photos and then compare and identify them using a cloud database.
[0003] Manual surveys heavily rely on personnel expertise and time commitment, are significantly limited by regional accessibility, and have limited monitoring range and frequency, making continuous 24 / 7 monitoring impossible. Fixed capture devices operate in a passive, waiting mode, only able to capture targets randomly entering the field of view, lacking active attraction capabilities, resulting in extremely low efficiency in capturing effective butterfly images, which is insufficient to meet the needs of large-scale, routine monitoring. Existing equipment often uses simple infrared sensing or motion pixel detection for triggering, unable to distinguish between non-living objects such as wind-blown branches, swaying shadows, and falling debris and real biological targets, frequently causing false triggers and generating a large number of targetless, invalid images. Current identification solutions generally upload all collected images to cloud servers for processing, but field monitoring sites typically have limited network conditions, resulting in high bandwidth costs, significant latency, and difficulty in guaranteeing real-time performance for full data transmission; furthermore, cloud-based identification results cannot be immediately linked to on-site equipment for localized operations such as directional attraction. Summary of the Invention
[0004] The purpose of this invention is to provide a butterfly monitoring and identification system and method based on edge computing to solve the problems raised in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] In a first aspect, this application provides a butterfly detection and identification method based on edge computing, including:
[0007] The radar beam is transmitted to the monitoring area, the echo signal reflected by the object is received, and the preprocessing is performed to obtain the beat echo signal.
[0008] The beat echo signal is solved to obtain echo characteristics; based on the echo characteristics, the likelihood ratio test is performed using the Kalman filter residuals to determine whether the target is a living organism.
[0009] When the target is a living organism, image data is collected within the monitoring area; a lightweight butterfly recognition model is constructed, and inference operations are performed on the image data at the local edge to obtain valid image data that contains the butterfly target and meets the verification requirements.
[0010] Based on the effective image data, butterfly species are identified, and identification results are obtained. Based on the identification results, directional attraction signals and attraction odors are output to the monitoring area to actively attract butterflies, and multi-view images are captured to form ecological observation data.
[0011] In conjunction with the first aspect, in a first embodiment of the first aspect of this application, the step of transmitting a radar beam to the monitoring area, receiving the echo signal reflected by the object, and performing preprocessing to obtain the beat echo signal includes:
[0012] Configure the radar's transmission frequency, beam coverage angle, detection range threshold, and sampling period to define the effective monitoring space as the monitoring area; continuously transmit a fixed frequency radar beam to the monitoring area according to the sampling period; receive the echo signals reflected by objects in the monitoring area, perform analog-to-digital conversion and basic filtering and noise reduction preprocessing to obtain the beat echo signal, including echo amplitude, beat frequency, frequency modulation slope, initial phase, and additive white Gaussian noise component.
[0013] In conjunction with the first aspect, in a second embodiment of the first aspect of this application, the step of calculating the beat echo signal to obtain echo characteristics includes:
[0014] Perform a Fast Fourier Transform (FFT) on the beat echo signal in the range dimension. Extract the target range, radar cross section amplitude, and Doppler frequency shift from the peak position of the transform result to form the echo characteristics at the current sampling time.
[0015] Preferably, based on the frequency-modulated continuous wave radar system, the radar frequency modulation slope is set to... The frequency modulation period is The sampling frequency is The number of sampling points in a single frequency modulation cycle is N, and the speed of electromagnetic wave propagation in air is c; for a range radar R and a single target with radial motion, the discrete form of its beat echo signal is... for:
[0016] ;
[0017] Where A is the amplitude of the echo signal, which is determined by the target scattering characteristics and the propagation distance; This is the beat frequency, which is related to the distance from the target to the radar; This is a Doppler frequency shift, generated by the radial velocity of the target; This is the initial phase of the echo; is discrete additive white Gaussian noise, corresponding to environmental clutter and circuit thermal noise; n is the index of the discrete sampling time; j is the imaginary unit;
[0018] Perform an N-point Fast Fourier Transform on the N-point beat sampling signal within a single frequency modulation cycle to map the time-domain signal to the range frequency domain, thus obtaining the range spectrum. :
[0019] ;
[0020] Where k is the frequency index in the range frequency domain, and each index corresponds to a beat frequency and a target range cell;
[0021] Amplitude sequence of the distance spectrum Perform peak detection to obtain the peak index corresponding to the maximum amplitude. This index corresponds to the distance cell where the target is located;
[0022] The beat frequency and peak index satisfy a corresponding relationship: ;
[0023] Combining the physical relationship between FMCW radar beat frequency and target distance The target distance R is derived as follows:
[0024] ;
[0025] Amplitude of the distance spectrum peak Positively correlated with the target's radar cross section, after range attenuation compensation due to bidirectional electromagnetic wave propagation, the RCS amplitude, which characterizes the target's scattering capability, is obtained. :
[0026] ;
[0027] Wherein, K is the radar system calibration constant, which is determined by the inherent parameters of the system such as transmit power, antenna gain, and carrier wavelength, and needs to be calibrated in advance;
[0028] Based on the complex phase information output by the range-dimensional FFT, and combined with echo data from multiple consecutive frequency modulation cycles, the phase change within the same range cell is extracted. Let the peak index be... The phases at the points are respectively , Then the phase difference The Doppler frequency shift can be calculated from this:
[0029] ;
[0030] The extracted target distance, radar cross section amplitude, and Doppler frequency shift are combined to form the echo feature vector at the current sampling time.
[0031] In conjunction with the first aspect, in the third embodiment of the first aspect of this application, the step of using Kalman filter residuals to perform a likelihood ratio test based on echo characteristics to determine whether the target is a living organism includes:
[0032] A Kalman filter state-space model of the target's radial motion is constructed, including state equations and observation equations; the formula for the state equations is: The formula for the observation equation is: ; where, state vector , For the target distance, Let be the radial velocity; F be the state transition matrix; H be the observation matrix; define process noise and observation noise; the process noise covariance matrix is Q; and the observation noise covariance matrix is R.
[0033] Kalman filtering is performed sequentially for state prediction and covariance prediction. The difference between the actual observed value and the predicted observed value is used to calculate the residual at the current time, and the covariance matrix corresponding to the residual is calculated. A log-likelihood ratio test statistic is constructed, and the residual covariance under the assumptions of non-living organisms and living organisms is substituted to complete the calculation and obtain the likelihood ratio test value. A decision threshold is set. When the likelihood ratio test value is greater than the decision threshold, the target is determined to be a living organism; otherwise, the target is determined not to be a living organism.
[0034] Preferably, in the Kalman filter model based on a uniformly moving target, the sampling time interval between two adjacent radar observations is T, and the relevant parameters are defined as follows:
[0035] The state transition matrix F describes the time recursive relationship of the states under uniform motion, and is expressed as:
[0036] ;
[0037] The physical meaning is that the distance at time k = the distance at the previous time + the velocity at the previous time × the sampling interval; under the assumption of uniform velocity, the velocity remains constant.
[0038] The observation matrix H maps the state space to the observation space. In this scenario, the radar can directly observe the range and radial velocity, so an identity matrix is used, represented as:
[0039] ;
[0040] It is two-dimensional zero-mean Gaussian white noise, representing random perturbations in the target motion, satisfying... Its covariance matrix is ;in, It is the mathematical expectation operator, which represents the statistical average of a random variable;
[0041] It is two-dimensional zero-mean Gaussian white noise, characterizing the random error in radar range and velocity measurements, and satisfies... Its covariance matrix is ;
[0042] Observation vector This represents the actual observation value obtained by radar calculation at time k. ,in To extract the target distance, The radial velocity is calculated from the Doppler frequency shift.
[0043] Based on the optimal state estimate at time k-1, the prior state prediction at time k is obtained recursively:
[0044] ;
[0045] in, It is the posterior state estimate at time k-1, representing the optimal estimate result after fusing observations at time k-1; The prior state estimate at time k is obtained solely from historical state predictions, without incorporating current observations.
[0046] The error covariance matrix of the prior state estimate is obtained recursively, which characterizes the uncertainty of the prediction result:
[0047] ;
[0048] in, It is the prior estimation error covariance matrix at time k. It is the posterior estimation error covariance matrix at time k-1. It is the transpose of the state transition matrix F;
[0049] Mapping the prior state estimate to the observation space yields the predicted observation at time k:
[0050] ;
[0051] The residual vector is obtained by subtracting the actual observed values from the predicted observed values:
[0052] ;
[0053] in, It is the residual vector, reflecting the deviation between actual observation and model prediction; the movement of biological objects is more in line with the uniform and slowly changing model, and the residual value is smaller; the movement of non-biological targets is chaotic and irregular, and the residual fluctuation amplitude is larger.
[0054] Calculate the covariance matrix corresponding to the residuals, which characterizes the statistical volatility of the residuals:
[0055] ;
[0056] in, It is the covariance matrix of the residuals at the current time. It is the transpose of the observation matrix H.
[0057] The residual covariance benchmarks for the two types of objectives are obtained in advance through statistical analysis of a large number of samples:
[0058] Assume the target is non-biological, the motion is highly random, and the residual covariance benchmark is... ;
[0059] Assuming the target is a living organism, the motion conforms to a slowly varying motion model, and the residual covariance benchmark is... ;
[0060] Based on the likelihood function of the multivariate Gaussian distribution, a log-likelihood ratio test statistic is constructed:
[0061] ;
[0062] in, This is the log-likelihood ratio test value. and These are the determinants of the residual covariance matrices under the non-biological and biological assumptions, respectively. , These are the inverse matrices of the corresponding covariance matrices; For residual vectors transpose;
[0063] Set a decision threshold Enforcement of a binary judgment:
[0064] like Then accept Assume the target is a living organism;
[0065] like Then accept Assume the target is a non-living organism.
[0066] In conjunction with the first aspect, in the fourth embodiment of the first aspect of this application, the step of collecting image data within the monitoring area when the target is a living organism includes:
[0067] The system retrieves pre-configured image capture parameters, opens frontal and overhead shooting angles, captures images of targets within the monitoring area, continuously collects multiple frames of continuous images to obtain the original images; the original images are pre-processed to remove noise interference and form image data.
[0068] In conjunction with the first aspect, in the fifth embodiment of the first aspect of this application, the step of constructing a lightweight butterfly recognition model and performing inference operations on image data at the local edge to obtain valid image data containing the butterfly target and meeting the verification requirements includes:
[0069] A lightweight butterfly recognition model is built based on the YOLOv11 object detection architecture. The model is trained using a dataset labeled with key butterfly features. After training, the model parameters and computational cost are compressed through structured pruning, INT8 quantization, and operator fusion. The model is then converted into an NCNN inference format suitable for embedded devices and deployed to a local edge inference engine. The input raw image is preprocessed and fed into the lightweight butterfly recognition model to complete forward inference. The model outputs the bounding box coordinates, target confidence, and coarse species classification results for all candidate targets in the image. Overlapping and redundant detection boxes are removed using a non-maximum suppression algorithm, and valid image data of butterfly targets with confidence scores higher than a preset threshold are selected.
[0070] The image clarity, target occlusion ratio, butterfly shooting angle compliance, and effective target image ratio of the valid image data are calculated sequentially. Multi-dimensional quality verification is performed, and the valid image data after successful verification is output.
[0071] In conjunction with the first aspect, in the sixth embodiment of the first aspect of this application, the step of identifying the species of butterflies based on the effective image data to obtain the identification result includes:
[0072] Geometric morphological features and texture distribution features are extracted from valid image data. The geometric morphological features include the overall length-to-width ratio of the wing, the ratio of the perimeter to the area, the curvature distribution of each segment of the wing margin, and the relative positional relationship of the wing vein nodes. The texture distribution features include the gray-scale statistical regularity of different wing zones, the number and area ratio of spots and patches, and the statistical feature value of texture thickness. All feature parameters are combined to form a feature sequence to be identified.
[0073] Retrieve the standard feature templates of all registered species in the butterfly species database. Each type of butterfly corresponds to a set of calibrated standard feature sequences and species attribute information. Calculate the difference between the feature sequence to be identified and the standard template of each type in the database to obtain the matching difference value for each type of butterfly. The lower the value, the higher the degree of matching.
[0074] Sort all categories by matching difference values in ascending order, and select the category with the smallest difference value as the identification result.
[0075] In conjunction with the first aspect, in the seventh embodiment of the first aspect of this application, the step of outputting directional attraction signals and attraction odors to the monitoring area based on the identification results to actively attract butterflies, capturing multi-view images, and forming ecological observation data includes:
[0076] By using a combination of ultraviolet and warm yellow light to output visual attraction signals, matching the spectral sensitivity range of butterfly compound eyes, and simulating the light color and reflective characteristics of flower sources, the system controls the release of attraction odors containing volatile nectar from flowers and specific pheromones to achieve targeted attraction of butterflies' foraging and courtship behaviors. During the attraction process, the system collects multi-view continuous images of the target and records the duration of the target's activities and behavioral patterns within the monitoring area, forming ecological observation data.
[0077] In conjunction with the first aspect, in the eighth embodiment of the first aspect of this application, the controlled release of an attractive odor comprising nectar-source floral volatiles and specific pheromones to achieve targeted attraction of butterflies' foraging and courtship behaviors includes:
[0078] Based on the identification results, two sets of behavioral parameters for the target butterfly species are retrieved from the species parameter database, including nectar source floral volatiles and specific pheromones. The nectar source floral volatiles include half-maximum response concentration, response curve kurtosis coefficient, and maximum foraging response intensity. The specific pheromones include half-maximum response concentration, response curve kurtosis coefficient, and maximum courtship response intensity.
[0079] The behavioral response intensity of butterflies to two types of attractants follows a saturation-dose response law. Based on this, the correspondence between the concentration of nectar volatiles and the intensity of foraging response, and the correspondence between the concentration of pheromones and the intensity of courtship response were obtained.
[0080] The total concentration of the attractant released by the device in a single run is set to a fixed value, and the sum of the concentrations of the two types of attractants equals the total concentration. With the optimization objective of maximizing the sum of the behavioral response intensities of the two types of attractants, an extreme value solution method with equality constraints is used to ensure that the marginal response increments of the two types of attractants are equal. Combined with the total concentration constraint, the optimal release concentrations of each type of attractant are calculated, and the release ratio of the nectar source fragrance volatiles to the specific pheromones is obtained. According to the release ratio, the on / off time and unit flow rate of the two release valves are controlled respectively, and the mixed attractant odor is released into the monitoring area after mixing.
[0081] Secondly, this application provides a butterfly monitoring and identification system based on edge computing, comprising:
[0082] Echo signal acquisition module: includes: an echo signal acquisition unit that transmits radar beams to the monitoring area, receives echo signals reflected by objects, performs preprocessing, and obtains beat echo signals;
[0083] Organism identification module: includes: echo resolution unit to resolve beat echo signals and obtain echo characteristics; organism identification unit to perform likelihood ratio test based on echo characteristics using Kalman filter residuals to determine whether the target is an organism;
[0084] Effective image data calculation module: includes: image data acquisition unit, which acquires image data within the monitoring area when the target is a living organism; effective image data calculation unit, which constructs a lightweight butterfly recognition model, performs inference operations on the image data at the local edge, and obtains effective image data that contains the butterfly target and meets the verification requirements.
[0085] Active attraction module: includes: a species identification unit that identifies the species of butterflies based on the valid image data and obtains the identification result; and an active attraction unit that outputs directional attraction signals and attraction odors to the monitoring area based on the identification result to actively attract butterflies.
[0086] Compared with the prior art, the beneficial effects of the present invention are:
[0087] 1. This invention actively attracts butterflies into the monitoring area through a dual attraction mechanism of vision and smell. Combined with radar-triggered automated image acquisition, it replaces manual surveys and passive capture modes, enabling large-scale, all-weather continuous monitoring without the need for on-site personnel, and significantly improving the capture rate of effective butterfly data.
[0088] 2. Based on radar echo characteristics, this invention achieves accurate differentiation between living and non-living objects by combining Kalman filter residuals with likelihood ratio tests. It filters out non-living motion interference from the triggering source, significantly reduces invalid images generated by false triggers, reduces resource consumption for storage and subsequent processing, and improves the overall effectiveness of monitoring data.
[0089] 3. This invention deploys a lightweight butterfly recognition model at the local edge, which completes target detection, quality screening and coarse species classification immediately after image acquisition, and only uploads valid images to the backend, greatly reducing the amount of data transmission and bandwidth pressure in the field environment; at the same time, the local recognition results can be directly linked to the attraction module to optimize the attractant ratio according to the species results, thereby improving the real-time performance and targeting of monitoring. Attached Figure Description
[0090] Figure 1 This is a schematic diagram illustrating the steps of a butterfly monitoring and identification method based on edge computing according to the present invention.
[0091] Figure 2 This is a system structure diagram of a butterfly monitoring and identification system based on edge computing according to the present invention. Detailed Implementation
[0092] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0093] Example: Figures 1-2 As shown, the present invention provides a technical solution:
[0094] like Figure 1 As shown, this application provides a butterfly detection and identification method based on edge computing, including:
[0095] Step S100: Transmit radar beams to the monitoring area, receive echo signals reflected by objects, perform preprocessing, and obtain beat echo signals;
[0096] Specifically, the radar's transmission frequency, beam coverage angle, detection distance threshold, and sampling period are configured to define the effective monitoring space as the monitoring area; a fixed frequency radar beam is continuously transmitted to the monitoring area according to the sampling period; the echo signals reflected by objects within the monitoring area are received, and analog-to-digital conversion and basic filtering and noise reduction preprocessing are performed to obtain the beat echo signal, including the echo amplitude, beat frequency, frequency modulation slope, initial phase, and additive white Gaussian noise component.
[0097] In one specific embodiment, a 24GHz frequency-modulated continuous wave radar is used for monitoring. The transmission center frequency is configured as 24.125GHz, the frequency modulation bandwidth as 150MHz, the detection distance threshold as 5m, the horizontal beam coverage angle as 60°, the vertical beam coverage angle as 40°, and the sampling period as 10ms. A sector-shaped space of 0.5~5m in front of the radar is defined as the effective monitoring area. A linear frequency-modulated radar beam is continuously transmitted at a period of 10ms. After receiving the echo, it is sampled by a 12-bit analog-to-digital converter at a sampling frequency of 1MHz, with 1024 sampling points per cycle. The signal is then preprocessed by DC component filtering and first-order low-pass filtering to obtain the beat echo signal. The measured beat signal parameters for a specific frame of the target are: echo amplitude 0.32V, beat frequency 12.5kHz, frequency modulation slope 15MHz / ms, initial phase 0.78rad, and the variance of the superimposed additive white Gaussian noise is 0.015V².
[0098] Step S200: Solve the beat echo signal to obtain echo characteristics; based on the echo characteristics, use Kalman filter residuals to perform a likelihood ratio test to determine whether the target is a living organism;
[0099] Specifically, a fast Fourier transform is performed on the beat echo signal in the range dimension. The target range, radar cross section amplitude, and Doppler frequency shift are extracted from the peak position of the transform result to form the echo characteristics at the current sampling time.
[0100] Preferably, based on the frequency-modulated continuous wave radar system, the radar frequency modulation slope is set to... The frequency modulation period is The sampling frequency is The number of sampling points in a single frequency modulation cycle is N, and the speed of electromagnetic wave propagation in air is c; for a range radar R and a single target with radial motion, the discrete form of its beat echo signal is... for:
[0101] ;
[0102] Where A is the amplitude of the echo signal, which is determined by the target scattering characteristics and the propagation distance; This is the beat frequency, which is related to the distance from the target to the radar; This is a Doppler frequency shift, generated by the radial velocity of the target; This is the initial phase of the echo; is discrete additive white Gaussian noise, corresponding to environmental clutter and circuit thermal noise; n is the index of the discrete sampling time; j is the imaginary unit;
[0103] Perform an N-point Fast Fourier Transform on the N-point beat sampling signal within a single frequency modulation cycle to map the time-domain signal to the range frequency domain, thus obtaining the range spectrum. :
[0104] ;
[0105] Where k is the frequency index in the range frequency domain, and each index corresponds to a beat frequency and a target range cell;
[0106] Amplitude sequence of the distance spectrum Perform peak detection to obtain the peak index corresponding to the maximum amplitude. This index corresponds to the distance cell where the target is located;
[0107] The beat frequency and peak index satisfy a corresponding relationship: ;
[0108] Combining the physical relationship between FMCW radar beat frequency and target distance The target distance R is derived as follows:
[0109] ;
[0110] Amplitude of the distance spectrum peak Positively correlated with the target's radar cross section, after range attenuation compensation due to bidirectional electromagnetic wave propagation, the RCS amplitude, which characterizes the target's scattering capability, is obtained. :
[0111] ;
[0112] Wherein, K is the radar system calibration constant, which is determined by the inherent parameters of the system such as transmit power, antenna gain, and carrier wavelength, and needs to be calibrated in advance;
[0113] Based on the complex phase information output by the range-dimensional FFT, and combined with echo data from multiple consecutive frequency modulation cycles, the phase change within the same range cell is extracted. Let the peak index be... The phases at the points are respectively , Then the phase difference The Doppler frequency shift can be calculated from this:
[0114] ;
[0115] The extracted target distance, radar cross section amplitude, and Doppler frequency shift are combined to form the echo feature vector at the current sampling time.
[0116] Furthermore, a Kalman filter state-space model of the target's radial motion is constructed, including state equations and observation equations; the formula for the state equations is: The formula for the observation equation is: ; where, state vector , For the target distance, Let be the radial velocity; F be the state transition matrix; H be the observation matrix; define process noise and observation noise; the process noise covariance matrix is Q; and the observation noise covariance matrix is R.
[0117] Kalman filtering is performed sequentially for state prediction and covariance prediction. The difference between the actual observed value and the predicted observed value is used to calculate the residual at the current time, and the covariance matrix corresponding to the residual is calculated. A log-likelihood ratio test statistic is constructed, and the residual covariance under the assumptions of non-living organisms and living organisms is substituted to complete the calculation and obtain the likelihood ratio test value. A decision threshold is set. When the likelihood ratio test value is greater than the decision threshold, the target is determined to be a living organism; otherwise, the target is determined not to be a living organism.
[0118] Preferably, in the Kalman filter model based on a uniformly moving target, the sampling time interval between two adjacent radar observations is T, and the relevant parameters are defined as follows:
[0119] The state transition matrix F describes the time recursive relationship of the states under uniform motion, and is expressed as:
[0120] ;
[0121] The physical meaning is that the distance at time k = the distance at the previous time + the velocity at the previous time × the sampling interval; under the assumption of uniform velocity, the velocity remains constant.
[0122] The observation matrix H maps the state space to the observation space. In this scenario, the radar can directly observe the range and radial velocity, so an identity matrix is used, represented as:
[0123] ;
[0124] It is two-dimensional zero-mean Gaussian white noise, representing random perturbations in the target motion, satisfying... Its covariance matrix is ;in, It is the mathematical expectation operator, which represents the statistical average of a random variable;
[0125] It is two-dimensional zero-mean Gaussian white noise, characterizing the random error in radar range and velocity measurements, and satisfies... Its covariance matrix is ;
[0126] Observation vector This represents the actual observation value obtained by radar calculation at time k. ,in To extract the target distance, The radial velocity is calculated from the Doppler frequency shift.
[0127] Based on the optimal state estimate at time k-1, the prior state prediction at time k is obtained recursively:
[0128] ;
[0129] in, It is the posterior state estimate at time k-1, representing the optimal estimate result after fusing observations at time k-1; The prior state estimate at time k is obtained solely from historical state predictions, without incorporating current observations.
[0130] The error covariance matrix of the prior state estimate is obtained recursively, which characterizes the uncertainty of the prediction result:
[0131] ;
[0132] in, It is the prior estimation error covariance matrix at time k. It is the posterior estimation error covariance matrix at time k-1. It is the transpose of the state transition matrix F;
[0133] Mapping the prior state estimate to the observation space yields the predicted observation at time k:
[0134] ;
[0135] The residual vector is obtained by subtracting the actual observed values from the predicted observed values:
[0136] ;
[0137] in, It is the residual vector, reflecting the deviation between actual observation and model prediction; the movement of biological objects is more in line with the uniform and slowly changing model, and the residual value is smaller; the movement of non-biological targets is chaotic and irregular, and the residual fluctuation amplitude is larger.
[0138] Calculate the covariance matrix corresponding to the residuals, which characterizes the statistical volatility of the residuals:
[0139] ;
[0140] in, It is the covariance matrix of the residuals at the current time. It is the transpose of the observation matrix H.
[0141] The residual covariance benchmarks for the two types of objectives are obtained in advance through statistical analysis of a large number of samples:
[0142] Assume the target is non-biological, the motion is highly random, and the residual covariance benchmark is... ;
[0143] Assuming the target is a living organism, the motion conforms to a slowly varying motion model, and the residual covariance benchmark is... ;
[0144] Based on the likelihood function of the multivariate Gaussian distribution, a log-likelihood ratio test statistic is constructed:
[0145] ;
[0146] in, This is the log-likelihood ratio test value. and These are the determinants of the residual covariance matrices under the non-biological and biological assumptions, respectively. , These are the inverse matrices of the corresponding covariance matrices; For residual vectors transpose;
[0147] Set a decision threshold Enforcement of a binary judgment:
[0148] like Then accept Assume the target is a living organism;
[0149] like Then accept Assume the target is a non-living organism.
[0150] In one specific embodiment, the configuration parameters of the aforementioned 24GHz frequency-modulated continuous wave radar are used, and the preprocessed beat echo signal is calculated with an observation period of 10ms. A 1024-point range-dimensional fast Fourier transform is performed on the sampled signal within a single period to generate a range spectrum. The peak position of the signal is located by a peak search algorithm, and the radial distance of the current target is calculated to be 2.48m. The radar cross section amplitude of the target is calculated to be -12.2dBsm by combining the range attenuation compensation formula. The echo phase information of the same range cell in two consecutive frequency-modulated periods is extracted, and the phase difference is measured to be 0.0754rad. The Doppler frequency shift is calculated to be 120Hz, corresponding to a radial velocity of 0.75m / s for the target. The three parameters of range, radar cross section amplitude, and Doppler frequency shift are combined to form the echo feature vector at the current sampling time.
[0151] Subsequently, a Kalman filter state-space model of the target's radial uniform motion was constructed. The sampling time interval T between adjacent observations was set to 0.01 s. The state transition matrix was a second-order matrix, with the first row [1, 0.01] and the second row [0, 1]. The observation matrix was a second-order identity matrix. Considering the disturbance characteristics of butterfly flight and radar measurement accuracy, the diagonal elements of the process noise covariance matrix Q were set to 1 × 10^-4 m² and 0.01 (m / s)², respectively, with the off-diagonal coupling terms set to 0. The diagonal elements of the observation noise covariance matrix R were set to 2.5 × 10^-3 m² and 4 × 10^-4 (m / s)², with the off-diagonal terms set to 0.
[0152] The posterior optimal state estimate at the previous time step (k-1) is taken as a distance of 2.42 m and a radial velocity of 0.72 m / s. The diagonal elements of the corresponding posterior estimation error covariance matrix are 1.8 × 10^-3 and 3 × 10^-4, respectively. Through recursive calculation of state prediction, the prior state prediction at time k is obtained as a distance of 2.4272 m and a radial velocity of 0.72 m / s. Through recursive covariance prediction, the diagonal elements of the prior estimation error covariance matrix are approximately 1.9 × 10^-3 and 0.0103, respectively. Mapping the prior state estimate to the observation space through the observation matrix yields the predicted observation value at the current time. Subtracting this from the actual observation value obtained from the radar calculation, the distance deviation of the residual vector is calculated to be 0.0528 m and the velocity deviation to be 0.06 m / s. Simultaneously, the diagonal elements of the covariance matrix corresponding to the current residual are calculated to be approximately 4.4 × 10^-3 and 0.0107, respectively.
[0153] The residual covariance benchmarks for two target classes were pre-determined through offline statistical analysis of a large number of samples: under the non-biological assumption, the diagonal elements of the residual covariance benchmark matrix S0 were 0.025m² and 0.08 (m / s)², respectively; under the biological assumption, the diagonal elements of the residual covariance benchmark matrix S1 were 0.004m² and 0.012 (m / s)², respectively. The current residual vector and the covariances of the two benchmarks were substituted into the log-likelihood ratio test statistic for calculation, resulting in a log-likelihood ratio test value of approximately 1.44. A decision threshold of 0 was pre-set. Since the current test value was greater than the decision threshold, the biological assumption was accepted, and the target currently entering the monitoring area was determined to be a biological entity.
[0154] Step S300: When the target is an organism, collect image data within the monitoring area; construct a lightweight butterfly recognition model, perform inference operations on the image data at the local edge, and obtain valid image data that contains the butterfly target and meets the verification requirements;
[0155] Specifically, the system retrieves pre-configured image capture parameters, opens both front-view and top-view shooting angles, captures images of targets within the monitoring area, continuously collects multiple frames of continuous images to obtain the original images, and preprocesses the original images to remove noise interference and form image data.
[0156] Furthermore, a lightweight butterfly recognition model was constructed based on the YOLOv11 object detection architecture. The model was trained using a dataset labeled with key butterfly features. After training, the model parameters and computational cost were compressed through structured pruning, INT8 quantization, and operator fusion. The model was then converted into an NCNN inference format suitable for embedded devices and deployed to the local edge inference engine. The original input image was preprocessed and input into the lightweight butterfly recognition model to complete forward inference. The model output the bounding box coordinates, target confidence, and coarse species classification results for all candidate targets in the image. Overlapping and redundant detection boxes were removed using a non-maximum suppression algorithm, and valid image data of butterfly targets with confidence scores higher than a preset threshold were selected.
[0157] The image clarity, target occlusion ratio, butterfly shooting angle compliance, and effective target image ratio of the valid image data are calculated sequentially. Multi-dimensional quality verification is performed, and the valid image data after successful verification is output.
[0158] In one specific embodiment, after determining that the target is a living organism, the dual-view image acquisition unit is triggered to start capturing images. Both the front-view and top-view cameras are configured with a resolution of 1280×720 and a frame rate of 15fps, continuously capturing 8 frames of raw images. After removing random noise from the images through Gaussian filtering, the image data to be processed is formed.
[0159] The butterfly recognition model is based on the YOLOv11n architecture and was trained using a dataset containing 12,000 labeled samples from 12 common butterfly species. After training, the model parameters were compressed from 2.8M to 1.2M and the computational cost was reduced from 4.1GFLOPs to 1.6GFLOPs through structured pruning, INT8 quantization, and operator fusion. After being converted to NCNN inference format, it was deployed on the RK3588 local edge inference engine.
[0160] After performing size normalization and pixel value normalization preprocessing on the 8 original images, the images were input into the model. The forward inference time per frame was about 12ms. After the model outputs candidate detection boxes, non-maximum suppression was performed with an intersection-union ratio threshold of 0.45 to remove overlapping and redundant boxes and filter out butterfly targets with a confidence level higher than 0.5. Among them, butterfly targets were detected in 5 frames from the 3rd to the 7th frame, and the highest target confidence level in a single frame was 0.89.
[0161] Multi-dimensional quality checks were performed on the above 5 images: the average Laplacian variance of image sharpness was 126, the average target occlusion rate was 8%, the average butterfly shooting angle deviation was 12°, and the average effective target image ratio was 6.2%. All indicators met the preset threshold requirements. Finally, 4 frames of non-repeating and quality-compliant valid image data were selected and entered into the subsequent category identification stage.
[0162] Step S400: Based on the effective image data, identify the species of butterflies and obtain the identification results; based on the identification results, output directional attraction signals and attraction odors to the monitoring area to actively attract butterflies, take multi-view images, and form ecological observation data.
[0163] Specifically, geometric morphological features and texture distribution features are extracted from valid image data. The geometric morphological features include the overall length-to-width ratio of the wing, the ratio of the outline perimeter to the area, the curvature distribution of each segment of the wing edge, and the relative positional relationship of the wing vein nodes. The texture distribution features include the gray-level statistical regularity of different wing zones, the number and area ratio of spots and patches, and the statistical characteristic value of texture thickness. All feature parameters are combined to form a feature sequence to be identified.
[0164] Retrieve the standard feature templates of all registered species in the butterfly species database. Each type of butterfly corresponds to a set of calibrated standard feature sequences and species attribute information. Calculate the difference between the feature sequence to be identified and the standard template of each type in the database to obtain the matching difference value for each type of butterfly. The lower the value, the higher the degree of matching.
[0165] Sort all categories by matching difference values in ascending order, and select the category with the smallest difference value as the identification result.
[0166] Furthermore, visual attraction signals are output through a combination of ultraviolet and warm yellow light sources, matching the spectral sensitivity range of butterfly compound eyes to simulate the light color and reflective characteristics of flower sources; the release of attraction odors containing volatile nectar and specific pheromones is controlled to achieve targeted attraction of butterflies' foraging and courtship behaviors; during the attraction process, multi-view continuous images of the target are collected, and the activity duration and behavioral patterns of the target in the monitoring area are recorded to form ecological observation data.
[0167] Furthermore, based on the identification results, two sets of behavioral parameters for the target butterfly species are retrieved from the species parameter database, including nectar source floral volatiles and specific pheromones. The nectar source floral volatiles include half-maximum response concentration, response curve kurtosis coefficient, and maximum foraging response intensity; the specific pheromones include half-maximum response concentration, response curve kurtosis coefficient, and maximum courtship response intensity.
[0168] The behavioral response intensity of butterflies to two types of attractants follows a saturation-dose response law. Based on this, the correspondence between the concentration of nectar volatiles and the intensity of foraging response, and the correspondence between the concentration of pheromones and the intensity of courtship response were obtained.
[0169] The total concentration of the attractant released by the device in a single run is set to a fixed value, and the sum of the concentrations of the two types of attractants equals the total concentration. With the optimization objective of maximizing the sum of the behavioral response intensities of the two types of attractants, an extreme value solution method with equality constraints is used to ensure that the marginal response increments of the two types of attractants are equal. Combined with the total concentration constraint, the optimal release concentrations of each type of attractant are calculated, and the release ratio of the nectar source fragrance volatiles to the specific pheromones is obtained. According to the release ratio, the on / off time and unit flow rate of the two release valves are controlled respectively, and the mixed attractant odor is released into the monitoring area after mixing.
[0170] In one specific embodiment, the four selected valid images were subjected to subject segmentation and feature extraction. The average aspect ratio of the butterfly wings was measured to be 1.42, and the ratio of the outline perimeter to the area was [value missing]. The standard deviation of the curvature distribution of each segment of the wing margin is 0.08, and the mean deviation of the relative position of the wing vein nodes is less than 3%. The mean gray level of the forewing partition measured in the texture dimension is 182. There are a total of 6 spots on the wing surface, and the total area of the spots accounts for 12.7%. The mean texture thickness is 2.3 pixels. The above 12 quantitative features are combined in sequence to form the feature sequence to be identified.
[0171] A butterfly species database containing standard templates of 18 local butterflies was retrieved. The difference value of the feature sequence to be identified was calculated one by one with each template. The difference value of the cabbage white butterfly was the smallest, at 0.063. The difference values of the other species were all higher than 0.12. Therefore, the final identification result was determined to be the cabbage white butterfly.
[0172] Based on the identification results, the corresponding parameters were retrieved from the species parameter database: the half-maximum response concentration of the nectar source floral volatiles was 0.25 mg / m³, the kurtosis coefficient of the response curve was 1.8, and the maximum foraging response intensity was 0.92; the half-maximum response concentration of the specific pheromone was 0.08 mg / m³, the kurtosis coefficient of the response curve was 2.1, and the maximum courtship response intensity was 0.85. With the total concentration of a single release fixed at 0.4 mg / m³, and with the objective of maximizing the joint response intensity, a constrained extreme value solution was performed. The optimal release concentration of the nectar source volatiles was found to be 0.28 mg / m³, and the optimal release concentration of the pheromone was 0.12 mg / m³, with a release volume ratio of approximately 2.33:1.
[0173] According to the specified ratio, the two release valves are controlled to release the mixed attractant odor at a total flow rate of 0.2L / min. At the same time, the attractant light source, which combines 365nm ultraviolet light and 3000K warm yellow light, is turned on. During the attraction process, dual-view images are continuously collected, and the target's activity time in the monitoring area is recorded for 42 seconds. The target exhibits three types of behavior: staying, visiting flowers, and flapping wings. Combined with species information and behavioral time series data, ecological observation data is formed.
[0174] like Figure 2 As shown, this application provides a butterfly monitoring and identification system based on edge computing, including:
[0175] Echo signal acquisition module: includes: an echo signal acquisition unit that transmits radar beams to the monitoring area, receives echo signals reflected by objects, performs preprocessing, and obtains beat echo signals;
[0176] Organism identification module: includes: echo resolution unit to resolve beat echo signals and obtain echo characteristics; organism identification unit to perform likelihood ratio test based on echo characteristics using Kalman filter residuals to determine whether the target is an organism;
[0177] Effective image data calculation module: includes: image data acquisition unit, which acquires image data within the monitoring area when the target is a living organism; effective image data calculation unit, which constructs a lightweight butterfly recognition model, performs inference operations on the image data at the local edge, and obtains effective image data that contains the butterfly target and meets the verification requirements.
[0178] Active attraction module: includes: a species identification unit that identifies the species of butterflies based on the valid image data and obtains the identification result; and an active attraction unit that outputs directional attraction signals and attraction odors to the monitoring area based on the identification result to actively attract butterflies.
[0179] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A butterfly detection and identification method based on edge computing, characterized in that, include: The radar beam is transmitted to the monitoring area, the echo signal reflected by the object is received, and the preprocessing is performed to obtain the beat echo signal. The beat echo signal is solved to obtain the echo characteristics; Based on echo characteristics, a likelihood ratio test is performed using Kalman filter residuals to determine whether the target is a living organism. When the target is a living organism, image data is collected within the monitoring area; a lightweight butterfly recognition model is constructed, and inference operations are performed on the image data at the local edge to obtain valid image data that contains the butterfly target and meets the verification requirements. Based on the effective image data, butterfly species are identified, and identification results are obtained. Based on the identification results, directional attraction signals and attraction odors are output to the monitoring area to actively attract butterflies, and multi-view images are captured to form ecological observation data.
2. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, The process of transmitting radar beams to the monitoring area, receiving echo signals reflected from objects, and preprocessing them to obtain beat echo signals includes: Configure the radar's transmission frequency, beam coverage angle, detection range threshold, and sampling period to define the effective monitoring space as the monitoring area; continuously transmit a fixed frequency radar beam to the monitoring area according to the sampling period; receive the echo signals reflected by objects in the monitoring area, perform analog-to-digital conversion and basic filtering and noise reduction preprocessing to obtain the beat echo signal, including echo amplitude, beat frequency, frequency modulation slope, initial phase, and additive white Gaussian noise component.
3. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, The process of resolving the beat echo signal to obtain echo characteristics includes: Perform a Fast Fourier Transform (FFT) on the beat echo signal in the range dimension. Extract the target range, radar cross section amplitude, and Doppler frequency shift from the peak position of the transform result to form the echo characteristics at the current sampling time.
4. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, The method of determining whether a target is a living organism by using Kalman filter residuals for likelihood ratio testing based on echo characteristics includes: A Kalman filter state-space model of the target's radial motion is constructed, including state equations and observation equations; the formula for the state equations is: The formula for the observation equation is: ; where, state vector , For the target distance, Let be the radial velocity; F be the state transition matrix; H be the observation matrix; define process noise and observation noise; the process noise covariance matrix is Q; and the observation noise covariance matrix is R. Kalman filtering is performed sequentially for state prediction and covariance prediction. The difference between the actual observed value and the predicted observed value is used to calculate the residual at the current time, and the covariance matrix corresponding to the residual is calculated. A log-likelihood ratio test statistic is constructed, and the residual covariance under the assumptions of non-living organisms and living organisms is substituted to complete the calculation and obtain the likelihood ratio test value. A decision threshold is set. When the likelihood ratio test value is greater than the decision threshold, the target is determined to be a living organism; otherwise, the target is determined not to be a living organism.
5. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, When the target is a living organism, the acquisition of image data within the monitoring area includes: The system retrieves pre-configured image capture parameters, opens frontal and overhead shooting angles, captures images of targets within the monitoring area, continuously collects multiple frames of continuous images to obtain the original images; the original images are pre-processed to remove noise interference and form image data.
6. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, The lightweight butterfly recognition model is constructed by performing inference operations on image data at the local edge to obtain valid image data containing the butterfly target and meeting the verification requirements, including: A lightweight butterfly recognition model is built based on the YOLOv11 object detection architecture. The model is trained using a dataset labeled with key butterfly features. After training, the model parameters and computational cost are compressed through structured pruning, INT8 quantization, and operator fusion. The model is then converted into an NCNN inference format suitable for embedded devices and deployed to a local edge inference engine. The original input image is preprocessed and input into the lightweight butterfly recognition model to complete forward inference. The model outputs the bounding box coordinates, target confidence, and coarse species classification results for all candidate targets in the image. Overlapping and redundant detection boxes are removed using a non-maximum suppression algorithm, and valid image data of butterfly targets with confidence scores higher than a preset threshold are selected. The image clarity, target occlusion ratio, butterfly shooting angle compliance, and effective target image ratio of the valid image data are calculated sequentially. Multi-dimensional quality verification is performed, and the valid image data after successful verification is output.
7. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, The process of identifying butterfly species based on the valid image data, and obtaining the identification result, includes: Geometric morphological features and texture distribution features are extracted from valid image data. The geometric morphological features include the overall length-to-width ratio of the wing, the ratio of the perimeter to the area, the curvature distribution of each segment of the wing margin, and the relative positional relationship of the wing vein nodes. The texture distribution features include the gray-scale statistical regularity of different wing zones, the number and area ratio of spots and patches, and the statistical feature value of texture thickness. All feature parameters are combined to form a feature sequence to be identified. Retrieve the standard feature templates of all registered species in the butterfly species database. Each type of butterfly corresponds to a set of calibrated standard feature sequences and species attribute information. Calculate the difference between the feature sequence to be identified and the standard template of each type in the database to obtain the matching difference value for each type of butterfly. The lower the value, the higher the degree of matching. Sort all categories by matching difference values in ascending order, and select the category with the smallest difference value as the identification result.
8. The butterfly detection and identification method based on edge computing according to claim 1, characterized in that, Based on the identification results, directional attraction signals and attractant odors are output to the monitoring area to actively attract butterflies, capture multi-view images, and form ecological observation data, including: By using a combination of ultraviolet and warm yellow light to output visual attraction signals, matching the spectral sensitivity range of butterfly compound eyes, and simulating the light color and reflective characteristics of flower sources, the system controls the release of attraction odors containing volatile nectar from flowers and specific pheromones to achieve targeted attraction of butterflies' foraging and courtship behaviors. During the attraction process, the system collects multi-view continuous images of the target and records the duration of the target's activities and behavioral patterns within the monitoring area, forming ecological observation data.
9. The butterfly detection and identification method based on edge computing according to claim 8, characterized in that, The controlled release of an attractive scent comprising nectar-scented floral volatiles and specific pheromones is used to target and attract butterflies during their foraging and courtship behaviors, including: Based on the identification results, two sets of behavioral parameters for the target butterfly species are retrieved from the species parameter database, including nectar source floral volatiles and specific pheromones. The nectar source floral volatiles include half-maximum response concentration, response curve kurtosis coefficient, and maximum foraging response intensity. The specific pheromones include half-maximum response concentration, response curve kurtosis coefficient, and maximum courtship response intensity. The behavioral response intensity of butterflies to two types of attractants follows a saturation-dose response law. Based on this, the correspondence between the concentration of nectar volatiles and the intensity of foraging response, and the correspondence between the concentration of pheromones and the intensity of courtship response were obtained. The total concentration of the attractant released by the device in a single run is set to a fixed value, and the sum of the concentrations of the two types of attractants equals the total concentration. With the optimization objective of maximizing the sum of the behavioral response intensities of the two types of attractants, an extreme value solution method with equality constraints is used to ensure that the marginal response increments of the two types of attractants are equal. Combined with the total concentration constraint, the optimal release concentrations of each type of attractant are calculated, and the release ratio of the nectar source fragrance volatiles to the specific pheromones is obtained. According to the release ratio, the on / off time and unit flow rate of the two release valves are controlled respectively, and the mixed attractant odor is released into the monitoring area after mixing.
10. A butterfly monitoring and identification system based on edge computing, using the butterfly monitoring and identification method based on edge computing according to any one of claims 1-9, characterized in that, include: Echo signal acquisition module: includes: an echo signal acquisition unit that transmits radar beams to the monitoring area, receives echo signals reflected by objects, performs preprocessing, and obtains beat echo signals; Organism identification module: includes: echo resolution unit to resolve beat echo signals and obtain echo characteristics; organism identification unit to perform likelihood ratio test based on echo characteristics using Kalman filter residuals to determine whether the target is an organism; Effective image data calculation module: includes: image data acquisition unit, which acquires image data within the monitoring area when the target is a living organism; effective image data calculation unit, which constructs a lightweight butterfly recognition model, performs inference operations on the image data at the local edge, and obtains effective image data that contains the butterfly target and meets the verification requirements. Active attraction module: includes: a species identification unit that identifies the species of butterflies based on the valid image data and obtains the identification result; and an active attraction unit that outputs directional attraction signals and attraction odors to the monitoring area based on the identification result to actively attract butterflies.