Mosquito recognition method, electric appliance box anti-insect method, device, system and electric appliance box

CN122841904APending Publication Date: 2026-09-29GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611131284.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]为了克服现有技术的不足,本申请提供一种蚊虫识别方法、电器盒防虫方法、装置、系统及电器盒,以解决不同大小的蚊虫进入空调电器盒导致短路、故障以及现有电器盒防虫方式防虫效果差甚至影响空调可靠性的问题

Benefits of technology

本申请技术方案提供一种蚊虫识别方法、电器盒防虫方法、装置、系统及电器盒。通过实时捕获红外图像并同时提取空间维度的形态特征与时间维度的振翅热波动时序特征,充分融合了蚊虫的静态轮廓信息和动态热力学行为信息,比单一特征识别更具区分度和抗干扰能力;随后将两类特征拼接并经降维压缩为标准化的融合特征张量,既保留了关键判别信息,又去除了冗余噪声,降低了后续分类模型的计算负担;最终利用预训练的分类识别模型自动输出蚊虫类型,实现了全天候、非接触、高精度的智能鉴别,有效避免了可见光方案受光照、阴影和背景干扰的局限,为候选电器盒防虫提供了良好的基础,便于精准调整网格大小以及及时放电消灭蚊虫。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122841904A_ABST
    Figure CN122841904A_ABST
Patent Text Reader

Abstract

The application discloses a mosquito recognition method, an electric appliance box anti-mosquito method, device, system and electric appliance box, and belongs to the electric appliance protection field. The morphological and wing vibration thermal wave fluctuation double-dimensional characteristics of mosquitoes are captured through infrared thermal radiation, a standardized fusion tensor is combined with a pre-training classification model, high-robustness mosquito type accurate recognition is realized, and the recognition is not affected by the light environment. Meanwhile, a type weighted loss strategy is used to relieve sample imbalance and improve the recognition accuracy of rare species, and reliable type basis is provided for subsequent electric appliance box anti-mosquito. Further, the anti-mosquito device dynamically adjusts the high-voltage shock grid gap based on the recognition result, ensures the physical killing effectiveness of the recognized mosquitoes, and can timely restore the heat dissipation gap to reduce energy consumption and safety risks. The whole constitutes a closed-loop system from intelligent sensing, accurate recognition to differentiated protection, and significantly improves the autonomous anti-mosquito capability and operation reliability of the electric appliance box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electrical protection technology, and in particular, to a mosquito identification method, an insect prevention method for electrical boxes, a device, a system, and an electrical box. Background Technology

[0002] The air conditioner electrical box (containing core components such as control circuit boards, relays, and power modules) serves as the control center of the air conditioning system, and its operational reliability directly determines the lifespan of the air conditioning equipment. Inside the electrical box, the main board typically contains indicator lights (such as LEDs) to monitor the communication status between the main board and the display board through flashing. However, the light radiation characteristics of the indicator lights and the heat generated by the main board easily attract mosquitoes, causing them to enter the electrical box through the air inlet and leading to short circuits. This is especially common in tropical and subtropical regions, where mosquitoes (such as Culex and Aedes mosquitoes) entering the electrical box through the air inlet is a frequent cause of malfunctions. According to IDC's "2025 Global Air Conditioner Failure Analysis Report," short circuits in the electrical box caused by mosquito intrusion account for 12.7% of air conditioner after-sales problems (an average of over 8 million units per year), mainly manifesting as: 1. Circuit board corrosion (conductive due to mosquito body fluids); 2. Relay contact adhesion (blockage by mosquito debris); 3. Power module burnout (short-circuit current surge).

[0003] Currently, the mainstream insect control solutions on the market fall into two categories, both of which have significant technical flaws: I. Static Insect Net Installing a fixed-aperture metal / plastic mesh (typically 0.5mm) at the air inlet physically blocks insects. Its drawback is the lack of intelligent recognition capability: the fixed aperture cannot adapt to different insect sizes (mosquitoes are 0.3-0.8mm wide, flies are 1.5-2.0mm wide), thus failing to intercept small insects.

[0004] II. Electric Insect Repellent Module A high-voltage electric shock mesh (1500-2500V) is embedded in the air inlet; insects that touch the mesh are electrocuted and killed. However, this design has several drawbacks. First, it causes severe electrical interference: the high-voltage electric shock circuit shares a power supply with the electrical box, generating high-frequency electromagnetic noise that can lead to false triggering of the control circuit (such as relay malfunction). Second, it poses a safety risk: insufficient physical distance between the electric shock circuit and the electrical box (<10mm) can easily cause short circuits in humid environments. Third, to electrocute all insects, the mesh gap needs to be very small, which exacerbates heat dissipation problems in the air conditioner's electrical box and affects the reliability of the air conditioner. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, this application provides a mosquito identification method, an insect prevention method for electrical boxes, a device, a system, and an electrical box, to solve the problems of short circuits and malfunctions caused by mosquitoes of different sizes entering the air conditioner electrical box, as well as the poor insect prevention effect of existing electrical box insect prevention methods, which may even affect the reliability of the air conditioner.

[0006] The technical solution adopted by this application to solve its technical problem is: Firstly, a mosquito identification method is provided, including: Infrared thermal radiation signals of the monitored area are captured in real time to obtain infrared images; The spatial morphological features and the temporal thermal fluctuation features of the flapping wings are extracted from the infrared images, respectively. The morphological features and the temporal features of the flapping thermal fluctuations are spliced ​​together and then dimensionality reduced and fused to obtain a standardized fused feature tensor; The fused feature tensor is input into the pre-trained classification and recognition model to output the mosquito type.

[0007] As an optional implementation of this application, the step of extracting spatial dimensional morphological features from the infrared image includes: For each frame of infrared image, the candidate threshold traversal range is determined based on the ambient temperature, and the step size during traversal is also determined; wherein, the candidate threshold traversal range is the absolute value of the difference between the ambient temperature and the ambient temperature is less than the preset temperature change value. Multiple discrete temperature values ​​are obtained based on the step size and the candidate threshold traversal range; Calculate the inter-class variance for each discrete temperature; The discrete temperature that maximizes the inter-class variance will be used as the target segmentation threshold. The foreground and background of the infrared image are determined based on the target segmentation threshold; Foreground morphological features are extracted based on segmentation, including area, aspect ratio, and convex hull ratio.

[0008] As an optional implementation of this application, the step of extracting the temporal features of wing flapping thermal fluctuations from the infrared image includes: The average temperature of the mosquito target outline region is continuously collected at a fixed frame rate, and the average temperature is spliced ​​in time order to generate a one-dimensional temperature time series, wherein the mosquito target outline region is determined based on the morphological features of the spatial dimension. Perform multi-level wavelet packet decomposition on the one-dimensional temperature time series to separate the low-frequency effective feature components from the high-frequency environmental noise components; Remove high-frequency environmental noise components and reconstruct the effective signal; The optimal spectrum is recalculated based on the reconstructed effective signal, and the thermal fluctuation dominant frequency and spectral energy entropy are output, where the thermal fluctuation dominant frequency is the frequency corresponding to the maximum spectral energy value. The one-dimensional time-series feature vector obtained by splicing the thermal wave dominant frequency and the spectral energy entropy is used as the time-series feature of the wing-vibrating thermal wave.

[0009] As an optional implementation of this application, the step of concatenating and dimensionally reducing the morphological features and the temporal features of the flapping thermal fluctuations to obtain a standardized fused feature tensor includes: The morphological features and the temporal features of the flapping thermal fluctuations of each frame of infrared image are spliced ​​together end to end to generate the original fused feature vector; A data matrix is ​​constructed based on the original fused feature vectors of all infrared images, where each row of the data matrix is ​​a sample and each column is a feature. Calculate the eigencovariance matrix of the data matrix; The eigenvalues ​​and eigenvectors are obtained by performing eigenvalue decomposition on the feature covariance matrix. The feature vectors are arranged in descending order of feature values, and the cumulative variance contribution rate is calculated based on the feature values. Only feature vectors with a cumulative variance contribution rate greater than a threshold are retained for noise reduction; The original features after noise reduction are compressed to a fixed length to obtain a standardized fused feature tensor.

[0010] As an optional implementation of this application, it also includes: When training the classification and recognition model, obtain the percentage of each class of samples in the training samples relative to the total number of samples; The type weight is determined based on the percentage, wherein the lower the percentage, the higher the type weight; After each round of training, the predicted type loss for each type is calculated based on the output of the classification and recognition model; Multiply the prediction type loss for each type by the corresponding type weight to obtain the weighted prediction type loss; The average of the weighted prediction type losses for all types is used to obtain the actual loss for this round of training. The classification and recognition model is adjusted based on the actual loss.

[0011] Secondly, a method for preventing insects from entering an electrical appliance box is provided, including: When the presence of mosquitoes is confirmed, power is supplied to the high-voltage electric shock grid; When determining the mosquito type, the mosquito size is obtained based on the mosquito type, and the mosquito type is determined based on any of the mosquito identification methods described above; The mesh spacing of the high-voltage electric shock grid is adjusted based on the size of the mosquito so that the mesh spacing is smaller than the size of the mosquito.

[0012] As an optional implementation of this application, it also includes: Get the status of mosquitoes; When the mosquito is dead, the gaps in the high-voltage electric shock grid are restored to the distance corresponding to the heat dissipation mode, and power supply to the high-voltage electric shock grid is stopped.

