Mosquito killer lamp adjusting method and device

By collecting environmental data and images in mosquito killing lamps, establishing a pest recognition model and combining the pest density change curve chart, adjusting the mosquito killing lamp parameters, the shortcomings of existing mosquito killing lamps in coping with complex environments and pest activity patterns are solved, and trapping efficiency and flexibility are improved.

CN120036290AActive Publication Date: 2025-05-27FOSHAN SHUNDE LEXUEER ELECTRICAL APPLIANCE CO LTD

Patent Information

Application Number
CN202510206434.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-05-27
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

Existing mosquito killing lamps lack flexibility in coping with complex and changing natural environments and pest activity patterns, and do not identify pest behavior patterns in depth, resulting in insufficiency of trapping.

Method used

By collecting environmental data and images, pre-processing and establishing a pest recognition model, identifying pest species and behavioral patterns, combining pest density change curve charts, mosquito killing lamp parameters are adjusted to improve trapping efficiency.

Benefits of technology

It improves trapping efficiency, reduces the impact on non-target organisms, and can better cope with seasonal and day-night changes, and improves the flexibility and response speed of mosquito killing lamps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120036290A_ABST
    Figure CN120036290A_ABST
Patent Text Reader

Abstract

The invention discloses a mosquito killer lamp adjusting method and device, and relates to the field of agriculture and pest management, and the method comprises the steps: collecting environment data and environment images, carrying out the preprocessing, building a pest recognition model based on the preprocessed environment images, obtaining the pest classification and pest behavior mode, carrying out the calculation according to the preprocessed environment data, and obtaining the pest recognition model. Outputting a pest density change curve chart, adjusting the mosquito killer lamp based on the pest classification, the pest behavior pattern and the pest density change curve chart, recording the capture rate after each adjustment, and evaluating the adjustment effect; according to the method, the mosquito killer lamp parameters can be adjusted in advance before the pest density reaches the peak value by accurately predicting the pest density change, the trapping effect is maximized, the prediction method can better cope with seasonal and day and night changes, and the flexibility and response speed of the mosquito killer lamp are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of agriculture and pest management, and particularly to a method and device for adjusting a mosquito killing lamp. Background Art

[0002] As an effective pest control tool, mosquito killing lamps have been widely used in households and the agricultural field in recent years. Traditional mosquito killing lamps mainly rely on fixed light sources and physical trapping mechanisms, such as ultraviolet light to attract pests and capture or eliminate them.

[0003] Although existing intelligent mosquito killing lamp technologies have made certain progress, there are still many limitations in practical applications. Firstly, most mosquito killing lamps can only adjust the light intensity and wavelength according to a preset schedule or simple environmental parameter changes, and cannot flexibly respond to complex and changeable natural environments and pest activity patterns. Secondly, the existing mosquito killing lamps do not have a deep enough understanding of pest behavior patterns, often ignoring the different response characteristics of pests to light sources and audio signals under different behavior patterns. This leads to low trapping efficiency, especially in cases where pest density fluctuates greatly or behavior patterns change frequently, making it difficult to achieve efficient trapping. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides a method for adjusting a mosquito killing lamp to solve the problem that the mosquito killing lamp cannot flexibly respond to complex and changeable natural environments and pest activity patterns.

[0006] To solve the above technical problems, the present invention provides the following technical solutions: In a first aspect, the present invention provides a method for adjusting a mosquito killing lamp, which includes: Collecting environmental data and environmental images, and performing preprocessing; Based on the preprocessed environmental images, establishing a pest recognition model to obtain pest classification and pest behavior patterns; Calculating according to the preprocessed environmental data, and outputting a pest density change curve graph; Based on the pest classification, pest behavior patterns, and the pest density change curve graph, adjusting the mosquito killing lamp; Recording the capture rate after each adjustment, and evaluating the adjustment effect.

