An intelligent insect gas detection method integrating image recognition and multi-gas sensing

CN123032647APending Publication Date: 2026-11-03BEIJING LIANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611209985.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

In existing methods for detecting pests in stored grain, the lack of a unified spatiotemporal framework for image recognition and gas sensing leads to inaccurate pest location and delayed or frequent false alarms.

Method used

The grain storage space is divided into multiple three-dimensional grid units. By combining grain surface image data, internal gas concentration data of grain piles, and environmental temperature and humidity data, a unified spatiotemporal correlation framework is established by calculating the CO2 change rate and identification confidence level, and the pest verification coefficient is corrected.

Benefits of technology

It enables three-dimensional spatial positioning and early accurate warning of pests in grain warehouses, improving the accuracy and reliability of pest warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123032647A_ABST
    Figure CN123032647A_ABST
Patent Text Reader

Abstract

The application discloses an intelligent insect and gas detection method integrating image recognition and multi-gas sensing, and relates to the technical field of image processing. The method comprises the following steps: acquiring multi-source monitoring data of a target area in a granary; dividing the granary space into a plurality of three-dimensional grid units, and associating the multi-source monitoring data to the corresponding grid units according to the collection positions and time stamps; for each grid unit, calculating a carbon dioxide change rate according to the gas concentration data, identifying the pest species, quantity and identification confidence according to the grain surface image data; determining the pest damage verification coefficient of the grid unit, correcting the pest damage verification coefficient according to the environmental temperature and humidity data to obtain a corrected pest damage verification coefficient, and outputting a warning signal when the corrected pest damage verification coefficient exceeds a warning threshold. The application realizes the deep fusion of the grain surface image and the internal gas data of the grain pile and the three-dimensional spatial positioning of the pest damage, and improves the accuracy and reliability of the early warning of the stored grain pest damage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically to an intelligent insect gas detection method that integrates image recognition and multi-gas sensing. Background Technology

[0002] Existing methods for detecting stored grain pests mainly fall into two categories. The first category is image recognition-based methods for detecting pests on the grain surface. These methods involve deploying cameras on the grain silo surface to capture images and using target detection algorithms to identify the types and numbers of pests crawling or gathering on the surface. While this method can visually identify pest types, it only covers the surface area and cannot effectively detect pests lurking inside the grain pile. The second category is gas sensing-based methods for detecting pest metabolic products. This method involves placing gas sensors inside the grain pile to detect changes in carbon dioxide concentration, indirectly determining the presence of pest activity inside. When pests multiply rapidly inside the grain pile, the concentration of carbon dioxide produced by their respiration and metabolism increases significantly, while the oxygen concentration decreases accordingly. This method can reflect the pest activity status inside the grain pile, but it cannot distinguish whether the increase in carbon dioxide concentration is caused by pest activity or by normal grain respiration or changes in temperature and humidity, and it cannot provide specific information on the types and spatial distribution of pests.

[0003] In existing technologies, some solutions attempt to simply combine image recognition with gas sensing, such as calling a camera to take a picture of the grain surface for verification when an increase in carbon dioxide concentration is detected. However, the above solutions still have significant shortcomings. There is a lack of a unified spatiotemporal correlation framework between image data and gas data. The grain surface image reflects surface information, while the gas concentration reflects internal information of the grain pile. It is difficult to establish an effective correspondence between the two, resulting in insufficient information fusion, inaccurate pest location, delayed early warning, or frequent false alarms.

[0004] Therefore, there is an urgent need for an intelligent insect gas detection method that can deeply integrate grain surface image recognition with internal gas sensing of grain piles to achieve three-dimensional spatial positioning and early warning of pests. Summary of the Invention

[0005] This invention addresses the technical problems in existing technologies, such as the lack of a unified spatiotemporal correlation framework between image data and gas data, the fact that grain surface images only cover the surface while gas concentration reflects the interior but the two are difficult to correspond effectively, leading to inaccurate pest location and delayed false alarms. The invention provides an intelligent pest gas detection method that integrates image recognition and multi-gas sensing.

[0006] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: This invention provides an intelligent insect gas detection method integrating image recognition and multi-gas sensing, comprising: Acquire multi-source monitoring data of the target area within the grain warehouse, including grain surface image data, gas concentration data inside the grain pile, and ambient temperature and humidity data; The grain storage space is divided into multiple three-dimensional grid units. The grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data are associated with the corresponding grid units according to the collection location and timestamp, forming multimodal associated data for each grid unit. For each grid cell, the rate of change of carbon dioxide is calculated based on the gas concentration data, and the types and quantities of pests and the confidence level are identified based on the grain surface image data. Based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, the pest verification coefficient of the grid cell is determined, and the pest verification coefficient is positively correlated with the identification confidence level. The pest verification coefficient is corrected based on the environmental temperature and humidity data to obtain a corrected pest verification coefficient. When the corrected pest verification coefficient exceeds the warning threshold, a warning signal is output.

[0007] The beneficial effects of this invention are: Compared to existing technologies, this invention first divides the grain storage space into three-dimensional grid units and associates grain surface image data, internal gas concentration data, and environmental temperature and humidity data with the corresponding grid units according to the collection location and timestamp, establishing a unified spatiotemporal correlation framework for image data and gas data. This solves the problem of ineffective correspondence between grain surface information and internal grain pile information. Secondly, by calculating the CO2 change rate as a quantitative indicator of the metabolic activity of pests inside the grain pile, and combining it with the pest species, quantity, and recognition confidence obtained from grain surface image recognition, the pest verification coefficient is determined using the matching degree between the CO2 change rate and the pest recognition results. This achieves mutual verification between image recognition results and gas sensing data, overcoming the shortcomings of single gas sensing in distinguishing CO2 sources and single image recognition in perceiving the interior of the grain pile. Thirdly, through the calculation of CO2 vertical distribution difference and the weight allocation driven by vertical gradient, the deep CO2 change rate of the grain pile occupies a reasonable weight in pest verification, achieving effective perception and spatial positioning of pests inside the grain pile.

[0008] Finally, by compensating for the effects of ambient temperature and humidity on the CO2 diffusion rate and solubility, the interference of temperature and humidity changes on gas concentration measurement is eliminated, improving the accuracy and reliability of pest early warning. This invention enables three-dimensional spatial positioning and early, accurate warning of grain warehouse pests. Attached Figure Description

[0009] Figure 1 A flowchart illustrating an intelligent insect gas detection method integrating image recognition and multi-gas sensing provided by the present invention; Figure 2A logical schematic diagram of an intelligent insect gas detection method integrating image recognition and multi-gas sensing provided by the present invention; Figure 3 This is a schematic diagram of the parallel computing logic for dual-source gas imaging provided by the present invention. Detailed Implementation

[0010] Examples, such as Figure 1 , Figure 2 , Figure 3 As shown, this embodiment of the invention provides an intelligent insect gas detection method integrating image recognition and multi-gas sensing, comprising: S10: Acquire multi-source monitoring data of the target area within the grain warehouse, including grain surface image data, gas concentration data inside the grain pile, and ambient temperature and humidity data; Grain storage environments are multi-physics coupled systems. The grain surface is the direct representation layer of pest activity; when pests crawl or gather on the grain surface, their species and quantity information can be directly captured by image acquisition equipment. However, most stored grain pests are photophobic and tend to burrow into the grain pile when the grain quality is good, only appearing in large numbers on the grain surface when the pest population density is too high or the grain surface temperature is suitable. Therefore, grain surface images can only reflect the pest situation that has risen to the surface and cannot detect pest activity occurring inside the grain pile. At the same time, pests continuously respire and metabolize inside the grain pile, consuming oxygen and releasing carbon dioxide, leading to an increase in CO2 concentration and a decrease in O2 concentration inside the grain pile. These gas concentration changes can be captured by gas sensors deployed inside the grain pile. However, an increase in CO2 concentration may also originate from the grain's own respiration or changes in gas diffusion rate caused by temperature and humidity variations. Relying solely on gas concentration changes cannot accurately determine the presence of pest activity. Therefore, it is necessary to simultaneously collect grain surface image data, grain pile internal gas concentration data, and environmental temperature and humidity data to form a multi-source complementary monitoring system.

[0011] Specifically, grain surface image data is used to directly identify pests that have risen to the grain surface, while gas concentration data inside the grain pile is used to sense the metabolic activity of pests inside the grain pile, and environmental temperature and humidity data are used to correct for interference from environmental factors on gas diffusion and sensor response. Simultaneous acquisition of these multi-source data provides a complete data foundation for subsequent spatiotemporal correlation and fusion analysis.

[0012] Specifically, in this embodiment, acquiring multi-source monitoring data of the target area within the grain depot includes: Image data of the grain surface is acquired through image acquisition equipment deployed inside the grain warehouse; The CO2 and O2 concentration sequences at different heights inside the grain pile are obtained by gas sensor arrays deployed at different heights inside the grain pile, which serve as gas concentration data inside the grain pile. Ambient temperature and relative humidity data are acquired by temperature and humidity sensors deployed inside the grain warehouse, serving as ambient temperature and humidity data. The grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data are synchronized and aligned according to the collection timestamp to form multi-source monitoring data.