[0013] Thirdly, a mosquito identification device is provided, comprising: The infrared image acquisition module is used to capture infrared thermal radiation signals of the monitored area in real time to obtain infrared images; The image feature extraction module is used to extract spatial morphological features and temporal wing-beating thermal fluctuation time-series features from the infrared image, respectively. The image feature processing module is used to concatenate the morphological features and the temporal features of the flapping thermal fluctuations and then reduce their dimensions to obtain a standardized fusion feature tensor. The mosquito type identification module is used to input the fused feature tensor into the pre-trained classification and identification model to output the mosquito type.

[0014] Fourthly, an insect-proof device for an electrical appliance box is provided, comprising: The grid power supply control module is used to supply power to the high-voltage electric grid when the presence of mosquitoes is detected; A mosquito size determination module is used to obtain the mosquito size based on the mosquito type when determining the mosquito type, wherein the mosquito type is determined based on any of the mosquito identification methods described above; A grid gap control module is used to adjust the grid gap of the high-voltage electric shock grid based on the size of the mosquito, so that the grid gap is smaller than the size of the mosquito.

[0015] Fifthly, a mosquito identification system is provided, comprising: At least one first processor and at least one first memory; The first memory stores the executable instructions of the first processor; The first processor is configured to perform the mosquito identification method described in any of the preceding claims.

[0016] Sixthly, an insect-proof system for an electrical appliance box is provided, comprising: At least one second processor and at least one second memory; The second memory stores the executable instructions of the second processor; The second processor is configured to perform the above-described insect-proofing method for the electrical box.

[0017] Seventhly, an electrical box is provided, including the aforementioned electrical box insect prevention system.

[0018] Beneficial effects: This application provides a mosquito identification method, an insect-repelling method for an electrical box, an apparatus, a system, and an electrical box. By capturing infrared images in real time and simultaneously extracting spatial morphological features and temporal features of wing-beat thermal fluctuations, it fully integrates the static contour information and dynamic thermodynamic behavior information of mosquitoes, which is more discriminative and anti-interference than single feature recognition. Subsequently, the two types of features are spliced ​​and compressed into a standardized fusion feature tensor through dimensionality reduction, which retains key discrimination information and removes redundant noise, reducing the computational burden of subsequent classification models. Finally, the pre-trained classification and recognition model is used to automatically output the mosquito type, achieving all-weather, non-contact, and high-precision intelligent identification. This effectively avoids the limitations of visible light schemes due to light, shadow, and background interference, providing a good foundation for insect repelling candidate electrical boxes, facilitating precise adjustment of grid size and timely discharge to eliminate mosquitoes. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of a mosquito identification method provided in an embodiment of this application; Figure 2 This is a flowchart illustrating the extraction of spatial dimensional morphological features from an infrared image, as provided in an embodiment of this application. Figure 3 This is a flowchart illustrating the temporal characteristics of wing-flapping thermal fluctuations from infrared images, as provided in an embodiment of this application. Figure 4 This is a flowchart of an embodiment of the present application that shows how to obtain a standardized fused feature tensor by splicing morphological features and temporal features of wing flapping thermal fluctuations and then reducing and fusing them. Figure 5 This is a flowchart of an insect-proofing method for an electrical appliance box provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a mosquito identification device provided in an embodiment of this application; Figure 7 This is a schematic diagram of an insect-proof device for an electrical appliance box provided in an embodiment of this application; Figure 8 This is a schematic diagram of the structure of a mosquito identification system provided in an embodiment of this application; Figure 9 This is a schematic diagram of an insect-proof system for an electrical appliance box provided in an embodiment of this application; Figure 10 This is a schematic diagram of an insect prevention system for an air conditioner appliance box provided in an embodiment of this application; Figure 11 This is a schematic diagram of a motor stretched mesh structure provided in an embodiment of this application; Figure 12 This is a flowchart of an end-to-end classification process for an AI deep learning model provided in an embodiment of this application; Figure 13 This is a block diagram of a grid-independent power supply control provided in an embodiment of this application; Figure 14 This is a schematic diagram of an oscillator power supply provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] Reference Figure 1 This application provides a mosquito identification method, including: S11: Real-time capture of infrared thermal radiation signals in the monitored area to obtain infrared images; For example, an infrared detector camera is used to acquire infrared images of the detection area.

[0023] Mosquitoes continuously radiate infrared energy through metabolism, while environmental objects mainly emit thermal radiation at room temperature. There is a fixed temperature difference between the two. The infrared detector converts different radiation powers into analog voltage signals, which are then converted into grayscale pixel thermal imaging data by the onboard ADC analog-to-digital converter. The pixel grayscale value directly maps the radiation temperature of the target surface.

[0024] S12: Extract spatial morphological features and temporal thermal fluctuation time sequence features of wing flapping from the infrared image, respectively. like Figure 2 As shown, the extraction of spatial dimensional morphological features from the infrared image includes: For each frame of infrared image, the candidate threshold traversal range is determined based on the ambient temperature, and the step size during traversal is also determined. The candidate threshold traversal range is defined as the absolute value of the difference between the candidate threshold and the ambient temperature being less than a preset temperature change value. For example, if the ambient temperature is T_{env}, a base threshold T is determined based on the ambient temperature. th The baseline threshold is positively correlated with ambient temperature; for example, T th =T env +2℃, the preset temperature change value ΔT is a set value, set based on actual needs; [T] th -ΔT,T th +ΔT], the step size δ depends on the temperature resolution and should be set according to actual needs.

[0025] Multiple discrete temperature values ​​are obtained based on the step size and the candidate threshold traversal range; that is, within [T th -ΔT,T th Within the range of +ΔT], a discrete temperature value is selected as a candidate threshold for each δ, and the foreground and background are determined based on the candidate thresholds.

[0026] Calculate the inter-class variance for each discrete temperature; inter-class variance σ 2 B (t) is defined as: σ 2 B (t)=ω f (t)*ω b (t)*[μ f (t)-μ b (t)] 2 The total number of pixels is N; The number of pixels n with temperature value i i Frequency p i =n i / N; The proportion of foreground pixels to total pixels: ω f (t)= ; Background pixel ratio: ω b (t)=1-ω f (t); Foreground average temperature: μ f (t)= ; Background average temperature: μ b (t)= ; Average temperature across the entire map: μ T = ; The discrete temperature that maximizes the inter-class variance will be used as the target segmentation threshold. The foreground and background of the infrared image are determined based on the target segmentation threshold; values ​​less than the target segmentation threshold are considered background, and values ​​greater than or equal to the target segmentation threshold are considered foreground.

[0027] Foreground morphological features are extracted based on segmentation, including area, aspect ratio, and convex hull ratio.

[0028] like Figure 3 As shown, the extraction of temporal features of wing flapping thermal fluctuations from the infrared image includes: The average temperature of the mosquito target outline region is continuously collected at a fixed frame rate. The mosquito target outline region is determined based on the morphological features of the spatial dimension, that is, the mosquito target outline region can be roughly determined based on the morphological features. The average temperatures are spliced ​​together in chronological order to generate a one-dimensional temperature time series. The average temperatures of the region for a preset number of consecutive frames are then arranged in chronological order to obtain a one-dimensional temperature time series.

[0029] Perform multi-level wavelet packet decomposition on the one-dimensional temperature time series to separate the low-frequency effective feature components from the high-frequency environmental noise components; Remove high-frequency environmental noise components and reconstruct the effective signal; The optimal spectrum is recalculated based on the reconstructed effective signal, and the thermal fluctuation dominant frequency and spectral energy entropy are output, where the thermal fluctuation dominant frequency is the frequency corresponding to the maximum spectral energy value. The one-dimensional time-series feature vector obtained by splicing the thermal wave dominant frequency and the spectral energy entropy is used as the time-series feature of the wing-vibrating thermal wave.

[0030] It should be noted that the mechanical wingbeats of Aedes mosquitoes can reach 200-500Hz, but infrared thermography samples the average temperature of a region and cannot capture high-frequency mechanical vibrations at the millisecond level. However, the high-frequency wingbeats of mosquitoes cause the body surface temperature to fluctuate periodically in an envelope pattern. Infrared detectors, limited by their thermal response time (millisecond level) and regional average sampling, naturally filter out high-frequency components and only output low-frequency envelopes. In this way, the macroscopic temperature changes caused by heat dissipation from the body surface are integrated into low-frequency thermal fluctuations of 15-25Hz, which can effectively identify mosquito species.

[0031] Understandably, the core reason for using spatial and temporal features for bimodal fusion identification is that single-dimensional features are insufficient to reliably distinguish mosquito species in complex field environments, while bimodal features can construct complementary discrimination criteria from two orthogonal dimensions of space and time, greatly reducing false alarm and false negative rates.

[0032] S13: After splicing the morphological features and the temporal features of the flapping thermal fluctuations, the dimensionality is reduced and fused to obtain a standardized fused feature tensor; like Figure 4As shown, the step of concatenating and dimensionally reducing the morphological features and the temporal features of the wing-beating thermal fluctuations to obtain a standardized fused feature tensor includes: The morphological features and the temporal features of the wing flapping thermal fluctuations of each infrared image frame are concatenated end-to-end to generate the original fused feature vector. The original dimensionality is highly redundant due to the large number of features, exhibiting feature correlation redundancy, which is detrimental to the convergence of the deep learning model. Therefore, this application requires dimensionality reduction processing. A data matrix is ​​constructed based on the original fused feature vectors of all infrared images, where each row of the data matrix is ​​a sample and each column is a feature; where a sample refers to an original fused feature vector. Calculate the characteristic covariance matrix of the data matrix; in some embodiments, the covariance matrix also needs to be standardized.