[0007] As a preferred solution of the method for adjusting a mosquito killing lamp according to the present invention, wherein: the environmental data includes temperature, humidity, and light; The environmental images include images of the pest prevention and monitoring area.

[0008] As a preferred solution of the mosquito lamp adjustment method of the present invention, wherein: the preprocessing includes using the OpenCV library to perform preliminary quality detection on the environmental image; For qualified environmental images, use LabelImg to mark the positions and types of various pests; Convert the marked environmental images and environmental data into a standardized format.

[0009] As a preferred solution of the mosquito lamp adjustment method of the present invention, wherein: based on the preprocessed environmental image, establish a pest recognition model to obtain pest classification and pest behavior patterns, specifically including the following steps, Divide the preprocessed environmental image into a training set and a validation set; Select ResNet50 as the basic framework of the pest recognition model, and add a fully connected layer on top of ResNet50; Define the cross-entropy loss function to measure the error of pest classification, and at the same time define the bounding box regression loss function, and use the smooth L1 function to measure the error of locating the pest position; Perform weighted averaging on the cross-entropy loss function and the bounding box regression loss function to obtain the comprehensive loss error; Adopt the Adam optimizer to optimize the pest recognition model based on the training set until the comprehensive loss error converges, and complete the construction of the pest recognition model; Use the validation set to test the pest recognition model, and use the softmax activation function to output the classification results of pests; The fully connected layer of the pest recognition model simultaneously outputs the coordinates of the upper left corner and the lower right corner corresponding to the bounding box respectively, and uses denormalization to obtain the actual bounding box coordinates; The said bounding box coordinates are the positions of pests in the environmental image; Arrange and combine the obtained pest classification and pest position results in the order of time stamps into continuous frames, and obtain the movement path and aggregation situation of pests according to the continuous frames; Use the clustering algorithm to cluster according to the movement path and aggregation situation of pests to obtain the behavior patterns of pests; Record the obtained pest classification and pest behavior pattern results in the central database.

[0010] As a preferred solution of the mosquito lamp adjustment method of the present invention, wherein: calculate according to the preprocessed environmental data and output a pest density change curve graph, specifically including the following steps, Use the Gaussian kernel function to extract the feature values of temperature, humidity and light intensity of the environmental data, and use the weighted summation method to form a comprehensive feature value; Based on the comprehensive eigenvalue, introduce a time decay factor, and through integral calculation, obtain the cumulative contribution of environmental data to the change in pest density in the past time and the periodic fluctuations caused by environmental data in the change in pest density; According to the calculated cumulative contribution and periodic fluctuations, obtain the pest density; According to the obtained pest density, use Matplotlib to convert the pest density into a curve graph of pest density change.

[0011] As a preferred solution of the mosquito killing lamp adjustment method described in the present invention, wherein: based on pest classification, pest behavior patterns, and the pest density change curve graph, adjust the mosquito killing lamp, which specifically includes the following steps, Stitch together the typical behavior patterns of pests containing different species and their corresponding effective trapping methods to form a pest behavior database; Use the Euclidean distance to obtain the similarity between pest classification, pest behavior patterns and the pest behavior database, and obtain the pest trapping strategy corresponding to the pest behavior pattern based on the result with the highest similarity; The pest trapping strategy is to adjust the values of the mosquito killing lamp parameters according to the pest behavior pattern; Based on the pest density change curve graph, set a pest threshold; Define an advanced time window H. When the pest density reaches the pest threshold, based on the time window H and combined with the pest trapping strategy obtained by comparing with the pest behavior library, gradually adjust the parameters of the mosquito killing lamp.

[0012] As a preferred solution of the mosquito killing lamp adjustment method described in the present invention, wherein: record the capture rate after each adjustment and evaluate the adjustment effect, which specifically includes the following steps, After each adjustment of the mosquito killing lamp parameters, count the pest capture amount on the same day; Define a capture efficiency index, and evaluate the adjustment effect on the same day according to the capture efficiency index at the end of each day; Regularly analyze the trend of the capture efficiency index, find the optimal parameter combination, and update the pest behavior database at the same time.

