WiFi Detection System for 3D Wide-Area Grain Pest Detection and Location

By installing WiFi CSI signal detection devices and servers in grain depots, and combining time-series pyramid networks and Gaussian distribution models, the problem of pest detection and location in large-space grain depots has been solved, achieving efficient and low-cost pest detection and location, and improving detection accuracy and result interpretability.

CN120669316BActive Publication Date: 2025-12-02UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511185977.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-22
Publication Date
2025-12-02
Estimated Expiration
2045-08-22

AI Technical Summary

Technical Problem

Existing technologies are insufficient for three-dimensional posture pest detection and localization in large-scale, deep grain depots. Furthermore, traditional methods suffer from problems such as low detection frequency, high cost, significant environmental impact, and lack of interpretability of results.

Method used

A three-dimensional wide-area grain storage pest detection system based on WiFi CSI is adopted. By setting up horizontal and vertical CSI signal detection devices in the grain warehouse, combined with spatial grid frame components and servers, non-contact pest detection and location are achieved. Data processing is carried out using temporal pyramid network and Gaussian distribution model to enhance the interpretability and accuracy of the results.

Benefits of technology

It enables non-contact pest detection and location in large-space grain depots, reducing detection costs, increasing detection frequency and accuracy, and providing interpretability of results to assist grain depot management decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120669316B_ABST
    Figure CN120669316B_ABST
Patent Text Reader

Abstract

This invention provides a WiFi detection system for three-dimensional wide-area grain storage pest detection and localization, involving target detection and localization technology based on Channel State Information (CSI). It includes horizontal / vertical CSI signal detection devices for transmitting and receiving CSI signals in the horizontal / vertical dimensions, a spatial grid construction component, and a server. The server receives CSI signals from the horizontal and vertical CSI signal detection devices to identify pests, outputting the probability of the presence of grain storage pests and the location of the three-dimensional spatial grid. The spatial grid construction component utilizes existing temperature-measuring optical cables. A wide-area CSI data acquisition and monitoring architecture is constructed based on existing grain depots and temperature-measuring optical cables, using CSI signals for non-contact pest detection inside the grain depot. The server's identification network adopts a temporal pyramid structure; it incorporates a Gaussian distribution temporal interpretability structure to enhance the interpretability of the results; and it enhances the accuracy of pest identification results through a three-dimensional perception attention mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to target detection and localization technology based on Channel State Information (CSI), and particularly to WiFi detection technology for three-dimensional wide-area grain storage pest detection and localization. Background Technology

[0002] Channel State Information (CSI) is data generated by WiFi devices during signal transmission and reception. It can be used in various applications such as human behavior recognition, crop moisture content monitoring, and pest identification in grain storage. The principle is that when the behavior or state of objects within the CSI monitoring range changes, the CSI data also changes accordingly. By establishing a correlation between CSI changes and corresponding scenarios, CSI data can be used to analyze and process these scenarios.

[0003] Currently, pest detection inside grain warehouses typically involves randomly inserting pest-catching devices into one or more locations within the grain pile. These devices attract and trap surrounding pests, and the pest situation and type are then analyzed manually or automatically using software. However, this method struggles to determine the overall pest status of the grain warehouse, leading to frequent missed detections. Furthermore, the entire process requires manual intervention, posing a certain risk to the grain warehouse, resulting in low detection frequency and high costs. Grain storage requires specific environmental conditions such as temperature and humidity, but this process is conducted after the grain has been placed in the warehouse and is subject to external equipment intrusion. Therefore, issues related to personnel, equipment, or the environment may negatively impact the quality of stored grain.

[0004] Current proposed CSI-based detection schemes involve placing Wi-Fi transmitting and receiving devices at both ends of the grain pile. Based on the principle that the presence of pests in the grain pile and the changes in the Wi-Fi CSI signal when pests crawl or move, a machine learning model is built for analysis and detection. However, these schemes are only usable under experimental conditions and cannot be used in wide-area spaces like grain warehouses, which are nearly 20 meters long and wide and over 10 meters high. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a WiFi CSI-based system that is suitable for large-space, wide-depth, and wide-area characteristics in actual grain storage warehouses, and can perform three-dimensional posture pest detection and positioning.

