Intelligent Analysis Method and System for Monitoring Data of a Termite Visual Monitoring Device
By designing a visual monitoring device for termites, using frame difference method and termite detection model to monitor termite activities in real time, and predicting future trends through cloud processing and activity prediction models, the problem of incomplete and dynamic termite monitoring in the existing technology is solved, and efficient termite monitoring and early warning is achieved.
Patent Information
- Application Number
- CN202510345543.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The existing termite monitoring schemes are insufficient in terms of depth and multi-dimensional analysis capabilities of equipment status monitoring, and cannot comprehensively monitor termite activities, especially in quantitative analysis of characteristics such as termite activity paths and frequency, and are mostly mainly static analysis, and fail to analyze the dynamic behavior of termite populations in real time.
A visual monitoring device for termites was designed to collect videos through industrial cameras, calculate background difference values using frame difference method, dynamically update background templates, extract termite activity frames, and combine termite detection models to calculate termite movement direction and speed, generate termite data and upload them to the cloud. Through cloud processing, the mobile index, activity index, frequency index and activity level are calculated, and the activity prediction model is used to predict future termite activity trends based on environmental data.
A comprehensive analysis and accurate warning of termite activities have been achieved, monitoring efficiency has been improved, the intensity of termite activities can be quantified, future activity trends have been predicted, and early warnings have been issued, reducing potential damage.
Smart Images