[0013] In a second aspect, the present invention provides a mosquito killing lamp adjustment device, including, A preprocessing module, which collects environmental data and environmental images and performs preprocessing; An identification module, which based on the preprocessed environmental image, establishes a pest identification model and obtains pest classification and pest behavior patterns; A density module, which calculates according to the preprocessed environmental data and outputs a curve graph of pest density change; An adjustment module, which based on pest classification, pest behavior patterns, and the pest density change curve graph, adjusts the mosquito killing lamp; An evaluation module that records the capture rate after each adjustment and evaluates the adjustment effect.

[0014] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the mosquito trap adjustment method described in the first aspect of the present invention is implemented.

[0015] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and: when the computer program is executed by the processor, any step of the mosquito trap adjustment method described in the first aspect of the present invention is implemented.

[0016] The beneficial effects of the present invention are as follows: By using environmental images and deep learning technologies, a pest recognition model is established, which can accurately identify pest species and analyze their behavior patterns. This not only improves the trapping efficiency but also reduces the impact on non-target organisms; in addition, through the accurate prediction of changes in pest density, the parameters of the mosquito trap can be adjusted in advance before the pest density reaches the peak, maximizing the trapping effect. This prediction method can better cope with seasonal and diurnal changes, improving the flexibility and response speed of the mosquito trap. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0018] Figure 1 It is a flowchart of the mosquito trap adjustment method in Embodiment 1.

[0019] Figure 2 It is a schematic diagram of the conditional mosquito trap in Embodiment 1. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0020] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will provide a detailed description of the specific embodiments of the present invention with reference to the accompanying drawings of the specification.

[0021] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0022] Second, the "one embodiment" or "embodiment" referred to herein means a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that are mutually exclusive of other embodiments.

[0023] Embodiment 1, referring to Figure 1 and Figure 2 , is the first embodiment of the present invention, which provides a method for adjusting a mosquito killing lamp, including the following steps: S1. Collect environmental data and environmental images, and perform preprocessing.

[0024] Specifically, it includes the following steps. In the pest control monitoring area, in accordance with the principle of uniform grid distribution, install 8 high-definition cameras with night vision function to ensure coverage of the entire monitoring area. The viewing angle of each camera should overlap by about 10% to eliminate monitoring dead angles.

[0025] Install a set of environmental sensors (such as DHT22 temperature and humidity sensors and BH1750 light intensity sensors) near each high-definition camera for collecting temperature, humidity, and light environment parameters.

[0026] S1.1. Develop a Python script to call the OpenCV library to perform preliminary quality detection on the images. OpenCV is an open-source library widely used in the field of computer vision, which provides a variety of image processing functions. Use the function of OpenCV to remove blurred and severely distorted frames. For example, high-quality images can be screened out by calculating the clarity index of the images (such as the result of the Laplacian operator).

[0027] For qualified environmental images, use the LabelImg tool to manually or automatically mark the positions and types of various pests. LabelImg is a graphical image annotation tool that supports multiple formats of output. During the marking process, the specific positions (bounding box coordinates) and category labels of each pest need to be recorded in detail.

[0028] Unify the size of the marked environmental images and adjust the color space (such as RGB to grayscale); Normalize the environmental data to ensure the consistency of all input data.

[0029] S2. Based on the preprocessed environmental images, establish a pest recognition model to obtain pest classification and pest behavior patterns.