[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is a WiFi detection system for three-dimensional wide-area grain storage pest detection and positioning, including a horizontal CSI signal detection device, a vertical CSI signal detection device, a spatial grid erection component and a server; the number of horizontal CSI signal detection devices and vertical CSI signal detection devices matches the number of spatial grids;

[0007] The horizontal CSI signal detection device is a WiFi-CSI signal transceiver installed on a set of parallel side surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize the monitoring of stored grain pests in the horizontal dimension.

[0008] The vertical CSI signal detection device uses WiFi-CSI signal transceivers mounted on the top and bottom surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to achieve vertical monitoring of stored grain pests.

[0009] The spatial grid framework provides a fixed foundation for horizontal and vertical CSI signal detection devices for the three-dimensional spatial grid divided according to the size of the grain silo and the strength of the CSI signal. Each three-dimensional spatial grid serves as a grain silo monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each grain silo monitoring zone as vertical CSI signal detection devices. At least one pair of WiFi-CSI signal transceivers is installed on at least one set of parallel side surfaces of each grain silo monitoring zone as horizontal CSI signal detection devices.

[0010] The server is used to receive CSI signals from the horizontal and vertical CSI signal detection devices of each three-dimensional spatial grid, identify pests, and output the probability of the presence of stored grain pests and the location of the pests in the three-dimensional spatial grid.

[0011] Based on the above scheme, non-contact detection of pests inside grain depots can be achieved using CSI signals.

[0012] Preferably, the spatial grid erection component is a temperature-measuring optical cable. At the hardware level, when deploying the equipment, the WiFi system is installed considering the existing conditions of the grain depot and the temperature-measuring optical cable. WiFi transmitters and receivers are added to the temperature-measuring optical cable, enabling real-time acquisition of WiFi CSI signals even in wide-area scenarios like grain depots. The obtained CSI data then provides a basis for subsequent server processing.

[0013] Preferably, the server's 3D wide-area grain storage pest identification network receives CSI signals from horizontal and vertical CSI signal detection devices in each 3D spatial grid, then stitches them together. The stitched CSI signals are then broken down into CSI data of different time lengths to obtain temporal features at different time lengths. The Gaussian function of each temporal feature is used as the probability of determining the presence of pests in the current time series. A Gaussian mixture model then integrates the Gaussian functions of the CSI data for each temporal feature into a joint probability. The loss function used during the training process of the 3D wide-area grain storage pest identification network is the negative log-likelihood function.

[0014] Specifically, a temporal interpretability structure incorporating Gaussian distribution is proposed: the server's three-dimensional wide-area grain storage pest identification network includes a multi-temporal decision network, which is used to analyze each temporal feature separately and adjust its weight in the corresponding Gaussian function in the Gaussian mixture model according to the contribution and / or reliability of each temporal feature.

[0015] The multi-temporal decision network includes a fully connected layer for outputting the mean of the Gaussian distribution corresponding to the current temporal feature, a fully connected layer for outputting the variance of the Gaussian distribution corresponding to the current temporal feature, and weights for outputting the Gaussian function corresponding to the current temporal feature.

[0016] The multi-temporal decision network obtains the Gaussian function of the current temporal feature based on the mean and variance of the Gaussian distribution, and obtains the joint decision probability based on the Gaussian function of each temporal feature and its weight.

[0017] The interpretability of quality monitoring is crucial for practical applications. Based on this requirement, this invention constructs a multi-time-series decision network and modifies the loss function. This allows different time-series data to output corresponding Gaussian distribution results. The multiple Gaussian results are then fused to obtain a comprehensive decision result from the overall network, along with the uncertainty of that result, thus enhancing the interpretability of the results.

[0018] Preferably, CSI is a type of time-series data. Due to the influence of the external environment and the characteristics of different detected objects, the effective time series (time period) of CSI varies under different task scenarios. Therefore, the three-dimensional wide-area grain storage pest identification network of the server also includes a time-series pyramid network. The time-series pyramid network is placed before the multi-time-series decision network to give different attention to the time-series features under different time lengths.

[0019] For CSI time-series data processing, existing technologies employ fixed-time-length neural networks—Long Short-Term Memory (LSTM) networks. This proposal, however, constructs a time-series pyramid that adaptively adjusts for different time lengths. Since CSI data is time-series, existing solutions typically use CSI data with fixed time periods as input and then perform iterative analysis using LSTM. This approach ignores the fact that the required time series length for CSI varies depending on the scenario and task. To address this issue, this invention proposes a time-series pyramid network. This network splits the input CSI signal into short, medium, and long periods, and then, referencing the image spatial pyramid, constructs a CSI time-series pyramid, achieving the goal of adaptively assigning weights to data of different time series lengths.

[0020] Preferably, considering the impact of different morphologies of pests in grain storage on CSI signals—for example, when pests are in a horizontal position, the perception ability of horizontal CSI signals is weak, while the perception ability of vertical CSI signals is strong, and vice versa—the server's three-dimensional wide-area grain storage pest identification network also includes a feature extraction and three-dimensional perception network. The feature extraction and three-dimensional perception network is used to place the spliced ​​CSI signals before CSI signal splitting, and to extract features from the spliced ​​CSI signals. The three-dimensional perception attention mechanism is used to adjust the attention to horizontal and vertical CSI signals to enhance the accuracy of the results, improve the generalization of the network model, and thus improve the final performance.

[0021] Preferably, the server's three-dimensional wide-area grain storage pest identification network proposes a network structure that combines CNN and Transformer to extract temporal features at different time lengths. This network structure can accurately detect pests by taking CSI data as input and observing the changes in signal waves caused by CSI penetrating different objects.

[0022] The beneficial effects of this invention are: it constructs a wide-area CSI data acquisition and monitoring architecture based on existing grain depots and temperature measuring optical cables, using CSI signals for non-contact detection of pests inside grain depots; furthermore, the temporal pyramid structure is adapted to the processing of time-series data such as CSI; furthermore, the integration of a Gaussian distribution temporal interpretability structure enhances the interpretability of the results; and furthermore, the accuracy of pest identification results is enhanced through a three-dimensional perception attention mechanism. Attached Figure Description

[0023] Figure 1 This is a flowchart illustrating the implementation of the system of the present invention;

[0024] Figure 2 This is a schematic diagram of the system architecture for an example embodiment;

[0025] Figure 3 A schematic diagram of a three-dimensional wide-area grain storage pest identification network;

[0026] Figure 4 A schematic diagram illustrating the impact of different forms of pests in grain storage on the CSI signal;

[0027] Figure 5 A schematic diagram illustrating the three-dimensional perception and attention of pest morphology;

[0028] Figure 6 This is a schematic diagram of time series decomposition;

[0029] Figure 7 This is a schematic diagram of a time-series pyramid network;

[0030] Figure 8 This is a schematic diagram of the time-series pyramid features;

[0031] Figure 9 This is a schematic diagram of a multi-time-sequence decision network. Detailed Implementation

[0032] The WiFi detection system of this invention is based on the existing grain storage process in grain depots. By optimizing the hardware layout and identification software algorithm of grain depots, it proposes a three-dimensional wide-area grain storage pest detection scheme, which overcomes the problems of weak CSI signals in large spaces, insufficient accuracy due to single-dimensional signal perception, and lack of interpretability of results that make it difficult to directly guide grain storage work in traditional methods.

[0033] like Figure 1 The diagram shows the overall business process for the scenario covered in this solution. Details are as follows:

[0034] 1. Equipment installation:

[0035] The grain depot was renovated by installing WiFi-CSI signal transceivers on the walls and also on the internal temperature-measuring fiber optic cables. Based on the actual size of the grain depot and the strength of the CSI signal, a spatial mesh was created for the 3D detection area. This mesh division provided a basis for locating the detection results. Figure 2 As shown, each spatial grid corresponds to a spatial block as a grain storage monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each zone as vertical CSI signal detection devices; at least one pair of WiFi-CSI signal transceivers is installed on at least one set of parallel side surfaces of each zone as horizontal CSI signal detection devices.

[0036] A set of parallel side surfaces can be front and rear side surfaces, or left and right side surfaces. The receiver and transmitter of a pair of WiFi-CSI signal transceivers are respectively installed on two opposite surfaces of the grain warehouse monitoring zone.

[0037] The six surfaces of the cubic space block in the grain storage monitoring zone do not require physical partitions; instead, they are virtual zones. When a surface of a zone located at the edge of the grain storage is a grain storage wall, the WiFi-CSI signal transceiver can be directly installed on the grain storage wall. When a zone at the edge of the grain storage is inside the space, the WiFi-CSI signal transceiver can be installed on an existing temperature-measuring optical cable, or, depending on the actual zone requirements, a dedicated physical cable can be laid for WiFi-CSI signal transmission, and the WiFi-CSI signal transceiver can be fixed in place. The WiFi-CSI signal is transmitted to the server via a wired connection, or the WiFi-CSI signal transceiver can be installed only in the air, and the received signal is transmitted directly to the server wirelessly. The server can be a cloud server or an edge server.

[0038] 2. Grain storage in warehouses:

[0039] After the equipment is installed, the grain is poured into the modified grain depot. Since the vertical and horizontal CSI signal detection devices, as well as temperature measuring optical cables or other physical cables or erection devices, are installed before the grain is put into storage, the vertical and horizontal CSI signal detection devices of each grain depot monitoring zone can detect the grain in its spatial grid after the grain is poured.

[0040] 3. Data Collection and Acquisition:

[0041] The WiFi-CSI signal receiver in the vertical or horizontal CSI signal detection device of each grain warehouse monitoring zone acquires the CSI signal and transmits the CSI signal to the server.

[0042] The server processes the CSI signal and converts it into CSI image data that can be analyzed by the network: First, the acquired CSI signal is truncated at a fixed period. Images are then generated based on these truncated segments, and the values ​​and dimensions are standardized to obtain the CSI image data corresponding to a single CSI signal transceiver. Since there are multiple CSI signal transceivers in a grain warehouse monitoring zone, to enable unified analysis, the CSI image data corresponding to multiple transceivers in that zone can be stitched together along the channel dimension to obtain the full CSI image of that zone.

[0043] 4. The server identifies pests:

[0044] The server analyzes the presence of pests in CSI images within a specific partition from both spatial and temporal dimensions. First, the CSI images are input to a feature extraction module and mapped to high-dimensional features. Then, they are fed into a 3D perception module to analyze the sensitivity of horizontal and vertical CSI signal feature maps in the spatial dimension. Finally, the feature maps are split into short-term, mid-term, and long-term feature maps. These feature maps from different time periods are then fused using a temporal pyramid network to obtain temporal pyramid features, summarizing the feature information from different time periods. Finally, the temporal pyramid features are output to a multi-temporal decision network, which adaptively analyzes the current situation to determine which of the short, mid, or long time periods is more suitable.

[0045] 5. Server output results:

[0046] The server uses the multi-time-series judgment network to predict whether there are pests in each grain warehouse monitoring zone and the corresponding probability of pest presence as the identification result. When the probability of pest presence in a grain warehouse monitoring zone is higher than the preset probability, the server outputs a pest alert and the corresponding spatial grid location for location. Optionally, the server also integrates the identification results of each grain warehouse monitoring zone and outputs the overall probability of pest presence in the grain warehouse.

[0047] The WiFi detection system includes horizontal CSI signal detection devices, vertical CSI signal detection devices, spatial grid erection components, and a server; the number of horizontal and vertical CSI signal detection devices matches the number of spatial grids.

[0048] The horizontal CSI signal detection device is a WiFi-CSI signal transceiver installed on a set of parallel side surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize the monitoring of stored grain pests in the horizontal dimension.

[0049] The vertical CSI signal detection device uses WiFi-CSI signal transceivers mounted on the top and bottom surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to achieve vertical monitoring of stored grain pests.

[0050] The spatial grid framework provides a fixed foundation for horizontal and vertical CSI signal detection devices in a three-dimensional spatial grid divided according to the size of the grain silo and the strength of the CSI signal. Each three-dimensional spatial grid serves as a grain silo monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each monitoring zone as vertical CSI signal detection devices. At least one pair of WiFi-CSI signal transceivers is installed on at least one set of parallel side surfaces of each monitoring zone as horizontal CSI signal detection devices. This uniformly divides the entire grain silo into n monitoring zones of uniform size, thereby improving the problem of CSI signal attenuation or excessive noise caused by the large size of the grain silo area. In the embodiment, as... Figure 2 In the grain silo shown, the spatial grid structure includes temperature-measuring optical cables on the two walls and vertical side of the grain silo; by installing CSI signal receiving or transmitting devices on the temperature-measuring optical cables on the two walls and vertical side of the grain silo, horizontal monitoring of stored grain pest information is achieved.

[0051] The temperature-measuring optical cable is used in grain depots to detect temperature information and is equipped with a temperature sensor. The cable is installed or laid inside the grain depot before grain is introduced and remains stationary throughout the entire storage period. The cable has an information outlet, allowing for the installation of signal transmission equipment to transmit CSI signals to a remote analysis terminal. Horizontal and vertical CSI signals from the same area are transmitted back to the cloud via the cable for identification, enabling three-dimensional, multi-angle pest detection. Furthermore, if further grid refinement is needed within the same space, additional horizontal and vertical temperature-measuring optical cables or other components supporting the CSI signal detection device can be added. If wired CSI signal transmission to a server is required, the components must also possess communication capabilities.

[0052] The server receives CSI signals from horizontal and vertical CSI signal detection devices on various 3D spatial grids, identifies pests, and outputs the probability of the presence of stored grain pests and the location of the pests on the 3D spatial grid. This embodiment uses a cloud server for pest identification; alternatively, edge servers can be deployed near the grain warehouse to complete pest identification.

[0053] Specifically, the server receives CSI data of varying time lengths in both the horizontal and vertical dimensions, and outputs the prediction results and their uncertainties as represented by a Gaussian mixture function. The specific structural network used to complete the three-dimensional wide-area grain storage pest identification is as follows: Figure 3 As shown, it includes a CSI data preprocessing module, a feature extraction and 3D perception network, a temporal splitting module, a temporal pyramid network, and a multi-temporal decision network;

[0054] The CSI data preprocessing module preprocesses the acquired CSI data to obtain multi-channel time-series CSI image data, which consists of horizontal CSI signals from each grain storage monitoring zone and vertical CSI signals. The multi-channel time-series CSI image data is then fed into a feature extraction network based on a CNN network for feature extraction and 3D perception of pest morphology, identifying which dimension is more sensitive to current pest behavior. The output is a feature map. This feature map is then fed into a time-series splitting module, where it is split according to time-series requirements. This allows the network to adapt to different CSI time periods, selecting the most suitable period for the current judgment scenario for analysis. In this embodiment, the time periods are divided into short, medium, and long time series. Subsequently, features from different time periods are fed into the temporal pyramid network to obtain temporal pyramid features, which are then analyzed and judged in a multi-temporal network. The judgment results and variances under three different temporal conditions (short-term, medium-term, and long-term) are output in the form of Gaussian functions, and the multi-temporal judgment probabilities and joint judgment probabilities are obtained by fusion using a mixture of Gaussian functions.

[0055] Specifically, a detailed explanation of each module in the three-dimensional wide-area grain storage pest identification network is provided:

[0056] 1) CSI Data Preprocessing Module