[0033] The eigenvalues ​​and eigenvectors are obtained by performing eigenvalue decomposition on the feature covariance matrix. The feature vectors are arranged in descending order of feature values, and the cumulative variance contribution rate is calculated based on the feature values. Only feature vectors with a cumulative variance contribution rate greater than a threshold are retained for noise reduction; The original features after noise reduction are compressed to a fixed length to obtain a standardized fused feature tensor.

[0034] After tensor format standardization, it can be directly used as input data for deep learning mosquito classification models such as CNN and fully connected neural networks to achieve subsequent classification and recognition.

[0035] S14: Input the fused feature tensor into the pre-trained classification and recognition model to output the mosquito type.

[0036] The specific structure of the classification and recognition model is set according to actual needs, such as using CNN, neural network, or other models.

[0037] It should be noted that during the training of the classification and recognition model, when the number of various mosquitoes in the samples used is inconsistent, or even differs significantly, the following may also be included: When training the classification and recognition model, obtain the percentage of each class of samples in the training samples relative to the total number of samples; The type weight is determined based on the percentage, wherein the lower the percentage, the higher the type weight; After each round of training, the predicted type loss for each type is calculated based on the output of the classification and recognition model; Multiply the prediction type loss for each type by the corresponding type weight to obtain the weighted prediction type loss; The average of the weighted prediction type losses for all types is used to obtain the actual loss for this round of training. The classification and recognition model is adjusted based on the actual loss.

[0038] This application's approach assigns higher loss weights to mosquito types with low sample proportions, forcing the model to pay more attention to the identification error of rare categories when updating parameters. This effectively alleviates the majority class bias problem caused by class imbalance and significantly improves the detection rate of rare mosquito species and the overall classification generalization ability.

[0039] The mosquito identification method provided in this application captures the radiation signals of live mosquitoes in real time using infrared thermal imaging. It combines spatial morphological features (area, aspect ratio, convex hull ratio) with temporal features of wing-flapping thermal fluctuations (dominant frequency and spectral energy entropy) to construct a complementary dynamic-static dual-modal discrimination system, effectively overcoming the problem of insufficient discrimination of single features in complex environments. Simultaneously, it employs inter-class variance adaptive segmentation and wavelet packet denoising to improve feature purity, and then uses principal component reduction to compress the data into a standard tensor, reducing the computational burden on the model. To address the imbalance of training sample classes, an inverse weighted loss strategy is introduced, focusing the model on the identification of rare mosquito species, significantly improving classification accuracy and generalization ability. The overall solution achieves all-weather, non-contact, and highly robust intelligent mosquito identification, providing reliable technical support for insect control.

[0040] It should be noted that any process or method description in the flowchart or otherwise described herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order according to the functions involved, as should be understood by those skilled in the art to which the embodiments of this application pertain.

[0041] Furthermore, in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0042] like Figure 5 As shown in the figure, this application provides a method for preventing insects from entering an electrical appliance box, including: S21: When the presence of mosquitoes is confirmed, power is supplied to the high-voltage electric shock grid. The high-voltage electric shock grid is located at the air inlet of the electrical box to prevent mosquitoes from entering the electrical box and to release high voltage to kill mosquitoes. When no mosquitoes are detected, the gaps in the high-voltage electric shock grid are larger to facilitate heat dissipation.

[0043] S22: When determining the mosquito type, the mosquito size is obtained based on the mosquito type, wherein the mosquito type is determined based on the mosquito identification method described above; The grid spacing can be adjusted based on actual needs.

[0044] S23: Adjust the mesh gap of the high-voltage electric shock grid based on the size of the mosquito so that the mesh gap is smaller than the size of the mosquito.

[0045] Also includes: Get the status of mosquitoes; When the mosquito is dead, the gaps in the high-voltage electric shock grid are restored to the distance corresponding to the heat dissipation mode, and power supply to the high-voltage electric shock grid is stopped.

[0046] The insect-proofing method for electrical boxes provided in this application obtains the target insect size based on the aforementioned mosquito identification results, and dynamically adjusts the gap of the high-voltage electric shock grid accordingly to make it smaller than the mosquito size. This achieves adaptive and precise killing of different mosquito species, avoiding the problems of small mosquitoes being missed due to excessively large fixed grid gaps or heat dissipation being affected by excessively small gaps. Simultaneously, after confirming the death of a mosquito, the grid is automatically restored to the heat dissipation mode gap and power supply is stopped. This ensures the ventilation and heat dissipation efficiency of the electrical box under normal conditions while significantly reducing the energy consumption and safety risks of high-voltage electric shock. This method integrates a complete closed-loop control process of "mosquito detection - type identification - size adaptation - targeted killing - state reset," enabling the insect-proofing action to intelligently switch according to the mosquito type and survival status. While ensuring the protective effect, it also takes into account energy saving and equipment operational reliability, providing an efficient active defense means for the long-term stable operation of the electrical box.

[0047] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the mosquito identification method or the insect prevention method for electrical boxes provided in any of the above embodiments.

[0048] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0049] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0050] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0051] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0052] The computer-readable storage medium provided in this application embodiment stores a computer program. When executed by a processor, the computer program implements the steps of the mosquito identification method or the appliance box insect prevention method provided in any of the above embodiments. By capturing the morphological and wing-flapping thermal fluctuation characteristics of mosquitoes through infrared thermal radiation, and combining standardized fusion tensors with a pre-trained classification model, highly robust and accurate mosquito type identification is achieved, unaffected by lighting conditions. Simultaneously, a type-weighted loss strategy is used to alleviate sample imbalance and improve the identification accuracy of rare species, providing a reliable type basis for subsequent appliance box insect prevention. Furthermore, the insect prevention device dynamically adjusts the gap of the high-voltage electric shock grid based on the identification results, ensuring the effectiveness of physical extermination of identified mosquitoes and promptly restoring the heat dissipation gap to reduce energy consumption and safety risks. Overall, this constitutes a closed-loop system from intelligent sensing and accurate identification to differentiated protection, significantly improving the appliance box's autonomous insect prevention capability and operational reliability.

[0053] Based on the same inventive concept, this application provides a mosquito identification device 60, comprising: The infrared image acquisition module 61 is used to capture the infrared thermal radiation signal of the monitored area in real time and obtain an infrared image. For example, an infrared detector camera is used to acquire infrared images of the detection area.

[0054] Mosquitoes continuously radiate infrared energy through metabolism, while environmental objects mainly emit thermal radiation at room temperature. There is a fixed temperature difference between the two. The infrared detector converts different radiation powers into analog voltage signals, which are then converted into grayscale pixel thermal imaging data by the onboard ADC analog-to-digital converter. The pixel grayscale value directly maps the radiation temperature of the target surface.

[0055] Image feature extraction module 62 is used to extract spatial morphological features and temporal wing thermal fluctuation time sequence features from the infrared image, respectively. The extraction of spatial dimensional morphological features from the infrared image includes: For each frame of infrared image, the candidate threshold traversal range is determined based on the ambient temperature, and the step size during traversal is also determined. The candidate threshold traversal range is defined as the absolute value of the difference between the candidate threshold and the ambient temperature being less than a preset temperature change value. For example, if the ambient temperature is T_{env}, a base threshold T is determined based on the ambient temperature. th The baseline threshold is positively correlated with ambient temperature; for example, T th =T env +2℃, the preset temperature change value ΔT is a set value, set based on actual needs; [T] th -ΔT,T th +ΔT], the step size δ depends on the temperature resolution and should be set according to actual needs.

[0056] Multiple discrete temperature values ​​are obtained based on the step size and the candidate threshold traversal range; that is, within [T th -ΔT,T th Within the range of +ΔT], a discrete temperature value is selected as a candidate threshold for each δ, and the foreground and background are determined based on the candidate thresholds.

[0057] Calculate the inter-class variance for each discrete temperature; inter-class variance σ 2 B (t) is defined as: σ 2 B (t)=ω f (t)*ω b (t)*[μ f (t)-μ b (t)] 2 The total number of pixels is N; The number of pixels n with temperature value i i Frequency pi =n i / N; The proportion of foreground pixels to total pixels: ω f (t)= ; Background pixel ratio: ω b (t)=1-ω f (t); Foreground average temperature: μ f (t)= ; Background average temperature: μ b (t)= ; Average temperature across the entire map: μ T = ; The discrete temperature that maximizes the inter-class variance will be used as the target segmentation threshold. The foreground and background of the infrared image are determined based on the target segmentation threshold; values ​​less than the target segmentation threshold are considered background, and values ​​greater than or equal to the target segmentation threshold are considered foreground.

[0058] Foreground morphological features are extracted based on segmentation, including area, aspect ratio, and convex hull ratio.

[0059] The extraction of temporal features of wing-flapping thermal fluctuations from the infrared image includes: The average temperature of the mosquito target outline region is continuously collected at a fixed frame rate. The mosquito target outline region is determined based on the morphological features of the spatial dimension, that is, the mosquito target outline region can be roughly determined based on the morphological features. The average temperatures are spliced ​​together in chronological order to generate a one-dimensional temperature time series. The average temperatures of the region for a preset number of consecutive frames are then arranged in chronological order to obtain a one-dimensional temperature time series.