[0030] Specifically, it includes the following steps. The preprocessed environmental images are divided into a training set and a validation set, usually in a ratio of 80% (training set) and 20% (validation set), to ensure that the distributions of the two parts of the data are as consistent as possible and to avoid overfitting or underfitting of the pest recognition model; Select ResNet50 as the basic framework of the pest recognition model. ResNet50 is a deep residual network widely used in image classification tasks. Due to its good generalization ability and transfer learning effect, it is suitable for multi-species insect recognition tasks. At the same time, a fully connected layer is added on top of ResNet50, which is used for the bounding box regression task and can output the position of the pest in the environmental image. The purpose is to obtain both pest classification and pest behavior patterns at the same time.

[0031] Define the cross-entropy loss function to measure the error of pest classification , and the cross-entropy loss function calculates the difference between the predicted probability distribution and the true label.

[0032] Define the bounding box regression loss function , use the smooth L1 function to measure the error of locating the pest position, and obtain the difference between the predicted bounding box coordinates and the true bounding box coordinates. The smooth L1 function combines the advantages of the L1 loss and the L2 loss, using the squared error (smoother) within a small error range and the absolute error (more stable) within a large error range; Perform a weighted average on the obtained cross-entropy loss function and the bounding box regression loss function to obtain the comprehensive loss error , ensuring that the pest recognition model can not only correctly classify the insect type but also accurately predict the position of the insect. Its expression is: ; ; ; Among them, represents the cross-entropy loss function, represents the true label vector, which contains the true class information of each sample, represents the predicted probability distribution vector, which contains the predicted probabilities of each sample belonging to each class, represents the number of samples participating in the calculation, represents the index variable of the sample, represents the th true label vector of the sample, represents the th predicted probability of the sample belonging to its true class, represents the bounding box regression loss function, represents the true bounding box coordinate vector, represents the predicted bounding box coordinate vector, Indicates the number of bounding boxes in the environmental image, that is, how many insect individuals are detected in each image. This parameter determines the number of iterations in the summation operation. Indicates the index variable of the bounding box, used to traverse all bounding boxes. Indicates the smooth L1 function. Indicates the true coordinate vector of the -th bounding box, referring to the true position of the -th pest individual in the image. predicted coordinate vector of the -th pest individual by the pest recognition model. Indicates the comprehensive loss error. Indicates the comprehensive true label vector. Indicates the weight between the classification loss and the localization loss.

[0033] Specifically, The value range of is [0,1], used to balance the contributions between pest classification and localization loss. Generally, =0.7 is selected because the pest classification task is more important, but the localization accuracy cannot be ignored. The value of can be customized according to the usage scenario and actual requirements; Using the Adam optimizer can accelerate the training process. First, each image in the training set is input into the pest recognition model to calculate the predicted output (the classification probability distribution result of the pest and the pest bounding box coordinates). Based on the comprehensive loss function using the backpropagation algorithm, the gradient of the comprehensive loss function with respect to the pest recognition model parameters is obtained. The Adam optimizer is used to update the pest recognition model parameters according to the obtained gradient to minimize the comprehensive loss error. When the comprehensive loss function no longer significantly decreases, the construction of the pest recognition model is completed. Using the Adam optimizer ensures that the pest recognition model can achieve the best performance in a short time; ; Among them, represents the classification result of the pest, represents the Softmax function, represents the unactivated output vector, represents the unactivated output vector currently being calculated. The th element, represents the total number of categories, represents the th element of the unactivated output vector; For example, assume there are three types of insects: mosquitoes, flies, and bees. After a softmax transformation, a probability distribution [0.67, 0.24, 0.09] is output, indicating that the pest recognition model believes the most likely insect in the image is a mosquito, followed by a fly and a bee.

[0034] The fully connected layer of the pest recognition model will simultaneously output four values, corresponding to the upper left and lower right coordinates of the bounding box respectively. These coordinates are values normalized relative to the size of the environmental image and need to be denormalized to obtain the actual coordinates; the bounding box coordinates are the positions of the pests in the environmental image; For each individual environmental image frame, the pest recognition model will output the pest classification result and its position information in that environmental image frame. When multiple consecutive environmental images (such as taken once every 1 second to form a time series) are fed into the pest recognition model, a series of consecutive prediction results can be obtained. These prediction results include not only the presence or absence of pests at each time point but also their position movement trajectories.