[0013] First, image data of the grain surface is acquired using image acquisition devices deployed within the grain silo. Preferably, the image acquisition devices employ a two-stage imaging strategy: the first stage is wide-angle overview imaging, using industrial wide-angle cameras deployed on the top of the grain silo, one per 50 to 80 square meters, to acquire panoramic images of the grain surface for preliminary assessment of the macroscopic distribution area of ​​grain pests; the second stage is local high-resolution imaging, using high-resolution industrial cameras or zoom cameras deployed on the top of the grain silo at a density of 5 to 10 square meters. When suspected pest aggregation features appear in a certain area of ​​the wide-angle overview image, the corresponding high-resolution camera is triggered to perform local magnification and capture detailed images of that area. The high-resolution camera lenses are configured with macro or telephoto lenses to ensure that a single pest occupies sufficient pixels on the imaging target surface. For example, for a grain silo with an area of ​​500 square meters, one wide-angle overview camera is deployed every 50 to 80 square meters, for a total of 6 to 10 cameras; one high-resolution camera is deployed every 5 to 10 square meters, for a total of 50 to 100 cameras, or a gimbal zoom camera can be used to achieve multi-point switching coverage with a smaller number of cameras.

[0014] Image acquisition equipment captures images of the grain surface at preset sampling times or under trigger conditions, recording the current distribution of pests on the grain surface. The preset sampling time or trigger condition refers to the time reference or event-driven condition for the image acquisition equipment to perform the shooting action. This is set comprehensively based on the activity patterns of pests in the grain silo and the response sensitivity requirements of the monitoring system; for example, it can be set to collect images every 15 minutes. When abnormal fluctuations occur in the sensor data within the grain silo, encrypted acquisition can be triggered, for example, shortening the sampling interval to 5 minutes, to capture the instantaneous characteristics of pest activity. The final acquired grain surface image data is used as input for subsequent pest target detection models to identify the types, quantities, and distribution locations of pests on the grain surface.

[0015] Secondly, CO2 and O2 concentration sequences at different heights within the grain pile were acquired using a gas sensor array deployed at various heights to serve as the internal gas concentration data. The gas sensor array consists of multiple gas sensor nodes, each containing both CO2 and O2 sensors, deployed at different heights within the grain pile. Since CO2 has a molecular weight of approximately 44, greater than the average molecular weight of air (29), it tends to sink within the grain pile, with the CO2 concentration typically higher at the bottom than at the top. Therefore, sensors need to be deployed at different heights within the grain pile to capture the vertical distribution characteristics of CO2 concentration.

[0016] For example, a set of sensors can be deployed at three locations: 20%, 50%, and 80% of the grain pile height, corresponding to the lower, middle, and upper layers of the grain pile, respectively. Each set of sensors collects CO2 and O2 concentration values ​​at a preset sampling interval, forming a concentration sequence that changes over time. The preset sampling interval is set based on the gas diffusion rate inside the grain pile and the sensitivity requirements of the pest monitoring system to concentration changes; for example, it can be set to collect data once every 5 minutes.

[0017] Simultaneously, ambient temperature and relative humidity data are acquired through temperature and humidity sensors deployed within the grain silo. These sensors are located in multiple locations within the silo, including near the grain surface, inside the grain pile, and in the top space of the silo, to collect ambient temperature and relative humidity data. Temperature and humidity affect the diffusion rate of CO2 within the grain pile and its solubility in the grain pores, and are used as compensation parameters in subsequent pest verification coefficient correction.

[0018] Finally, the grain surface image data, internal gas concentration data, and ambient temperature and humidity data are synchronized and aligned according to their acquisition timestamps to form multi-source monitoring data. Since the sampling frequencies of the image acquisition device, gas sensor, and temperature and humidity sensor may differ, all data needs to be aligned according to a unified time reference. For example, if the image acquisition device takes a picture every 15 minutes, the gas sensor collects data every 5 minutes, and the temperature and humidity sensor collects data every 10 minutes, then the data are aligned to a unified timestamp using linear interpolation or nearest neighbor matching, based on the smallest time granularity, ensuring accurate correlation of multi-source data at the same time. This synchronization and alignment provides time-consistent multi-source monitoring data for subsequent data correlation of three-dimensional mesh cells.

[0019] S20: Divide the grain storage space into multiple three-dimensional grid units, and associate the grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data with the corresponding grid units according to the collection location and timestamp to form multimodal association data for each grid unit; Secondly, after acquiring multi-source monitoring data, a unified spatiotemporal correlation framework needs to be established for image data and gas data. Since grain surface images reflect two-dimensional planar information of the grain surface, while gas concentration data reflects three-dimensional spatial information within the grain pile, their spatial dimensions are inconsistent, making direct correlation difficult. Simply correlating the entire grain surface image with the gas data of the entire grain silo will fail to pinpoint the specific spatial location of pests; fusing only image and gas data as a whole will lose information about spatial distribution differences, leading to inaccurate pest location. Therefore, this step divides the grain silo space into multiple three-dimensional grid units, each with a clearly defined spatial coordinate range, providing a unified reference system for the spatial correlation of multi-source data.

[0020] Specifically, this step involves associating grain surface image data with grid cells at the corresponding horizontal grid height level based on the acquisition location, associating CO2 and O2 concentration sequences with grid cells at the corresponding height levels based on the acquisition location, and associating environmental temperature and humidity data with all grid cells. This ensures that each grid cell carries feature information from multiple data sources. This spatial association method allows grain surface image data and internal grain pile gas data to correspond within the same spatial coordinate system. When pests are identified in the grain surface area corresponding to a certain horizontal grid, gas concentration data at various height levels within the grain pile for that grid can be retrieved simultaneously to verify whether pest activity exists within the grain pile below that grid.

[0021] Specifically, in this embodiment, the grain storage space is divided into multiple three-dimensional grid cells. The grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data are associated with the corresponding grid cells according to the collection location and timestamp, forming multimodal association data for each grid cell, including: The grain storage space is divided into multiple horizontal grids in the horizontal direction and multiple height layers in the vertical direction. The overlapping areas of each horizontal grid and each height layer constitute a three-dimensional grid unit. Each three-dimensional grid unit contains a horizontal position indicator and a height layer indicator. The grain surface image data is associated with the corresponding horizontal grid cell at the grain surface height layer according to the acquisition location; The CO2 and O2 concentration sequences were correlated to the corresponding grid cells at the height of the acquisition location. Ambient temperature and relative humidity data are correlated to all grid cells.

[0022] First, the grain silo space is divided into multiple horizontal grids and multiple vertical height layers. The overlapping areas of each horizontal grid and each height layer constitute a three-dimensional grid unit. Each three-dimensional grid unit contains a horizontal position identifier and a height layer identifier. The division of the horizontal grids is determined based on the planar dimensions of the grain silo and the monitoring accuracy requirements. For example, the bottom surface of the grain silo can be divided into rectangular grids with side lengths of 1 to 2 meters, with each grid corresponding to a horizontal position. The division of the vertical height layers is determined based on the depth of the grain pile and the number of gas sensor layers. For example, the height of the grain pile can be divided into three height layers: lower, middle, and upper. The combination of horizontal grids and height layers forms a three-dimensional grid unit. For example, the horizontal grid in the 3rd row and 4th column, combined with the middle layer height, corresponds to a three-dimensional grid unit in the middle area of ​​the central region of the grain silo. Each grid unit has a unique horizontal position identifier and a height layer identifier, which serve as coordinate indexes for subsequent data association. For example, when the height of the grain pile is 6 meters, the lower height layer corresponds to the range of 0 to 2 meters from the bottom of the grain pile, the middle height layer corresponds to the range of 2 to 4 meters, and the upper height layer corresponds to the range of 4 to 6 meters.

[0023] Secondly, the grain surface image data is associated with the corresponding horizontal grid cells at the grain surface height layer according to the acquisition location. The grain surface height layer refers to the height layer where the grain pile surface is located, usually corresponding to the uppermost layer in the three-dimensional grid. When the image acquisition device takes pictures at the top of the grain silo, each image corresponds to a specific area of ​​the grain surface, and this area has a corresponding relationship with the position of the horizontal grid. Based on the internal and external parameters and installation location of the image acquisition device, the pixel area of ​​the image is mapped to the corresponding horizontal grid. When the image identifies the presence of pests in the grain surface area corresponding to a certain horizontal grid, the identification result is stored in the grain surface height layer cell of that grid.

[0024] In an optional embodiment, the mapping process from image pixel coordinates to grain surface physical coordinates is as follows: First, three coordinate systems are defined: the image pixel coordinate system with the top left corner of the image as the origin and the unit being pixels; the grain surface physical coordinate system with a corner of the bottom surface of the grain silo as the origin and the unit being meters; and the image acquisition device coordinate system with the optical center of the camera as the origin and the unit being meters. The intrinsic and extrinsic parameter matrices of the image acquisition device are obtained through camera calibration. The intrinsic parameter matrix includes focal length, principal point coordinates, and distortion coefficients, obtained through a checkerboard calibration method or a self-calibration method based on active vision; the extrinsic parameter matrix includes the three-dimensional position coordinates and orientation angle of the camera in the grain silo space, obtained through measurement using a total station or laser rangefinder. For any point on the grain surface height layer, the mapping relationship between its coordinates in the grain surface physical coordinate system and its coordinates in the image pixel coordinate system is established by a perspective transformation matrix. The perspective transformation matrix is ​​determined by both the intrinsic and extrinsic parameter matrices. Specifically, after converting the physical coordinates of the grain surface to homogeneous coordinates, it is multiplied by the perspective transformation matrix synthesized from the intrinsic and extrinsic parameter matrices to obtain normalized image coordinates. This normalized image coordinates are then multiplied by the image size to obtain pixel coordinates. In actual calculations, a reverse mapping method is used. That is, for the coordinates of the four corner points of each horizontal grid in the grain surface physical coordinate system, the inverse transformation of the perspective transformation matrix is ​​used to calculate the corresponding positions of the four corner points in the image pixel coordinate system. All pixels within the quadrilateral region enclosed by these four pixel positions are determined to be the image region corresponding to that grid. When the pixel coordinates of the center point of the detection box output by the pest target detection model fall within the quadrilateral region corresponding to a certain grid, the pest is determined to belong to that horizontal grid.