[0057] Function Description: After the data is transmitted to the cloud server, the CSI data needs to be preprocessed. It is converted into an image format according to the number of subcarrier antennas and the time period before being sent to the network for judgment.

[0058] Specific method: CSI data is a time-series data characterizing Wi-Fi signal transmission. It has multiple dimensions. In the grain storage pest detection task, two dimensions, subcarrier and data packet information, are selected to characterize the impact of grain state on CSI signals. For each data packet t, the number of channels... :

[0059] ;

[0060] in , , These represent the transmitter antenna, receiver antenna, and the number of subcarriers for each antenna, respectively. The data packet reflects the period length of data acquisition. Consider it as the CSI image at a time length of t. The size is , For the length of the CSI image, The width of the CSI image. In this proposal, to encompass as many different data scenarios as possible, such as some quality conditions that are difficult to characterize in short-period data, a large value is chosen for the period length of the data packet, fixed at 1 second. This value can be revised according to different use cases.

[0061] The obtained CSI image is uniformly represented using the 0-255 value range of the RGB three-channel image, and its size is fixed at 512x512 using image interpolation. This completes the process. Figure 3 The data conversion for a single transmit / receive pair is performed. The system converts each transmit / receive pair individually to obtain a three-channel 512x512 image of the corresponding tree. Finally, all images are stitched together along the channel dimension to complete the conversion of all CSI data within a specific detection area into an image, thus completing the preprocessing work.