[0035] By analyzing these consecutive frames, the movement paths and aggregation situations of pests over a period of time can be observed, and thus the behavior patterns of pests can be obtained using a clustering algorithm based on the movement paths and aggregation situations of pests. Clustering analysis is an unsupervised learning method used to group data points into different clusters such that data points within the same cluster are similar to each other while data points in different clusters are quite different. In pest behavior pattern recognition, clustering analysis is used to classify the movement paths and aggregation situations of pests to identify different behavior patterns. For example, the input data: the movement trajectories and aggregation situations of pests, and the output is the pest behavior patterns. Specific pest behavior patterns include foraging behavior, mating behavior, and evasion behavior, etc. For example, if several consecutive frames show a group of mosquitoes gradually aggregating in the same area and through the clustering operation of the clustering algorithm, it indicates that they are preparing to mate.

[0036] Furthermore, by analyzing the consecutive frames, a deeper understanding of the pest behavior patterns can be achieved, thereby formulating more refined trapping strategies.

[0037] S3. Calculate based on the preprocessed environmental data and output a curve graph of pest density changes.

[0038] Specifically, it includes the following steps: The Gaussian kernel function can map the original data into a high-dimensional space to capture more complex non-linear relationships. Therefore, the Gaussian kernel function is used to extract the feature values of temperature, humidity, and light intensity of environmental data, and the extraction results of the Gaussian kernel function are linearly combined and weighted to form a comprehensive eigenvalue; According to the obtained comprehensive eigenvalue, a time decay factor is introduced. The time decay factor is used to simulate the phenomenon that the influence of past environmental data on the current pest density gradually weakens over time, enhancing the dynamics and realism of the prediction.

[0039] The cumulative contribution of environmental data to the change in pest density over past time is obtained through integral calculation.

[0040] Furthermore, by calculating the cumulative contribution through integration, the long-term influence of environmental conditions on pest density can be comprehensively considered, improving the comprehensiveness of the prediction.

[0041] Calculating the periodic fluctuations in pest density caused by environmental data can identify regular patterns in pest density changes, such as seasonal peaks or circadian rhythms, enhancing the accuracy of the prediction.

[0042] Based on the cumulative contribution and periodic fluctuations calculated by integration, the pest density at time is obtained, and its expression is: ; where, represents the pest density at time , represents the comprehensive eigenvalue, represents each time point from the past to time , represents the temperature value at time , represents the humidity value at time , represents the light intensity value at time , represents the time decay factor, represents the number of cycles, represents the influence weight of the th cycle, represents the time length of a complete cycle, represents the sine function; Through calculation, the change of pest density over time can be accurately predicted, providing reliable data support for the intelligent adjustment of mosquito killing lamps.

[0043] Matplotlib is a powerful plotting library that can generate intuitive and easy-to-understand charts, facilitating user understanding and analysis. According to the calculated pest density, it is converted into a curve graph of pest density changes using Matplotlib, visually showing the changing trend of pest density over time, including peak and trough periods, as well as periodic fluctuations.

[0044] S4. Adjust the mosquito killer lamp based on pest classification, pest behavior patterns, and the curve graph of pest density changes.

[0045] Specifically, it includes the following steps: The pest behavior database is an information repository that contains a large amount of information on the typical behavior characteristics of different types of pests under various environmental conditions and their corresponding most effective trapping methods, including pest classification information, pest behavior patterns, and the most effective trapping methods for corresponding pests. The research results and historical data from fields such as entomology and ecology are uniformly stored in the database to form a unified pest behavior database.

[0046] First, compare the pest classification results (such as mosquitoes, flies, etc.) and behavior patterns (such as foraging, mating, resting, etc.) obtained in real-time with the pre-established pest behavior database. This database contains the typical behavior models of different types of pests under various environmental conditions and their corresponding effective trapping strategies.