[0025] Through the coordinate mapping calculations described above, each pest identified in the image can be precisely located to its corresponding horizontal grid, achieving accurate correlation between the grain surface image recognition results and the grid cells. If the image acquisition device uses a pan-tilt zoom method, its intrinsic and extrinsic parameters change with the focal length and angle. Therefore, the current focal length and angle values ​​need to be reread after each zoom or rotation, and the perspective transformation matrix updated in real time. It is important to note that the calibration parameters mentioned above can be pre-acquired after the image acquisition device is installed and do not need to be recalibrated during online operation; recalibration is only required when the device's position or orientation changes.

[0026] Next, the CO2 and O2 concentration sequences are associated with the corresponding grid cells at each height level of the sampling location. Gas sensors are deployed at various height levels within the grain pile, and the CO2 and O2 concentration values ​​collected by each sensor node have a clearly defined height level affiliation. The concentration data collected by the sensors at each height level are associated with all horizontal grid cells corresponding to that height level. For example, CO2 concentration data collected by sensors at the lower level of the grain pile is associated with the lower-level grid cells of all horizontal grids, and data from sensors at the middle level is associated with the middle-level grid cells of all horizontal grids. If multiple sensors are deployed at different horizontal locations within the same height level, the data is associated with the corresponding horizontal grid cells based on the sensor's horizontal location.

[0027] Finally, the ambient temperature and relative humidity data are correlated to all grid cells. Temperature and humidity sensors are typically deployed at multiple locations within the grain silo to acquire the overall ambient temperature and relative humidity. Since the distribution of temperature and humidity within the grain silo space is relatively uniform, or the scale of variation is much larger than the grid cell size, the ambient temperature and relative humidity data are copied and correlated to all three-dimensional grid cells. This ensures that each grid cell carries the current ambient temperature and relative humidity information, which is used for temperature and humidity correction of subsequent pest verification coefficients.

[0028] Through the aforementioned association operations, each three-dimensional grid cell is associated with the pest identification results at the corresponding location on the grain surface, the CO2 and O2 concentration data at the corresponding height layer inside the grain pile, and the environmental temperature and humidity data, forming multimodal associated data for that grid cell. By dividing the grid and associating the data, multi-source data with inconsistent spatial dimensions are unified into the same three-dimensional grid coordinate system, providing a structured data foundation for the subsequent calculation of pest verification coefficients.

[0029] S30: For each grid cell, calculate the carbon dioxide change rate based on the gas concentration data, and identify the pest species and quantity and the confidence level based on the grain surface image data; Furthermore, after completing the three-dimensional mesh generation and multi-source data association, each mesh cell carries spatially aligned and temporally synchronized multimodal association data. At this point, it is necessary to extract quantitative indicators that characterize pest activity from this data. Specifically, since pests continuously undergo respiratory metabolism while active inside the grain pile, their respiration produces carbon dioxide and consumes oxygen, causing the CO2 concentration inside the grain pile to change over time. Therefore, the rate of change of CO2 concentration over time is a key indicator characterizing the metabolic activity of pests. The larger the rate of change of CO2, the faster the CO2 concentration rises per unit time, and the more active the respiratory metabolism of pests inside the grain pile. This step calculates the CO2 change rate at each height layer based on the CO2 concentration sequence associated with each mesh cell through linear fitting, and further calculates the vertical distribution difference of CO2 between the surface layer of the grain and the deep layer of the grain pile, as a basis for judging the intensity of pest activity inside the grain pile.

[0030] Meanwhile, grain surface image data provides direct visual evidence of pest presence. When pests appear on the grain surface, image recognition can determine the type and quantity of pests, providing an intuitive basis for pest assessment. This step, by acquiring the pest types and quantities in the grain surface area of ​​the grid unit and calculating the recognition confidence of the grid unit, provides quantitative input parameters for the subsequent calculation of pest verification coefficients.

[0031] Specifically, in this embodiment, for each grid cell, the carbon dioxide change rate is calculated based on the gas concentration data, and the pest species and quantity are identified and the identification confidence level is determined based on the grain surface image data, including: Obtain the CO2 concentration sequence of the current grid cell at each height layer, perform linear fitting on the CO2 concentration sequence, and use the slope of the fitted line as the CO2 change rate at each height layer; The difference between the CO2 change rate at each height level inside the grain pile and the CO2 change rate at the grain surface height level is calculated, and the maximum value of the difference is taken as the CO2 vertical distribution difference. The CO2 vertical distribution difference is positively correlated with the activity intensity of pests inside the grain pile. The grain surface image data is input into a pre-trained pest target detection model, which outputs the category label and detection confidence of each pest target. The number of pest targets is counted to obtain the pest types and quantities. The average of the detection confidence scores for all pest targets is calculated as the identification confidence score.

[0032] First, the CO2 concentration sequence of the current grid cell at each height level is obtained. A linear fit is then performed on the CO2 concentration sequence, and the slope of the fitted line is taken as the CO2 change rate at each height level. The CO2 concentration sequence is a time series composed of CO2 concentration values ​​recorded by the sensor at multiple consecutive sampling times. With time as the independent variable and CO2 concentration as the dependent variable, the least squares method is used to perform a linear fit on the data points in the sequence to obtain an optimal fitted line. The slope of this fitted line is the CO2 change rate; a positive slope indicates that the CO2 concentration increases with time, and a negative slope indicates that the CO2 concentration decreases with time. The larger the absolute value of the slope, the more drastic the change in CO2 concentration.

[0033] Secondly, the difference between the CO2 change rate at each height level inside the grain pile and the CO2 change rate at the grain surface level was calculated, and the maximum value of the difference was taken as the CO2 vertical distribution difference. The CO2 change rate at the grain surface level reflects the rate of change of CO2 concentration near the grain surface, mainly affected by ventilation and the respiration of pests on the grain surface. The CO2 change rate at each height level inside the grain pile reflects the rate of change of CO2 concentration at different depths inside the grain pile, mainly affected by the respiratory metabolism of pests inside the grain pile and the respiration of the grain. Because the molecular weight of CO2 is larger than the average molecular weight of air, CO2 produced inside the grain pile tends to sink and accumulate at the bottom, resulting in a higher CO2 concentration change rate at the bottom of the grain pile than at the top. When pests are active inside the grain pile, the CO2 change rate at deeper levels increases significantly, while the CO2 change rate at the grain surface level is less affected by ventilation, and the difference between the two increases. Therefore, the greater the CO2 vertical distribution difference, the more significantly the CO2 concentration rises inside the grain pile than at the grain surface, reflecting the presence of an active CO2 source inside the grain pile, i.e., the greater the intensity of pest activity inside the grain pile.

[0034] For example, if the CO2 change rate on the grain surface is 5 ppm per hour and the CO2 change rate in the lower layer of the grain pile is 25 ppm per hour, then the vertical distribution difference of CO2 is 20 ppm per hour, indicating that there is a significant abnormal accumulation of CO2 in the lower layer of the grain pile.

[0035] Furthermore, the grain surface image data is input into a pre-trained pest target detection model, which outputs the category label and detection confidence score for each pest target. This pest target detection model is a target detection model built on a deep convolutional neural network, employing architectures such as YOLO, and is trained under supervision using grain surface images labeled with pest locations and categories as training samples. The pest target detection model performs feature extraction and region prediction on the input grain surface image, outputting the bounding box coordinates, category label, and detection confidence score for each pest target in the image. The category label indicates the species to which the pest belongs, such as common stored grain pests like the maize weevil, sawtooth flour beetle, and red flour beetle. The detection confidence score is a value between 0 and 1, representing the reliability of the pest target detection model's detection result; a higher detection confidence score indicates clearer pest features and more reliable identification.

[0036] It should be noted that the pest target detection model belongs to deep learning target detection technology. This embodiment only provides one optional implementation method and is not intended to limit the scope of protection of this invention. For example, the pest target detection model adopts a YOLOv8 network architecture, which consists of a backbone network, a neck network, and a detection head. The backbone network adopts a CSPDarknet structure, containing multiple convolutional layers and a C2f module, used to extract multi-scale feature maps from the input image, with an input image size of 640×640 pixels. The neck network adopts a feature pyramid structure and a path aggregation network to fuse feature maps of different scales, enhancing the model's ability to detect small pest targets. The detection head adopts a decoupled head structure, outputting the bounding box regression parameters and class classification probability of the target.

[0037] During training, grain surface images were collected under different lighting conditions, grain surface coverage, and insect population densities at the grain depot. Pest targets in the grain surface images were manually labeled, including the bounding box coordinates and category labels, to construct a training sample set. The training sample set was divided into training, validation, and test sets in a 7:2:1 ratio. A stochastic gradient descent optimizer was used for training, with an initial learning rate of 0.01, momentum factor of 0.937, weight decay coefficient of 0.0005, batch size of 16, and 300 training epochs. Mosaic data augmentation and hybrid data augmentation strategies were employed during training to simulate the distribution patterns of pests under different grain surface backgrounds, improving the model's generalization ability. Training stopped when the average precision of the pest detection model on the validation set no longer improved for 10 consecutive epochs, and the model with the highest average precision on the validation set was selected as the completed pest detection model. This pest detection model can meet the application requirements for pest identification in grain depots.