[0062] 2) Feature extraction and 3D perception network

[0063] Function Description: The preprocessed CSI data requires feature extraction for subsequent analysis. Furthermore, considering the actual situation of pests inside grain piles, especially large grain silos, their posture changes are a three-dimensional problem. This invention's three-dimensional posture determination improves overall accuracy. It also considers the impact of different pest morphologies on the CSI signal in grain storage, such as... Figure 4 As shown, when pests are in a horizontal position, their ability to perceive horizontal CSI signals is weak, while their ability to perceive vertical CSI signals is strong, and vice versa. The feature extraction and 3D CSI signal perception network proposed in the embodiment constructs a separate 3D perception attention module for pest morphology. The network determines which dimension of the CSI signal to focus on based on the specific pest morphology, thereby improving the final performance.

[0064] Specific methods: such as Figure 3 As shown, the feature extraction and 3D perception network primarily uses a Convolutional Neural Network (CNN), comprising four convolutional layers and a 3D perception attention module for insect morphology. Each convolutional layer includes operations such as convolution, batch normalization, and max pooling. Convolutional layer 1 has a 7x7x96 kernel with a stride of 2; convolutional layer 2 has a 5x5x256 kernel with a stride of 2; convolutional layer 3 has a 3x3x512 kernel with a stride of 1; and convolutional layer 4 has a 3x3x512 kernel with a stride of 1. Since this part involves standard CNN feature extraction, it will not be elaborated further.