[0060] Perform multi-level wavelet packet decomposition on the one-dimensional temperature time series to separate the low-frequency effective feature components from the high-frequency environmental noise components; Remove high-frequency environmental noise components and reconstruct the effective signal; The optimal spectrum is recalculated based on the reconstructed effective signal, and the thermal fluctuation dominant frequency and spectral energy entropy are output, where the thermal fluctuation dominant frequency is the frequency corresponding to the maximum spectral energy value. The one-dimensional time-series feature vector obtained by splicing the thermal wave dominant frequency and the spectral energy entropy is used as the time-series feature of the wing-vibrating thermal wave.

[0061] It should be noted that the mechanical wingbeats of Aedes mosquitoes can reach 200-500Hz, but infrared thermography samples the average temperature of a region and cannot capture high-frequency mechanical vibrations at the millisecond level. However, the high-frequency wingbeats of mosquitoes cause the body surface temperature to fluctuate periodically in an envelope pattern. Infrared detectors, limited by their thermal response time (millisecond level) and regional average sampling, naturally filter out high-frequency components and only output low-frequency envelopes. In this way, the macroscopic temperature changes caused by heat dissipation from the body surface are integrated into low-frequency thermal fluctuations of 15-25Hz, which can effectively identify mosquito species.

[0062] Understandably, the core reason for using spatial and temporal features for bimodal fusion identification is that single-dimensional features are insufficient to reliably distinguish mosquito species in complex field environments, while bimodal features can construct complementary discrimination criteria from two orthogonal dimensions of space and time, greatly reducing false alarm and false negative rates.

[0063] Image feature processing module 63 is used to stitch together the morphological features and the temporal features of the flapping thermal fluctuations and then reduce their dimensions to obtain a standardized fusion feature tensor. The step of concatenating and dimensionality-reducing the morphological features and the temporal features of the flapping thermal fluctuations to obtain a standardized fused feature tensor includes: The morphological features and the temporal features of the wing flapping thermal fluctuations of each infrared image frame are concatenated end-to-end to generate the original fused feature vector. The original dimensionality is highly redundant due to the large number of features, exhibiting feature correlation redundancy, which is detrimental to the convergence of the deep learning model. Therefore, this application requires dimensionality reduction processing. A data matrix is ​​constructed based on the original fused feature vectors of all infrared images, where each row of the data matrix is ​​a sample and each column is a feature; where a sample refers to an original fused feature vector. Calculate the characteristic covariance matrix of the data matrix; in some embodiments, the covariance matrix also needs to be standardized.

[0064] The eigenvalues ​​and eigenvectors are obtained by performing eigenvalue decomposition on the feature covariance matrix. The feature vectors are arranged in descending order of feature values, and the cumulative variance contribution rate is calculated based on the feature values. Only feature vectors with a cumulative variance contribution rate greater than a threshold are retained for noise reduction; The original features after noise reduction are compressed to a fixed length to obtain a standardized fused feature tensor.

[0065] After tensor format standardization, it can be directly used as input data for deep learning mosquito classification models such as CNN and fully connected neural networks to achieve subsequent classification and recognition.

[0066] The mosquito type identification module 64 is used to input the fused feature tensor into the pre-trained classification and identification model to output the mosquito type.

[0067] The specific structure of the classification and recognition model is set according to actual needs, such as using CNN, neural network, or other models.

[0068] It should be noted that during the training of the classification and recognition model, when the number of various mosquitoes in the samples used is inconsistent, or even differs significantly, the following may also be included: When training the classification and recognition model, obtain the percentage of each class of samples in the training samples relative to the total number of samples; The type weight is determined based on the percentage, wherein the lower the percentage, the higher the type weight; After each round of training, the predicted type loss for each type is calculated based on the output of the classification and recognition model; Multiply the prediction type loss for each type by the corresponding type weight to obtain the weighted prediction type loss; The average of the weighted prediction type losses for all types is used to obtain the actual loss for this round of training. The classification and recognition model is adjusted based on the actual loss.

[0069] This application's approach assigns higher loss weights to mosquito types with low sample proportions, forcing the model to pay more attention to the identification error of rare categories when updating parameters. This effectively alleviates the majority class bias problem caused by class imbalance and significantly improves the detection rate of rare mosquito species and the overall classification generalization ability.

[0070] The mosquito identification device provided in this application captures the radiation signals of live mosquitoes in real time through infrared thermal imaging. It combines spatial morphological features (area, aspect ratio, convex hull ratio) with temporal characteristics of wing-flapping thermal fluctuations (dominant frequency and spectral energy entropy) to construct a complementary dynamic-static dual-modal discrimination system, effectively overcoming the problem of insufficient discrimination of single features in complex environments. Simultaneously, it employs inter-class variance adaptive segmentation and wavelet packet denoising to improve feature purity, and then uses principal component reduction to compress the data into a standard tensor, reducing the computational burden on the model. To address the imbalance of training sample classes, an inverse weighted loss strategy is introduced, allowing the model to focus on the identification of rare mosquito species, significantly improving classification accuracy and generalization ability. The overall solution achieves all-weather, non-contact, and highly robust intelligent mosquito identification, providing reliable technical support for insect control.

[0071] Based on the same inventive concept, such as Figure 7 As shown, this application embodiment provides an insect-proof device 70 for an electrical appliance box, comprising: The grid power supply control module 71 supplies power to the high-voltage electric shock grid when mosquitoes are detected. The high-voltage electric shock grid is located at the air inlet of the electrical box to prevent mosquitoes from entering the box and can release high voltage to kill mosquitoes. When no mosquitoes are detected, the gaps in the high-voltage electric shock grid are larger to facilitate heat dissipation.

[0072] The mosquito size determination module 72 is used to obtain the mosquito size based on the mosquito type when determining the mosquito type, wherein the mosquito type is determined based on any of the mosquito identification methods described above; The grid spacing can be adjusted based on actual needs.

[0073] The grid gap control module 73 is used to adjust the grid gap of the high-voltage electric shock grid based on the size of the mosquito, so that the grid gap is smaller than the size of the mosquito.

[0074] Also includes: Get the status of mosquitoes; When the mosquito is dead, the gaps in the high-voltage electric shock grid are restored to the distance corresponding to the heat dissipation mode, and power supply to the high-voltage electric shock grid is stopped.

[0075] The insect-repellent device for the electrical box provided in this application obtains the target insect size based on the aforementioned mosquito identification results, and dynamically adjusts the gap of the high-voltage electric shock grid accordingly to make it smaller than the mosquito size. This achieves adaptive and precise killing of different mosquito species, avoiding the problems of small mosquitoes being missed due to excessively large fixed grid gaps or heat dissipation being affected by gaps that are too small. Simultaneously, after confirming the death of a mosquito, the grid is automatically restored to the heat dissipation mode gap and power supply is stopped. This ensures the ventilation and heat dissipation efficiency of the electrical box under normal conditions while significantly reducing the energy consumption and safety risks of high-voltage electric shock. This method integrates a complete closed-loop control process of "mosquito detection - type identification - size adaptation - targeted killing - state reset," enabling the insect-repellent action to intelligently switch according to the mosquito type and survival status. While ensuring the protective effect, it also considers energy saving and equipment operational reliability, providing an efficient active defense means for the long-term stable operation of the electrical box.

[0076] Based on the same inventive concept, such as Figure 8 As shown, this application also provides a mosquito identification system 80, comprising: At least one first processor 81 and at least one first memory 82; The first memory stores the executable instructions of the first processor; The first processor is configured to execute the mosquito identification method provided in the above embodiments.

[0077] The mosquito identification system provided in this application stores executable instructions of a first processor in a first memory. When these instructions are executed, the first processor can capture the radiation signals of live mosquitoes in real time through infrared thermal imaging. Combining spatial morphological features (area, aspect ratio, convex hull ratio) with temporal features of wing-flapping thermal fluctuations (dominant frequency and spectral energy entropy), a complementary dynamic and static dual-modal discrimination system is constructed, effectively overcoming the problem of insufficient discrimination of single features in complex environments. Simultaneously, adaptive segmentation based on inter-class variance and wavelet packet denoising are used to improve feature purity, and principal component dimensionality reduction is applied to compress the features into a standard tensor, reducing the computational burden on the model. To address the imbalance of training sample classes, an inverse weighted loss strategy is introduced, allowing the model to focus on the identification of rare mosquito species, significantly improving classification accuracy and generalization ability. The overall solution achieves all-weather, non-contact, and highly robust intelligent mosquito identification, providing reliable technical support for insect control.

[0078] Based on the same inventive concept, such as Figure 9 As shown, this application also provides an insect-proof system 90 for an electrical appliance box, comprising: At least one second processor 91 and at least one second memory 92; The second memory stores the executable instructions of the second processor; The second processor is configured to perform the above-described insect-proofing method for the electrical box.

[0079] The insect-proof system for the electrical box provided in this application embodiment stores executable instructions of the second processor in a second memory. When the executable instructions are executed, the second processor can obtain the target insect size based on the aforementioned insect identification results and dynamically adjust the gap of the high-voltage electric shock grid accordingly, making it smaller than the insect size. This achieves adaptive and precise killing of different mosquito species, avoiding the problems of small insects being missed due to excessively large fixed grid gaps or heat dissipation being affected by gaps that are too small. Simultaneously, after confirming the death of an insect, the grid is automatically restored to the heat dissipation mode gap and power supply is stopped. This ensures the ventilation and heat dissipation efficiency of the electrical box under normal conditions while significantly reducing the energy consumption and safety risks of high-voltage electric shock. This method integrates a complete closed-loop control process of "insect detection - type identification - size adaptation - targeted killing - state reset," enabling the insect-proof action to intelligently switch according to the insect type and survival status. While ensuring the protective effect, it also considers energy saving and equipment operational reliability, providing an efficient active defense means for the long-term stable operation of the electrical box.