[0038] Finally, the number of output pest targets is counted to obtain the pest types and quantities. The average detection confidence of all pest targets is calculated as the recognition confidence. Specifically, all pest targets output by the pest target detection model are grouped and counted according to category to obtain the quantity of each type of pest. The pest types and quantities of the grain surface area of ​​the grid unit are then summarized. The detection confidence of all pest targets is extracted, and their arithmetic mean is calculated as the recognition confidence of the grid unit. A higher recognition confidence indicates that the pest features in the grain surface image are clear and the recognition result is reliable, providing a more reliable visual basis for the correction of gas data in subsequent pest verification. A lower recognition confidence indicates that the grain surface image quality is poor or the pest features are not obvious, requiring more reliance on gas data for judgment.

[0039] S40: Determine the pest verification coefficient of the grid cell based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, wherein the pest verification coefficient is positively correlated with the identification confidence level; Furthermore, after obtaining the CO2 change rate and pest identification results for each grid cell, it is necessary to fuse these two types of information to determine whether pests exist in that grid cell. Image recognition results provide direct visual evidence of pest presence, but their coverage is limited to the grain surface and cannot directly perceive pest activity inside the grain pile. The CO2 change rate can reflect the metabolic activity of pests inside the grain pile, but its concentration changes may be affected by grain respiration and temperature and humidity changes, and cannot be used alone as sufficient evidence for pest determination. Therefore, it is necessary to match and fuse the two types of information: when pests are identified in the grain surface image and the vertical CO2 distribution shows a large difference, it indicates that pests on the grain surface and pest activity inside the grain pile coexist, mutually corroborating each other, and the confidence in the presence of pests is high; when pests are identified in the grain surface image but the vertical CO2 distribution shows a small difference, it indicates that the pests on the grain surface may be in the early stage and have not yet developed into the grain pile, requiring continuous monitoring; when pests are not identified in the grain surface image but the vertical CO2 distribution shows a large difference, it indicates that pest activity exists inside the grain pile but has not yet risen to the grain surface, requiring close attention.

[0040] This step quantifies the difference in CO2 change rates between the deep and surface layers by calculating the vertical gradient coefficient. The vertical gradient coefficient equals the deep CO2 change rate divided by the surface CO2 change rate. When the vertical gradient coefficient is greater than 1, it indicates that the deep CO2 change rate is higher than the surface rate, suggesting abnormal CO2 accumulation inside the grain pile and a high probability of deep-layer pest activity. Next, a first fusion weight and a second fusion weight are determined based on the vertical gradient coefficient: the larger the vertical gradient coefficient, the greater the first fusion weight, meaning the higher the weight of the CO2 change rate in pest verification; the second fusion weight decreases accordingly, meaning the weight of the image recognition result in pest verification decreases accordingly. Specifically, the physical basis for this weight allocation method is that when the deep CO2 change rate is significantly higher than the surface rate, there is a clear gas anomaly signal inside the grain pile. In this case, gas data reflects the true pest situation inside the grain pile better than the grain surface image; therefore, the weight of gas data should be appropriately increased.

[0041] Finally, the CO2 change rate and recognition confidence level are weighted and fused according to the aforementioned weights to obtain the pest verification coefficient for this grid cell. The pest verification coefficient is positively correlated with the recognition confidence level; that is, when the image recognition confidence level is high, the credibility of the image recognition result increases, and its contribution to the fusion increases accordingly. When the recognition confidence level is low, the contribution of the image recognition result decreases, and the judgment relies more on gas data. Through the above weighted fusion mechanism, mutual verification and adaptive fusion of image recognition results and gas sensing data can be achieved.

[0042] Specifically, in this embodiment, the pest verification coefficient of the grid cell is determined based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, including: The CO2 change rate of the current grid cell at the grain surface height layer is obtained as the surface change rate, and the maximum value of the CO2 change rate of the current grid cell at each height layer inside the grain pile is obtained as the deep change rate. The ratio of the deep layer change rate to the surface layer change rate is calculated as the vertical gradient coefficient; A first fusion weight and a second fusion weight are determined based on the vertical gradient coefficient. The first fusion weight is used to weight the CO2 change rate, and the second fusion weight is used to weight the recognition confidence. The pest verification coefficient is obtained by weighted fusion based on the first fusion weight and the second fusion weight.

[0043] First, the CO2 change rate at the grain surface level of the current grid cell is obtained as the surface change rate, and the maximum value of the CO2 change rate at each height level within the grain pile of the current grid cell is obtained as the depth change rate. The surface change rate reflects the rate of change of CO2 concentration near the grain surface, while the maximum value of the depth change rate reflects the situation at the depth where the CO2 concentration changes most drastically within the grain pile. The purpose of selecting the maximum value of the CO2 change rate at each height level as the depth change rate is that pest activity within the grain pile is not necessarily uniformly distributed. Selecting the maximum value can capture the areas where pest activity is most active within the grain pile, avoiding the dilution of local high-value signals by taking the average value.

[0044] Secondly, the ratio of the deep layer CO2 change rate to the surface layer CO2 change rate is calculated as the vertical gradient coefficient. A larger vertical gradient coefficient indicates a higher deep layer CO2 change rate relative to the surface layer, suggesting significant abnormal CO2 accumulation within the grain pile and a greater likelihood of deep-layer pest activity. A vertical gradient coefficient less than 1 indicates a higher surface layer CO2 change rate than the deep layer, possibly caused by surface ventilation or surface pest activity, with a lower likelihood of pest activity within the grain pile.

[0045] Next, the first and second fusion weights are determined based on the vertical gradient coefficient. The first fusion weight is used to weight the CO2 change rate, and the second fusion weight is used to weight the identification confidence level. The physical meaning of the vertical gradient coefficient is as follows: when the deep layer CO2 change rate is significantly higher than that of the surface layer, it indicates the presence of a strong CO2 source inside the grain pile. In this case, the gas data has higher reliability in pest identification and should be given a higher weight. When the vertical gradient coefficient approaches 1 or is less than 1, it indicates that the CO2 change rates of the deep and surface layers are similar, the spatial specificity of the gas data is insufficient, the weight of the gas data should be reduced, and more reliance should be placed on image recognition results.

[0046] Specifically, in this embodiment, determining the first fusion weight and the second fusion weight based on the vertical gradient coefficient includes: The sum of the vertical gradient coefficient and 1 is used as the normalized denominator. The vertical gradient coefficient is divided by the normalized denominator to obtain the first fusion weight. The first fusion weight is positively correlated with the vertical gradient coefficient. The difference between 1 and the first fusion weight is used as the second fusion weight.

[0047] First, the sum of the vertical gradient coefficient and 1 is used as the normalized denominator. The vertical gradient coefficient is then divided by the normalized denominator to obtain the first fusion weight. The formula for calculating the first fusion weight is: First Fusion Weight = Vertical Gradient Coefficient / (Vertical Gradient Coefficient + 1). When the vertical gradient coefficient is 0.5, the first fusion weight = 0.5 / 1.5 ≈ 0.333; when the vertical gradient coefficient is 1, the first fusion weight = 1 / 2 = 0.5; when the vertical gradient coefficient is 3, the first fusion weight is 3 / 4 = 0.75. This formula ensures that the value of the first fusion weight is between 0 and 1 and is monotonically positively correlated with the vertical gradient coefficient. That is, the larger the vertical gradient coefficient, the larger the first fusion weight, and the higher the weight of gas data in pest verification.

[0048] Second, the difference between 1 and the first fusion weight is taken as the second fusion weight. The formula for calculating the second fusion weight is: Second fusion weight = 1 - First fusion weight. When the vertical gradient coefficient is 0.5, the second fusion weight is 0.667; when the vertical gradient coefficient is 1, the second fusion weight is 0.5; when the vertical gradient coefficient is 3, the second fusion weight is 0.25. The sum of the first fusion weight and the second fusion weight is always 1.

[0049] According to the above formula, when the CO2 change rate in the deep layer is significantly higher than that in the surface layer, the vertical gradient coefficient increases, and gas data plays a dominant role in pest verification, while image recognition results assist in the judgment; when the CO2 change rates in the deep layer and the surface layer are similar, the vertical gradient coefficient approaches 1, and the weights of image recognition and gas data are similar, with both participating in the judgment; when the CO2 change rate in the surface layer is higher than that in the deep layer, the vertical gradient coefficient is less than 1, and image recognition results play a dominant role in pest verification, while gas data assists in the judgment.

[0050] For example, when the vertical gradient coefficient is 0.5, the first fusion weight is 0.333 and the second fusion weight is 0.667, indicating that the current grain surface image recognition result is more reliable than the gas data, and the pest verification coefficient is mainly determined based on the image recognition result. When the vertical gradient coefficient is 3, the first fusion weight is 0.75 and the second fusion weight is 0.25, indicating that the gas anomaly signal inside the grain pile is strong, and the pest verification coefficient is mainly determined based on the deep CO2 change rate. This weight allocation method allows the pest verification coefficient to adaptively adjust its dependence on image data and gas data according to the difference in CO2 changes between the inside and surface of the grain pile.

[0051] Finally, a weighted fusion is performed based on the first and second fusion weights to obtain the pest verification coefficient. The formula for calculating the pest verification coefficient is: Pest Verification Coefficient = First Fusion Weight × Normalized Value of Deep CO2 Change Rate + Second Fusion Weight × Recognition Confidence. Here, the normalized value of deep CO2 change rate refers to the value after Min-Max normalization of the maximum value of CO2 change rate at each height level within the current grid unit of the grain pile. The numerical correspondence between the maximum value and the vertical distribution difference of CO2 is as follows: the vertical distribution difference of CO2 equals the maximum value of deep CO2 change rate minus the CO2 change rate at the grain surface height level. When the maximum value of deep CO2 change rate increases, the vertical distribution difference of CO2 increases accordingly, both reflecting the enhanced metabolic activity of pests within the grain pile. The recognition confidence is obtained by averaging the detection confidence of all identified pest targets using the pest target detection model. Its value itself comprehensively reflects the influence of pest species and quantity. When pest species are common and numerous on the grain surface, the detection confidence is usually high, and vice versa. Therefore, the pest verification coefficient indirectly introduces information on the types and quantities of pests by identifying confidence levels, thus achieving a match between the CO2 change rate and the pest identification results.

