Regional forestry pest intelligent prevention and control method
By using intelligent identification and risk assessment technologies, combined with the U-Net model and A-Star algorithm, the power of insecticidal lamps and the spraying path of drones are optimized, solving the problems of low identification efficiency and resource waste in the control of forest pests, and achieving precise control and environmentally friendly control effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN LINKEDA AGRI & FORESTRY TECH SERVICE CO LTD
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Current technologies for controlling forest pests suffer from problems such as low pest identification efficiency, inaccurate early warning, and insufficient intelligence in control methods, leading to resource waste and environmental pollution.
Intelligent recognition technology is used in combination with the U-Net model and A-Star algorithm to generate cruise paths. Pest species are identified by Chebyshev distance and cosine similarity. Pest risk assessment models are constructed by combining environmental factor data to optimize the power control of insecticidal lamps and the spraying path of drones.
It enables precise identification and distribution assessment of pests, reduces resource waste, improves control efficiency, and reduces the risk of environmental pollution.
Smart Images

Figure CN121432944B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of forestry protection technology, specifically a method for intelligent control of regional forest pests. Background Technology
[0002] The outbreak and spread of forest pests has always been a key issue restricting forestry development. It can hinder tree growth and sharply reduce timber production, as well as damage biodiversity and cause secondary disasters such as forest fires, resulting in huge ecological and economic losses.
[0003] Currently, forestry pest control still faces many technical bottlenecks: Pest identification is inefficient, relying on staff experience, which is insufficient to differentiate between pests with similar morphologies, making it difficult to quickly match pest types with corresponding control measures; risk warnings lack scientific rigor, with existing warnings largely based on pest density data, failing to fully integrate key information such as environmental factors or spatial aggregation characteristics, leading to delayed warnings and inaccurate risk assessments; and control methods lack intelligence, with insecticidal lamps often operating at fixed power, resulting in energy waste or poor insecticidal effects, and drone spraying path planning lacking global optimization, easily leading to missed sprays and repeated spraying, causing pesticide waste and environmental pollution.
[0004] Therefore, intelligent control methods for regional forestry pests are needed to solve the above problems. Summary of the Invention
[0005] To address the technical problems mentioned in the background section, this invention provides a method for intelligent control of regional forest pests.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] This invention provides a method for intelligent control of regional forest pests, comprising the following steps:
[0008] Step 1: Pest Distribution: The intelligent identification remote monitoring station triggers the camera to take pictures of pests in the forest area. The pest pictures are processed based on the U-Net model and connected region analysis, and environmental factor data are collected simultaneously. The UAV then generates a cruise path through the A-Star algorithm, and a wide-area image is collected based on the multispectral camera to generate a pest density heat map.
[0009] Step 2, Pest Type Identification: Establish a pest feature template library, filter pest types by Chebyshev distance and cosine similarity, and then identify pest types in each region by weighted voting based on morphological features, color features and texture features.
[0010] Step 3, Pest Early Warning: Based on environmental factor data, calculate entropy weight, construct an environmental pest matter-element model through matter-element extension algorithm to obtain environmental suitability correlation degree, quantify the forest pest density heat map to obtain forestry density risk value, and obtain pest risk correlation degree based on risk correlation degree and forestry density risk value.
[0011] Step 4: Automated processing: Based on reinforcement learning, the optimal power control command for the fully automatic insecticidal lamp is generated, and then the optimal spraying path of the drone is obtained through a genetic algorithm.
[0012] In this application, based on step one, the intelligent identification of remote monitoring stations triggers cameras to capture photos of insect infestations in the forest area. The insect infestation photos are processed using the U-Net model and connected component analysis, and environmental factor data is collected simultaneously. The UAV generates a cruise path using the A-Star algorithm, and a wide-area image is acquired using a multispectral camera to generate a heat map of insect density. The specific steps are as follows:
[0013] The camera takes photos of nearby insect infestations according to preset parameters. Each trigger captures several consecutive images, covering the understory, middle trunk, and understory vegetation within the monitoring radius of the station. These consecutive images are input into a trained U-Net model, which outputs an insect segmentation map (PS) through a Softmax activation function. A preset probability threshold is then applied. Generate a binary segmentation mask MC, whose segmentation logic is as follows: , where 1 represents the pest-affected area and 0 represents the forestry background area;
[0014] The mask is segmented using distance transform and watershed algorithm to separate the contiguous pest regions. Specifically, the Euclidean distance DR from each foreground pixel to the background is calculated, and the calculation logic is as follows: Where x and y are the coordinates of the target pixel point from which the distance is to be calculated. and The coordinates of the nearest background pixel to the target pixel (x,y) are used as seed points with the local maxima of the distance transformation. The watershed algorithm is executed to segment the sticky region. An area threshold SM is set, and connected components with an area < SM after segmentation are removed to obtain the separated pest region.
[0015] An 8-neighbor connected region labeling algorithm is used to traverse the separated pest images and label each independent pest target. Specifically, the labeling matrix LX=0 and the individual number are initialized. The image pixels of each separated pest region are traversed. If the separated pest region of a pixel is 1 and the labeling matrix is 0, then the 8-neighbor pixels of the pest pixel are recursively labeled as the first body. After all pest pixels are labeled, the individual number is incremented by one to obtain the connected region set.
[0016] Extract the morphological features of each connected component, including aspect ratio and roundness. Retain connected components whose aspect ratio and roundness are within the corresponding preset morphological range to obtain effective connected components. Statistically count the number of remaining effective connected components after filtering and their corresponding aspect ratio and roundness to obtain the number and body shape characteristics of each pest.
[0017] Environmental data of forestry are collected in real time by environmental sensors, including real-time temperature, relative humidity, light intensity and cumulative precipitation; the number, size characteristics and environmental data of various pests are uploaded to the Internet of Things platform.
[0018] By inputting topographic data, tree species distribution data, and historical pest occurrence data of the target forest area through GIS geographic information, a forest area information database is constructed. The tree species distribution data includes tree species type, stand density, and tree age, while the historical pest occurrence data includes pest type, occurrence time, and occurrence range.
[0019] After receiving insect infestation images and environmental factor data uploaded by monitoring stations, the IoT cloud platform triggers a drone patrol if any of the following conditions are met: Condition 1: The number of pests identified in a single image collected by the monitoring station is greater than or equal to a preset threshold; Condition 2: Environmental factors meet the high incidence conditions of the target pest within several consecutive collection cycles; Condition 3: A patrol command is issued remotely by the operator. Taking the location of the monitoring station that triggers the patrol as the starting point of the path, if multiple adjacent monitoring stations trigger patrols simultaneously, the geometric center of each monitoring station is used as the starting point. Topographic data and tree species distribution data from the forest area information database are then used to construct a three-dimensional forestry model. The three-dimensional forestry model is embedded into the A* algorithm, and the actual cost (QC) of the drone is calculated. The calculation logic is as follows: ,in This represents the cumulative actual cost from the starting point to the previous node m. DC represents the cumulative actual cost from the starting point to the current node, and DC represents the Euclidean distance from the current node to the previous node. To preset the terrain cost coefficient, This is the energy consumption cost coefficient, which is related to the flight altitude difference. Its construction logic is as follows: Where az represents altitude and ac represents the altitude of the previous node. A preset altitude threshold is set; then, a heuristic function is calculated using weighted Euclidean distance to obtain the estimated cost. The actual cost of the UAV and the estimated cost are added together to obtain the cost function. The flight path corresponding to the minimum cost function is obtained, which is the cruise path. Forestry images are then collected based on the cruise path.
[0020] Obtain the pest quantity N and the corresponding total monitoring coverage area SG and SK for each monitoring station. Calculate the local pest density DG for each monitoring station using the density formula. The calculation logic is as follows: The calculation logic for obtaining wide-area pest density values based on local pest density is as follows: ,in The correlation coefficient of the vegetation index is obtained by fitting the historical vegetation index data of the forest area in recent years and the corresponding measured density data of pests using the least squares method. JH is the vegetation index, which is obtained based on the near-infrared and red light band data collected by the UAV multispectral camera.
[0021] The target forest area is divided into grids of the same size to obtain several basic heat map units. The wide-area pest density value is then assigned to each grid unit to generate a grid density matrix. The grid density matrix is interpolated using the Kriging interpolation algorithm to obtain filled grids. The corresponding color gradient is matched according to the preset density level. The color gradient includes green, yellow and red. The forest area pest density heat map is then rendered.
[0022] In this application, based on step two, a pest feature template library is established. Pest species are screened using Chebyshev distance and cosine similarity. Then, pest types in each region are identified by weighted voting based on morphological features, color features, and texture features. The specific steps are as follows:
[0023] Construct a pest feature template library using the name, template feature vector, and feature thresholds for each pest;
[0024] The morphological features are normalized to obtain the morphological features to be identified. The Chebyshev distance is then calculated using these morphological features. The calculation logic is as follows: Where KL is the normalized aspect ratio of the pest to be identified. Here, represents the normalized aspect ratio of the g-th type of pest in the feature template library, and CH represents the normalized circularity value. Let g be the normalized value of the circularity of the g-th type of pest in the feature template library, where g is the pest type number; calculate the cosine similarity between the morphological feature to be identified and the feature vector of each type of pest template in the template library; calculate the weighted sum of Chebyshev distance and cosine similarity to obtain the comprehensive matching degree; retain the types with comprehensive matching degree ≥ preset matching degree to obtain candidate types; if there is only 1 candidate type left, directly determine the type; if there are multiple candidate types left, trigger the weighted voting algorithm.
[0025] The weighted voting algorithm converts the morphological features to be identified into morphological dimension candidate categories. Then, based on the separated pest image, it obtains the mean hue and mean saturation of the pest region, matches it with the pest feature template library, and outputs color dimension candidate categories. The pest region is converted into a grayscale image, the gray-level co-occurrence matrix is calculated, and the contrast and entropy of the gray-level co-occurrence matrix are extracted. Then, it matches it with the pest feature template library again and outputs texture dimension candidate categories. The morphological dimension candidate categories, color dimension candidate categories, and texture dimension candidate categories are weighted and voted to obtain the score corresponding to each pest category. The category with the highest score is selected as the pest category.
[0026] In this application, based on step three, the entropy weight is calculated based on environmental factor data. An environmental pest matter-element model is constructed using the matter-element extension algorithm to obtain the environmental suitability correlation degree. Furthermore, the forest pest density heatmap is quantified to obtain the forestry density risk value. Based on the risk correlation degree and the forestry density risk value, the pest risk correlation degree is obtained. The specific steps are as follows:
[0027] The forest area is set up with f monitoring points and h environmental factors, and an environmental factor decision matrix is constructed. , Given the value of the q-th factor at the p-th monitoring point, calculate the information entropy of the environmental factor using the environmental factor decision matrix. Its calculation logic is as follows: Where ln is the natural logarithm and J is the weight value, the total standardized value is obtained by summing the standardized values of environmental factors at each monitoring point, and then the weight value of that factor at that point is obtained by dividing the standardized value of that factor at each individual monitoring point by the total standardized value. The entropy weight is then obtained through information entropy. Its calculation logic is as follows: ;
[0028] An environmental pest matter-element model is constructed, with the matter element set as R=(G,A,B), where G represents the target pest species, A represents environmental factors, and B represents the environmental suitability range for each pest species. The correlation function is then calculated based on the environmental suitability range. Its calculation logic is as follows: ,in Let be the distance function. for The complement of represents the unsuitable interval; then, the environmental suitability correlation is obtained through the correlation function and entropy weight, and its calculation logic is as follows: , ≥0 indicates that the overall environment is suitable. <0 indicates unsuitable; the forest pest density heatmap is uniformly divided into several grids, and the risk value of each grid is obtained based on a preset density threshold. Hotspot function acquisition The statistical measure, its calculation logic is as follows: Where Z is the number of neighboring raster cells, and c is the neighboring raster cell number. Spatial weights, The normalized density mean of all neighboring graticles. Let i be the standardized density standard deviation of all neighboring graticles, and DC be the pest density. The spatial clustering risk value is obtained by normalizing the statistics, and the forestry density risk value is obtained by weighted summation of the single grid risk value and the spatial clustering risk value.
[0029] The pest prediction model inputs the pest species, forestry density risk value, and environmental suitability correlation into the model and outputs the pest risk correlation. If the pest risk correlation is greater than the preset correlation threshold, an early warning is triggered.
[0030] In this application, based on step four, which generates the optimal power control command for the fully automatic insecticidal lamp using reinforcement learning, and then obtains the optimal spraying path for the drone using a genetic algorithm, the specific steps are as follows:
[0031] Each insecticidal lamp has a state space, including the average pest density in its coverage area and the lamp's energy consumption at the previous moment. Its action space is set to power level selection, including high, medium, and low power levels, and it receives rewards for its insecticidal effect. and energy consumption penalty The reward function is obtained by weighted summation, and the calculation logic for the insecticidal effect reward and energy consumption penalty are as follows: , Where Du is the remaining pest density in the covered area under the selected power of the insecticidal lamp, De is the average initial pest density in the covered area of the insecticidal lamp, and Ca is the energy consumption coefficient when the power level of the insecticidal lamp is selected. It has the highest energy efficiency coefficient among all power settings of the insecticidal lamp;
[0032] The optimal power of each insecticidal lamp in the current state is obtained by using the state space, action space, and reward function. The calculation logic is as follows: ,in RC represents the power action of the insecticidal lamp, and RC represents the immediate reward after the action is executed. For state space, For the number of iterations, The insecticidal lamp is in operation. The action value of selecting the power action; the optimal power is sent to the corresponding insecticidal lamp;
[0033] Using the red and yellow grids in the forest pest density heatmap as nodes for pest control paths, multiple pest control paths are randomly generated. A fitness function is set based on path length, energy consumption, and spray coverage rate. The calculation logic is as follows: ,in This represents the total length of the insecticidal path. A maximum length is preset for the random path, and TE represents the total energy consumption of the drone. The maximum energy consumption of the drone is CV, the spray coverage rate is CV, and Y1, Y2 and Y3 are corresponding fixed preset coefficients, which are 0.48, 0.34 and 0.18 respectively.
[0034] The insecticidal paths are sorted from high to low fitness values and genetic operations are performed, including selection, crossover, and mutation operations, to output the optimal spraying path and send it to the corresponding UAV control terminal.
[0035] Compared with the prior art, the beneficial effects of the present invention are:
[0036] By using intelligent monitoring stations and drones for collaborative monitoring, and through the U-Net model and connected region analysis, accurate segmentation and separation of contiguous regions of pest images are achieved, effectively extracting the number and size characteristics of pests, and solving the problems of limited coverage and high misjudgment rate of traditional manual monitoring; the drones generate terrain-adaptive cruise paths based on the A-Star algorithm, and combine them with Kriging interpolation to generate pest density heat maps, presenting the wide-area pest distribution.
[0037] The entropy weight method is used to objectively determine the weights of environmental factors. An environmental pest matter-element model is constructed through the matter-element extension algorithm. By integrating the correlation between environmental suitability and forestry density risk value, a multi-dimensional pest risk correlation assessment system is generated, which solves the problem of traditional early warning relying on density data and can predict pest outbreaks and risk classification.
[0038] The power control of insecticidal lamps is optimized based on rules and reinforcement learning to balance insecticidal effect and energy consumption, and reduce energy waste or insufficient control caused by fixed power operation; the spraying path of drones is planned by genetic algorithm, taking into account path length, energy consumption and spraying coverage, to reduce repeated spraying and missed spraying. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. The following drawings are not drawn to scale according to the actual size, but are intended to illustrate the main idea of the present invention.
[0040] Figure 1 This is a diagram illustrating the method steps of the present invention. Detailed Implementation
[0041] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are also within the scope of protection of the present invention.
[0042] Please refer to Figure 1 As shown, this invention provides an intelligent control method for regional forestry pests, comprising the following steps:
[0043] Step 1: Pest Distribution: The intelligent identification remote monitoring station triggers the camera to take pictures of pests in the forest area. The pest pictures are processed based on the U-Net model and connected region analysis, and environmental factor data are collected simultaneously. The UAV then generates a cruise path through the A-Star algorithm, and a wide-area image is collected based on the multispectral camera to generate a pest density heat map.
[0044] Step 2, Pest Type Identification: Establish a pest feature template library, filter pest types by Chebyshev distance and cosine similarity, and then identify pest types in each region by weighted voting based on morphological features, color features and texture features.
[0045] Step 3, Pest Early Warning: Based on environmental factor data, calculate entropy weight, construct an environmental pest matter-element model through matter-element extension algorithm to obtain environmental suitability correlation degree, quantify the forest pest density heat map to obtain forestry density risk value, and obtain pest risk correlation degree based on risk correlation degree and forestry density risk value.
[0046] Step 4: Automated processing: Based on reinforcement learning, the optimal power control command for the fully automatic insecticidal lamp is generated, and then the optimal spraying path of the drone is obtained through a genetic algorithm.
[0047] In this application, based on step one, the intelligent identification of remote monitoring stations triggers cameras to capture photos of insect infestations in the forest area. The insect infestation photos are processed using the U-Net model and connected component analysis, and environmental factor data is collected simultaneously. The UAV generates a cruise path using the A-Star algorithm, and a wide-area image is acquired using a multispectral camera to generate a heat map of insect density. The specific steps are as follows:
[0048] The camera takes photos of nearby insect infestations according to preset parameters. Each trigger captures several consecutive images, covering the understory, middle trunk, and understory vegetation within the monitoring radius of the station. These consecutive images are input into a trained U-Net model, which outputs an insect segmentation map (PS) through a Softmax activation function. A preset probability threshold is then applied. Generate a binary segmentation mask MC, whose segmentation logic is as follows: Where 1 represents the pest area and 0 represents the forestry background area; it should be noted that the U-Net model optimizes the characteristics of forestry pest images by adding dilated convolutions to expand perception and enhance pest features. Its construction consists of convolutional layers and pooling layers. Dilated convolutions replace convolutional layers, the Dice loss function is used to optimize the model, and it is trained with historical pest data to iteratively obtain the U-Net model.
[0049] The mask is segmented using distance transform and watershed algorithm to separate the contiguous pest regions. Specifically, the Euclidean distance DR from each foreground pixel to the background is calculated, and the calculation logic is as follows: Where x and y are the coordinates of the target pixel point from which the distance is to be calculated. and The coordinates of the nearest background pixel to the target pixel (x,y) are used as the local maxima of the distance transformation as the seed point. The watershed algorithm is executed to segment the sticky region. An area threshold SM is set, and connected components with an area less than the area threshold SM after segmentation are removed to obtain the separated pest region. It should be noted that the area threshold is set according to the average size of the target pest, such as SM=20 pixels for pine caterpillar.
[0050] An 8-neighbor connected component labeling algorithm is used to traverse and separate the pest images, labeling each independent pest target. Specifically, the labeling matrix LX=0 and the individual number are initialized. The image pixels of each separated pest region are traversed. If the separated pest region of a pixel is 1 and the labeling matrix is 0, then the 8 neighbor pixels of that pest pixel are recursively labeled as the first entity. After all pest pixels are labeled, the individual number is incremented by one to obtain the set of connected components. It should be noted that at the beginning of the algorithm, a labeling matrix of the same size as the pest image mask is created. Initially, the individual number of all positions is set to 0, representing the corresponding background or unprocessed foreground pixels. If a pixel is detected as a pest region and has not been labeled, it means that a new independent pest target has been found. This pixel and all the connected pest pixels in its 8 neighborhoods are all labeled with the current individual number. After labeling, the individual number is incremented by one to prepare a unique number for the next new independent pest target. Each individual number corresponds to a unique independent pest target. For example, individual number = 1 is the first pest, individual number = 2 is the second, and so on. The final value of the individual number is the number of connected components.
[0051] Extract the morphological features of each connected component, including aspect ratio and roundness. Retain connected components whose aspect ratio and roundness are within the corresponding preset morphological range to obtain effective connected components. Statistically count the number of remaining effective connected components after filtering and their corresponding aspect ratio and roundness to obtain the number and body shape characteristics of each pest.
[0052] Environmental data of forestry are collected in real time by environmental sensors, including real-time temperature, relative humidity, light intensity and cumulative precipitation; the number, size characteristics and environmental data of various pests are uploaded to the Internet of Things platform.
[0053] By inputting topographic data, tree species distribution data, and historical pest occurrence data of the target forest area through GIS geographic information, a forest area information database is constructed. The tree species distribution data includes tree species type, stand density, and tree age, while the historical pest occurrence data includes pest type, occurrence time, and occurrence range.
[0054] After receiving insect infestation images and environmental factor data uploaded by monitoring stations, the IoT cloud platform triggers a drone patrol if any of the following conditions are met: Condition 1: The number of pests identified in a single image collected by the monitoring station is greater than or equal to a preset threshold; Condition 2: Environmental factors meet the high incidence conditions of the target pest within several consecutive collection cycles; Condition 3: A patrol command is issued remotely by the operator. Taking the location of the monitoring station that triggers the patrol as the starting point of the path, if multiple adjacent monitoring stations trigger patrols simultaneously, the geometric center of each monitoring station is used as the starting point. Topographic data and tree species distribution data from the forest area information database are then used to construct a three-dimensional forestry model. The three-dimensional forestry model is embedded into the A* algorithm, and the actual cost (QC) of the drone is calculated. The calculation logic is as follows: ,in This represents the cumulative actual cost from the starting point to the previous node m. DC represents the cumulative actual cost from the starting point to the current node, and DC represents the Euclidean distance from the current node to the previous node. To preset the terrain cost coefficient, This is the energy consumption cost coefficient, which is related to the flight altitude difference. Its construction logic is as follows: Where az represents altitude and ac represents the altitude of the previous node. A preset altitude threshold is set; then, a heuristic function is calculated using weighted Euclidean distance to obtain the estimated cost. The actual cost of the UAV and the estimated cost are added together to obtain the cost function. The flight path corresponding to the minimum cost function is obtained, which is the cruise path. Forestry images are then collected based on the cruise path.
[0055] Obtain the pest quantity N and the corresponding total monitoring coverage area SG and SK for each monitoring station. Calculate the local pest density DG for each monitoring station using the density formula. The calculation logic is as follows: The calculation logic for obtaining wide-area pest density values based on local pest density is as follows: ,in The correlation coefficient of the vegetation index is obtained by fitting the historical vegetation index data of the forest area in recent years and the corresponding measured density data of pests using the least squares method. JH is the vegetation index, which is obtained based on the near-infrared and red light band data collected by the UAV multispectral camera.
[0056] The target forest area is divided into grids of the same size to obtain several basic heat map units. The wide-area pest density value is then assigned to each grid unit to generate a grid density matrix. The grid density matrix is interpolated using the Kriging interpolation algorithm to obtain filled grids. The corresponding color gradient is matched according to the preset density level. The color gradient includes green, yellow and red. The forest area pest density heat map is then rendered. It should be noted that the density levels are as follows: low density is <5 pests / ㎡, medium density is 5-20 pests / ㎡, and high density is >20 pests / ㎡.
[0057] In this application, based on step two, a pest feature template library is established. Pest species are screened using Chebyshev distance and cosine similarity. Then, pest types in each region are identified by weighted voting based on morphological features, color features, and texture features. The specific steps are as follows:
[0058] It should be noted that the target pest samples were selected, including forestry pests such as pine caterpillars, longhorn beetles, poplar leafminer moths and sawflies. Several clear sample images were selected for each type of pest. Uniform morphological, color and texture feature extraction was performed on each type of pest sample, and the mean was calculated as the template feature vector of that type of pest. The name, template feature vector and feature threshold of each pest were used to construct a pest feature template library.
[0059] The morphological features are normalized to obtain the morphological features to be identified. The Chebyshev distance is then calculated using these morphological features. The calculation logic is as follows: Where KL is the normalized aspect ratio of the pest to be identified. Here, represents the normalized aspect ratio of the g-th type of pest in the feature template library, and CH represents the normalized circularity value. Let g be the normalized value of the circularity of the g-th type of pest in the feature template library, where g is the pest type number; calculate the cosine similarity between the morphological feature to be identified and the feature vector of each type of pest template in the template library; calculate the weighted sum of Chebyshev distance and cosine similarity to obtain the comprehensive matching degree; retain the types with comprehensive matching degree ≥ preset matching degree to obtain candidate types; if there is only 1 candidate type left, directly determine the type; if there are multiple candidate types left, trigger the weighted voting algorithm.
[0060] The weighted voting algorithm converts the morphological features to be identified into morphological dimension candidate categories. Then, based on the separated pest image, it obtains the mean hue and mean saturation of the pest region, matches it with the pest feature template library, and outputs color dimension candidate categories. The pest region is converted into a grayscale image, the gray-level co-occurrence matrix is calculated, and the contrast and entropy of the gray-level co-occurrence matrix are extracted. Then, it matches it with the pest feature template library again and outputs texture dimension candidate categories. The morphological dimension candidate categories, color dimension candidate categories, and texture dimension candidate categories are weighted and voted to obtain the score corresponding to each pest category. The category with the highest score is selected as the pest category.
[0061] In this application, based on step three, the entropy weight is calculated based on environmental factor data. An environmental pest matter-element model is constructed using the matter-element extension algorithm to obtain the environmental suitability correlation degree. Furthermore, the forest pest density heatmap is quantified to obtain the forestry density risk value. Based on the risk correlation degree and the forestry density risk value, the pest risk correlation degree is obtained. The specific steps are as follows:
[0062] The forest area is set up with f monitoring points and h environmental factors, and an environmental factor decision matrix is constructed. , Given the value of the q-th factor at the p-th monitoring point, calculate the information entropy of the environmental factor using the environmental factor decision matrix. Its calculation logic is as follows: Where ln is the natural logarithm and J is the weight value, the total standardized value is obtained by summing the standardized values of environmental factors at each monitoring point, and then the weight value of that factor at that point is obtained by dividing the standardized value of that factor at each individual monitoring point by the total standardized value. The entropy weight is then obtained through information entropy. Its calculation logic is as follows: ;
[0063] An environmental pest matter-element model is constructed, with the matter element set as R=(G,A,B), where G represents the target pest species, A represents environmental factors, and B represents the environmental suitability range for each pest species. The correlation function is then calculated based on the environmental suitability range. Its calculation logic is as follows: ,in Let be the distance function. for The complement of represents the unsuitable interval; then, the environmental suitability correlation is obtained through the correlation function and entropy weight, and its calculation logic is as follows: , ≥0 indicates that the overall environment is suitable. <0 indicates unsuitable; the forest pest density heatmap is uniformly divided into several grids, and the risk value of each grid is obtained based on a preset density threshold. Hotspot function acquisition The statistical measure, its calculation logic is as follows: Where Z is the number of neighboring raster cells, and c is the neighboring raster cell number. Spatial weights, The normalized density mean of all neighboring graticles. Let i be the standardized density standard deviation of all neighboring graticles, and DC be the pest density. The spatial clustering risk value is obtained by normalizing the statistical values. The forest density risk value is then obtained by weighted summation of the single-grid risk value and the spatial clustering risk value. It should be noted that... Hotspot function is a classic local spatial autocorrelation analysis method in spatial statistics. It compares the sum of attribute values of a certain grid and its neighboring cells with the average level of the entire forest area to determine whether the attribute value of the local area is significantly higher or lower than the global level.
[0064] The pest prediction model inputs the pest species, forestry density risk value, and environmental suitability correlation into the model and outputs the pest risk correlation. If the pest risk correlation is greater than the preset correlation threshold, an early warning is triggered.
[0065] In this application, based on step four, which generates the optimal power control command for the fully automatic insecticidal lamp using reinforcement learning, and then obtains the optimal spraying path for the drone using a genetic algorithm, the specific steps are as follows:
[0066] Each insecticidal lamp has a state space, including the average pest density in its coverage area and the lamp's energy consumption at the previous moment. Its action space is set to power level selection, including high, medium, and low power levels, and it receives rewards for its insecticidal effect. and energy consumption penalty The reward function is obtained by weighted summation, and the calculation logic for the insecticidal effect reward and energy consumption penalty are as follows: , Where Du is the remaining pest density in the covered area under the selected power of the insecticidal lamp, De is the average initial pest density in the covered area of the insecticidal lamp, and Ca is the energy consumption coefficient when the power level of the insecticidal lamp is selected. It has the highest energy efficiency coefficient among all power settings of the insecticidal lamp;
[0067] The optimal power of each insecticidal lamp in the current state is obtained by using the state space, action space, and reward function. The calculation logic is as follows: ,in RC represents the power action of the insecticidal lamp, and RC represents the immediate reward after the action is executed. For state space, For the number of iterations, The insecticidal lamp is in operation. The action value of selecting the power action; the optimal power is sent to the corresponding insecticidal lamp;
[0068] Using the red and yellow grids in the forest pest density heatmap as nodes for pest control paths, multiple pest control paths are randomly generated. A fitness function is set based on path length, energy consumption, and spray coverage rate. The calculation logic is as follows: ,in This represents the total length of the insecticidal path. A maximum length is preset for the random path, and TE represents the total energy consumption of the drone. The maximum energy consumption of the drone is CV, the spray coverage rate is CV, and Y1, Y2 and Y3 are corresponding fixed preset coefficients, which are 0.48, 0.34 and 0.18 respectively.
[0069] The insecticidal paths are sorted from high to low fitness values and genetic operations are performed, including selection, crossover, and mutation operations, to output the optimal spraying path and send it to the corresponding UAV control terminal.
[0070] The regional forestry pest intelligent control method disclosed in the above embodiments of the present invention involves formulas that are all dimensionless and calculated numerically. Dimensionlessness can be achieved using conventional methods such as standardization, which will not be elaborated upon here. Each formula is based on extensive measured data from forest areas and software simulation verification, and can meet the real needs of actual pest control scenarios. The preset parameters in the formulas can be flexibly set by those skilled in the art according to the actual terrain, tree species, pest types, and other conditions of the target forest area.
[0071] The embodiments of the present invention can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above embodiments can be embodied in whole or in part as a computer program product. This computer program product includes one or more computer instructions or computer programs. When these computer instructions or computer programs are loaded or executed on a computer (which may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device), they generate, in whole or in part, the flow or function of the prevention and control method according to the embodiments of the present invention (including core processes such as pest monitoring, identification, early warning, and automated prevention and control). The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another, for example, from one website, computer, server, or data center to another via wired (e.g., network cable) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0072] The computer-readable storage medium may be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more sets of available media. The available media include magnetic media (such as floppy disks, hard disks, and magnetic tapes), optical media (such as DVDs), or semiconductor media (such as solid-state drives).
[0073] It should be understood that in the various embodiments of the present invention, the sequence number of each process does not represent the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in the embodiments of the present invention (such as U-Net model processing, A* algorithm path planning, entropy weight method calculation, etc.) can be implemented by electronic hardware, computer software, or a combination of both. This implementation method depends on the specific application and design constraints of the technical solution and should not be considered as exceeding the protection scope of the present invention.
[0074] In the several embodiments provided by this invention, it should be understood that the disclosed prevention and control methods, systems, and related devices can be implemented in other forms. For example, the unit division described in the above embodiments is only a logical functional division, and other division methods may exist in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, direct coupling or communication connections between units can be implemented through some interfaces, and indirect coupling or communication connections may take electrical, mechanical, or other forms.
[0075] The units described as separate components may or may not be physically separate. Components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0076] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into a unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, network device, etc.) to execute all or part of the steps of the prevention and control method described in the various embodiments of the present invention. The storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, and optical disks.
[0077] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for intelligent control of regional forestry pests, characterized in that, Includes the following steps: Step 1: Intelligent identification of remote monitoring stations triggers cameras to take photos of insect infestations in the forest area. Based on the U-Net model and connected component analysis, the insect infestation photos are processed, and environmental factor data are collected simultaneously. The UAV then generates a cruise path through the A-Star algorithm, and a wide-area image is collected based on a multispectral camera to generate a heat map of insect density. Step 2: Establish a pest feature template library, filter pest types by Chebyshev distance and cosine similarity, and then identify pest types in each region by weighted voting based on morphological features, color features and texture features. Step 3: Calculate entropy weight based on environmental factor data, construct an environmental pest matter-element model using the matter-element extension algorithm to obtain the environmental suitability correlation degree, quantify the forest pest density heat map to obtain the forestry density risk value, and obtain the pest risk correlation degree based on the risk correlation degree and the forestry density risk value. The specific steps are as follows: The forest area is set up with f monitoring points and h environmental factors, and an environmental factor decision matrix is constructed. , Given the value of the q-th factor at the p-th monitoring point, calculate the information entropy of the environmental factor using the environmental factor decision matrix. Its calculation logic is as follows: Where ln is the natural logarithm, J is the weight value, and the entropy weight is obtained through information entropy. Its calculation logic is as follows: ; An environmental pest matter-element model is constructed, with the matter element set as R=(G,A,B), where G represents the target pest species, A represents environmental factors, and B represents the environmental suitability range for each pest species. The correlation function is then calculated based on the environmental suitability range. Its calculation logic is as follows: ,in Let be the distance function. for The complement of represents the unsuitable interval. Then, the environmental suitability correlation is obtained through the correlation function and entropy weight. The calculation logic is as follows: , ≥0 indicates that the overall environment is suitable. <0 indicates unsuitable; the forest pest density heatmap is uniformly divided into several grids, and the risk value of each grid is obtained based on a preset density threshold. Hotspot function acquisition The statistical measure, its calculation logic is as follows: Where Z is the number of neighboring raster cells, and c is the neighboring raster cell number. Spatial weights, The normalized density mean of all neighboring graticles. Let i be the standardized density standard deviation of all neighboring rasters, and DC be the pest density. The spatial clustering risk value is obtained by normalizing the statistics, and the forestry density risk value is obtained by weighted summation of the single grid risk value and the spatial clustering risk value. The pest species, forestry density risk value and environmental suitability correlation are input into the pest prediction model, and the pest risk correlation is output. If the pest risk correlation is greater than the preset correlation threshold, an early warning is triggered. Step 4: Generate the optimal power control command for the fully automatic insecticidal lamp based on reinforcement learning, and then obtain the optimal spraying path of the drone through a genetic algorithm.
2. The intelligent control method for regional forestry pests according to claim 1, characterized in that, The intelligent identification system triggers cameras at remote monitoring stations to capture images of insect infestations in the forest area. These images are then processed using the U-Net model and connected component analysis, while simultaneously collecting environmental factor data. The drone then generates a cruise path using the A-Star algorithm. The specific steps are as follows: The camera takes photos of nearby insect infestations according to preset parameters. Each trigger captures several consecutive images, covering the understory, middle trunk, and understory vegetation within the monitoring radius of the station. These consecutive images are input into a trained U-Net model, which outputs an insect segmentation map through a Softmax activation function, and then passes a preset probability threshold. Generate a binary segmentation mask; The method involves segmenting the sticky pest regions in the mask using distance transform and watershed algorithm. Specifically, the Euclidean distance from each foreground pixel to the background is calculated. Local maxima of the distance transform are used as seed points. The watershed algorithm is then executed to segment the sticky regions. An area threshold is set, and connected components with an area less than the area threshold after segmentation are removed to obtain the separated pest regions. An 8-neighbor connected region labeling algorithm is used to traverse the separated pest images and label each independent pest target. Specifically, the labeling matrix and individual number are initialized. The image pixels of each separated pest region are traversed. If the separated pest region of a pixel is 1 and the labeling matrix is 0, then the 8-neighbor pixels of the pest pixel are recursively labeled as the first body. After all pest pixels are labeled, the individual number is incremented by one to obtain the connected region set. Extract the morphological features of each connected component, including aspect ratio and roundness. Retain connected components whose aspect ratio and roundness are within the corresponding preset morphological range to obtain effective connected components. Statistically count the number of remaining effective connected components after filtering and their corresponding aspect ratio and roundness to obtain the number and body shape characteristics of each pest. Environmental data of forestry are collected in real time by environmental sensors, including real-time temperature, relative humidity, light intensity, and cumulative precipitation; the number, size characteristics, and environmental data of various pests are uploaded to the Internet of Things platform.
3. The intelligent control method for regional forestry pests according to claim 2, characterized in that, The specific steps for acquiring wide-area images using a multispectral camera and generating a pest density heatmap are as follows: By inputting topographic data, tree species distribution data, and historical pest occurrence data of the target forest area through GIS geographic information, a forest area information database is constructed. The tree species distribution data includes tree species type, stand density, and tree age, while the historical pest occurrence data includes pest type, occurrence time, and occurrence range. After receiving insect infestation images and environmental factor data uploaded by monitoring stations, the IoT cloud platform triggers a drone patrol if any of the following conditions are met: Condition 1: The number of pests identified in a single image collected by the monitoring station is greater than or equal to a preset threshold; Condition 2: Environmental factors meet the high incidence conditions of the target pest within several consecutive collection cycles; Condition 3: A patrol command is issued remotely by the operator. The patrol route starts at the location of the monitoring station that triggers the patrol. If multiple adjacent monitoring stations trigger patrols simultaneously, the route starts at the geometric center of each monitoring station. It then uses terrain data and tree species distribution data from the forest information database to construct a 3D forestry model. This 3D forestry model is embedded with the A* algorithm, and the actual cost of the drone is calculated. A weighted Euclidean distance heuristic is then used to obtain the estimated cost. The actual cost of the drone is then compared with the estimated cost. The estimated costs are summed to obtain the cost function. The flight path corresponding to the minimum cost function is obtained to obtain the cruise path. Forestry images are collected based on the cruise path. The number of pests and the corresponding total monitoring coverage area for each monitoring station are obtained. The local pest density of each monitoring station is calculated using the density formula. The wide-area pest density value is obtained based on the local pest density. The target forest area is divided into several basic heat map units of the same size grid. The wide-area pest density value is then assigned to each grid unit to generate a grid density matrix. The grid density matrix is interpolated using the Kriging interpolation algorithm to obtain the filled grid. The corresponding color gradient is matched according to the preset density level. The color gradient includes green, yellow and red. The forest area pest density heat map is then rendered.
4. The intelligent control method for regional forestry pests according to claim 1, characterized in that, A pest feature template library was established, and pest species were screened using Chebyshev distance and cosine similarity. Then, morphological, color, and texture features were used as the further criteria. The specific steps are as follows: Construct a pest feature template library using the name, template feature vector, and feature thresholds for each pest; Morphological features are normalized to obtain the morphological features to be identified. Chebyshev distance is calculated using the morphological features to be identified. Cosine similarity between the morphological features to be identified and the feature vectors of each type of pest template in the template library is calculated. The Chebyshev distance and cosine similarity are weighted and summed to obtain the comprehensive matching degree. The types with comprehensive matching degree ≥ preset matching degree are retained to obtain candidate types. If there is only one candidate type, the type is directly determined. If there are multiple candidate types, a weighted voting algorithm is triggered.
5. The intelligent control method for regional forestry pests according to claim 4, characterized in that, The specific steps for identifying pest types in each region using weighted voting are as follows: The weighted voting algorithm converts the morphological features to be identified into morphological dimension candidate categories. Then, based on the separated pest image, it obtains the mean hue and mean saturation of the pest region, matches it with the pest feature template library, and outputs color dimension candidate categories. The pest region is converted into a grayscale image, the gray-level co-occurrence matrix is calculated, and the contrast and entropy of the gray-level co-occurrence matrix are extracted. Then, it matches it with the pest feature template library again and outputs texture dimension candidate categories. The morphological dimension candidate categories, color dimension candidate categories, and texture dimension candidate categories are weighted and voted to obtain the score corresponding to each pest category. The category with the highest score is selected as the pest category.
6. The intelligent control method for regional forestry pests according to claim 1, characterized in that, The specific steps for generating optimal power control instructions for fully automatic insecticidal lamps based on reinforcement learning are as follows: Set the state space for each insecticidal lamp, including the average pest density in the area covered by the lamp and the energy consumption of the lamp in the previous moment. Set the action space to select the power level, including high power level, medium power level and low power level. Obtain the insecticidal effect reward and energy consumption penalty, and sum them up by weight to obtain the reward function. The optimal power of each insecticidal lamp in the current state is obtained by using the state space, action space, and reward function, and the optimal power is then distributed to the corresponding insecticidal lamp.
7. The intelligent control method for regional forestry pests according to claim 6, characterized in that, The specific steps for obtaining the optimal spraying path for a drone using a genetic algorithm are as follows: The red and yellow grids in the forest pest density heatmap are used as nodes for pest control paths. Multiple pest control paths are randomly generated. A fitness function is set based on path length, energy consumption, and spray coverage. The pest control paths are sorted from high to low fitness values and genetic operations are performed, including selection, crossover, and mutation operations. The optimal spraying path is then output and sent to the corresponding UAV control terminal.
Citation Information
Patent Citations
Insecticidal lamp Internet of Things energy consumption optimization method and device based on edge calculation
CN114138437A
Intelligent pine wood nematode recognition system based on unmanned aerial vehicle deep learning
CN118692000A
Lightweight disease and pest early warning and capturing system
CN120615888A
Crop insect pest image intelligent identification system based on electronic information technology
CN120635825A
Satellite and unmanned aerial vehicle remote sensing monitoring prevention and control system based on insect behavior regulation and control
CN120766153A