[0047] For the pest classification and pest behavior patterns newly obtained by the pest recognition model, calculate their similarity with the existing records in the pest behavior database using the Euclidean distance, and use the record with the highest similarity as the most suitable trapping strategy for the current situation.

[0048] For example, if a certain type of pest is identified as foraging, it may be necessary to increase the UV light intensity to attract more pests; if it is a mating behavior, the color wavelength of the light source can be adjusted or a specific audio signal can be emitted to simulate the mating signal to attract more pests; for the resting behavior, the UV light intensity can be reduced to avoid unnecessary energy consumption.

[0049] Use the generated curve graph of pest density changes to predict the changing trend of pest density in the next period of time. Especially pay attention to those time periods when the pest density is about to reach the peak. Set a pest threshold according to the number of pests. For example, when the pest density per unit area will reach more than 5 per square meter, start to gradually adjust the mosquito killer lamp H (1 - 2) hours before the pest density reaches the pest threshold to ensure that the mosquito killer lamp is in the best working state before the pest density peak arrives.

[0050] For example, on a summer evening, an environmental image was taken and a group of male Culex mosquitoes were detected by a pest recognition model to be in mating flight. After comparing with the pest behavior database, it was shown that during mating, male Culex mosquitoes are particularly sensitive to ultraviolet light (UV-A) of a specific wavelength and respond to sound signals of certain frequencies because these sounds mimic the wing vibration frequency of females. Then the trapping strategy at this time is to increase the intensity of the UV-A light source and emit sound signals that simulate the wing vibration of female Culex mosquitoes to attract more male Culex mosquitoes to approach and be captured. As night falls, the temperature drops and the humidity rises. According to the calculated pest density change curve, around 8 pm, the pest density will reach the pest threshold. Two hours before the expected pest threshold (i.e., 6 pm), start gradually adjusting the parameters of the mosquito trap to ensure that the device is in the best working state before the pest density peak arrives. Specifically, it is expressed as: the UV light intensity is gradually increased to 70% of the maximum power to adapt to the visual sensitivity of Culex mosquitoes at dusk; the light source color wavelength is adjusted to be closer to the dusk lighting conditions in the natural environment, further enhancing the trapping effect; the sound frequency is also dynamically adjusted to better mimic the audio characteristics during Culex mosquito mating to attract more pests. As time goes by, the fan speed is also appropriately increased to help capture those pests attracted by the light source or sound.

[0051] Due to the advance preparation, the mosquito trap can exert its maximum efficiency during the pest density peak, improving the trapping efficiency and avoiding resource waste at the same time.

[0052] S5. Record the capture rate after each adjustment and evaluate the adjustment effect.

[0053] Specifically, it includes the following steps: S5.1. After each adjustment of the mosquito trap parameters (such as UV light intensity, light source color wavelength, sound frequency, etc.), immediately start recording the daily pest capture amount. By recording the capture amount in real time, immediate feedback after each adjustment can be quickly obtained, providing accurate data support for subsequent evaluation.

[0054] Define a capture efficiency index that comprehensively considers factors such as the capture quantity, pest density per unit area, and energy consumption. Its expression is: ; where, represents the capture efficiency index.

[0055] At the end of each day, evaluate the adjustment effect of the day according to the capture efficiency index. A high CEI indicates efficient pest capture with low energy consumption, while a low CEI suggests that further optimization is needed.

[0056] Furthermore, the capture efficiency index provides a quantitative evaluation criterion, which can objectively evaluate the effect of each adjustment and facilitate subsequent optimization. By comprehensively considering the capture quantity, pest density, and energy consumption, the CEI not only focuses on the trapping effect but also pays attention to the resource utilization efficiency, achieving the goal of energy conservation and efficiency improvement.