[0052] Furthermore, in this embodiment, determining the pest verification coefficient of the grid cell based on the degree of matching between the carbon dioxide change rate and the pest species and quantity further includes: The historical CO2 concentration sequence of the current grid cell is obtained, and an LSTM prediction model is constructed. The review window length of the LSTM prediction model is dynamically adjusted according to the pest activity cycle at the current moment. When the pest is active, the review window length is shortened, and when the pest is dormant, the review window length is extended. The historical CO2 concentration sequence is input into the LSTM prediction model, and the LSTM prediction model outputs the predicted CO2 change rate. Calculate the deviation between the predicted CO2 change rate and the actual CO2 change rate. When the deviation is lower than a preset deviation threshold, maintain the pest verification coefficient. When the deviation exceeds the preset deviation threshold, the pest verification coefficient is corrected based on the identification confidence level.

[0053] First, the historical CO2 concentration sequence of the current grid cell is obtained, and an LSTM prediction model is constructed. LSTM, or Long Short-Term Memory network, is a variant of recurrent neural network suitable for time series prediction, capable of learning long-term dependencies and periodic changes in CO2 concentration sequences. The review window length of the LSTM prediction model is dynamically adjusted according to the current pest activity cycle. The pest activity cycle is determined based on a combination of lighting conditions within the grain silo and historical activity patterns. Specifically, the light intensity within the grain silo is used as the primary criterion. When the light intensity is below a preset light threshold, it is considered an active period; when the light intensity is above or equal to the preset light threshold, it is considered a dormant period. The preset light threshold can be set based on the grain silo lighting regime and the biological characteristics of stored grain pests, such as 10 lux. When there is no natural light in the grain silo and artificial lighting is off, the light intensity is below the threshold, indicating an active pest period; when artificial lighting is on or natural light is sufficient, the light intensity is above the threshold, indicating a dormant pest period. In grain silos without light sensors, the active period can be determined by combining local time with sunrise and sunset times, with the hour from sunset to sunrise considered the active period and the remaining time the dormant period. For grain silos with continuous artificial lighting throughout the day, the boundary between active and dormant periods can be determined by the diurnal statistical patterns of CO2 concentration changes in historical monitoring data. For example, by statistically analyzing the average CO2 concentration for each hour over a historical 30-day period, hours with average CO2 concentrations higher than the daily average are marked as active periods, and hours with average CO2 concentrations lower than the daily average are marked as dormant periods.

[0054] In an optional embodiment, the specific selection method for the review window length is as follows: when the current time is determined to be during the active period of pests, the review window length is set to 4 hours to quickly respond to sudden changes in CO2 concentration; when the current time is determined to be during the dormant period of pests, the review window length is set to 24 hours to utilize complete diurnal cycle information for stable prediction. For the transition period between the active and dormant periods, the review window length is determined by linear interpolation between 4 and 24 hours, with the transition period being 1 hour before and after the time of the decision switch. For example, if the active period is determined to switch to the dormant period, the review window length at the switch time is 4 hours, and after 1 hour, it smoothly transitions to 24 hours. Through the above dynamic adjustment mechanism, the LSTM prediction model can quickly detect concentration changes during the active period of pests and suppress noise interference by utilizing long-term historical information during the dormant period. The above light threshold and time period division method can be adaptively adjusted according to the actual lighting conditions and pest species of different grain warehouses, and is not limited to the above example.

[0055] Secondly, historical CO2 concentration sequences are input into the LSTM prediction model, which outputs a predicted rate of CO2 change. Based on historical CO2 concentration data within a review window, the LSTM prediction model learns the pattern of CO2 concentration changes over time and outputs a predicted rate of CO2 change over a future period. This predicted rate of CO2 change represents the expected trend of CO2 concentration change under the condition of no sudden pest activity.

[0056] It should be noted that the LSTM prediction model is a time series prediction technique and is not intended to limit the scope of protection, but merely to provide an optional time series prediction implementation method in this embodiment. For example, the LSTM prediction model can adopt a two-layer stacked structure, with each layer containing 64 LSTM units. The input layer receives historical CO2 concentration sequences within a review window length, which is dynamically adjusted between 4 and 24 hours according to the pest activity cycle, corresponding to an input sequence length of 16 to 96 time steps. The model includes a Dropout layer with a dropout rate set to 0.2 to suppress overfitting. The output layer is a fully connected layer that outputs the predicted CO2 change rate value.

[0057] During the training of the LSTM prediction model, historical CO2 concentration sequences under different temperature and humidity conditions during periods free from pest interference were collected as training data from the grain silo. The training data was divided into samples using a sliding window approach. Each sample contained a historical sequence of the length of the review window as input features, and the CO2 change rate at the next time step as a supervision label. The training sample set was divided into training and validation sets in an 8:2 ratio. Mean squared error was used as the loss function, and the Adam optimizer was used for parameter updates. The initial learning rate was set to 0.001, the batch size to 32, and the number of training epochs to 200. Training was stopped when the validation set loss value no longer decreased for 15 consecutive epochs. After training, the LSTM prediction model was deployed to each grid cell for predicting actual CO2 change rates and verifying biases. After deployment, CO2 concentration data from the grain silo site can be periodically fed back into the LSTM prediction model for incremental updates to maintain continuous adaptability to changes in the grain silo environment.

[0058] Next, the deviation between the predicted CO2 change rate and the actual CO2 change rate is calculated. When the deviation is below a preset deviation threshold, the pest verification coefficient is maintained. The preset deviation threshold is a critical value set based on the distribution range of prediction errors of the LSTM prediction model under normal operating conditions, used to distinguish whether the prediction deviation falls within the normal fluctuation range. Normal operating conditions refer to the period during which no pest abnormalities occur in the grain silo and all sensors function normally. Optionally, the criteria for determining normal operating conditions include: no pests detected in the grain surface image recognition, a CO2 change rate below the preset background change rate upper limit (e.g., 5 ppm per hour), and temperature and humidity sensor readings within the historical normal fluctuation range.

[0059] In an optional embodiment, the preset deviation threshold is determined statistically as follows: During the normal operating period of the past 30 days, several representative time points are selected each day. For each time point, the historical CO2 concentration sequence of the previous 24 hours is input into the LSTM prediction model. The deviation between the predicted CO2 change rate and the actual CO2 change rate is calculated. Multiple deviation samples are obtained each day, and at least 300 deviation samples are accumulated over 30 consecutive days. The distribution characteristics of all the above deviation samples are statistically analyzed, and the mean μ and standard deviation σ of the deviation samples are calculated. The preset deviation threshold is set to μ + 3σ, that is, when the deviation is greater than the mean plus three times the standard deviation, it is judged as abnormal. The statistical period and threshold setting method can be adjusted according to the amount of historical data of different grain warehouses and the system's tolerance for false alarm rate.

[0060] When the prediction deviation is within the normal range, it indicates that the actual CO2 change conforms to historical patterns, and the current pest verification coefficient is reliable, requiring no adjustment. When the deviation exceeds the preset deviation threshold, it indicates that the actual CO2 change rate significantly deviates from historical patterns, potentially indicating sudden pest activity or sensor malfunction. In this case, further investigation is needed to determine the cause of the deviation and correct the pest verification coefficient based on the recognition confidence level. If the recognition confidence level is high, it means that the pest features in the grain surface image are clear, and the actual deviation is consistent with the image recognition result; the pest verification coefficient should be increased to confirm the presence of pests. If the recognition confidence level is low, it means that the image recognition result is unreliable, and the actual deviation may be caused by sensor noise or environmental interference; the pest verification coefficient should be decreased to avoid false alarms. Through the joint verification of the LSTM prediction model and the recognition confidence level, noise interference and abnormal fluctuations in the CO2 concentration sequence can be effectively filtered out, improving the reliability of the pest verification coefficient.

[0061] Specifically, in this embodiment, the pest verification coefficient is corrected based on the identification confidence level, including: When the deviation is higher than the preset deviation threshold and the recognition confidence is higher than the preset confidence threshold, the recognition result of the grain surface image data is used as the main factor to improve the pest verification coefficient and trigger the encrypted sampling of the current grid cell. When the deviation is higher than the preset deviation threshold and the recognition confidence is lower than the preset confidence threshold, the pest verification coefficient is reduced and the image verification and gas sensor self-test of the current grid cell are triggered.

[0062] When the deviation exceeds a preset deviation threshold and the recognition confidence level exceeds a preset confidence threshold, it indicates that the actual CO2 change rate significantly deviates from historical patterns, and the grain surface image recognition result is highly reliable. At this point, two independent pieces of information corroborate each other: gas data suggests abnormal CO2 release inside the grain pile, and image data confirms pest activity on the grain surface. The probability of pests in this grid unit is high; therefore, the grain surface image data recognition result should be prioritized to improve the pest verification coefficient and trigger intensive sampling in the current grid unit. Intensive sampling refers to shortening the sampling interval between gas sensors and image acquisition devices within the grid unit, for example, shortening the CO2 concentration sampling interval from 5 minutes to 2 minutes and the image acquisition interval from 15 minutes to 5 minutes, to obtain monitoring data with higher temporal resolution and closely track pest development trends.