[0080] To more clearly illustrate the solution proposed in this application, a specific implementation method is provided below, and the system schematic diagram is as follows. Figure 10 As shown: I. Intelligent Mosquito Recognition Mechanism Based on Infrared Camera (I) Hardware Selection and Signal Acquisition Implementation 1. Infrared Imaging Hardware Configuration A high-sensitivity, uncooled focal plane infrared detector camera with precise 8-14μm response band locking is selected. The detector pixel array is matched with the back-end image processing computing power, and the detector's equivalent noise temperature difference (NETD) is ≤20mK, meeting the requirements for capturing weak thermal radiation from mosquitoes under a small temperature difference ΔT of 5-15℃ between mosquitoes and the environment. Mosquitoes continuously radiate infrared energy outward through metabolism, while environmental objects mainly emit room temperature thermal radiation. A fixed temperature difference exists between the two. The infrared detector converts different radiation powers into analog voltage signals, which are then converted into grayscale pixel thermal imaging data by an onboard ADC. The pixel grayscale value directly maps to the radiation temperature of the target surface.

[0081] 2. Thermal radiation signal capture and temperature calibration The camera captures the thermal radiation signals of mosquitoes and the environment (typical temperature difference ΔT = 5-15°C), and calculates the radiation power based on the Stefan-Boltzmann law (radiant power P ∝ εσT). 4 (where ε is the emissivity and σ is the Boltzmann constant). The system firmware has a built-in subroutine for calculating this formula. After the hardware acquires the original radiation voltage, it combines the photoelectric conversion coefficient of the detector calibrated at the factory to convert the pixel radiation power into the corresponding target thermodynamic temperature, and establishes a one-to-one mapping relationship between pixel grayscale, radiation power and target temperature.

[0082] Temperature calibration process: Real-time connection to an ambient temperature and humidity sensor (accuracy ±0.5°C) and a built-in blackbody calibration source (temperature setpoints 25°C and 35°C) is used. A multi-point linear regression algorithm is employed to eliminate environmental noise and sensor drift. After calibration, the thermal radiation data error is controlled within ±0.3°C, providing a reliable foundation for subsequent feature extraction.

[0083] (II) Implementation of the entire multi-point temperature calibration process The calibration is divided into two parts: online real-time environmental sensing calibration and built-in dual-temperature blackbody fixed-point calibration. The entire process is automatically executed by a microcontroller and an embedded FPGA, and is implemented in three steps: 1. External sensor data access: The device is equipped with an external high-precision integrated temperature and humidity sensor with a temperature measurement accuracy of ±0.5℃. The sensor uploads real-time environmental T_{env} and relative humidity data to the image processing unit every 200ms via the I2C bus. The device has a built-in miniature controllable blackbody calibration source with two preset standard points: a low temperature of 25℃ (normal temperature environmental reference) and a high temperature of 35℃ (close to the physiological body temperature of mosquitoes). The blackbody is temperature-controlled by a PTC heating element + PT100 closed-loop control with a temperature control accuracy of ±0.1℃.

[0084] 2. Multi-point linear regression calibration calculation ① During system idle periods (when no mosquitoes enter the monitoring field of view), the camera is pointed at the built-in blackbody, and the original pixel readings of the infrared detector are collected at two standard temperatures of 25℃ and 35℃ respectively, resulting in two sets of "standard temperature-original pixel grayscale" calibration samples. ②Simultaneously read the current ambient temperature measured by the environmental sensor, supplement the ambient temperature calibration points, and form ≥3 sets of multi-point calibration datasets; ③ The embedded algorithm uses the least squares method to complete multi-point linear regression, solves the system offset coefficient b and gain coefficient k, and obtains the correction formula: T_{real}=k·T_{raw}+b, where T_{raw} is the original infrared temperature measurement value and T_{real} is the true temperature after calibration. ④ The regression coefficients are refreshed and stored in the register in real time, and the temperature values ​​of all pixels in each frame of infrared image are corrected in real time to offset the imaging noise caused by infrared detector temperature drift and changes in ambient temperature and humidity.

[0085] 3. Closed-loop control of calibration error: After calibration, the temperature measurement error of the whole machine is stably controlled within ±0.3℃. All infrared images output to the feature extraction stage are valid data after temperature correction, eliminating the systematic error of mosquito thermal feature extraction caused by ambient temperature fluctuations and device aging drift.

[0086] II. Dynamic Feature Extraction and Dual-Modal Input Generation The infrared video stream data that has been collected and calibrated for temperature is divided into two parallel algorithm links: spatial dimension (single frame thermal profile) and temporal dimension (continuous frame thermal fluctuation time series). Morphological features and wing flapping time series features are extracted respectively. Finally, the data is dimensionality reduced and fused to generate a standardized tensor that can be used for deep learning.

[0087] (I) Thermal contour spatial feature extraction based on adaptive Otsu threshold segmentation: The mosquito target region is separated from a single-frame infrared thermal image, and morphological parameters such as area, aspect ratio, and convex hull ratio are extracted. The convex hull ratio typically refers to the ratio of convex hull areas to differentiate between Aedes and Culex mosquito species. The calculation formula is as follows: Convex hull ratio = Area of ​​the contour region / Area of ​​the convex hull of the contour Outline region area: The total area of ​​pixels belonging to the target region after the mosquito is binary segmented.

[0088] Convex hull area: Take all boundary points of the contour and calculate the area of ​​its smallest convex hull (i.e., the smallest convex polygon that can enclose all points). Intuitively, it's like tightly wrapping a mosquito in plastic wrap and counting the area of ​​the non-concave region.

[0089] Convex hull ratio: This ratio ≤ 1. The closer the ratio is to 1, the fuller the shape of the object, without deep or narrow depressions or bifurcations; the smaller the ratio, the deeper the depressions, fragmentation, or obvious segmentation of the insect body.

[0090] 1. The adaptive threshold filtering algorithm for mosquito pixels uses the real-time calibrated ambient temperature T_{env} as a benchmark and sets a basic segmentation threshold T. th =T_{env}+2℃, combined with adaptive Otsu's method to dynamically optimize the segmentation threshold: The Otsu algorithm traverses the temperature pixels of the entire frame image, taking the maximum inter-class variance as the optimization objective. The inter-class variance is the temperature value of all pixels in the infrared thermal image as a dataset, assuming the temperature range is [T min T max With quantization level L, for any candidate threshold t, the image is divided into two classes: Foreground (mosquitoes): Temperature ≥ t; Background (environment): Temperature <t。

[0091] The inter-class variance σ²B(t) is defined as: σ2B(t)=ωf(t)*ωb(t)*[μf(t)-μb(t)]2 The total number of pixels is N; The number of pixels n with temperature value i i Frequency p i =n i / N; The proportion of foreground pixels to total pixels: ω f (t)= ; Background pixel ratio: ω b (t)=1-ω f (t); Foreground average temperature: μ f (t)= ; Background average temperature: μ b (t)= ; Average temperature across the entire map: μ T = ; In T th The reason for fine-tuning the threshold nearby is that, in the actual algorithm, it does not traverse the entire graph to find the global optimum across all temperatures, but instead uses a prior base threshold T. th =T env Using +2℃ as the anchor point, Otsu optimization is performed within a narrow local search window. Specific steps: 1. Determine the search range: Set the temperature change range ΔT, then the candidate threshold traversal range is [T]. th -ΔT,T th +ΔT]. The step size δ depends on the temperature resolution and is typically taken as 0.1℃ or 0.05℃.

[0092] 2. Constructing a local histogram: While a full-map temperature histogram can be used directly, only the statistics within the search range used as the threshold are needed when calculating the inter-class variance. To improve efficiency, a cumulative sum array can be pre-calculated: P(k) = (Cumulative proportion), S(k) = (Cumulative weighted sum), then for candidate threshold t: ω b (t)=P(t-1), ω f (t)=1-ω b (t), μ b (t)=S(t-1) / ω b (t), μ f (t)=(S(T max )-S(t-1)) / ω f (t).

[0093] 3. Traverse and calculate the inter-class variance: For each discrete temperature value t in the interval, substitute it into the σ2B(t) formula and record the maximum value.

[0094] 4. Output optimization threshold: Take the value t that maximizes the inter-class variance as the final segmentation threshold T. opt : T opt= arg(max σ²B(t)); If the maximum variance corresponds to multiple thresholds, their average value is usually taken as the final value.

[0095] 5. If the inter-class variance of all candidate thresholds within the search window is extremely low (e.g., there is no obvious temperature rise target in the image), then degenerate back to the base threshold T. th To avoid incorrect segmentation.

[0096] Secondly, it automatically adapts to local environmental temperature interference (such as local airflow heating, hot spots from debris); areas with pixel temperatures greater than the optimized segmentation threshold are identified as effective target areas for mosquitoes, and the remaining pixels are marked as background, completing the binary image segmentation of mosquito foreground and environmental background. Contour feature parameter quantization calculation: ① Contour extraction: The Suzuki8 neighborhood contour search algorithm is used to filter valid closed contours within the image and remove invalid contours that are too small (dust thermal noise) or have abnormal shapes (zero heat dissipation spots). ② Contour Physical Conversion: Based on the pixel-to-actual-size mapping coefficient (cm / pixel) specified by the infrared camera manufacturer, the pixel area is converted into the actual physical area (unit: ...). Aedes fever profile area: Overall, they are small and slender; - Culex mosquito thermal outline area: Its body is robust and its outline is large; ③ Additional morphological parameters: The aspect ratio (long side / short side of the rectangle) is calculated based on the minimum bounding rectangle. The convex hull ratio is obtained by dividing the actual area of ​​the contour by the area of ​​the convex hull. Together, they form a spatial feature vector to supplement body shape details for further subdivision of categories.