Figure CN119863759B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of termite monitoring data processing, and particularly to an intelligent analysis method and system for monitoring data of a termite visual monitoring device. Background Technique
[0002] Termites are pests that have strong destructive power to infrastructure such as underground buildings, houses, and bridges. With the acceleration of global climate change and urbanization, the distribution range and activity intensity of termites are increasing continuously, which in turn leads to property losses and structural safety problems. Therefore, termite monitoring has become an important research direction in the current pest control field.
[0003] Existing monitoring schemes can, to a certain extent, record and analyze termite activities. For example, by trapping termites and collecting monitoring videos, combined with online monitoring and early warning functions, the activities of termites can be intuitively understood. However, on the one hand, these schemes are limited by the performance of the monitoring devices, lacking in the depth of equipment status monitoring and multi-dimensional analysis capabilities, and unable to comprehensively monitor termite activities in complex environments, especially being weak in the quantitative analysis of characteristics such as termite activity paths and frequencies. On the other hand, these schemes mainly focus on static analysis and fail to conduct real-time analysis on the dynamic behaviors of termite colonies, further exploring the time trends of termite activities, resulting in deficiencies in the monitoring efficiency of these schemes.
[0004] Therefore, an intelligent analysis method and system for monitoring data of a termite visual monitoring device are proposed. Summary of the Invention
[0005] The purpose of the present invention is to provide an intelligent analysis method and system for monitoring data of a termite visual monitoring device. By designing a termite visual monitoring device for monitoring termite activities, collecting videos through the termite visual monitoring device, calculating the background difference value using the frame difference method, dynamically updating the background template, and extracting termite activity frames; combining with a termite detection model to obtain the coordinates and quantity of the activity bounding boxes, calculating the moving direction and speed of termites, generating termite data and uploading it to the cloud; obtaining termite data through the cloud, calculating the movement index, activity index, frequency index, and activity degree, and at the same time combining environmental data to predict the future termite activity trend using an activity prediction model. By real-time monitoring and activity prediction, the first and second alarm messages are respectively sent to achieve a comprehensive analysis and accurate early warning of termite activities, thereby improving the monitoring efficiency.
[0006] To achieve the above purpose, the present invention provides the following technical solutions:
[0007] In the first aspect, an intelligent analysis method for monitoring data of a termite visual monitoring device includes:
[0008] Step S1: Termite Visual Monitoring Device, which is used to monitor termite activities;
[0009] Step S2: Based on the termite visual monitoring device, obtain an initial video frame without termite activities; calculate the pixel average value of the initial video frame to obtain a background template; obtain a new termite video frame, and use the frame difference method to calculate the absolute difference between the termite video frame and the background template; if the absolute difference is greater than the first threshold, extract the termite video frame; otherwise, update the background template according to the termite video frame;
[0010] Step S3: Binarize the termite video frame, and use a termite detection model to obtain the bounding box coordinates and the number of bounding boxes; if the number of bounding boxes is greater than the second threshold, send a first alarm message; if the number of bounding boxes is greater than zero, segment the termite video frame to obtain grid regions; calculate the termite movement direction and termite movement speed based on the bounding box coordinates and the grid regions; combine the termite movement direction, the termite movement speed, the number of bounding boxes, and the timestamp into termite data and send it to the cloud;
[0011] Step S4: Obtain the termite data from the cloud, calculate the movement index, activity index, frequency index, and termite activity level based on the termite data; obtain environmental data, use an activity prediction model to output the future termite activity level according to the environmental data and the termite activity level, and send a second alarm message according to the future termite activity level.
[0012] Furthermore, the termite visual monitoring device includes a monitoring box, a switch, and an edge device; an industrial camera, a light bulb, and a termite-eating cylinder are installed in the monitoring box, the industrial camera is connected to the switch through a network cable, and transmits the collected termite video frames to the switch; the switch is connected to the edge device through the network cable; the edge device receives the termite video frames, monitors the termite activities according to the termite video frames, and generates the termite data; the edge device transmits the termite data to the cloud through a wireless network.
[0013] Furthermore, the process of updating the background template includes:
[0014] ;
[0015] where, is the updated background template with coordinates ; is the smoothing factor; is the pixel value of the current termite video frame; is the background template; is the current time; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template;
[0016] Among them, The update process of is expressed as:
[0017] ;
[0018] Among them, is the smoothing factor, is the updated smoothing factor; is the constant for controlling the growth rate; is the timestamp for currently updating the background template, is the timestamp for the previous update of the background template.
[0019] Furthermore, the calculation process of the termite movement direction and the termite movement speed includes:
[0020] Generate the termite center coordinates for the bounding box coordinates in each grid area;
[0021] Take the average of the termite center coordinates for each frame to obtain the termite centroid coordinates;
[0022] For the termite centroid coordinates of consecutive frames, use the Euclidean formula to calculate the termite displacement vector, and obtain the termite movement speed according to the termite displacement vector;
[0023] For the termite centroid coordinates of consecutive frames, use the azimuth calculation formula to calculate the termite movement direction.
[0024] Furthermore, the calculation process of the movement index, the activity index, the frequency index, and the termite activity level includes:
[0025] Set a fixed time period, and perform a direction distribution analysis on the termite movement direction according to the fixed time period to obtain the movement index;
[0026] According to the fixed time period, take the average of the termite movement speed to obtain the average termite movement speed; multiply the average termite movement speed by the number of bounding boxes with weights to obtain the activity index;
[0027] According to the fixed time period, count the number of changes in the number of bounding boxes, and divide the number of changes by the duration of the fixed time period to obtain the frequency index;
[0028] Weighted sum the movement index, the activity index, and the frequency index to obtain the termite activity level.
[0029] In a second aspect, an intelligent analysis system for monitoring data of a termite visual monitoring device includes:
[0030] A termite visual monitoring device design module for monitoring termite activities;
[0031] A video acquisition module for, according to the termite visual monitoring device design module, obtaining an initial video frame without termite activities, calculating the pixel average value of the initial video frame to obtain a background template; obtaining a new termite video frame, and using the frame difference method to calculate the absolute difference between the termite video frame and the background template; if the absolute difference is greater than a first threshold, extracting the termite video frame; otherwise, updating the background template according to the termite video frame;
[0032] An edge processing module for binarizing the termite video frame, and using a termite detection model to obtain the bounding box coordinates and the number of bounding boxes; if the number of bounding boxes is greater than a second threshold, sending a first alarm message; if the number of bounding boxes is greater than zero, segmenting the termite video frame to obtain grid regions; calculating the termite movement direction and the termite movement speed according to the bounding box coordinates and the grid regions; combining the termite movement direction, the termite movement speed, the number of bounding boxes and the timestamp into termite data and sending it to the cloud;
[0033] A cloud processing module for obtaining the termite data from the cloud, calculating a movement index, an activity index, a frequency index and the termite activity level according to the termite data; obtaining environmental data, using an activity prediction model to output the future termite activity level according to the environmental data and the termite activity level, and sending a second alarm message according to the future termite activity level.
[0034] Further, the termite visual monitoring device includes a monitoring box, a switch and an edge device; an industrial camera, a bulb and a termite-eating cylinder are installed in the monitoring box, the industrial camera is connected to the switch through a network cable and transmits the collected termite video frames to the switch; the switch is connected to the edge device through the network cable; the edge device receives the termite video frames, monitors the termite activities according to the termite video frames and generates the termite data; the edge device transmits the termite data to the cloud through a wireless network.
[0035] Further, the process of updating the background template includes:
[0036] ;
[0037] Wherein, is the updated background template; is the smoothing factor; is the pixel value of the current termite video frame; is the background template; is the current time; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template;
[0038] where the update process of is expressed as:
[0039] ;
[0040] where is the smoothing factor, is the updated smoothing factor; is the constant for controlling the growth rate; is the timestamp for the current update of the background template, is the timestamp for the previous update of the background template.
[0041] Furthermore, the calculation process of the termite movement direction and termite movement speed includes:
[0042] Generate the termite center coordinates for the bounding box coordinates in each grid area;
[0043] Take the average of the termite center coordinates for each frame to obtain the termite centroid coordinates;
[0044] For the termite centroid coordinates of consecutive frames, use the Euclidean formula to calculate the termite displacement vector, and obtain the termite movement speed based on the termite displacement vector;
[0045] For the termite centroid coordinates of consecutive frames, use the azimuth calculation formula to calculate the termite movement direction.
[0046] Furthermore, the calculation process of the movement index, the activity index, the frequency index, and the termite activity level includes:
[0047] Set a fixed time period, and perform a direction distribution analysis on the termite movement direction according to the fixed time period to obtain the movement index;
[0048] According to the fixed time period, take the average of the termite movement speed to obtain the average termite movement speed; multiply the average termite movement speed by the number of bounding boxes weighted to obtain the activity index;
[0049] According to the fixed time period, count the number of changes in the number of bounding boxes, and divide the number of changes by the duration of the fixed time period to obtain the frequency index;
[0050] The moving index, the activity index, and the frequency index are weighted and summed to obtain the termite activity level.
[0051] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0052] 1. By designing a termite visualization monitoring device, the present invention integrates an industrial camera, a light, and edge devices, achieving efficient capture and monitoring of termite activities. This device can automatically extract key features through edge devices and generate termite data in real time, thereby reducing data transmission latency and cloud pressure, ensuring rapid response to sudden termite activities and sending the first alarm message. Subsequently, the termite data is transmitted to the cloud for storage and analysis, fully realizing the efficient division of labor between the edge and the cloud, making data processing and storage more flexible, and thus improving the overall operation efficiency and reliability of termite monitoring.
[0053] 2. The present invention generates a background template based on the initial video frame, calculates the difference between the video frame and the background template using the frame difference method, and dynamically updates the background template through an adaptive smoothing factor, capable of eliminating environmental interference in real time and providing stable and reliable input for subsequent data analysis. In addition, a termite detection model is deployed on the edge device to achieve accurate identification of termite activities. Through the identified termite activities, the moving direction and speed of termites are further calculated, enabling precise capture of the dynamic changes in termite activities, quickly responding to emergencies, and enhancing the overall operation efficiency and reliability of the termite monitoring system.
[0054] 3. After receiving the termite data in the cloud, the present invention combines information such as the number of bounding boxes, the moving speed and direction of termites, calculates the moving index, the activity index, and the frequency index, and then obtains the termite activity level, capable of quantifying the intensity of termite activities, helping to evaluate the current situation and change trend of termite activities. By combining data such as environmental temperature and humidity with the termite activity level, using the activity prediction model to output the future activity trend, and sending the second alarm message according to the future activity trend, an early warning is issued before significant changes in termite activities, capable of comprehensively predicting potential risks, and thus improving the overall operation efficiency of termite monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 is a schematic flow diagram of an intelligent analysis method for monitoring data of a termite visualization monitoring device of the present invention;
[0056] Figure 2 is a schematic structural diagram of the termite visualization monitoring device of the present invention;
[0057] Figure 3 is a schematic diagram of the monitoring box of the present invention;
[0058] Figure 4Schematic diagram of the intelligent analysis system for monitoring data of a termite visual monitoring device according to the present invention.
[0059] In the figure: 1, monitoring box; 2, switch; 3, edge device; 4, network cable; 11, industrial camera; 12, light bulb; 13, termite-eating cylinder. Specific implementation manners
[0060] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0061] Termites, these highly destructive pests are widely distributed globally, posing a huge threat to buildings, farmlands, and forestry resources. However, existing monitoring technologies face many challenges. For example, interference from environmental factors may reduce the accuracy of monitoring, and the efficiency issues of data transmission and analysis also affect the timeliness of monitoring, ultimately resulting in insufficient overall monitoring efficiency. In response to these problems, the present invention proposes an intelligent analysis method and system for monitoring data of a termite visual monitoring device, aiming to improve the efficiency of termite monitoring and provide a more scientific solution for termite prevention and control work, thereby reducing the damage caused by termites. Please refer to Figures 1 to 4 , the technical solution of the present invention is as follows:
[0062] The first embodiment is as follows:
[0063] Figure 1 Schematic diagram of the process of an intelligent analysis method for monitoring data of a termite visual monitoring device according to the present invention.
[0064] As Figure 1 shown, an intelligent analysis method for monitoring data of a termite visual monitoring device includes:
[0065] Refer to Figure 1 step S1 in : Design a termite visual monitoring device, and the termite visual monitoring device is used to monitor termite activities;
[0066] Figure 2 Schematic diagram of the structure of the termite visual monitoring device according to the present invention.
[0067] Furthermore, as Figure 2As shown, the termite visual monitoring device includes a monitoring box 1, a switch 2, and an edge device 3; an industrial camera 11, a light bulb 12, and a termite-eating cylinder 13 are installed inside the monitoring box 1. The industrial camera 11 is connected to the switch 2 through a network cable 4 and transmits the collected termite video frames to the switch 2; the switch 2 is connected to the edge device 3 through the network cable 4; the edge device 3 receives the termite video frames, monitors the termite activities based on the termite video frames, and generates the termite data; the edge device 3 transmits the termite data to the cloud through a wireless network; the gray shaded part is the soil layer, the monitoring box 1 is buried under the soil layer, and the switch 2 and the edge device 3 are placed on the soil layer.
[0068] Figure 3 It is a schematic diagram of the monitoring box 1 of the present invention;
[0069] Specifically, in this embodiment, as Figure 3 shown, the size of the monitoring box 1 is 300 mm × 250 mm × 200 mm, the aperture around is 5.0 mm, and the overall is made of polypropylene material, which is both strong and light. The appearance design of the monitoring box 1 adopts a pull-out opening and closing mechanism, which not only improves its aesthetics but also makes the operation more convenient. An industrial camera 11 is equipped inside the monitoring box 1 to capture clear videos of termite activities. The model of the industrial camera 11 is ala2400-20gm, equipped with a 2 / 3-inch chip and a 5mm lens, and can provide a field of view of 245 mm × 205 mm at a working distance of 150 mm. To ensure clear images under different lighting conditions, a light bulb 12 is equipped as a supplementary lighting device. In actual applications, the built-in supplementary lighting function of the industrial camera 11 can be tested first. If its supplementary lighting effect is not ideal, then the light bulb 12 will be activated to provide additional light sources.
[0070] In addition, the monitoring box 1 is connected to the edge device 3 through the switch 2. It is allowed that one switch 2 is connected to multiple monitoring boxes 1 to realize the pulling and management of multiple monitoring screens by the edge device 3. In this embodiment, to simplify the operation process, only one monitoring box 1 is connected. The edge device 3 accesses the switch 2, extracts the termite video frames and identifies the termite activities, and transmits data through a 4G network, ensuring the real-time nature and transmission efficiency of the monitoring data. Among them, for the identification of termite activities, an RK3588 computing platform is adopted, which can perform real-time data processing and achieve a second-level response, so as to effectively identify the termite activities around the termite-eating cylinder 13. To ensure a stable connection between the monitoring box 1 and the edge device 3, a long enough network cable 4 is used, so that the monitoring box 1 can be flexibly deployed in various environments, whether indoors or outdoors, and can ensure the stable operation of termite monitoring.
[0071] Through the capture, data processing, and transmission of termite activities by this termite visual monitoring device, the real-time performance and accuracy of termite monitoring can be ensured, and the data transmission burden and cloud pressure are also reduced, thereby improving the efficiency of termite monitoring.
[0072] Reference Figure 1 In step S2 of [reference]: According to the termite visual monitoring device, obtain an initial video frame without termite activities; calculate the pixel average value of the initial video frame to obtain a background template; obtain a new termite video frame, and use the frame difference method to calculate the absolute difference between the termite video frame and the background template; if the absolute difference is greater than the first threshold, extract the termite video frame; otherwise, update the background template according to the termite video frame;
[0073] Among them, the calculation process of the background template is expressed as:
[0074] ;
[0075] Among them, is the pixel value of the pixel point with coordinates in the background template; is the total number of selected frames, which can be 30; is the frame, and the pixel value of the pixel point with coordinates ; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template; is the frame serial number of the initial video frame.
[0076] Use the frame difference method to calculate the absolute difference between the termite video frame and the background template, that is, the background template has changed, and there may be termites, which is expressed as:
[0077] ;
[0078] Among them, is the absolute difference matrix between the current termite video frame and the background template, is the pixel value of the current termite video frame coordinate ; is the current moment.
[0079] Assume that the obtained difference matrix is expressed as:
[0080] ;
[0081] Assume that the pixel value of the pixel point (2, 2) is 150 and the background template is 180, then the absolute difference is 30. Set the first threshold to 25, then the pixel point (2, 2) is marked as a suspected termite activity area, and this frame is extracted.
[0082] Further, the process of updating the background template includes:
[0083] ;
[0084] wherein, is the updated background template; is the smoothing factor to ensure that the background template is updated slowly to adapt to environmental changes; is the pixel value of the current termite video frame; is the background template; is the current time; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template.
[0085] wherein, The update process of is expressed as:
[0086] ;
[0087] wherein, is the smoothing factor, is the updated smoothing factor; is a constant for controlling the growth rate; is the timestamp for currently updating the background template, is the timestamp for the last update of the background template.
[0088] Specifically, in this embodiment, The initial value is set to 0.1, is set to 0.05. If the absolute difference is not greater than the first threshold, the background template is updated every 10 minutes, and the update time can be adjusted according to the actual situation. If the absolute difference is greater than the first threshold, the timestamp of the last update of the background template is recorded. Until the absolute difference no longer changes, the current timestamp is recorded and the background template is updated. By dynamically updating the background template, it can better adapt to environmental changes, such as the change of the cylinder 13 eaten by termites. At the same time, it helps to distinguish termites from the background, avoids misjudging termites as part of the background, can reduce the false detection rate, lighten the burden of data processing, and thus improve the efficiency of termite monitoring.
[0089] Refer to Figure 1Step S3: Binarize the termite video frame, and use the termite detection model to obtain the bounding box coordinates and the number of bounding boxes; if the number of bounding boxes is greater than the second threshold, send the first alarm message; if the number of bounding boxes is greater than zero, segment the termite video frame to obtain grid regions; calculate the termite movement direction and termite movement speed based on the bounding box coordinates and the grid regions; combine the termite movement direction, the termite movement speed, the number of bounding boxes, and the timestamp into termite data and send it to the cloud.
[0090] Among them, the termite detection model can be YOLO or Faster R-CNN, etc. In this embodiment, YOLOV8 is selected as the termite detection model. YOLOV8 outputs a set of bounding box coordinates based on the termite video frame, and these bounding boxes enclose each termite area in the video frame. Count the number of bounding boxes to obtain the number of termites. In this embodiment, the second threshold can be set to 10, considering that the termite activity is abnormal, trigger the first alarm message, and alarm through the notification system to prompt the intensive termite activity.
[0091] In addition, if the number of bounding boxes is greater than zero, segment the current termite video frame into multiple small grid regions. Assuming the size of the video frame is W×H, the video frame can be segmented into an m×n grid to obtain m×n small regions. For example, for a video frame with a resolution of 800×600, it can be divided into a 4×3 grid, and the size of each small grid is 200×200 pixels. Through this segmentation, each grid region is regarded as a group of termites, and a unique ID is assigned to each group of termites by DeepSORT, and its cross-frame trajectory is continuously tracked. By independently analyzing each region, the accuracy of identifying termites with different behaviors is improved, and at the same time, the problem of excessive data volume caused by over-segmentation is avoided, thereby improving the efficiency of termite monitoring.
[0092] Furthermore, the calculation process of the termite movement direction and the termite movement speed includes:
[0093] Generate the termite center coordinates for the bounding box coordinates in each grid region;
[0094] Take the average value of the termite center coordinates for each frame to obtain the termite centroid coordinates, expressed as:
[0095] ;
[0096] Among them, is the centroid value in the horizontal direction, is the centroid value in the vertical direction, is the termite centroid coordinates, is the number of termites in the current frame, is the The central coordinate of a termite is the serial number of the central coordinate of the termite
[0097] For the centroid coordinates of the termites in consecutive frames, the displacement vector of the termites is calculated using the Euclidean formula, and the moving speed of the termites is obtained based on the displacement vector of the termites, expressed as:
[0098] ;
[0099] wherein is the displacement vector of the termite is the centroid coordinate of the termite in the th frame is the centroid coordinate of the termite in the th frame is the moving speed of the termite is the time between frames is the current time
[0100] For the centroid coordinates of the termites in consecutive frames, the moving direction of the termites is calculated using the azimuth calculation formula, expressed as:
[0101] ;
[0102] wherein is the moving direction of the termite
[0103] By treating the entire grid area as a group, the individual tracking of termites is simplified, and the calculation cost is reduced. In addition, by calculating the centroid trajectory, the moving direction and speed of termite activities can be clearly reflected, assisting in judging the diffusion trend of the group, providing data support for the study of termite activities, and thus improving the efficiency of termite monitoring
[0104] Refer to Figure 1 Step S4 in: Obtain the termite data from the cloud, calculate the movement index, activity index, frequency index, and termite activity level according to the termite data; obtain environmental data, output the future termite activity level using the activity prediction model according to the environmental data and the termite activity level, and send a second alarm message according to the future termite activity level
[0105] Furthermore, the calculation processes of the movement index, the activity index, the frequency index, and the termite activity level include:
[0106] Set a fixed time period, and perform direction distribution analysis on the moving direction of the termites according to the fixed time period to obtain the movement index
[0107] Expressed as:
[0108] ;
[0109] Among them, is the movement index, that is, the average direction and concentration degree of termites, and the range is , the higher the concentration degree, the larger the value; is the number of termite movement directions obtained within a fixed time period, is the serial number of the termite movement direction; is the cosine function; is the sine function; is the th termite movement direction.
[0110] According to the fixed time period, the average value of the termite movement speed is taken to obtain the average termite movement speed; the average termite movement speed is multiplied by the number of bounding boxes with weights to obtain the activity index, which is expressed as:
[0111] ;
[0112] Among them, is the activity index, is the duration of the fixed time period, is the weight of the th timestamp, is the average termite movement speed of the th timestamp, is the th timestamp of the number of bounding boxes.
[0113] Among them, By assigning different weights to timestamps, more attention can be paid to specific timestamps. In this embodiment, in order to reduce the calculation, are both set to 1.
[0114] According to the fixed time period, the number of changes in the number of bounding boxes is counted, and the number of changes is divided by the duration of the fixed time period to obtain the frequency index, which is expressed as:
[0115] ;
[0116] Among them, is the frequency index, is the number of changes in the number of bounding boxes, is the duration of the fixed time period.
[0117] The movement index, the activity index and the frequency index are normalized and weighted and summed to obtain the termite activity degree, which is expressed as:
[0118] ;
[0119] Among them, is the activity level of termites, , and are the weight factors of the movement index, activity index and frequency index, which can be 0.3, 0.5 and 0.2 respectively.
[0120] Specifically, in this embodiment, the fixed time period is set to 10 seconds. The movement index can measure whether the overall movement direction of termites is concentrated within a time period. If the movement directions of termites are highly consistent, it indicates that termites are performing collective behaviors, such as searching for food or migrating. The calculation of the activity index comprehensively considers the movement speed and activity range of termites, which helps to understand the activity level of the termite colony in a specific environment. The frequency index can reveal the fluctuation frequency of termite activities. If the activities of termites change frequently, it means that their behaviors may be more unstable. By analyzing the frequency index, the sensitivity of the termite colony to environmental changes can be better understood. By analyzing termite activities from multiple dimensions of the movement index, activity index and frequency index, the activity characteristics and rules of termites can be comprehensively reflected, and the factors to be concerned can be adjusted according to actual needs, providing data support for predicting the future activity level of termites, thus improving the efficiency of termite monitoring.
[0121] Furthermore, data related to the termite habitat environment is obtained through sensors or the local environmental monitoring system. It can be the temperature, humidity, light intensity, etc. of the termite habitat environment. In addition, the LSTM model can be selected as the activity prediction model. The LSTM model can effectively predict the future termite activities based on historical data. After inputting the environmental data and the termite activity level into the LSTM model, the LSTM model outputs the future termite activity level, that is, the termite activity level at the next moment. If the future termite activity level exceeds the third threshold, a second alarm message is sent to warn the operator that the termite activities may be abnormal in the future for a period of time. By combining environmental data for termite activity prediction, the efficiency of termite monitoring and early warning is improved, providing a strong guarantee for taking timely control measures.
[0122] Through the termite visual monitoring device, relevant video data of termite activities can be obtained in real time, and effective background modeling and difference calculation can be carried out through the frame difference method, accurately distinguishing the differences between termite activities and the background environment, ensuring that the capture of termite activities is not interfered by the outside. The boundary box coordinates and quantity of termites are extracted by using the termite detection model. When the activity level of termites reaches a certain threshold, a first alarm message will be automatically sent out to notify the staff to take corresponding measures in time, enhancing the sensitivity and response speed of termite monitoring. Then, by calculating the moving direction and speed of termites, combining the quantity of boundary boxes with the time stamp, detailed termite activity data is generated, which can not only be used for real-time monitoring, but also provide data support for subsequent activity trend analysis and prediction. All termite data is sent to the cloud. Combining the environmental data and the real-time calculated termite activity level, the activity prediction model is used to predict the future termite activities. If the prediction result shows that the future termite activities will reach a dangerous level, the system will automatically send out a second alarm message and take preventive measures in advance, improving the efficiency of termite monitoring and reducing potential damage.
[0123] Based on the intelligent analysis method for monitoring data of a termite visual monitoring device provided in Embodiment 1, a real estate development company is located in a hot and humid environment, and the underground infrastructure is extremely likely to become a place for termite activities. To ensure the structural safety of the building after the delivery of the property, this company uses an intelligent analysis system for monitoring data of a termite visual monitoring device, installs monitoring devices in the basement and the surrounding green belts, and connects the data to the cloud platform, helping the developer to prevent termite hazards during the construction period and improving the efficiency of termite monitoring.
[0124] Embodiment 2 is as follows:
[0125] Figure 4 It is a schematic structural diagram of an intelligent analysis system for monitoring data of a termite visual monitoring device of the present invention.
[0126] As Figure 4 shown, an intelligent analysis system for monitoring data of a termite visual monitoring device includes:
[0127] Referring to Figure 4 the termite visual monitoring device design module in it, which is used to monitor termite activities;
[0128] Referring to Figure 4 the video acquisition module in it, which is used to obtain the initial video frame without termite activities according to the termite visual monitoring device design module, calculate the pixel average value of the initial video frame to obtain the background template; obtain a new termite video frame, and use the frame difference method to calculate the absolute difference between the termite video frame and the background template; if the absolute difference is greater than the first threshold, extract the termite video frame; otherwise, update the background template according to the termite video frame;
[0129] Referring to Figure 4 the edge processing module in it, which is used to binarize the termite video frame, obtain the bounding box coordinates and the number of bounding boxes using the termite detection model; if the number of bounding boxes is greater than the second threshold, send the first alarm message; if the number of bounding boxes is greater than zero, segment the termite video frame to obtain grid regions; calculate the termite movement direction and termite movement speed based on the bounding box coordinates and the grid regions; combine the termite movement direction, the termite movement speed, the number of bounding boxes and the timestamp into termite data and send it to the cloud;
[0130] Referring to Figure 4 the cloud processing module in it, which is used to obtain the termite data from the cloud, calculate the movement index, activity index, frequency index and termite activity degree according to the termite data; obtain environmental data, output the future termite activity degree using the activity prediction model according to the environmental data and the termite activity degree, and send the second alarm message according to the future termite activity degree.
[0131] Figure 2 It is a schematic structural diagram of the termite visual monitoring device of the present invention.
[0132] Further, as Figure 2 shown, the termite visual monitoring device includes a monitoring box 1, a switch 2 and an edge device 3; an industrial camera 11, a bulb 12 and a termite-eating cylinder 13 are installed in the monitoring box 1, and the industrial camera 11 is connected to the switch 2 through a network cable 4 and transmits the collected termite video frames to the switch 2; the switch 2 is connected to the edge device 3 through the network cable 4; the edge device 3 receives the termite video frames, monitors the termite activities according to the termite video frames and generates the termite data; the edge device 3 transmits the termite data to the cloud through a wireless network; the gray shaded part is the soil layer, the monitoring box 1 is buried under the soil layer, and the switch 2 and the edge device 3 are placed on the soil layer.
[0133] Table 1 Composition example of the industrial camera 11
[0134]
[0135] Among them, the composition of the industrial camera 11 is shown in Table 1, including an industrial camera, an industrial lens, a power cord and a data cable. The devices configured in this way can operate stably in various environments, will not cause too high equipment costs, and provide stable video transmission and image processing, enhancing the adaptability of the system, thereby improving the efficiency of termite monitoring.
[0136] Further, the process of background template update includes:
[0137] ;
[0138] wherein, is the updated background template; is the smoothing factor; is the pixel value of the current termite video frame; is the background template; is the current time; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template;
[0139] wherein, The update process of is expressed as:
[0140] ;
[0141] wherein, is the smoothing factor, is the updated smoothing factor; is a constant for controlling the growth rate; is the timestamp for updating the background template currently, is the timestamp for updating the background template last time.
[0142] Furthermore, the calculation process of the termite moving direction and the termite moving speed includes:
[0143] Generate the termite center coordinates for the bounding box coordinates in each grid area;
[0144] Take the average value of the termite center coordinates for each frame to obtain the termite centroid coordinates;
[0145] For the termite centroid coordinates of consecutive frames, use the Euclidean formula to calculate the termite displacement vector, and obtain the termite moving speed according to the termite displacement vector;
[0146] For the termite centroid coordinates of consecutive frames, use the azimuth calculation formula to calculate the termite moving direction.
[0147] Furthermore, the calculation process of the movement index, the activity index, the frequency index and the termite activity level includes:
[0148] Set a fixed time period, and perform direction distribution analysis on the termite moving direction according to the fixed time period to obtain the movement index;
[0149] According to the fixed time period, the average termite movement speed is obtained by taking the average of the termite movement speeds, and the average termite movement speed is multiplied by the number of bounding boxes with weights to obtain the activity index.
[0150] According to the fixed time period, the number of changes in the number of bounding boxes is counted, and the number of changes is divided by the duration of the fixed time period to obtain the frequency index.
[0151] The movement index, the activity index, and the frequency index are weighted and summed to obtain the activity level of the termites.
[0152] Specifically, in this embodiment, the termite detection model uses the YOLOv5 model, and is trained with pre-annotated video frame images of termite activities to generate bounding boxes as detection targets. Faster R-CNN and SSD are selected as comparison models, and the performance comparisons on the test set are shown in Table 2. It can be seen from the table that the YOLOv5 has the highest detection accuracy and is particularly suitable for the termite detection task.
[0153] The activity prediction model selects the Transformer-LSTM hybrid model that combines multi-scale features, including a Transformer module and an LSTM module. The Transformer module can capture the long-range dependence characteristics of termite data, and the LSTM module can extract the dynamic characteristics of the activity intensity in a short time. Then, the Transformer output and the LSTM output are fused through a fully connected layer to obtain the future activity level of the termites. The Transformer-LSTM hybrid model is compared with other time series prediction models. As shown in Table 3, three other prediction models are given. It can be seen from the table that the Transformer-LSTM model performs best in terms of the MAE and MAPE metrics, indicating its excellent ability to extract long-term and short-term features. The R² value is closest to 1, indicating that the prediction results are most consistent with the real data. By combining the above models, it is possible to not only monitor termite activities in real time but also provide high-precision activity trend predictions, providing comprehensive support for termite control.
[0154] Table 2 Performance Comparison of Termite Detection Models
[0155]
[0156] Table 3 Performance Comparison of Activity Prediction Models
[0157]
[0158] The project site is divided into two experimental areas. Area A uses the termite visual monitoring device of the present invention, and Area B uses a traditional termite trap. The traditional trap attracts termites with bait. When termites enter the trap and feed on the bait material, their activities trigger an internal gravity device, and the captured termites are retained by a collection device. After ensuring that both devices are started in the experiment, they are continuously operated for 30 days, and relevant data is recorded for comparison.
[0159] The experimental results show that the average response time in Area A is about 5 minutes, and the average response time in Area B is about 6 minutes. The response time in Area A is shorter and the real-time performance is stronger, making it suitable for high-frequency monitoring tasks. The false alarm rate in Area A is less than 10%, and the false alarm rate in Area B is about 11%. The false alarm rate in Area A is lower than that in Area B, which can reduce false alarm interference. In addition, Area B cannot perform activity prediction, and the prediction error in Area A is about 8.2%. It can capture active termite groups more effectively, thereby improving the efficiency of termite monitoring.
[0160] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A monitoring data intelligent analysis method of a termite visual monitoring device, characterized in that: include: Step S1: designing a visual termite monitoring device, wherein the visual termite monitoring device is used to monitor termite activities; Step S2: according to the termite visualization monitoring device, an initial video frame without termite activity is obtained; the pixel average value of the initial video frame is calculated to obtain a background template; a new termite video frame is obtained, and the absolute difference between the termite video frame and the background template is calculated using a frame difference method; if the absolute difference is greater than a first threshold, the termite video frame is extracted; otherwise, the background template is updated according to the termite video frame; Step S3: binarizing the termite video frame, and using the termite detection model to obtain the coordinates of the bounding boxes and the number of bounding boxes; if the number of bounding boxes is greater than a second threshold, issuing a first alarm message; if the number of bounding boxes is greater than zero, segmenting the termite video frame to obtain grid areas; Obtaining a termite movement direction and a termite movement speed according to the bounding box coordinates and the grid area; The calculation process of the termite movement direction and termite movement speed includes: For the bounding box coordinates in each of the grid areas, generating termite center coordinates; Taking the average value of the termite center coordinates in each frame to obtain the termite center of gravity coordinates; For the coordinates of the termite center of gravity of the continuous frames, the termite displacement vector is calculated using the Euclidean formula, and the termite movement speed is obtained according to the termite displacement vector; The termite moving direction is calculated using an azimuth calculation formula for the coordinates of the termite center of gravity in continuous frames; Combining the termite movement direction, the termite movement speed, the number of bounding boxes and the timestamp into termite data and sending the data to the cloud; Step S4: Obtain the termite data from the cloud, and calculate the mobility index, activity index, frequency index and termite activity level; the calculation process of the mobility index, activity index, frequency index and termite activity level includes: Setting a fixed time period, and performing a direction distribution analysis on the termite movement direction according to the fixed time period to obtain the movement index; According to the fixed time period, averaging the termite movement speeds to obtain an average termite movement speed; weighted multiplying the average termite movement speed by the number of bounding boxes to obtain the activity index; According to the fixed time period, counting the number of changes in the number of bounding boxes, and dividing the number of changes by the length of the fixed time period to obtain the frequency index; The movement index, the activity index and the frequency index are weighted and summed to obtain the termite activity level; Environmental data is acquired, future termite activity levels are output using an activity prediction model according to the environmental data and the termite activity levels, and a second alarm message is issued according to the future termite activity levels.
2. The monitoring data intelligent analysis method of a termite visual monitoring device according to claim 1 is characterized in that: The termite visual monitoring device comprises a monitoring box (1), a switch (2) and an edge device (3); an industrial camera (11), a light bulb (12) and a termite edible cylinder (13) are installed in the monitoring box (1); the industrial camera (11) is connected to the switch (2) via a network cable (4) and transmits the collected termite video frames to the switch (2); the switch (2) is connected to the edge device (3) via the network cable (4); the edge device (3) receives the termite video frames, monitors the termite activities according to the termite video frames, and generates the termite data; the edge device (3) transmits the termite data to the cloud via a wireless network.
3. The monitoring data intelligent analysis method of a termite visual monitoring device according to claim 1 is characterized in that: The background template updating process includes: ; in, The updated coordinates are The background template; is the smoothing factor; is the pixel value of the current termite video frame; is the background template; for the current moment; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template; in, The update process is expressed as: ; in, is the smoothing factor; is a constant that controls the speed increase; is the timestamp of the current update of the background template, is the timestamp of the last update of the background template.
4. A monitoring data intelligent analysis system for a termite visual monitoring device, characterized in that: include: Termite visual monitoring device design module, used to monitor termite activities; The video acquisition module is used to design a module for the visual termite monitoring device, obtain an initial video frame without termite activity, calculate the pixel average value of the initial video frame, and obtain a background template; obtain a new termite video frame, and use a frame difference method to calculate the absolute difference between the termite video frame and the background template; if the absolute difference is greater than a first threshold, extract the termite video frame; otherwise, update the background template according to the termite video frame; an edge processing module, for binarizing the termite video frame, and obtaining bounding box coordinates and the number of bounding boxes using a termite detection model; if the number of bounding boxes is greater than a second threshold, issuing a first alarm message; if the number of bounding boxes is greater than zero, segmenting the termite video frame to obtain a grid area; Calculate the termite movement direction and termite movement speed according to the bounding box coordinates and the grid area; The calculation process of the termite movement direction and termite movement speed includes: For the bounding box coordinates in each of the grid areas, generating termite center coordinates; Taking the average value of the termite center coordinates in each frame to obtain the termite center of gravity coordinates; For the coordinates of the termite center of gravity of the continuous frames, the termite displacement vector is calculated using the Euclidean formula, and the termite movement speed is obtained according to the termite displacement vector; The termite moving direction is calculated using an azimuth calculation formula for the coordinates of the termite center of gravity in continuous frames; Combining the termite movement direction, the termite movement speed, the number of bounding boxes and the timestamp into termite data and sending the data to the cloud; A cloud processing module is used to obtain the termite data from the cloud, and calculate the mobility index, activity index, frequency index and termite activity level according to the termite data; the calculation process of the mobility index, activity index, frequency index and termite activity level includes: Setting a fixed time period, and performing a direction distribution analysis on the termite movement direction according to the fixed time period to obtain the movement index; According to the fixed time period, averaging the termite movement speeds to obtain an average termite movement speed; weighted multiplying the average termite movement speed by the number of bounding boxes to obtain the activity index; According to the fixed time period, counting the number of changes in the number of bounding boxes, and dividing the number of changes by the length of the fixed time period to obtain the frequency index; The movement index, the activity index and the frequency index are weighted and summed to obtain the termite activity level; Environmental data is acquired, future termite activity levels are output using an activity prediction model according to the environmental data and the termite activity levels, and a second alarm message is issued according to the future termite activity levels.
5. The monitoring data intelligent analysis system of the termite visual monitoring device according to claim 4 is characterized in that: The termite visual monitoring device comprises a monitoring box (1), a switch (2) and an edge device (3); an industrial camera (11), a light bulb (12) and a termite edible cylinder (13) are installed in the monitoring box (1); the industrial camera (11) is connected to the switch (2) via a network cable (4) and transmits the collected termite video frames to the switch (2); the switch (2) is connected to the edge device (3) via the network cable (4); the edge device (3) receives the termite video frames, monitors the termite activities according to the termite video frames, and generates the termite data; the edge device (3) transmits the termite data to the cloud via a wireless network.
6. The monitoring data intelligent analysis system of the termite visual monitoring device according to claim 4 is characterized in that: The process of updating the background template includes: ; in, The background template is updated; is the smoothing factor; is the pixel value of the current termite video frame; is the background template; for the current moment; is the horizontal distance from the lower left corner of the background template; is the vertical distance from the lower left corner of the background template; in, The update process is expressed as: ; in, is the smoothing factor, is the updated smoothing factor; is a constant that controls the speed increase; is the timestamp of the current update of the background template, is the timestamp of the last update of the background template.
Citation Information
Patent Citations
Automatic remote termite monitoring system based on internet of things
CN105230588A
Intelligent insect trap and monitoring system
US20220361471A1