[0063] Furthermore, when the deviation exceeds the preset deviation threshold and the recognition confidence level is lower than the preset confidence level threshold, it indicates that although the actual CO2 change rate significantly deviates from historical patterns, the confidence level of the grain surface image recognition result is low. The recognition may be unreliable due to insufficient lighting, grain surface coverage, or unclear pest morphology. In this case, the actual deviation may be caused by sensor noise, environmental interference, or image false detection, and the presence of pests cannot be confirmed. Therefore, the pest verification coefficient should be reduced to avoid false alarms caused by image false detection and to trigger image verification and gas sensor self-checking for the current grid cell.

[0064] Specifically, image verification refers to re-acquiring the grain surface image of the corresponding area of ​​the current grid cell, adjusting the exposure parameters or shooting angle, and then re-identifying to eliminate false detections caused by image quality issues. In one optional embodiment, when adjusting the exposure parameters, the image histogram distribution is checked: if the grayscale is concentrated in the low area, the exposure is increased; if it is concentrated in the high area, the exposure is decreased, and this is gradually adjusted in 10% increments until the histogram covers a grayscale range of 30 to 220. When adjusting the shooting angle, fine-tuning is performed within a horizontal ±15 degree and a vertical ±10 degree range using a gimbal to avoid areas of high light reflection. After each adjustment, re-identification is performed. If the confidence level increases above the threshold, the verification result is adopted; if the confidence level remains below the threshold after three consecutive adjustments, the image recognition result for that grid cell is temporarily not adopted, and the judgment is based solely on gas data.

[0065] Gas sensor self-testing refers to performing zero-point and range calibration on the gas sensors of the current grid cell to check for sensor drift or malfunction, ensuring the reliability of gas data. Zero-point calibration involves introducing high-purity nitrogen gas, recording the zero-point offset after the reading stabilizes, and subtracting it to bring the output to zero under zero-gas conditions. Range calibration involves introducing 1000ppm and 5000ppm CO2 standard gases, recording the output values ​​at each concentration point, and establishing a calibration curve. The pass / fail criteria are: zero-point deviation not exceeding ±2% of full scale, and range point deviation not exceeding ±5% of the standard value. If qualified, the calibration parameters are written to the sensor register; otherwise, the sensor is marked as faulty and a maintenance alarm is triggered. After verification and self-testing, if the identification confidence improves but the gas data still shows anomalies, the pest verification coefficient is reassessed; if verification still fails, a low pest verification coefficient is maintained and monitoring continues. Through this differentiated processing, verification and mutual validation between gas data anomalies and image recognition results are achieved, effectively reducing the risk of false alarms caused by misjudgments from a single data source.

[0066] For example, in an optional embodiment, when the deviation exceeds a preset deviation threshold and the recognition confidence exceeds a preset confidence threshold, the pest verification coefficient is increased based on the recognition result of the grain surface image data. The specific method of increase is: Pest Verification Coefficient = Original Pest Verification Coefficient × (1 + Increase Amount), where the Increase Amount = (Recognition Confidence - Preset Confidence Threshold) × Preset Increase Coefficient. The increased pest verification coefficient must not exceed 1; when the calculation result is greater than 1, it is taken as 1. For example, if the original pest verification coefficient is 0.65, the preset confidence threshold is 0.75, the recognition confidence is 0.85, and the preset increase coefficient is 0.5, then the increase amount = (0.85 - 0.75) × 0.5 = 0.05, and the corrected pest verification coefficient = 0.65 × 1.05 = 0.6825. Simultaneously, the current grid cell's encrypted sampling is triggered, shortening the CO2 concentration sampling interval from 5 minutes to 2 minutes and the image acquisition interval from 15 minutes to 5 minutes.

[0067] When the deviation exceeds a preset deviation threshold and the recognition confidence level is lower than a preset confidence threshold, the pest verification coefficient is reduced. The specific reduction method is: Pest Verification Coefficient = Original Pest Verification Coefficient × (1 - Reduction Amount), where the reduction amount = (Preset Confidence Threshold - Recognition Confidence Level) × Preset Reduction Coefficient. The reduced pest verification coefficient must not be lower than 0; if the calculated result is less than 0, it is set to 0. For example, if the original pest verification coefficient is 0.65, the preset confidence threshold is 0.75, the recognition confidence level is 0.55, and the preset reduction coefficient is 0.3, then the reduction amount = (0.75 - 0.55) × 0.3 = 0.06, and the corrected pest verification coefficient = 0.65 × 0.94 = 0.611. Simultaneously, image verification and gas sensor self-checking of the current grid cell are triggered.

[0068] Through the aforementioned quantitative correction mechanism, the adjustment range of the pest verification coefficient is directly proportional to the degree to which the identification confidence deviates from the threshold. Higher identification confidence results in a greater increase, and lower identification confidence results in a greater decrease, achieving continuous controllability of the correction amount. The preset increase and decrease coefficients can be determined using a grid search method on the historical verification set. Specifically, historical monitoring data labeled with the actual pest status are collected as the verification set. The verification set includes true positive samples (those actually containing pests), false positive samples (those actually not containing pests but falsely reported by the system), true negative samples, and false negative samples. Candidate values ​​for the preset increase coefficient are taken in the range of 0.2 to 1.0 with a step size of 0.1, and candidate values ​​for the preset decrease coefficient are taken in the range of 0.1 to 0.5 with a step size of 0.05. All combinations of candidate values ​​are iterated, and the false negative rate and false positive rate of the verification set are calculated for each combination. The weighted sum of the false negative rate and the false positive rate is used as the overall cost. The weights are determined based on the business's tolerance for false negatives and false positives. For example, when the system prioritizes avoiding false negatives, the weight for the false negative rate is set to 0.7 and the weight for the false positive rate is set to 0.3; when the system prioritizes avoiding false positives, the weight for the false negative rate is set to 0.3 and the weight for the false positive rate is set to 0.7. The candidate value combination that minimizes the overall cost is selected as the final value of the preset increase coefficient and preset decrease coefficient. When the business tolerance changes, the weights are readjusted and a grid search is performed to update the parameters without changing the principle of parameter determination.

[0069] In addition, the execution steps of this embodiment also include: Obtain the CO2 change rate and O2 change rate of each grid cell, and calculate the ratio between the absolute values ​​of the CO2 change rate and the O2 change rate as the mirror consistency coefficient; When the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value exceeds the preset mirror deviation threshold, the gas sensing data is determined to be abnormal, and the gas sensor self-test of the current grid cell is triggered. When the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value is lower than the preset mirror deviation threshold, the reliability of the current gas sensing data is maintained, and the mirror consistency coefficient is used as an auxiliary correction factor for the pest verification coefficient.

[0070] Specifically, the execution steps of this embodiment also include a gas sensor data self-check and correction step based on the mirror consistency coefficient of CO2 and O2, which is explained in detail below: First, the CO2 and O2 change rates for each grid cell are obtained, and the ratio between the absolute values ​​of the CO2 and O2 change rates is calculated as the mirror consistency coefficient. The respiratory metabolism of stored-grain pests is essentially an oxidative decomposition reaction of organic matter. Pests consume oxygen while producing carbon dioxide, and the amount of CO2 produced and O2 consumed has a fixed stoichiometric ratio. Theoretically, for a complete oxidation reaction, the ratio of the absolute values ​​of the CO2 and O2 change rates approaches 1. Therefore, the mirror consistency coefficient reflects the degree of synchronization between CO2 and O2 changes and can be used to determine the reasonableness of gas sensing data.

[0071] Secondly, when the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value exceeds the preset mirror deviation threshold, the gas sensing data is determined to be abnormal, triggering a self-check of the gas sensor in the current grid cell. The preset mirror reference value is determined based on the stoichiometry of insect respiratory metabolism. The simplified chemical reaction equation for the respiratory metabolism of stored grain pests is: C6H... 12 O6 + 6O2 → 6CO2 + 6H2O, meaning that for every 6 molecules of oxygen consumed, 6 molecules of carbon dioxide are generated. The theoretical stoichiometric ratio of CO2 generated to O2 consumed is 1:1. Therefore, the preset mirror reference value is set to 1. The preset mirror deviation threshold is set based on the sensor measurement accuracy and environmental noise level. Specifically, it is determined as follows: During periods of no pest interference in the grain warehouse, i.e., when no pests are detected in the grain surface image and the CO2 change rate is less than 5 ppm per hour, gas sensor data is continuously collected for 48 hours. The mirror consistency coefficient is calculated within each 10-minute time window, obtaining no less than 288 mirror consistency coefficient samples. The mean and standard deviation of the above samples are calculated, and the mirror deviation threshold is set to the sample mean ± 3 times the standard deviation.

[0072] For example, if the mean of the 288 mirror consistency coefficient samples is 0.98 and the standard deviation is 0.08, then the mirror deviation threshold is 3 × 0.08 = 0.24. This means that when the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value 1 exceeds 0.24, a sensor self-test is triggered. When the sensor measurement accuracy is high and the environment is stable, the threshold can be appropriately reduced to 2 times the standard deviation to improve sensitivity; when the sensor is aging or the environmental noise is high, the threshold can be appropriately increased to 4 times the standard deviation to reduce the false alarm rate. The above adjustments do not change the principle of threshold determination; the actual threshold value is selected within the range of 2 to 4 times the standard deviation based on the sensor configuration and environmental conditions of the grain silo. After the sensor self-test passes, the mirror consistency coefficient is recalculated; if the self-test fails, the gas data of that grid cell is marked as unavailable and a maintenance alarm is triggered.