[0097] (II) Extraction of thermal fluctuation time series features by STFT+wavelet packet decomposition: Using the thermal radiation time series signal composed of continuous infrared frames, extract the periodic temperature fluctuation features caused by the flapping of mosquito wings, and distinguish the differences in wing flapping behavior among different mosquitoes.

[0098] 1. Temporal signal construction: The average temperature of the mosquito target outline region was continuously collected at a fixed frame rate (≥50fps) and spliced ​​in chronological order to generate a one-dimensional temperature time series T(t). The sampling duration of the sequence was uniformly set to 0.5s, covering multiple wing-beat cycles of the mosquito. The high-speed wing-beat of the mosquito caused periodic changes in heat dissipation from the body surface, and the average temperature of the corresponding area showed periodic small fluctuations, forming a fundamental frequency thermal fluctuation of 5~30Hz (macroscopic temperature fluctuation captured by infrared thermometry, which is different from the microscopic 200~500Hz wing-beat mechanical frequency). Among them, the main peak of the macroscopic thermal fluctuation spectrum of Aedes mosquito is concentrated in the range of 15~25Hz.

[0099] 2. Short-Time Fourier Transform (STFT) Time-Frequency Analysis: The time-series signal is segmented and windowed using STFT operations. Hanning windows are used to suppress spectral leakage. The signal spectrum is solved segment by segment to obtain the frequency distribution matrix of temperature fluctuations and to initially extract the original fluctuation frequency components. However, the original time series contains environmental airflow disturbances and random high-frequency noise from the detector, resulting in a lot of spectral clutter, which requires noise reduction optimization.

[0100] 3. Wavelet Packet Decomposition (WPD) Denoising and Feature Output: A db4 wavelet basis is used to perform multi-level wavelet packet decomposition on the original time series, separating the low-frequency effective feature components from the high-frequency environmental noise components. The high-frequency noise subband is discarded, and the effective signal is reconstructed. Based on the denoised signal, the optimal spectrum is recalculated, ultimately outputting two types of time series features: Feature 1: Thermal fluctuation dominant frequency (Hz), i.e., the frequency corresponding to the maximum spectral energy; Feature 2: Spectral energy entropy, which characterizes the dispersion of energy distribution of thermal fluctuation signals and reflects the activity level and wing-beat stability of mosquitoes; the combination of main frequency and energy entropy forms a one-dimensional time-series feature vector.

[0101] Additional explanation: Aedes mosquitoes can vibrate their wings at frequencies of 200-500 Hz, but infrared thermography samples the average temperature of a region and cannot capture high-frequency mechanical vibrations at the millisecond level. Macroscopic temperature changes caused by heat dissipation from the body surface are integrated into low-frequency thermal fluctuations of 15-25 Hz, which are effective distinguishing features for infrared identification of mosquitoes.

[0102] (III) PCA Dimensionality Reduction and Construction of Bimodal 2D Tensor Input 1. Original feature concatenation: The multi-dimensional spatial features (area, aspect ratio, convex hull ratio, etc.) extracted from a single frame are concatenated with the frequency and energy entropy features extracted from the temporal dimension to generate a high-dimensional original fused feature vector. The original dimension has high redundancy due to the number of features, and there is feature correlation redundancy, which is not conducive to the convergence of deep learning models.

[0103] 2. PCA Principal Component Analysis: After standardizing and preprocessing the batch-collected mosquito raw feature dataset, PCA principal component analysis is performed. ① Solve for the eigencovariance matrix, eigenvalues, and eigenvectors; the calculation steps are as follows: (1) Preparing the data matrix: Assume that n mosquito samples (batch) are collected, and each sample is concatenated to obtain a d-dimensional feature vector (spatial features and frequency / energy entropy features concatenated end to end). Arrange these vectors in rows to form a data matrix X. Each row represents a sample, and each column represents a feature.

[0104] (2) Standardization (zero mean): To avoid the influence of dimensional differences on the principal component orientation, Z-score standardization (or at least zero mean) is performed on each feature column: (Mean of column j) = (Sample standard deviation)

[0105] The standardized matrix Z is obtained. The mean of each column is 0, and the standard deviation is 1.

[0106] (3) Calculate the covariance matrix: covariance matrix Its elements Let represent the covariance between the j-th feature and the k-th feature. For a zero-mean matrix Z, the covariance matrix is:

[0107] This involves multiplying the standardized data matrix by its transpose and then dividing by the degrees of freedom. If zero mean is used without dividing by the standard deviation, the covariance matrix reflects the variance-covariance structure at the original scale; after standardization, it is equivalent to the correlation matrix.

[0108] (4) Solving for eigenvalues ​​and eigenvectors: For the covariance matrix Perform eigenvalue decomposition: in: It is the j-th eigenvalue (scalar), representing the magnitude of the variance along the direction of the principal component; It is the corresponding eigenvector (dd-dimensional column vector), which represents the direction of the principal component and is usually normalized to a unit length; =1; In actual calculations, the eigenvalues ​​are sorted from largest to smallest: ... 0 Feature vector , ,..., This forms a new orthogonal basis.

[0109] Principal components were selected from highest to lowest based on their eigenvalue contribution rates. The method for calculating the contribution rate of eigenvalues ​​is as follows: Let all d eigenvalues ​​be... ... 0 Variance contribution rate of the j-th principal component Defined as: ×100% The denominator is the sum of all eigenvalues ​​(i.e., the total variance of the original data). This proportion directly reflects how much information from the original data the principal component retains (measured by variance).

[0110] Cumulative contribution rate Cumulative variance contribution rate of the first k principal components for: ×100% In actual screening, the numbers are incremented starting from k=1 until... ≥95%, the corresponding k is the number of principal components that need to be retained.

[0111] Retain principal components with a cumulative contribution rate ≥ 95%; ③ Compress the original features of any sample into a fixed-length 128-dimensional one-dimensional vector.

[0112] 3. Standardized Tensor Generation: The 128-dimensional one-dimensional feature vector after dimensionality reduction is normalized into a fixed-format tensor, namely a 128-row, 1-column two-dimensional tensor, to complete the fusion of spatial-temporal dual-modal features. After the tensor format is standardized, it can be directly used as input data for deep learning mosquito classification models such as CNN and fully connected neural networks to achieve subsequent AI classification and recognition.

[0113] III. End-to-end classification using AI deep learning models This section builds upon the [128,1] bimodal feature tensor obtained through PCA dimensionality reduction described earlier. It utilizes a lightweight dual-stream CNN-LSTM hybrid network to achieve end-to-end intelligent classification of mosquito species. (Refer to...) Figure 12 It is implemented from four dimensions: network architecture design, dataset training enhancement, loss function optimization, and lightweight model deployment, thus connecting the entire chain from feature input to AI inference to category output.

[0114] 3.1 Implementation of a Lightweight Dual-Stream CNN-LSTM Hybrid Network Architecture 3.1.1 The classification network is used to receive the 128-dimensional fused feature tensor obtained by principal component analysis dimensionality reduction and output the mosquito category prediction result. Its specific structure includes an input layer, a one-dimensional convolutional feature extraction module, a global average pooling layer and a fully connected classification layer.

[0115] Input Layer: The input layer receives a fused feature tensor Z of shape [128, 1], where 128 represents the feature dimension and 1 represents a single channel. The fused feature tensor Z is generated by concatenating spatial morphological features and temporal thermal fluctuation features and performing dimensionality reduction through principal component analysis. Each dimension corresponds to a principal component projection value. To adapt to one-dimensional convolution operations, the input layer reshapes the fused feature tensor Z into a one-dimensional single-channel signal of length 128.

[0116] One-dimensional convolutional feature extraction module: The one-dimensional convolutional feature extraction module consists of multiple cascaded one-dimensional convolutional blocks. Each one-dimensional convolutional block sequentially includes a one-dimensional convolutional layer, a batch normalization layer, a non-linear activation layer, and an optional one-dimensional max pooling layer. Wherein: The first one-dimensional convolutional block includes: a one-dimensional convolutional layer with a kernel size of 5, a stride of 1, and equal-length padding, which increases the number of input channels from 1 to 64 and outputs a feature map with 64 channels; a batch normalization layer; a ReLU activation function; and a one-dimensional max pooling layer with a pooling kernel size of 2, which downsamples the feature length from 128 to 64.

[0117] The second one-dimensional convolutional block includes: a one-dimensional convolutional layer with a kernel size of 3 and equal-length padding, which increases the number of input channels from 64 to 128; a batch normalization layer and a ReLU activation function; and a one-dimensional max pooling layer with a pooling kernel size of 2, which downsamples the feature length from 64 to 32.

[0118] The third one-dimensional convolutional block includes: a one-dimensional convolutional layer with a kernel size of 3 and equal-length padding, which increases the number of input channels from 128 to 256; a batch normalization layer and a ReLU activation function; and a one-dimensional max pooling layer with a pooling kernel size of 2, which downsamples the feature length from 32 to 16, and finally outputs a feature map with a shape of [16, 256].