[0065] The 3D perception attention module for pest morphology, such as Figure 5 As shown, the features received from the output of convolutional layer 4 This feature is fed into average pooling and max pooling layers respectively, and then processed by two 1x1 convolutions to determine which regions in the input feature map require special attention from both channel and spatial dimensions. The convolution output is then summed element-wise and fed into a sigmoid activation function. Each channel dimension generates an attention probability value that sums to 1, which is then multiplied by... Multiply to obtain the final output result. .

[0066] 3) Temporal splitting network

[0067] Function Description: Even after conversion to image format, CSI data retains its temporal characteristics, thus possessing a very strong temporal contextual relationship. When addressing issues such as stored-grain pests, different pest postures, and varying pest movements, CSI data not only exhibits changes in amplitude and waveform but also shows distinctions along the time dimension. For example, when pests are making short-term movements without external interference, short-cycle CSI data may suffice for observation and judgment. However, when pests are making long-term movements with external interference, longer-cycle CSI observations are required for assessment. Therefore, the step size or time of CSI data is uncertain and variable. To address this issue, a mechanism or structure needs to be designed to analyze CSI data from different time dimensions to adapt to this problem.

[0068] Specific methods: such as Figure 6 As shown, the temporal splitting module splits the feature map output by the feature extraction network into three dimensions: short temporal, medium temporal, and long temporal.