[0057] S5.2. Analyze the changing trend of the capture efficiency index regularly (such as weekly or monthly), and draw a chart of CEI changing over time. This helps to identify long-term effective trapping strategies and potential problem points.

[0058] According to the trend analysis results, find the optimal parameter combination. For example, if it is found that the CEI is the highest under a certain combination of UV light intensity and audio signal during a certain period (such as at dusk), this combination can be set as the default setting.

[0059] Update the newly discovered best parameter combination and the corresponding pest behavior pattern to the pest behavior database. This can greatly enrich the content of the database.

[0060] Furthermore, through regular analysis and optimization, it can continuously self-improve to ensure long-term efficient pest management. And based on the trend analysis of the capture efficiency index, more scientific and reasonable decisions can be made, improving the intelligent level.

[0061] This embodiment also provides a mosquito killer lamp adjustment device, including: A preprocessing module that collects environmental data and environmental images and performs preprocessing; An identification module that, based on the preprocessed environmental image, establishes a pest identification model to obtain pest classification and pest behavior patterns; A density module that calculates based on the preprocessed environmental data and outputs a pest density change curve graph; An adjustment module that adjusts the mosquito killer lamp based on the pest classification, pest behavior patterns, and the pest density change curve graph; An evaluation module that records the capture rate after each adjustment and evaluates the adjustment effect.

[0062] This embodiment also provides a computer device applicable to the situation of the mosquito killer lamp adjustment method, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the mosquito killer lamp adjustment method proposed in the above embodiment.

[0063] The computer device can be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be achieved through WIFI, carrier networks, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0064] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the mosquito trap adjustment method proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, magnetic disks, or optical discs.

[0065] In summary, the present invention: uses environmental images and deep learning technologies to establish a pest recognition model, which can accurately identify pest species and analyze their behavior patterns, not only improving the trapping efficiency but also reducing the impact on non-target organisms; in addition, through the accurate prediction of changes in pest density, it is possible to adjust the parameters of the mosquito trap in advance before the pest density reaches its peak, maximizing the trapping effect. This prediction method can better cope with seasonal and diurnal changes, improving the flexibility and response speed of the mosquito trap.

[0066] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and all of them should be covered by the scope of the claims of the present invention.

Claims

1. A method for adjusting a mosquito killer lamp, characterized in that: include, Collect environmental data and environmental images and perform preprocessing; Based on the preprocessed environmental images, a pest recognition model is established to obtain pest classification and pest behavior patterns; Calculate based on the pre-processed environmental data and output a curve chart of pest density changes; Adjust mosquito lamps based on pest classification, pest behavior patterns, and pest density change curves; Record the capture rate after each adjustment and evaluate the adjustment effect.

2. The mosquito killer lamp adjustment method according to claim 1, characterized in that: The environmental data include temperature, humidity and light; The environmental image includes an image of a hazard prevention monitoring area.

3. The mosquito killer lamp adjustment method according to claim 2, characterized in that: The preprocessing includes using the OpenCV library to perform preliminary quality detection on the environment image; For qualified environmental images, LabelImg is used to mark the location and type of various pests; Convert labeled environment images and environment data into a standardized format.

4. The mosquito killer lamp adjustment method according to claim 3, characterized in that: Based on the preprocessed environmental image, a pest recognition model is established to obtain pest classification and pest behavior patterns, which specifically includes the following steps: Divide the preprocessed environment images into training set and validation set; Select ResNet50 as the basic framework of the pest recognition model and add a fully connected layer on top of ResNet50; Define the cross entropy loss function to measure the error of pest classification, and define the bounding box regression loss function, and use the smooth L1 function to measure the error of locating the pest position; Take the weighted average of the cross entropy loss function and the bounding box regression loss function to get the comprehensive loss error; The Adam optimizer is used to optimize the pest identification model based on the training set until the comprehensive loss error converges, completing the construction of the pest identification model; Use the validation set to test the pest recognition model and use the softmax activation function to output the pest classification results; The fully connected layer of the pest recognition model simultaneously outputs the coordinates of the upper left corner and the lower right corner of the corresponding bounding box, and uses denormalization to obtain the actual bounding box coordinates; The bounding box coordinates are the positions of the pests in the environment image; The obtained pest classification and pest location results are arranged and combined into continuous frames in the order of timestamps, and the movement path and aggregation situation of the pests are obtained according to the continuous frames; Use clustering algorithms to cluster pests according to their movement paths and aggregation conditions to obtain their behavior patterns; The obtained pest classification and pest behavior patterns are recorded in a central database.