[0119] The one-dimensional convolutional layer performs sliding convolution in the feature dimension direction, capturing the statistical correlation between adjacent principal components through the local receptive field, thereby extracting high-level abstract features reflecting the local interaction patterns of spatial morphology and temporal fluctuations. The gradual increase in the number of channels enables the network to learn hierarchical representations from low-level general features to high-level semantic features, while pooling operations increase the effective receptive field of subsequent convolutional layers while reducing feature resolution and parameter count.

[0120] Global average pooling layer: The global average pooling layer receives the [16, 256] feature map output by the one-dimensional convolutional feature extraction module, and calculates the average value of all time-step elements of each channel along the feature length dimension to generate a fixed-length feature vector with dimension 256. This operation eliminates the influence of feature length variation on subsequent classification layers, significantly reduces the parameter scale of the fully connected layer, and plays a structural regularization role to prevent overfitting.

[0121] Fully connected classification layer: The fully connected classification layer consists of two fully connected layers connected in sequence. The first fully connected layer maps the 256-dimensional feature vector to 128 dimensions, followed by a ReLU activation function and Dropout regularization with a probability of 0.3. The second fully connected layer maps the 128-dimensional features to several output neurons for each category, followed by a Softmax activation function to output the normalized probability distribution of each type of mosquito.

[0122] The network takes the category corresponding to the maximum value in the probability distribution as the final mosquito species identification result.

[0123] 3.1.2 Dataset Construction and Training Partitioning The training benchmark dataset contains 120,000+ labeled infrared mosquito samples. The dataset consists of: a publicly available open-source infrared mosquito thermal imaging dataset and a field-collected and labeled dataset. It is divided in a 7:2:1 ratio: training set 84,000+ samples, validation set 24,000+ samples, and test set 12,000+ samples.

[0124] Sample preprocessing: All features are standardized to the same dimension and uniformly converted into a [128,1] standard tensor to match the network input format; the labels are one-hot encoded to adapt to Softmax and loss function calculation.

[0125] 3.2 Specific Implementation of Data Augmentation during the Training Phase To address common issues in infrared imaging during field measurements, such as occlusion, ambient temperature drift, and random thermal noise, two types of targeted data augmentation are performed online in real-time on the training set. This expands sample diversity, improves model generalization ability, and ensures that the augmentation operations are performed in real-time before being fed into the network. Thermal radiation noise superposition enhances the simulation of dust obstruction, water vapor in the air, and random electrical noise interference from equipment: random thermal noise following a Gaussian distribution is superimposed on the original feature tensor, with the noise amplitude referencing the noise range of real infrared equipment, and the feature values ​​are randomly perturbed to equivalently simulate the scenario where the thermal outline of a mosquito is incomplete and the thermal fluctuation signal is distorted after a part of the mosquito is partially obscured by debris; local features are randomly zeroed to simulate the condition where part of the mosquito's body is out of the infrared field of view.

[0126] Temperature drift transformation enhances the identification of issues related to day-night temperature differences and sensor temperature drift in the target environment. It randomly shifts the temperature parameters bound to the original features by \Delta T\pm3℃: positive +1~3℃ and negative -1~3℃ to adjust the equivalent temperature value corresponding to the features. Simultaneously, it corrects the contour conversion and thermal fluctuation frequency correlation parameters, reproduces the feature shift caused by environmental temperature drift, and enables the model to accurately identify mosquito species under temperature disturbances.

[0127] 3.3 Design of Weighted Cross-Entropy Loss Function There is an inherent imbalance in the number of samples collected in the field: the Culex mosquito population is large and accounts for a high proportion of the sample, while Aedes mosquito, Anopheles mosquito, and midge samples are scarce. Conventional cross-entropy tends to favor categories with large sample sizes, resulting in lower accuracy for identifying smaller categories. Therefore, category-weighted cross-entropy Loss is introduced.

[0128] 3.3.1 Weighting rules Using Culex mosquitoes as the baseline class with a high proportion, the category weight of Culex mosquitoes is set to w_{Culex mosquito}=0.7; for Aedes mosquitoes, Anopheles mosquitoes, midges, etc., where the sample is scarce, the category weight is increased (e.g., w_{Aedes mosquito}=1.3, w_{Anopheles mosquito}=1.4). The weight is calculated inversely proportional to the sample proportion of each category: the lower the sample proportion, the higher the category weight.

[0129] 3.4 Model Compression and Edge Real-Time Inference Optimization After the model is trained, it is deployed on edge embedded devices such as Raspberry Pi 4B, performing end-to-end lightweight compression to meet storage and real-time performance requirements. 1. The multi-method model compression is performed sequentially: model pruning (removing redundant parameters with weights close to 0) → quantization compression (FP32 floating-point quantization to INT8 fixed-point) → weight sparsification. The final overall model size is compressed to <10MB, which meets the local storage limitations of edge devices. 2. Edge deployment and inference latency control: The ONNX+TensorRT / OpenVINO inference engine is used to accelerate model inference and is deployed on Raspberry Pi 4B hardware. After the mosquito feature tensor of a single frame is fed into the model, the end-to-end inference time is <50ms / frame, realizing real-time image acquisition by infrared camera and instant AI identification of mosquito species. The identification results are sent to the lower-level grid adjustment and control system in real time as the basis for adaptive parameter adjustment of mechanical structure.

[0130] IV. AI-based dynamic mesh gap adjustment mechanism Based on the signals detected by the infrared camera, AI intelligently identifies the type of insect and combines theoretical data on insect size from the cloud with the infrared camera detection data to derive the body characteristics (length Lmos, width Wmos) of the target mosquito.

[0131] 1. Grid size matching logic: In order to maximize the capture rate and prevent mosquitoes from escaping, the optimal grid side length ΔLopt should be slightly smaller than the minimum dimension of the mosquito (usually taken as 85%~90% of the mosquito width, i.e., the safety factor k≈0.85).

[0132] Calculation formula: ΔLopt=k×min(Lmos,Wmos).

[0133] If different types of mosquitoes are detected (e.g., Anopheles mosquitoes are larger, Culex mosquitoes are smaller), the system will set target spacing ΔX and ΔY in the horizontal and vertical directions respectively.

[0134] 2. Target displacement calculation: Assuming the current grid spacing is ΔLcurrent, it needs to be adjusted to the target grid spacing ΔLtarget. Linear displacement requirement: ΔL = |ΔLtarget - ΔLcurrent|. Direction determination: Based on the adjustment requirements (densification or sparseness), determine the rotation direction of the lead screw (forward or reverse).

[0135] 3. Mechanical Transmission Link and Hardware Implementation: The hardware utilizes a high-rigidity, low-friction NEMA 17 2026 standard stepper motor paired with a C5-grade ball screw to ensure micron-level positioning accuracy. Its motor's stretched mesh structure is as follows... Figure 11 As shown: (1) Transmission component configuration: The power source for the tensioning mechanism uses a NEMA 17 2026 standard stepper motor, characterized by a base step angle of 1.8∘, set to 1 / 32 subdivision. Steps per revolution (Nstep): 360∘ / (1.8∘ / 32) = 6400 steps / revolution. This setting not only improves the smoothness of motion but also eliminates low-frequency resonance, making it suitable for fine adjustment.

[0136] (2) The transmission mechanism uses a C5 grade ball screw. Its characteristic is that the lead (P) is 1.5 mm / revolution. The C5 grade precision ensures that the repeatability error is extremely small under long stroke. Surface treatment: DLC (diamond-like carbon) nano-coating, which reduces the coefficient of friction to 0.05, greatly reduces heat accumulation and wear, and ensures long-term operational stability.

[0137] (3) Load structure: The lead screw nut is directly embedded in the slide groove of the carbon fiber mesh frame. The carbon fiber material has a high strength-to-weight ratio and is insulating, avoiding the electromagnetic interference risk caused by the metal frame. Insulation fixation: The wire mesh is fixed at both ends of the frame by special high-voltage insulation clamps to ensure that the high-voltage electric field only acts on the mesh itself and is not conducted to the moving parts.

[0138] 4. Software Control Flow and Pulse Generation: The software calculates the target number of steps based on the required mesh size. The specific calculation is as follows: N = ΔL * Nstep / P Where N is the number of step pulses (target value); ΔL is the linear displacement (mm); P is the lead screw (1.5mm / revolution); and Nstep is the number of steps per revolution (6400 steps / revolution).

[0139] 5. (1) Bidirectional independent adjustment: X-axis (horizontal): Drives the first set of lead screws to adjust the horizontal wire spacing based on the lateral width of the mosquito. Y-axis (vertical): Drives the second set of lead screws to adjust the vertical wire spacing based on the longitudinal length of the mosquito.

[0140] (2) Overlapping forms a grid: Once both sets of wires reach their target positions, they intersect perpendicularly in space, forming a rectangular grid.

[0141] (3) Adaptive characteristics: When facing large mosquitoes (such as Anopheles mosquitoes): The system expands the mesh size to reduce power consumption while ensuring that large mosquitoes cannot pass through. For smaller mosquitoes (such as midges): the system quickly shrinks the mesh, reducing the aperture to prevent tiny insects from escaping.

[0142] V. Power Supply Control for Electric Shock Circuit independent power supply for the grid, reference Figure 13 .

[0143] like Figure 14 As shown, the oscillator is powered by a 5V lithium battery, which is stepped down to 3.3V by a linear regulator IC (LM2940-3.3).