[0073] Specifically, when the mirror consistency coefficient is close to 1, it indicates that the changes in CO2 and O2 are highly synchronized, and the gas data is highly reliable. The mirror consistency coefficient can be directly used to perform bidirectional correction on the pest verification coefficient. The auxiliary correction factor is directly taken from the mirror consistency coefficient, and the pest verification coefficient = original pest verification coefficient × auxiliary correction factor. When the mirror consistency coefficient is greater than 1, the corrected pest verification coefficient is higher than the original value, indicating that the CO2 change rate is relatively high compared to the O2 change rate, which may reflect the presence of other CO2 sources inside the grain pile besides pest respiration. The corrected pest verification coefficient should be appropriately increased. When the mirror consistency coefficient is less than 1, the corrected pest verification coefficient is lower than the original value, indicating that the CO2 change rate is relatively low compared to the O2 change rate, which may be related to decreased sensor sensitivity or measurement noise. The corrected pest verification coefficient should be appropriately decreased. When the mirror consistency coefficient is equal to 1, the corrected pest verification coefficient remains unchanged.

[0074] By performing the above mirror consistency verification and correction, abnormal states of gas sensors can be effectively identified, avoiding misjudgments of pests due to sensor data distortion. At the same time, the synchronous relationship between CO2 and O2 changes can be used to assist in correcting the pest verification coefficient, thereby improving the reliability of the verification results.

[0075] S50: Correct the pest verification coefficient based on the ambient temperature and humidity data to obtain the corrected pest verification coefficient. When the corrected pest verification coefficient exceeds the warning threshold, output a warning signal.

[0076] Finally, after obtaining the pest verification coefficient, it is necessary to further consider the impact of environmental temperature and humidity on CO2 concentration measurement and pest activity. The temperature and humidity within the grain silo directly affect the diffusion rate of CO2 in the grain pile pores, as well as the solubility of CO2 on the grain surface and in pore water. When the temperature rises, the increased CO2 diffusion rate leads to an overestimation of the CO2 concentration change rate measured by the sensor, requiring a negative correction to the pest verification coefficient to offset the enhanced diffusion effect. When the humidity rises, some CO2 dissolves in the water film, causing a decrease in the gas phase concentration, requiring a positive correction to compensate for the dissolution loss effect. If the influence of these environmental factors is not considered, the pest verification coefficient may deviate due to changes in environmental temperature and humidity, leading to false alarms or missed alarms. Therefore, this step calculates the CO2 diffusion rate compensation coefficient and the CO2 dissolution compensation coefficient based on the environmental temperature and relative humidity, respectively. These two coefficients are then weighted and fused to obtain a comprehensive temperature and humidity compensation coefficient. The pest verification coefficient is then multiplied by this comprehensive temperature and humidity compensation coefficient to obtain the corrected pest verification coefficient.

[0077] When the corrected pest verification coefficient exceeds the warning threshold, it indicates a high probability of actual pest activity in the grid unit, and the system outputs a warning signal. The warning threshold can be determined based on the statistical distribution of the corrected pest verification coefficient during historical pest-free periods in the grain depot. Specifically, the warning threshold is the sum of the average value and three standard deviations of the corrected pest verification coefficients during pest-free periods. When the corrected pest verification coefficient exceeds the warning threshold, the grid unit is deemed to have a pest risk, and a warning signal is output. Optionally, the warning signal may include the location identifier of the grid unit, the type and quantity of pests, the corrected pest verification coefficient value, and the warning level, for grain depot management personnel to conduct on-site verification and take control measures such as fumigation. Through the above-mentioned environmental temperature and humidity correction, the interference of environmental factors on CO2 concentration measurement can be effectively eliminated, improving the accuracy and reliability of pest warnings.

[0078] Specifically, in this embodiment, the pest verification coefficient is corrected based on the environmental temperature and humidity data, including: Obtain the current ambient temperature and relative humidity; The CO2 diffusion rate compensation coefficient is calculated based on the ambient temperature, and the CO2 diffusion rate compensation coefficient is negatively correlated with the ambient temperature. The CO2 dissolution compensation coefficient is calculated based on the relative humidity of the environment, and the CO2 dissolution compensation coefficient is positively correlated with the relative humidity of the environment. The comprehensive temperature and humidity compensation coefficient is calculated based on the weighted sum of the CO2 diffusion rate compensation coefficient and the CO2 dissolution compensation coefficient. The corrected pest verification coefficient is obtained by multiplying the pest verification coefficient by the temperature and humidity comprehensive compensation coefficient.

[0079] First, the current ambient temperature and relative humidity are obtained. The ambient temperature and relative humidity are collected in real time by temperature and humidity sensors deployed inside the grain silo, and are denoted as T and RH, respectively.