5. The mosquito killer lamp adjustment method according to claim 4, characterized in that: Calculate based on the pre-processed environmental data and output the pest density change curve, which specifically includes the following steps: The Gaussian kernel function is used to extract the temperature, humidity and light intensity features of the environmental data, and a weighted summation method is used to form a comprehensive feature value; Based on the comprehensive characteristic value, the time decay factor is introduced, and through integral calculation, the cumulative contribution of environmental data to the change of pest density in the past time and the periodic fluctuation of pest density caused by environmental data are obtained; Based on the calculated cumulative contribution and periodic fluctuation, the pest density is obtained; According to the obtained pest density, Matplotlib is used to convert the pest density into a pest density change curve graph.

6. The mosquito killer lamp adjustment method according to claim 5, characterized in that: Based on the pest classification and pest behavior patterns, as well as the pest density change curve, the mosquito killer lamp is adjusted, which specifically includes the following steps: The typical behavior patterns of different types of pests and their corresponding effective trapping methods are combined to form a pest behavior database; The similarity between the pest classification and the pest behavior pattern and the pest behavior database is obtained using the Euclidean distance, and the pest trapping strategy corresponding to the pest behavior pattern is obtained based on the result with the highest similarity; The pest trapping strategy is to adjust the values ​​of mosquito lamp parameters according to the pest behavior patterns; Set pest thresholds based on pest density change curves; Define an advance time window H. When the pest density reaches the pest threshold, based on the time window H and the pest trapping strategy obtained by comparing with the pest behavior library, gradually adjust the parameters of the mosquito killer lamp.

7. The mosquito killer lamp adjustment method according to claim 6, characterized in that: Record the capture rate after each adjustment and evaluate the adjustment effect, which includes the following steps: Each time the parameters of the mosquito killer lamp are adjusted, the number of pests captured on that day is counted; Define a capture efficiency index, and evaluate the regulation effect of the day based on the capture efficiency index at the end of each day; Regularly analyze the trend of capture efficiency index to find the optimal parameter combination and update the pest behavior database.

8. A mosquito killer lamp adjustment device, based on the mosquito killer lamp adjustment method according to any one of claims 1 to 7, characterized in that: include, A preprocessing module collects environmental data and environmental images and performs preprocessing; The recognition module builds a pest recognition model based on the preprocessed environmental image to obtain pest classification and pest behavior patterns; The density module calculates based on the pre-processed environmental data and outputs a curve chart of pest density changes; An adjustment module adjusts the mosquito killer lamp based on pest classification and pest behavior patterns, as well as a pest density change curve diagram; The evaluation module records the capture rate after each adjustment and evaluates the adjustment effect.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the mosquito killer lamp adjustment method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the mosquito killer lamp adjustment method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method for extracting network interactive behavioral pattern and analyzing similarity

    CN101582817A

  • Intelligent mobile energy-saving mosquito-killing lamp

    CN102626063A

  • System and method for cultivating caterpillar fungus

    CN105766379A

  • Crop disease and pest intelligent detection method based on deep learning

    CN109919239A

  • Mosquito killing device

    CN115663937A

Cited By

  • Disease and pest monitoring system and method based on AI vision and multi-parameter dynamic optimization

    CN121000847A