[0144] The generated 3.3V is connected to the base of the PNP transistor. At this time, the emitter and collector of the transistor are not conducting. When the control chip outputs a low-level signal, the PNP transistor conducts, and the 3.3V power supply powers the NE555 oscillator, driving it to generate a 15kHz high-frequency square wave. This high-frequency square wave is then input to the primary winding of the high-frequency step-up transformer, resulting in an induced AC high voltage in the secondary winding: Vout = Vin × Nsec / Npri Where Vout is the induced AC high voltage of the secondary winding, and Vin is the input of the primary winding of the transformer. Nsec is the number of turns of the secondary winding coil, and Npri is the number of turns of the primary winding coil. Where Vin is 3.3V, and Nsec / Npri is 100:1, then the peak output of Vout is 330*1.414=466V AC.

[0145] This 466V AC high voltage is then rectified by voltage multiplication using two Schottky diodes (1N5819) and two capacitors (10nF). Voltage multiplier output value: VDC=2×VAC,peak-Vdiode-Vleakage Where: VAC,peak = 466 V (AC peak value), Vdiode = 0.3 V (Schottky diode forward voltage drop, 1N5819), Vleakage = 5% (capacitor leakage loss). Therefore, the total output is: VDC=2×466-0.3-(466×0.05)=932-0.3-23.3=908.4 V The output DC high voltage is connected to a high-voltage energy storage capacitor, and the stored energy is: E=1 / 2×CV2=0.5×10×10-9×(908.4)2=0.00413 J When a mosquito comes into contact with the grid, the capacitor discharges instantaneously, outputting a peak pulse of approximately 900V, ensuring that the mosquito is electrocuted.

[0146] 6. After the precise electric shock, restore the original mesh spacing and disconnect the power supply. After a mosquito is electrocuted, an infrared camera continuously scans the grid area, using an AI model to analyze the thermal outline area and thermal fluctuation frequency characteristics in real time to determine the mosquito's activity status. If the system does not detect any heat source movement characteristics for one second (thermal outline area < 8mm), the mosquito's activity status is determined. 2 If the thermal fluctuation frequency is <5Hz, a low-level signal is transmitted to the control chip. The control chip drives the stepper motor based on the PWM signal to accurately restore the grid gap from the corresponding size in the insect-catching mode to the 10mm heat dissipation mode. Furthermore, the control chip outputs a high-level signal to the oscillator power supply system, causing the emitter and collector of the PNP transistor to disconnect, thus preventing the oscillator from operating and disconnecting the electric shock system. This dynamic adjustment mechanism, through a closed loop of "sensing-decision-execution," completely solves the airflow obstruction problem caused by the fixed gap.

[0147] Based on the same inventive concept, this application provides an electrical box, including the insect-proof system for the electrical box provided in the above embodiments.

[0148] The electrical box provided in this application embodiment, through the insect-repelling system included in the above embodiment, simultaneously acquires the spatial morphology and wing-flapping thermal fluctuation temporal information of mosquitoes using infrared thermal imaging. This information is then stitched together and dimensionality reduced to generate a standardized fusion tensor, which is input into a pre-trained classification model, thereby achieving accurate species identification regardless of lighting conditions. To address the issue of imbalanced samples, a type-weighted loss function is introduced to effectively improve the reliability of identifying rare mosquito species. At the protection execution end, the spacing of the high-voltage electric shock grid is dynamically adjusted based on the identified insect size to ensure the physical killing effect on the target mosquitoes. After confirming the insect's death, the heat dissipation gap is automatically restored, reducing unnecessary energy consumption and potential safety risks. This provides the electrical box with an adaptive, low-power, and highly secure active insect-repelling solution.

[0149] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0150] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means at least two.

[0151] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for identifying mosquitoes, characterized in that, include: Infrared thermal radiation signals of the monitored area are captured in real time to obtain infrared images; The spatial morphological features and the temporal thermal fluctuation features of the flapping wings are extracted from the infrared images, respectively. The morphological features and the temporal features of the flapping thermal fluctuations are spliced ​​together and then dimensionality reduced and fused to obtain a standardized fused feature tensor; The fused feature tensor is input into the pre-trained classification and recognition model to output the mosquito type.

2. The method according to claim 1, characterized in that: The extraction of spatial dimensional morphological features from the infrared image includes: For each frame of infrared image, the candidate threshold traversal range is determined based on the ambient temperature, and the step size during traversal is also determined; wherein, the candidate threshold traversal range is the absolute value of the difference between the ambient temperature and the ambient temperature is less than the preset temperature change value. Multiple discrete temperature values ​​are obtained based on the step size and the candidate threshold traversal range; Calculate the inter-class variance for each discrete temperature; The discrete temperature that maximizes the inter-class variance will be used as the target segmentation threshold. The foreground and background of the infrared image are determined based on the target segmentation threshold; Foreground morphological features are extracted based on segmentation, including area, aspect ratio, and convex hull ratio.

3. The method according to claim 1, characterized in that: The extraction of temporal features of wing-flapping thermal fluctuations from the infrared image includes: The average temperature of the mosquito target outline region is continuously collected at a fixed frame rate, and the average temperature is spliced ​​in time order to generate a one-dimensional temperature time series, wherein the mosquito target outline region is determined based on the morphological features of the spatial dimension. Perform multi-level wavelet packet decomposition on the one-dimensional temperature time series to separate the low-frequency effective feature components from the high-frequency environmental noise components; Remove high-frequency environmental noise components and reconstruct the effective signal; The optimal spectrum is recalculated based on the reconstructed effective signal, and the thermal fluctuation dominant frequency and spectral energy entropy are output, where the thermal fluctuation dominant frequency is the frequency corresponding to the maximum spectral energy value. The one-dimensional time-series feature vector obtained by splicing the thermal wave dominant frequency and the spectral energy entropy is used as the time-series feature of the wing-vibrating thermal wave.

4. The method according to claim 1, characterized in that: The step of concatenating and dimensionality-reducing the morphological features and the temporal features of the flapping thermal fluctuations to obtain a standardized fused feature tensor includes: The morphological features and the temporal features of the flapping thermal fluctuations of each frame of infrared image are spliced ​​together end to end to generate the original fused feature vector; A data matrix is ​​constructed based on the original fused feature vectors of all infrared images, where each row of the data matrix is ​​a sample and each column is a feature. Calculate the eigencovariance matrix of the data matrix; The eigenvalues ​​and eigenvectors are obtained by performing eigenvalue decomposition on the feature covariance matrix. The feature vectors are arranged in descending order of feature values, and the cumulative variance contribution rate is calculated based on the feature values. Only feature vectors with a cumulative variance contribution rate greater than a threshold are retained for noise reduction; The original features after noise reduction are compressed to a fixed length to obtain a standardized fused feature tensor.

5. The method according to claim 1, characterized in that, Also includes: When training the classification and recognition model, obtain the percentage of each class of samples in the training samples relative to the total number of samples; The type weight is determined based on the percentage, wherein the lower the percentage, the higher the type weight; After each round of training, the predicted type loss for each type is calculated based on the output of the classification and recognition model; Multiply the prediction type loss for each type by the corresponding type weight to obtain the weighted prediction type loss; The average of the weighted prediction type losses for all types is used to obtain the actual loss for this round of training. The classification and recognition model is adjusted based on the actual loss.

6. A method for preventing insects from entering an electrical appliance box, characterized in that, include: When the presence of mosquitoes is confirmed, power is supplied to the high-voltage electric shock grid; When determining the mosquito type, the mosquito size is obtained based on the mosquito type, wherein the mosquito type is determined based on the method according to any one of claims 1-5; The mesh spacing of the high-voltage electric shock grid is adjusted based on the size of the mosquito so that the mesh spacing is smaller than the size of the mosquito.

7. The method according to claim 6, characterized in that, Also includes: Get the status of mosquitoes; When the mosquito is dead, the gaps in the high-voltage electric shock grid are restored to the distance corresponding to the heat dissipation mode, and power supply to the high-voltage electric shock grid is stopped.

8. A mosquito identification device, characterized in that, include: The infrared image acquisition module is used to capture infrared thermal radiation signals of the monitored area in real time to obtain infrared images; The image feature extraction module is used to extract spatial morphological features and temporal wing-beating thermal fluctuation time-series features from the infrared image, respectively. The image feature processing module is used to concatenate the morphological features and the temporal features of the flapping thermal fluctuations and then reduce their dimensions to obtain a standardized fusion feature tensor. The mosquito type identification module is used to input the fused feature tensor into the pre-trained classification and identification model to output the mosquito type.

9. An insect-proof device for an electrical appliance box, characterized in that, include: The grid power supply control module is used to supply power to the high-voltage electric grid when the presence of mosquitoes is detected; A mosquito size determination module is used to obtain the mosquito size based on the mosquito type when determining the mosquito type, wherein the mosquito type is determined based on the method according to any one of claims 1-5; A grid gap control module is used to adjust the grid gap of the high-voltage electric shock grid based on the size of the mosquito, so that the grid gap is smaller than the size of the mosquito.

10. A mosquito identification system, characterized in that, include: At least one first processor and at least one first memory; The first memory stores the executable instructions of the first processor; The first processor is configured to perform the method according to any one of claims 1-5.

11. An insect-proof system for an electrical appliance box, characterized in that, include: At least one second processor and at least one second memory; The second memory stores the executable instructions of the second processor; The second processor is configured to perform the method according to any one of claims 6-7.

12. An electrical box, characterized in that, Including the insect-proof system for electrical boxes as described in claim 11.