[0080] Secondly, the CO2 diffusion rate compensation coefficient is calculated based on the ambient temperature. The CO2 diffusion rate in a gas is positively correlated with temperature; as temperature increases, the thermal motion of gas molecules intensifies, increasing the CO2 diffusion rate within the grain pile pores. In the presence of a constant pest-induced CO2 source within the grain pile, increased temperature leads to a faster diffusion rate, but the concentration change rate measured by the sensor is affected by both the diffusion rate and the source intensity. To eliminate the interference of temperature on the diffusion rate, the pest verification coefficient needs to be compensated and corrected. The formula for calculating the CO2 diffusion rate compensation coefficient is: α T =1 / (1+k T ×(TT ref ), where T ref For reference temperature, k T This is the temperature compensation coefficient.

[0081] In one optional embodiment, the temperature compensation coefficient k T The calibration method is as follows: During a period free from pests in the grain warehouse, two different ambient temperatures, T1 and T2, are selected, with a temperature difference of no less than 10 degrees Celsius. A constant concentration of standard CO2 gas is introduced at each temperature, keeping the chamber sealed. The rate of change of CO2 concentration at each temperature is measured and recorded as R1 and R2. Based on the theoretical relationship between diffusion rate and temperature, k... T =(R2-R1) / [R1×(T2-T1)]. For example, if the CO2 concentration change rate measured at 20°C is 2.0 ppm per hour, and the CO2 concentration change rate measured at 30°C is 2.4 ppm per hour, then k T =(2.4-2.0) / [2.0×(30-20)]=0.02 / ℃. This calibration process only needs to be performed once after the sensor is installed. Recalibration should be performed if the sensor or gas chamber structure changes. Reference temperature T ref Use the lower temperature value during calibration, for example, 20℃. When the ambient temperature is 25℃, α T =1 / (1+0.02×5)=1 / 1.10≈0.909, indicating that the diffusion rate is 10% higher than the reference temperature, and the pest verification coefficient is reduced by about 9.1% after correction. Through the above correction, the influence of temperature change on CO2 diffusion rate can be eliminated, so that the pest verification coefficient truly reflects the actual pest activity intensity inside the grain pile.

[0082] Next, the CO2 dissolution compensation coefficient is calculated based on the relative humidity of the environment. CO2 has a certain degree of water solubility. When the humidity is high, the water vapor content in the pores of the grain pile increases, and some CO2 dissolves in the water film or pore water, resulting in a decrease in the CO2 concentration in the gas phase. Consequently, the rate of change of CO2 concentration measured by the sensor is lower than expected, thus underestimating the intensity of pest activity. To eliminate the interference of humidity on CO2 dissolution, the pest verification coefficient needs to be compensated and corrected. The formula for calculating the CO2 dissolution compensation coefficient is: α RH =1 / (1-k RH ×(RH-RH ref ), of which RH ref For reference relative humidity, k RH This is the humidity compensation coefficient.

[0083] In an optional embodiment, the humidity compensation coefficient k RH The calibration method is as follows: During a period when there is no pest interference in the grain warehouse, select two different relative humidity values ​​RH1 and RH2. 2,The difference should be no less than 20%. Under various humidity conditions, inject the same concentration of standard CO2 gas into a sealed chamber, maintaining constant temperature and pressure. Measure the equilibrium values ​​of the gas phase CO2 concentration under each humidity condition and record them as C1 and C2. According to Henry's Law, the solubility of a gas in a liquid is related to humidity, k... RH =(C1-C2) / [C2×(RH2-RH1)]. For example, if the equilibrium concentration of gaseous CO2 is measured to be 1000 ppm at 40% relative humidity and 940 ppm at 80% relative humidity, then k RH =(1000-940) / [940×(80-40)]≈0.0016 / %RH. This calibration process only needs to be performed once after the sensor is installed. Recalibration should be performed if the sensor or air chamber structure changes. Reference relative humidity (RH) ref Use the lower humidity value during calibration, such as 40%. When the ambient relative humidity is 80%, α RH =1 / (1-0.0016×40)≈1.068, indicating that the gas phase concentration decreased by about 6.4% due to CO2 dissolution. After correction, the pest verification coefficient increased by about 6.8% to compensate for the underestimation of pest activity caused by increased humidity. Through the above correction, the impact of humidity changes on CO2 dissolution can be reduced, so that the pest verification coefficient can truly reflect the actual pest activity intensity inside the grain pile.

[0084] Finally, based on the CO2 diffusion rate compensation coefficient α T and CO2 dissolution compensation coefficient α RH The weighted sum of these factors is used to calculate the comprehensive temperature and humidity compensation coefficient. The formula for calculating the comprehensive temperature and humidity compensation coefficient is: α TH =w T ×α T +w RH ×α RH , where w T and w RH w is the weighting coefficient. T With w RH The sum is 1. For example, the weighting coefficients are determined based on the relative magnitudes of the effects of temperature and humidity changes on CO2 concentration measurement. Specifically, during a period free from pest interference in the grain warehouse, comparative experiments are conducted under both constant temperature and constant humidity conditions. Constant temperature change experiment: At a fixed relative humidity, for example, 60%, the ambient temperature is increased from 20℃ to 30℃, and the change in CO2 concentration rate is measured, denoted as ΔT. Constant humidity change experiment: At a fixed temperature, for example, 25℃, the ambient relative humidity is increased from 50% to 80%, and the change in CO2 concentration rate is measured, denoted as ΔRH. The weighting coefficients are determined according to the proportion of each change to the total change, i.e., w T=ΔT / (ΔT+ΔRH), w RH =ΔRH / (ΔT+ΔRH). For example, if the change in CO2 concentration from 20°C to 30°C results in a change of 2.0 ppm per hour, and the change in CO2 concentration from 50% to 80% results in a change of 1.2 ppm per hour, then ΔT = 2.0, ΔRH = 1.2, w T =2.0 / (2.0+1.2)≈0.625, w RH =1.2 / (2.0+1.2)≈0.375, take approximate values ​​of 0.6 and 0.4. This calibration experiment only needs to be performed once after the sensor is installed. Recalibration should be performed if the sensor or air chamber structure is changed. Multiply the pest verification coefficient by the temperature and humidity comprehensive compensation coefficient to obtain the corrected pest verification coefficient.

[0085] In summary, the above temperature and humidity correction can reduce the interference of environmental temperature and humidity changes on CO2 concentration measurement, enabling the pest verification coefficient to truly reflect the pest activity status inside the grain pile, and improving the accuracy and reliability of early warning.

[0086] In summary, the embodiments of this application have at least the following technical effects: The beneficial effects of this invention are: Compared to existing technologies, this invention first constructs a three-dimensional gridded grain storage space model, unifying three types of heterogeneous data—grain surface images, CO2 and O2 concentrations inside the grain pile, and environmental temperature and humidity—into the same spatiotemporal coordinate system, providing a structured data foundation for subsequent grid-level pest assessment. Secondly, it proposes a CO2 vertical distribution difference index, effectively eliminating concentration fluctuations introduced by ventilation in the upper layer of the grain pile by comparing the difference in CO2 change rates between the grain surface and the deeper layers of the grain pile, overcoming the fundamental deficiency of traditional single-point gas detection in locating the spatial distribution of pests. Thirdly, it introduces a vertical gradient coefficient-driven fusion weighting mechanism, automatically increasing the gas sensing weight and decreasing the image recognition weight when the deep layer CO2 change rate is significantly higher than the surface layer, achieving self-matching fusion of image recognition results and gas data. Furthermore, it combines an LSTM prediction model and a self-checking mechanism for CO2 and O2 mirror consistency to perform closed-loop correction on the fusion results, eliminating abnormal data introduced by sensor drift or environmental abrupt changes, and improving the reliability of the pest verification coefficient.

[0087] Finally, the verification coefficients were corrected using a compensation model of temperature and humidity on CO2 diffusion rate and solubility, eliminating the coupling interference of environmental factors on gas concentration and making the early warning signal more accurate and reliable. This invention improves the accuracy and reliability of early warning of stored grain pests.

Claims

1. A smart insect gas detection method integrating image recognition and multi-gas sensing, characterized in that, include: Acquire multi-source monitoring data of the target area within the grain warehouse, including grain surface image data, gas concentration data inside the grain pile, and ambient temperature and humidity data; The grain storage space is divided into multiple three-dimensional grid units. The grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data are associated with the corresponding grid units according to the collection location and timestamp, forming multimodal associated data for each grid unit. For each grid cell, the rate of change of carbon dioxide is calculated based on the gas concentration data, and the types and quantities of pests and the confidence level are identified based on the grain surface image data. Based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, the pest verification coefficient of the grid cell is determined, and the pest verification coefficient is positively correlated with the identification confidence level. The pest verification coefficient is corrected based on the environmental temperature and humidity data to obtain a corrected pest verification coefficient. When the corrected pest verification coefficient exceeds the warning threshold, a warning signal is output.

2. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, Acquire multi-source monitoring data for the target area within the grain depot, including: Image data of the grain surface is acquired through image acquisition equipment deployed inside the grain warehouse; The CO2 and O2 concentration sequences at different heights inside the grain pile are obtained by gas sensor arrays deployed at different heights inside the grain pile, which serve as the gas concentration data inside the grain pile. Ambient temperature and relative humidity data are acquired by temperature and humidity sensors deployed inside the grain warehouse, serving as ambient temperature and humidity data. The grain surface image data, the gas concentration data inside the grain pile, and the environmental temperature and humidity data are synchronized and aligned according to the collection timestamp to form multi-source monitoring data.

3. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, The grain storage space is divided into multiple three-dimensional grid cells. The grain surface image data, internal gas concentration data of the grain pile, and environmental temperature and humidity data are associated with the corresponding grid cells according to the collection location and timestamp, forming multimodal associated data for each grid cell, including: The grain storage space is divided into multiple horizontal grids in the horizontal direction and multiple height layers in the vertical direction. The overlapping areas of each horizontal grid and each height layer constitute a three-dimensional grid unit. Each three-dimensional grid unit contains a horizontal position indicator and a height layer indicator. The grain surface image data is associated with the corresponding horizontal grid cell at the grain surface height layer according to the acquisition location; The CO2 and O2 concentration sequences were correlated to the corresponding grid cells at the height of the acquisition location. Ambient temperature and relative humidity data are correlated to all grid cells.

4. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, For each grid cell, the rate of change of carbon dioxide is calculated based on the gas concentration data, and the types and quantities of pests are identified and their confidence levels are determined based on the grain surface image data, including: Obtain the CO2 concentration sequence of the current grid cell at each height layer, perform linear fitting on the CO2 concentration sequence, and use the slope of the fitted line as the CO2 change rate at each height layer; The difference between the CO2 change rate at each height level inside the grain pile and the CO2 change rate at the grain surface height level is calculated, and the maximum value of the difference is taken as the CO2 vertical distribution difference. The CO2 vertical distribution difference is positively correlated with the activity intensity of pests inside the grain pile. The grain surface image data is input into a pre-trained pest target detection model, which outputs the category label and detection confidence of each pest target. The number of pest targets is counted to obtain the pest types and quantities. The average of the detection confidence scores for all pest targets is calculated as the identification confidence score.

5. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, Based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, the pest verification coefficient of the grid cell is determined, including: The CO2 change rate of the current grid cell at the grain surface height layer is obtained as the surface change rate, and the maximum value of the CO2 change rate of the current grid cell at each height layer inside the grain pile is obtained as the deep change rate. The ratio of the deep layer change rate to the surface layer change rate is calculated as the vertical gradient coefficient; A first fusion weight and a second fusion weight are determined based on the vertical gradient coefficient. The first fusion weight is used to weight the CO2 change rate, and the second fusion weight is used to weight the recognition confidence. The pest verification coefficient is obtained by weighting and fusing the first fusion weight and the second fusion weight.

6. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 5, characterized in that, The first fusion weight and the second fusion weight are determined based on the vertical gradient coefficient, including: The sum of the vertical gradient coefficient and 1 is used as the normalized denominator. The vertical gradient coefficient is divided by the normalized denominator to obtain the first fusion weight. The first fusion weight is positively correlated with the vertical gradient coefficient. The difference between 1 and the first fusion weight is used as the second fusion weight.

7. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 5, characterized in that, The pest verification coefficient for the grid cell is determined based on the degree of matching between the carbon dioxide change rate and the pest species and quantity, and further includes: The historical CO2 concentration sequence of the current grid cell is obtained, and an LSTM prediction model is constructed. The review window length of the LSTM prediction model is dynamically adjusted according to the pest activity cycle at the current moment. When the pest is active, the review window length is shortened, and when the pest is dormant, the review window length is extended. The historical CO2 concentration sequence is input into the LSTM prediction model, and the LSTM prediction model outputs the predicted CO2 change rate. Calculate the deviation between the predicted CO2 change rate and the actual CO2 change rate. When the deviation is lower than a preset deviation threshold, maintain the pest verification coefficient. When the deviation exceeds the preset deviation threshold, the pest verification coefficient is corrected based on the identification confidence level.

8. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 7, characterized in that, The pest verification coefficient is corrected based on the identification confidence level, including: When the deviation is higher than the preset deviation threshold and the recognition confidence is higher than the preset confidence threshold, the recognition result of the grain surface image data is used as the main factor to improve the pest verification coefficient and trigger the encrypted sampling of the current grid cell. When the deviation is higher than the preset deviation threshold and the recognition confidence is lower than the preset confidence threshold, the pest verification coefficient is reduced and the image verification and gas sensor self-test of the current grid cell are triggered.

9. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, Also includes: Obtain the CO2 change rate and O2 change rate of each grid cell, and calculate the ratio between the absolute values ​​of the CO2 change rate and the O2 change rate as the mirror consistency coefficient; When the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value exceeds the preset mirror deviation threshold, the gas sensing data is determined to be abnormal, and the gas sensor self-test of the current grid cell is triggered. When the absolute value of the deviation between the mirror consistency coefficient and the preset mirror reference value is lower than the preset mirror deviation threshold, the reliability of the current gas sensing data is maintained, and the mirror consistency coefficient is used as an auxiliary correction factor for the pest verification coefficient.

10. The intelligent insect gas detection method integrating image recognition and multi-gas sensing according to claim 1, characterized in that, The pest verification coefficient is corrected based on the environmental temperature and humidity data, including: Obtain the current ambient temperature and relative humidity; The CO2 diffusion rate compensation coefficient is calculated based on the ambient temperature, and the CO2 diffusion rate compensation coefficient is negatively correlated with the ambient temperature. The CO2 dissolution compensation coefficient is calculated based on the relative humidity of the environment, and the CO2 dissolution compensation coefficient is positively correlated with the relative humidity of the environment. The comprehensive temperature and humidity compensation coefficient is calculated based on the weighted sum of the CO2 diffusion rate compensation coefficient and the CO2 dissolution compensation coefficient. The corrected pest verification coefficient is obtained by multiplying the pest verification coefficient by the temperature and humidity comprehensive compensation coefficient.