[0069] Specifically, short time series divides the original feature map into four parts, each with a time step of 0.25s; medium time series divides it into two parts, each with a time step of 0.5s; long time series are not divided and remain unchanged. This time period is only an example and can be adjusted according to the actual situation.

[0070] 4) Temporal Pyramid Network

[0071] Function Description: This function analyzes and processes the short, medium, and long time series feature maps obtained from the decomposition. By constructing a time series pyramid, it achieves mutual fusion and supplementation of different time series information, thereby improving the overall robustness and performance of the model.

[0072] Specific methods: such as Figure 7 As shown, the architecture is based on a sliding window Transformer (Swin-Transformer) structure, consisting of three layers. Each layer corresponds to short, medium, and long temporal feature map inputs. The specific processing procedure is as follows:

[0073] (1) Select one segment from the short time series data in sequence and pass it through the linear embedding layer and the Swin-Transformer, assuming the dimension is 128. The linear embedding layer adapts to the changes in the input dimension to ensure that it is compatible with the input data.

[0074] (2) Repeat step 1 for the four segments of short time series data to obtain the features of the short time series data. Where n is the number of short-time segments, and the short-time features can be represented by four 128-dimensional features;

[0075] (3) After concatenating the four feature results of the short time series output in the feature dimension, the average pooling of 4 times is used to obtain a 128-dimensional short time series feature, which is reserved for fusion with the medium time series feature;

[0076] (4) For the two segments of data in the mid-time series, intermediate features are obtained by passing them through a linear embedding layer and a Swin-Transformer. The intermediate features are then concatenated with the short-time series features from step (3) along the channel dimension, and then fed into a new linear embedding layer and a Swin-transformer for feature calculation to obtain the mid-time series features. Where k is the number of mid-time series segments; the feature dimension of each segment is also 128-dimensional, so the mid-time series feature is represented by two 128-dimensional features;

[0077] (5) For long time series data, intermediate features are obtained after passing through two sets of linear embedding layers and Swin-Transformer. The intermediate features are concatenated with the intermediate time series features in step (4) in the channel dimension, and then fed into a new linear embedding layer and Swin-transformer for feature calculation to obtain a 128-dimensional long time series feature. .

[0078] The output of the temporal pyramid network is as follows Figure 8 As shown, the data features from bottom to top represent short-term, medium-term, and long-term data. The short-term data consists of four features of the same dimensions. This allows for the inference of mid- and long-term time series features, with each time series having the same feature dimension for its sub-segments.

[0079] This creates a time-series pyramid feature, which can reasonably encompass and focus on the feature information of different time periods, thereby improving the problems caused by the uncertainty and variability of CSI data due to time.

[0080] 5) Multi-time decision network

[0081] Function Description: This function performs segment-based analysis on the temporal pyramid features, and outputs the final pest situation and the uncertainty of the judgment by combining the selected segments. The example uses 6 segments.

[0082] Specific methods: such as Figure 9 As shown, the input data consists of 6 segments of 128-dimensional features, of which 3 segments represent short-term features, 2 segments represent medium-term features, and 1 segment represents long-term features.

