WiFi detection system for three-dimensional wide-area stored grain pest detection and positioning
By setting up WiFi CSI signal detection devices and servers in the granary, combined with multi-time series judgment networks and Gaussian distribution, the problem of pest detection and positioning in large-space granaries was solved, non-contact accurate detection and positioning was achieved, and the efficiency of grain storage management was improved.
Patent Information
- Application Number
- CN202511185977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-22
AI Technical Summary
Existing technologies make it difficult to perform three-dimensional pest detection and positioning in large, deep granaries. Traditional methods also have problems such as low detection frequency, high cost, manual intervention, and potential impact on grain storage quality.
A three-dimensional wide-area stored-grain pest detection system based on WiFi CSI is adopted, including horizontal and vertical CSI signal detection devices, spatial grid erection components and servers. Pest identification is performed by constructing a multi-time series judgment network and a time series pyramid network, and contactless detection is achieved by combining Gaussian distribution and three-dimensional perception attention mechanism.
It realizes contactless pest detection and positioning in large-space grain silos, improves detection accuracy and interpretability, reduces labor costs, and improves grain storage safety and management efficiency.
Smart Images

Figure CN120669316A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a target detection and positioning technology based on channel state information (CSI), and in particular to a WiFi detection technology for three-dimensional wide-area stored-grain pest detection and positioning. Background Art
[0002] Channel State Information (CSI) is data generated by Wi-Fi devices during signal transmission and reception. It can be used in a variety of scenarios, including human behavior recognition, crop moisture monitoring, and pest identification in grain silos. The principle is that when the behavior or state of an object within the CSI monitoring range changes, the CSI data will also change accordingly. By establishing a correlation between CSI changes and corresponding scenarios, the CSI data can be used to analyze and process the scenario.
[0003] Currently, pest detection inside granaries usually involves randomly inserting pest capture devices into one or more points in the grain pile in the granary. After using the characteristics of the device to lure surrounding pests into the device, the pest situation and category are analyzed manually or automatically using software. This makes it difficult to determine the pest status of the entire granary, and missed detections often occur. The entire process requires human participation, and granaries are inherently dangerous, resulting in low detection frequency and high detection costs. Grain storage has high requirements for temperature, humidity, and other environmental factors, but this process is performed after the grain is placed in the granary and is subject to intrusion by external equipment. This may affect the quality of grain storage due to personnel or equipment environmental issues.
[0004] Current CSI-based detection solutions involve placing Wi-Fi transmitters and receivers at either end of a grain pile. Machine learning models are then built to analyze and detect pests based on the presence of pests and changes in Wi-Fi CSI signals when pests crawl or move. However, these solutions are only effective under experimental conditions and cannot be used in large spaces like granaries, which can be 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 system that is suitable for the actual situation of grain storage warehouses, has a large space and a wide depth, is adapted to wide-area characteristics, and can perform three-dimensional posture pest detection and positioning.
[0006] The technical solution adopted by the present invention to solve the above technical problems is a WiFi detection system for three-dimensional wide-area stored-grain pest detection and positioning, comprising a horizontal CSI signal detection device, a vertical CSI signal detection device, a spatial grid mounting component, and a server; the number of the horizontal CSI signal detection devices and the vertical CSI signal detection devices matches the number of the 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 mounting component. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize horizontal grain pest monitoring.
[0008] The vertical CSI signal detection device is a WiFi-CSI signal transceiver installed on the top and bottom surfaces of the three-dimensional space grid through a space grid mounting component. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to realize vertical dimension storage pest monitoring;
[0009] The spatial grid mounting components provide a fixed foundation for horizontal and vertical CSI signal detection devices in a three-dimensional spatial grid divided according to the size of the granary and the strength of the CSI signal. Each three-dimensional spatial grid serves as a granary monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each granary monitoring zone as a vertical CSI signal detection device. At least one pair of WiFi-CSI signal transceivers is installed on each of the parallel side surfaces of each granary monitoring zone as a horizontal CSI signal detection device.
[0010] The server is used to receive CSI signals from the horizontal CSI signal detection device and the vertical CSI signal detection device of each three-dimensional space grid, perform pest identification, and output the probability of the presence of stored grain pests and the location of the three-dimensional space grid where the pests exist.
[0011] Based on the above scheme, CSI signals are used to perform contactless detection of pests inside grain warehouses.
[0012] Preferably, the spatial grid is constructed with temperature-measuring optical cables. At the hardware level, the WiFi system installation environment takes into account the existing conditions of the granary and temperature-measuring optical cables during equipment deployment. WiFi transmitters and receivers are installed on the temperature-measuring optical cables. This allows for real-time WiFi CSI signals to be acquired even in wide-area scenarios like granaries. The acquired CSI data provides the foundation for subsequent server processing.
[0013] Preferably, the server's three-dimensional wide-area stored-grain pest identification network receives and splices CSI signals from the horizontal and vertical CSI signal detection devices of each three-dimensional spatial grid. The spliced CSI signals are then split into CSI data of varying time lengths to obtain time series features. The Gaussian function of each time series feature is used as the probability of determining the presence of an insect pest in the current time series. A mixed Gaussian model is then used to integrate the Gaussian functions of the CSI data from each time series feature into a joint determination probability. The loss function used in the training of the three-dimensional wide-area stored-grain pest identification network is the negative log-likelihood function.
[0014] Specifically, a time series interpretability structure integrating Gaussian distribution is proposed: the server's three-dimensional wide-area stored-grain pest identification network contains multiple time series judgment networks, which are used to analyze each time series feature separately and adjust the weight of the corresponding Gaussian function in the mixed Gaussian model according to the contribution and / or reliability of each time series feature.
[0015] The multi-time series decision network includes a fully connected layer for outputting the mean of the Gaussian distribution corresponding to the current time series feature, a fully connected layer for outputting the variance of the Gaussian distribution corresponding to the current time series feature, and a weight for outputting the Gaussian function corresponding to the current time series feature;
[0016] The multi-time series decision network obtains the Gaussian function of the current time series feature according to the mean and variance of the Gaussian distribution, and obtains the joint decision probability according to the Gaussian function of each time series feature and the weight of its Gaussian function.
[0017] The interpretability of quality monitoring is crucial for practical applications. To address this need, the present invention constructs a multi-time series decision network and modifies the loss function. This allows different time series data to output corresponding Gaussian distributions. These multiple Gaussian distributions are then fused to obtain a comprehensive decision result from the entire network, along with its uncertainty, enhancing its interpretability.
[0018] Preferably, CSI is a time series data. Affected by the external environment and the characteristics of different detection objects, the effective time series (time period) of CSI in different task scenarios is different. Therefore, the server's three-dimensional wide-area stored grain pest identification network also includes a time series pyramid network. The time series pyramid network is placed before the multi-time series judgment network to give different attention to time series features under different time lengths.
[0019] For processing CSI time series data, existing technologies use a fixed-time-length neural network—a long short-term memory (LSTM) network. This proposal constructs a time series pyramid to adaptively adjust time length. When CSI is time series data, existing solutions typically use CSI data with a fixed time period as input and then perform iterative analysis using an LSTM. This analysis method ignores the fact that the time series required for CSI vary in length for different scenarios and tasks. To address this issue, the present invention proposes a time series pyramid network that splits the input CSI signal into short, medium, and long periods. It then constructs a CSI time series pyramid based on a reference image space pyramid, adaptively weighting data of varying time series lengths.
[0020] Preferably, considering the impact of different pest forms in the grain warehouse on the CSI signal, for example, when the pest is in a horizontal state, the horizontal CSI signal perception ability is weak, while the vertical CSI signal perception ability is strong, and vice versa. Therefore, the server's three-dimensional wide-area stored grain 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, and is used to extract features from the spliced CSI signal. The three-dimensional perception attention mechanism is used to adjust the attention to the horizontal CSI signal and the vertical CSI signal 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 stored-grain pest identification network proposes a network structure combining CNN and Transformer to extract temporal features at different time lengths. This network structure can use CSI data as input and accurately detect pests through the changes in signal waves caused by CSI penetrating different objects.
[0022] The present invention achieves the beneficial effect of constructing a wide-area CSI data collection and monitoring architecture based on existing grain storage and temperature measurement optical cables, enabling contactless pest detection within grain storage using CSI signals. Furthermore, a time series pyramid structure is adapted for processing time series data such as CSI. Furthermore, the integration of a Gaussian distribution-based time series interpretability structure enhances the interpretability of the results. Furthermore, a three-dimensional perception attention mechanism improves the accuracy of pest identification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 Flowchart for the implementation of the system of the present invention;
[0024] Figure 2 Schematic diagram of the system architecture of the embodiment;
[0025] Figure 3 This is a schematic diagram of a three-dimensional wide-area stored-grain pest identification network;
[0026] Figure 4 Schematic diagram of the impact of different pest forms on CSI signals in grain depots;
[0027] Figure 5 Schematic diagram of attention for three-dimensional perception of pest morphology;
[0028] Figure 6 This is a schematic diagram of timing splitting;
[0029] Figure 7 This is a schematic diagram of the temporal pyramid network;
[0030] Figure 8 It is a schematic diagram of the time series pyramid feature;
[0031] Figure 9 Schematic diagram of multi-sequence decision network. DETAILED DESCRIPTION
[0032] The WiFi detection system of the present invention is based on the existing grain storage process of grain depots. By optimizing the hardware layout and identification software algorithm of the grain depot, it proposes a three-dimensional wide-area stored grain pest detection solution. This overcomes the problems of traditional methods such as weak large-space CSI signals, insufficient precision caused by single-dimensional signal perception, and the lack of interpretability of the results, which makes it difficult to directly guide grain storage operations.
[0033] like Figure 1 The following is the overall business process of the scenario involved in this solution.
[0034] 1. Equipment installation:
[0035] The grain warehouse was renovated, and a WiFi-CSI signal transceiver was installed on the wall of the grain warehouse. The temperature measurement optical cable inside the grain warehouse was also renovated and installed with a WiFi-CSI signal transceiver. The spatial grid of the three-dimensional detection area was divided according to the actual size of the grain warehouse and the strength of the CSI signal. The division of the spatial grid also provided the basis for the positioning of the detection results. Figure 2 As shown, the spatial block corresponding to each spatial grid is used as a granary monitoring partition. At least a pair of WiFi-CSI signal transceivers are installed on the top and bottom surfaces of each partition as vertical CSI signal detection devices; and a pair of WiFi-CSI signal transceivers are installed on at least one set of parallel side surfaces of each partition as horizontal CSI signal detection devices.
[0036] The set of parallel side surfaces may be front and rear side surfaces, or left and right side surfaces. The receiving device and the transmitting device in a pair of WiFi-CSI signal transceiver devices are respectively installed on two opposite surfaces of the granary monitoring area.
[0037] The six surfaces of the cubic space block forming the granary monitoring partitions are virtual partitions, not physically separated by partitions. When a surface of a partition at the edge of the granary is a granary wall, the WiFi-CSI signal transceiver can be directly mounted on the wall. When the partition at the edge of the granary is located within the space, the WiFi-CSI signal transceiver can be installed on an already installed temperature measurement optical cable. Alternatively, specific physical cabling for signal transmission and the WiFi-CSI signal transceiver can be laid and fixed to the granary based on the actual partitioning requirements. The received WiFi-CSI signal can be transmitted to the server via a wired connection. Alternatively, the WiFi-CSI signal transceiver can be installed in the air and the received WiFi-CSI signal can be transmitted directly to the server wirelessly. The server can be a cloud server or an edge server.
[0038] 2. Storage of grain in silos:
[0039] After the equipment is installed, the grain is dumped into the modified grain warehouse. Since the vertical and horizontal CSI signal detection devices and temperature measurement optical cables or other physical cables or installation devices are installed before the grain is stored, after the grain is dumped, the vertical and horizontal CSI signal detection devices in each granary monitoring zone can detect the grain within its spatial grid.
[0040] 3. Data collection and acquisition:
[0041] The vertical CSI signal detection device or the WiFi-CSI signal receiving device in the horizontal CSI signal detection device of each granary monitoring zone obtains the CSI signal and transmits the CSI signal to the server.
[0042] The server processes the CSI signals and converts them into CSI image data that can be subsequently analyzed by the network. The captured CSI signals are first captured at a fixed interval, and then an image is generated based on this capture. The values and dimensions are then normalized to obtain the CSI image data corresponding to a single CSI signal transceiver. Because a granary monitoring zone may contain multiple CSI signal transceivers, the CSI image data corresponding to these multiple transceivers within the zone can be concatenated by channel dimension to generate the full CSI image for that zone for unified analysis.
[0043] 4. Server performs pest identification:
[0044] The server analyzes the presence of pests in a CSI image within a specific partition from both spatial and temporal dimensions. First, the CSI image is input into a feature extraction module, mapped into high-dimensional features, and then fed into a three-dimensional perception module. The CSI signal feature graphs in the horizontal and vertical dimensions are spatially analyzed for sensitivity. Finally, the feature graphs are split into short-, medium-, and long-series feature graphs using a temporal pyramid network. These feature graphs from different time periods are then fused using a temporal pyramid network to generate temporal pyramid features that summarize feature information from different time periods. Finally, the temporal pyramid features are fed into a multi-temporal decision network, which adaptively analyzes the current situation in terms of time, determining which of the short, medium, and long time periods is most appropriate.
[0045] 5. Server output:
[0046] The server uses the multi-time series judgment network's prediction of whether there are pests in each granary monitoring zone and the corresponding probability of pests existing as the identification result. When the probability of pests existing in a granary monitoring zone is higher than the preset probability, the server outputs pest prompts and the corresponding spatial grid position for positioning. Optionally, the server also integrates the identification results of each granary monitoring zone and outputs the probability of pests existing in the entire granary.
[0047] The WiFi detection system includes a horizontal CSI signal detection device, a vertical CSI signal detection device, a spatial grid installation component, and a server; the number of horizontal CSI signal detection devices 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 mounting component. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize horizontal grain pest monitoring.
[0049] The vertical CSI signal detection device is a WiFi-CSI signal transceiver installed on the top and bottom surfaces of the three-dimensional space grid through a space grid mounting component. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to realize vertical dimension storage pest monitoring;
[0050] The spatial grid erection component provides a fixed foundation for the horizontal CSI signal detection device and the vertical CSI signal detection device for the three-dimensional spatial grid divided according to the size of the granary and the strength of the CSI signal; each three-dimensional spatial grid serves as a granary monitoring zone, and at least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each granary monitoring zone as a vertical CSI signal detection device; at least one set of parallel side surfaces of each granary monitoring zone is respectively installed with a pair of WiFi-CSI signal transceivers as a horizontal CSI signal detection device. The complete granary is evenly divided into n granary monitoring zones of the same size to improve the problem of CSI signal attenuation or excessive noise caused by the granary area being too large. In the embodiment, as Figure 2 In the granary shown, the spatial grid erection components include the two walls of the granary and the temperature measuring optical cables on the vertical side; through the temperature measuring optical cables, CSI signal receiving or transmitting devices are installed on the two walls of the granary and the temperature measuring optical cables on the vertical side to realize horizontal dimension storage pest information monitoring.
[0051] Temperature measuring optical cables are optical cables used in grain depots to detect temperature information, and are equipped with temperature sensors. The temperature measuring optical cables are installed or laid inside the grain depot before grain is added, and they do not move during the entire grain storage cycle. The temperature measuring optical cables also have information outlets, and signal transmission equipment can be installed to transmit CSI signals to a remote analysis terminal. The horizontal and vertical CSI signals obtained within the same partition are transmitted back to the cloud via the temperature measuring optical cables for identification, thereby enabling pest detection within three dimensions and from multiple angles. Furthermore, if the grid needs to be refined within the same space, horizontal and vertical temperature measuring optical cables or other components that support the CSI signal detection device can be added. If wired CSI signal transmission to the server is required, the components must also have communication capabilities.
[0052] The server is configured to receive CSI signals from the horizontal and vertical CSI signal detection devices in each three-dimensional spatial grid, perform pest identification, and output the probability of the presence of stored-grain pests and the location of the three-dimensional spatial grid where the pest is located. This embodiment utilizes a cloud server for pest identification. Alternatively, edge servers can be deployed near the granary to perform pest identification.
[0053] Specifically, the server receives CSI data of variable time length in both horizontal and vertical dimensions, and outputs the prediction results and result uncertainty represented by a mixed Gaussian function. The specific structural network used to complete the three-dimensional wide-area stored grain pest identification is as follows: Figure 3 As shown, it includes CSI data preprocessing module, feature extraction and 3D perception network, time series splitting module, time series pyramid network and multi-time series decision network;
[0054] The CSI data preprocessing module preprocesses the acquired CSI data to obtain multi-channel time-series CSI image data, which is composed of the horizontal CSI in each granary monitoring zone as one dimension and the CSI signal in the vertical dimension. The multi-channel time-series CSI image data is sent to the feature extraction network with the CNN network as the core, and feature extraction and three-dimensional perception of pest morphology are performed separately to determine which specific dimension is more sensitive to the current pest behavior. The output result is a feature map. The feature map is then sent to the time-series splitting module and split according to the timing requirements to enable the network to adapt to different CSI time periods. The cycle that best suits the current judgment scenario is selected to analyze the results. In the embodiment, it is divided into three types of time periods: short, medium, and long time series. After that, the features of different time periods are sent into the time series pyramid network to obtain the time series pyramid features, and analyzed and judged in the multi-time series network. The judgment results and variances under three different time series conditions of short time series, medium time series and long time series are output in the form of Gaussian function, and the mixed Gaussian function is used for fusion to obtain the multi-time series judgment probability and joint judgment probability.
[0055] Specifically, each module in the three-dimensional wide-area stored-grain pest identification network is described in detail:
[0056] 1) CSI data preprocessing module
[0057] Function description: After the data is transmitted to the cloud server, the CSI data needs to be pre-processed and converted into image format based on the number of subcarrier antennas and time period before being sent to the network for judgment.
[0058] Specific method: CSI data is a time series data that represents Wi-Fi signal transmission. It has multiple dimensions. In the stored grain pest detection task, two dimensions of information, subcarrier and data packet, are selected to represent the impact of the grain status in the stored grain on the CSI signal. For each data packet t, the number of channels is :
[0059] ;
[0060] in 、 、 The data packets can reflect the length of the data collection cycle. Considered as the CSI image with a time length of t, The size of , is the length of the CSI image, The width of the CSI image. To accommodate as many different data scenarios as possible, such as some quality conditions that are difficult to characterize in short-period data, this proposal sets a larger value for the packet cycle length, fixed at 1 second. This value can be adjusted based on different usage scenarios.
[0061] For the obtained CSI image, the 0-255 value range of the RGB three-channel image is uniformly used, and the image difference is used to fix its size to 512x512, which can be completed. Figure 3 The data conversion of a single transceiver pair in the system is performed. The conversion is performed on each of the transceiver pairs in the system to obtain a three-channel 512x512 image of the corresponding tree. Finally, all images are spliced in the channel dimension to complete the conversion of the entire CSI data in a detection area to an image, thus completing the preprocessing work.
[0062] 2) Feature extraction and 3D perception network
[0063] Function description: The CSI data obtained by preprocessing needs to be feature extracted for subsequent analysis. At the same time, considering the actual situation of pests inside grain piles, especially large grain silos, their posture changes are actually a three-dimensional problem. The three-dimensional posture judgment of the present invention can improve the overall judgment accuracy. Considering the impact of different forms of pests in grain warehouses on CSI signals, such as Figure 4 As shown, when pests are horizontal, their ability to perceive horizontal CSI signals is weak, while their ability to perceive vertical CSI signals is strong, and vice versa. The proposed feature extraction and 3D CSI signal perception network constructs a separate attention module for 3D pest morphology perception. The network independently determines which dimension of CSI signal to focus on based on the specific pest morphology, thereby improving final performance.
[0064] Specific methods: such as Figure 3 As shown, the feature extraction and 3D perception network is primarily based on a convolutional network (CNN), consisting of four convolutional layers and an attention module for 3D perception of pest morphology. Each convolutional layer incorporates operations such as convolution, batch normalization, and max pooling. Convolutional layer 1 has a kernel size of 7x7x96 with a stride of 2; convolutional layer 2 has a kernel size of 5x5x256 with a stride of 2; convolutional layer 3 has a kernel size of 3x3x512 with a stride of 1; and convolutional layer 4 has a kernel size of 3x3x512 with a stride of 1. Since this portion of the CNN feature extraction is standard, it will not be detailed here.
[0065] Pest morphology 3D perception attention module Figure 5 As shown, it receives the features output from convolutional layer 4 , the feature will be sent to the average pooling and maximum pooling layers respectively, and then processed by two 1x1 convolutions, and then determine which areas in the input feature map need special attention from the channel dimension and spatial dimension. The result of the convolution output will be summed element by element and sent to the sigmoid activation function. Each channel dimension in generates an attention probability value that sums to 1, and then Multiply to get the final output .
[0066] 3) Time-series splitting network
[0067] Functional Description: Even after conversion to image format, CSI data retains its temporal characteristics and therefore possesses a very strong temporal contextual association. For issues such as additional stored-grain pests, different pest postures, and different pest movements, CSI data will not only vary in amplitude and waveform, but also vary in the temporal dimension. For example, when pests engage in short-term movements without external interference, short-period CSI data may be sufficient for observation and judgment. However, when pests engage in long-term movements with external interference, longer-period CSI observations are required for judgment. Therefore, the step size or time of CSI data is uncertain and variable. To address this issue, it is necessary to design a mechanism or structure that can analyze CSI data from different temporal dimensions to adapt to the problem.
[0068] Specific methods: such as Figure 6 As shown in the figure, the time series splitting module splits the feature map output by the feature extraction network into three dimensions: short time series, medium time series, and long time series.
[0069] Specifically, for short time series, the original feature map is split into four parts, each with a time step of 0.25 seconds. For medium time series, the feature map is split into two parts, each with a time step of 0.5 seconds. For long time series, the feature map remains unchanged without any splitting. This time period is only an example and can be adjusted according to actual conditions.
[0070] 4) Temporal Pyramid Network
[0071] Function Description: Analyze and process the short, medium, and long time series feature maps obtained by splitting. By building a time series pyramid, different time series information can be integrated and supplemented to improve the overall robustness and performance of the model.
[0072] Specific methods: such as Figure 7 As shown in the figure, the sliding window Transformer (Swin-Transformer) structure is mainly used, which is divided into three layers. Each layer corresponds to the short, medium, and long time series feature map inputs. The specific processing process is as follows:
[0073] (1) Sequentially select a segment from the short time series data and pass it through the linear embedding layer and Swin-Transformer, assuming the dimension is 128 dimensions; the linear embedding layer adapts to the change of the input dimension to ensure that it is compatible with the input data;
[0074] (2) Repeat step 1 for the 4 segments of short time series data to obtain the short time series data features ; Where n is the number of short time series segments. In this case, the short time series features can be represented by four 128-dimensional features;
[0075] (3) After splicing the four feature results of the short time series output in the feature dimension, 4 times average pooling is used to obtain a 128-dimensional short time series feature, which is used for fusion with the medium time series feature;
[0076] (4) For the two segments of data in the middle time series, the intermediate features are obtained by linear embedding layer and Swin-Transformer respectively. The intermediate features are concatenated with the short time series features of step (3) in the channel dimension, and then sent to the new linear embedding layer and Swin-transformer for feature calculation to obtain the middle time series features. ; where k is the number of time series segments; the feature dimension of each segment is also 128-dimensional, so the time series feature is represented by two 128-dimensional features;
[0077] (5) For long time series data, after two sets of linear embedding layers and Swin-Transformer, the intermediate features are obtained. After the intermediate features are spliced with the time series features in step (4) in the channel dimension, they are sent to the 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. From bottom to top, they are the data features of short time series, medium time series and long time series. And the short time series consists of 4 features of the same dimension , in order to infer the characteristics of medium and long time series and the sub-segment feature dimensions in each time series are consistent.
[0079] This forms a time series pyramid feature that can reasonably encompass and focus on feature information from different time periods to improve the problems caused by the uncertainty and variability of CSI data.
[0080] 5) Multi-sequence decision network
[0081] Function Description: Performs segment-based judgment analysis based on the time series pyramid features, and synthesizes the selected segments to output the final pest situation and the uncertainty of the judgment. The example uses 6 segments.
[0082] Specific methods: such as Figure 9 As shown in Figure 1, 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: the mean layer, the variance layer, and the weight layer. These layers generate the Gaussian function mean, variance, and weight corresponding to each feature.
[0084] For the 6 time series features of the input, 6 sets of mean * variance * weight results are output to represent 6 different Gaussian distributions As the multi-time series judgment probability, k is the Gaussian distribution number.
[0085] Then the mixed Gaussian model GMM is used to integrate the above six Gaussian models to obtain the joint judgment probability .
[0086] ;
[0087] ;
[0088] is the probability density function of the Gaussian model, that is, the Gaussian function, is a random variable; is the mean of the k-th Gaussian function, and is the output result 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; is the probability density function of the mixed Gaussian model, K represents the total number of Gaussian functions, and in the embodiment, K is 6. is the weight of the kth Gaussian function, and is the output result of the weight layer.
[0089] 6) Explanation on the temporal interpretability of the 3D wide-area stored-grain pest identification network:
[0090] Traditional deep learning networks are black boxes because once the model is trained, the neuron parameters are fixed and expressed as numerical data. Single numerical data lacks interpretability and the ability to measure uncertainty. Data distributions, however, do have this ability. For example, the variance of a Gaussian function can be used to characterize its confidence in the mean.
[0091] The present invention transforms the output result from a single numerical value into a Gaussian function, so the output result of the entire model has interpretability and uncertainty measurement capabilities.
[0092] The present invention splits CSI information in the time dimension. The input to the multi-time series decision network is three short time series data segments, two medium time series data segments, and one long time series data segment. Therefore, the multi-time series decision network can perform separate analyses on these six different data segments to clarify which one contributes more and which one is more reliable, thereby adjusting the weights of the Gaussian function and aligning them to comprehensively output the final decision result, which has time series interpretability.
[0093] 7) Loss function calculation:
[0094] Different from the traditional classification network that uses cross entropy, in order to better adapt to the model structure and mathematical model, this embodiment uses negative log-likelihood as the loss function from the perspective of probability distribution modeling. :
[0095]
[0096]
[0097]
[0098] is the total loss function, N is the total number of training samples, and are the input and label corresponding to the k-th Gaussian function, and is the mean and standard deviation corresponding to the kth Gaussian function.
[0099] At the software level, a neural network combining a convolutional neural network (CNN) and a Transformer was constructed, and a three-dimensional perception attention mechanism for pest morphology and a temporal pyramid network structure were proposed. These methods provide a reference standard for determining the presence of pests in a more accurate and explainable manner, assisting in pest fumigation decision-making in grain warehouses.
[0100] The present invention also optimizes the neural network processing of WiFi CSI signals. Existing CSI analysis methods segment data into fixed periods (e.g., 1-second intervals) and then directly analyze the segmented data. However, CSI data inherently exhibits temporal characteristics. Therefore, the analysis period may vary to account for factors such as environmental fluctuations, varying pest species, and varying pest postures and movements over time. Using a fixed period can increase misjudgments or degrade analysis results. This invention proposes a new temporal pyramid, based on a transformer network. Through training, the network automatically selects the most appropriate time period for CSI data analysis, improving the overall robustness and performance of the CSI analysis model and making the system more adaptable.
[0101] Furthermore, various neural networks with uninterpretable black-box models cannot tell users whether the confidence level of a result is 90% or 30%. The SotfMax layer outputs a probability value for convenient ranking, not a confidence level (Yarin Gal, University of Cambridge, ICML 2014), a characteristic of black-box neural networks. Existing black-box model detection solutions simply output results, lacking interpretability and providing users with confidence levels, limiting their widespread use. Considering that pest control in stored grain is a costly undertaking and requires careful judgment, this present invention addresses the need for more reliable pest detection probabilities by proposing a multi-time series decision network structure incorporating a Gaussian distribution. This architecture outputs both the decision result (analogous to the mean of a Gaussian function) and the uncertainty / confidence level (analogous to the variance of a Gaussian function). Therefore, this proposal addresses both the network structure and the loss function, introducing a Gaussian distribution to transform the numerical output into a measurable Gaussian distribution, thus enhancing the interpretability of the results and enabling uncertainty measurement in a time series context.
[0102] The stored grain pest detection technology provided by the present invention can detect pests in the granary without damaging the grain, accurately identify the pests and locate the area, and then control the number of fumigations; and combined with the existing grain storage management system, it can also realize remote monitoring and automated management, greatly improve management efficiency, reduce labor costs, significantly improve the safety and efficiency of grain storage, and reduce losses caused by pests.
Claims
1. A WiFi detection system for three-dimensional wide-area stored grain pest detection and positioning, characterized by: It includes a horizontal CSI signal detection device, a vertical CSI signal detection device, a space grid erection component and a server; the number of the horizontal CSI signal detection device and the vertical CSI signal detection device matches the number of the space 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 mounting component. It is used to transmit and receive CSI signals in the horizontal dimension and send the received CSI signals to the server to realize horizontal grain pest monitoring. The vertical CSI signal detection device is a WiFi-CSI signal transceiver installed on the top and bottom surfaces of the three-dimensional space grid through a space grid mounting component. It is used to transmit and receive CSI signals in the vertical dimension and send the received CSI signals to the server to realize vertical dimension storage pest monitoring; The spatial grid mounting components provide a fixed foundation for horizontal and vertical CSI signal detection devices in a three-dimensional spatial grid divided according to the size of the granary and the strength of the CSI signal. Each three-dimensional spatial grid serves as a granary monitoring zone. At least one pair of WiFi-CSI signal transceivers is installed on the top and bottom surfaces of each granary monitoring zone as a vertical CSI signal detection device. At least one pair of WiFi-CSI signal transceivers is installed on each of the parallel side surfaces of each granary monitoring zone as a horizontal CSI signal detection device. The server is used to receive CSI signals from the horizontal CSI signal detection device and the vertical CSI signal detection device of each three-dimensional space grid, perform pest identification, and output the probability of the presence of stored grain pests and the location of the three-dimensional space grid where the pests exist.
2. The system according to claim 1, wherein: The space grid installation component is a temperature measuring optical cable.
3. The system according to claim 1, wherein: The server is a cloud server or an edge server.
4. The system according to claim 1, wherein: The server's three-dimensional wide-area stored-grain pest identification network receives the CSI signals from the horizontal CSI signal detection devices and vertical CSI signal detection devices of each three-dimensional spatial grid and then splices them together. The spliced CSI signals are split into CSI data of different time lengths to obtain time series features at different time lengths. The Gaussian function of each time series feature is used as the judgment probability of whether there is an insect pest in the current time series. The Gaussian function of the CSI data of each time series feature is then integrated into a joint judgment probability by a mixed Gaussian model.
5. The system according to claim 4, wherein: The server's three-dimensional wide-area stored-grain pest identification network includes multiple time-series judgment networks, which are used to analyze each time-series feature separately and adjust the weight of the corresponding Gaussian function in the mixed Gaussian model according to the contribution and / or reliability of each time-series feature.
6. The system according to claim 5, wherein: The multi-time series decision network includes a fully connected layer for outputting the mean of the Gaussian distribution corresponding to the current time series feature, a fully connected layer for outputting the variance of the Gaussian distribution corresponding to the current time series feature, and a weight for outputting the Gaussian function corresponding to the current time series feature; The multi-time series decision network obtains the Gaussian function of the current time series feature according to the mean and variance of the Gaussian distribution, and obtains the joint decision probability according to the Gaussian function of each time series feature and the weight of its Gaussian function.
7. The system according to claim 4, wherein: The three-dimensional wide-area stored-grain pest recognition network extracts temporal features of different time lengths through a network structure that combines convolutional neural network (CNN) and Transformer.
8. The system according to claim 4, wherein: The server's three-dimensional wide-area stored-grain pest identification network also includes a temporal pyramid network, which is placed before the multi-temporal judgment network to give different levels of attention to temporal features at different time lengths.
9. The system according to claim 4, wherein: The server's three-dimensional wide-area stored-grain pest identification network also includes feature extraction and three-dimensional perception networks. The feature extraction and three-dimensional perception networks are used to place the spliced CSI signal before the CSI signal splitting, and are used to extract features from the spliced CSI signal. The three-dimensional perception attention mechanism is used to adjust the attention to the horizontal and vertical CSI signals.
10. The system according to claim 4, wherein: The loss function used in the training process of the server's three-dimensional wide-area stored-grain pest recognition network is the negative log-likelihood function.
Citation Information
Patent Citations
Stored grain pest detection method and device based on channel state information
CN110515130A
Grain mildew detection method and device based on WiFi equipment
CN110531039A
Grain surface pest quantity determination method and device, electronic equipment and storage medium
CN113222894A
Storage grain pest multi-dimensional information acquisition and early warning method based on mobile terminal
CN115100471A
Cereal moisture detection method based on wireless signal refraction model
CN117491440A