[0083] These features are sequentially fed into a fully connected neural network for nonlinear processing and dimensionality reduction to 64. These 1x64 features are then fed into three fully connected layers: a mean layer, a variance layer, and a weight layer, yielding the Gaussian function mean, variance, and weights corresponding to each feature.

[0084] Given 6 input time-series features, the system outputs 6 sets of mean * variance * weight results, representing 6 different Gaussian distributions. As a multi-time series decision probability, k is the Gaussian distribution index.

[0085] Then, a Gaussian mixture model (GMM) is used to integrate the above six Gaussian models to obtain the joint decision probability. .

[0086] ;

[0087] ;

[0088] Let be the probability density function of the Gaussian model, i.e., the Gaussian function. It is a random variable; is the mean of the k-th Gaussian function, and is the output of the mean layer; is the standard deviation of the k-th Gaussian function, is the output of the variance layer; exp is the natural exponential function; Let K be the probability density function of the Gaussian mixture model, and K represent the total number of Gaussian functions. In this example, K is 6. Let be the weight of the k-th Gaussian function, and be the output of the weighted layer.

[0089] 6) Regarding the temporal interpretability of the three-dimensional wide-area grain storage pest identification network:

[0090] Traditional deep learning networks are considered black boxes because once the model is trained, the neuron parameters are fixed and represent numerical data. Single numerical data lacks interpretability and the ability to measure uncertainty. Data distributions, on the other hand, possess interpretability; for example, the variance of a Gaussian function can be used to characterize its confidence level in the mean.

[0091] This invention transforms the output from a single numerical value into a Gaussian function, thus giving the entire model's output interpretability and uncertainty measurement capabilities.

[0092] This invention splits CSI information along the time dimension, inputting three short time-series data segments, two medium time-series data segments, and one long time-series data segment into the multi-time-series decision network. Therefore, the multi-time-series decision network can analyze each of these six different data segments separately to determine which contributes more and which has higher reliability, thereby adjusting the weights of the Gaussian function and aligning them to output the final decision result, thus providing temporal interpretability.

[0093] 7) Loss function calculation:

[0094] Unlike traditional classification networks that choose cross entropy, this implementation, to better adapt to the model structure and mathematical model, selects negative log-likelihood as the loss function from the perspective of probability distribution modeling. :

[0095]

[0096]

[0097]

[0098] Let N be the total loss function, and N be the total number of training samples. and Let be the input and label corresponding to the k-th Gaussian function, respectively. and Let be the mean and standard deviation of the k-th Gaussian function.

[0099] At the software level, a neural network combining convolutional neural network (CNN) and Transformer was constructed. A three-dimensional perception attention mechanism for pest morphology and a temporal pyramid network structure were proposed to provide a reference standard for determining the presence of pests in a more accurate and interpretable way, and to assist grain depots in pest fumigation decisions.

[0100] This invention also optimizes the neural network layer for processing WiFi CSI signals. Existing CSI analysis methods segment data at fixed intervals (e.g., 1 second) and then analyze the segmented data directly. However, CSI data inherently possesses temporal characteristics. Therefore, considering factors such as changes in the external environment, different pest species, and variations in pest posture and movement at different times, the analysis time period may not be fixed. Using a fixed time period may increase misjudgments or reduce analysis results. This invention proposes a temporal pyramid based on a transformer network. Through training, the network automatically selects the most suitable time period pair for analyzing CSI data, improving the overall robustness and performance of the CSI analysis model and giving the system stronger adaptability.

[0101] Furthermore, various neural networks employing black-box models, which lack interpretability and cannot inform users whether the confidence level of the result is 90% or 30%, demonstrate this characteristic of black-box neural networks. The SotfMax layer output is not a confidence score, but merely a probability value used for convenient ranking (Yarin Gal, Cambridge University, ICML 2014, a top AI conference). In other words, existing black-box model detection schemes directly output results without interpretability, failing to provide users with the reliability of the output and limiting their widespread use. Considering that pest control in grain storage is a high-cost operation requiring careful judgment, this invention addresses the need for more reliable pest detection probabilities. It proposes a multi-temporal decision network structure incorporating a Gaussian distribution, which can output the decision result (analogous to the mean of a Gaussian function) and the uncertainty / confidence level (analogous to the variance of a Gaussian function) simultaneously. Therefore, this proposal addresses this issue from two levels: network structure and loss function. By introducing a Gaussian distribution, the numerical output is transformed into a measurable Gaussian distribution output, thus enabling the results to possess temporal interpretability and uncertainty measurement capabilities.

[0102] The grain storage pest detection technology provided by this invention can detect pests in grain warehouses without damaging the grain, accurately identify pests and locate them in different areas, thereby controlling the number of fumigation cycles. Furthermore, when combined with existing grain storage management systems, it can also achieve remote monitoring and automated management, significantly improving management efficiency, reducing labor costs, significantly improving the safety and efficiency of grain storage, and reducing losses caused by pests.

Claims

1. A WiFi detection system for three-dimensional wide-area grain storage pest detection and location, characterized in that, It includes horizontal CSI signal detection devices, vertical CSI signal detection devices, spatial grid erection components, and servers; the number of horizontal and vertical CSI signal detection devices matches the number of spatial grids. The horizontal CSI signal detection device is a WiFi-CSI signal transceiver installed on a set of parallel side surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize the monitoring of stored grain pests in the horizontal dimension. The vertical CSI signal detection device uses WiFi-CSI signal transceivers mounted on the top and bottom surfaces of a three-dimensional spatial grid through a spatial grid frame structure. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to achieve vertical monitoring of stored grain pests. The spatial grid framework provides a fixed foundation for horizontal and vertical CSI signal detection devices for the three-dimensional spatial grid divided according to the size of the grain silo and the strength of the CSI signal. Each three-dimensional spatial grid serves as a grain silo monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each grain silo monitoring zone as vertical CSI signal detection devices. At least one pair of WiFi-CSI signal transceivers is installed on at least one set of parallel side surfaces of each grain silo monitoring zone as horizontal CSI signal detection devices. The server is used to receive CSI signals from the horizontal and vertical CSI signal detection devices of each three-dimensional spatial grid, identify pests, and output the probability of the presence of stored grain pests and the location of the three-dimensional spatial grid where the pests are located. The server's 3D wide-area grain storage pest identification network receives CSI signals from horizontal and vertical CSI signal detection devices in each 3D spatial grid and splices them together. The spliced ​​CSI signals are then broken down into CSI data of different time lengths to obtain temporal features at different time lengths. The Gaussian function of each temporal feature is used as the probability of determining whether pests exist in the current time series. Finally, a Gaussian mixture model integrates the Gaussian functions of the CSI data of each temporal feature into a joint determination probability.

2. The system as described in claim 1, characterized in that, The spatial grid erection component is a temperature-measuring optical cable.

3. The system as described in claim 1, characterized in that, The server is a cloud server or an edge server.

4. The system as described in claim 1, characterized in that, The server's three-dimensional wide-area grain storage pest identification network includes a multi-temporal decision network. The multi-temporal decision network is used to analyze each temporal feature separately and adjust its weight in the corresponding Gaussian function in the Gaussian mixture model according to the contribution and / or reliability of each temporal feature.

5. The system as described in claim 4, characterized in that, The multi-temporal decision network includes a fully connected layer for outputting the mean of the Gaussian distribution corresponding to the current temporal feature, a fully connected layer for outputting the variance of the Gaussian distribution corresponding to the current temporal feature, and weights for outputting the Gaussian function corresponding to the current temporal feature. The multi-temporal decision network obtains the Gaussian function of the current temporal feature based on the mean and variance of the Gaussian distribution, and obtains the joint decision probability based on the Gaussian function of each temporal feature and its weight.

6. The system as described in claim 1, characterized in that, The three-dimensional wide-area grain storage pest identification network extracts temporal features at different time lengths through a network structure that combines convolutional neural networks (CNN) and Transformers.

7. The system as described in claim 5, characterized in that, The server's three-dimensional wide-area grain storage pest identification network also includes a temporal pyramid network, which is placed before the multi-temporal decision network to assign different levels of attention to temporal features at different time lengths.

8. The system as described in claim 1, characterized in that, The server's three-dimensional wide-area grain storage pest identification network also includes a feature extraction and three-dimensional perception network. The feature extraction and three-dimensional perception network is used to place the spliced ​​CSI signal before the CSI signal splitting, to extract features from the spliced ​​CSI signal, and then to adjust the attention to the horizontal and vertical CSI signals through the three-dimensional perception attention mechanism.

9. The system as described in claim 1, characterized in that, The loss function used during the training of the server's 3D wide-area grain storage pest identification network is the negative log-likelihood function.

Citation Information

Patent Citations

  • Grain mildew detection method and device based on WiFi equipment

    CN110531039A

  • Stored grain pest detection method and device based on Gaussian mixture model and medium

    CN118314512A