Comprehensive Gas Pollution Detection Method Based on Selective State Space Model

By combining selective state space model and autoencoder, the problem of inefficient gas pollutant prediction methods when dealing with complex time series is solved, and efficient gas pollutant concentration prediction and abnormal detection are achieved.

CN119804772BActive Publication Date: 2025-08-01WEIHAI LANGXIN SMART TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411946249.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-08-01
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Existing gas pollutant prediction methods are inefficient and complex in processing nonlinear relationships, multivariate, and complex time series data, making it difficult to achieve accurate anomaly detection.

Method used

The comprehensive detection method of gas pollution based on the selected state space model is adopted, and the data is processed through the one-dimensional convolutional neural network module and the Mamba module, and the encoding and decoding reconstruction are combined with the autoencoder to determine the abnormal sequence.

Benefits of technology

Efficiently capture the complex dependencies between time series data, maintain efficient computing performance when processing long time series, improve computing speed and efficiency, and achieve accurate abnormal detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119804772B_ABST
    Figure CN119804772B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a comprehensive gas pollution detection method based on a selective state space model, which relates to the field of environmental monitoring. The method includes preprocessing the treatment equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix, converting the data in the data matrix into corresponding feature vectors to obtain a data set; inputting the data set into the selective state space model, which uses the feature vectors to output the predicted concentration values of each pollutant at the next moment through a one-dimensional convolutional neural network and a Mamba module; obtaining the time series of each pollutant according to the environmental parameters at the current and previous moments; reconstructing the time series of each pollutant element based on the autoencoder of the model to obtain corresponding reconstructed sequences; and determining the abnormal sequences according to the time series corresponding to each pollutant element and the reconstructed sequences of the same pollutant element. In this way, the complex dependence relationships between time series can be efficiently captured, and the computational performance of long time series can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of environmental monitoring, and particularly to a comprehensive gas pollution detection method based on a selective state space model. Background Art

[0002] The component content of various gas pollutants emitted by industries is a time series, which is characterized by being sorted in chronological order. By analyzing historical data to find the law of its dynamic change and thus predicting future data, it plays a crucial role in the prediction problem of time-related components. Predicting and analyzing the data of various gas pollutants emitted by industries and implementing control measures in a timely manner is an effective way to improve air quality. Therefore, the abnormal detection of gas pollutants has important and practical significance for sustainable development and improving the social living environment.

[0003] Existing waste gas concentration prediction and abnormal detection methods have many problems. For example, traditional time series prediction methods cannot well capture non-linear relationships and are difficult to handle multi-variable and complex time series data; time series prediction methods based on machine learning do not consider the time dependence of historical time data and sequences, and have a large computational amount and high complexity for multi-dimensional and multi-variable data prediction; time series prediction methods based on deep learning usually require a larger data set for learning and training to obtain a more accurate model; time series prediction methods based on convolutional neural networks usually process data with local correlations and have limitations as the input has a fixed width; time series prediction methods based on recurrent neural networks have poor performance when dealing with long time series; time series prediction methods based on long short-term memory networks have a high computational complexity and are prone to gradient explosion problems when dealing with long time series; time series prediction methods based on Transformer have high computational and memory resource requirements when dealing with long time series, and are prone to overfitting when the data set is insufficient. Summary of the Invention

[0004] The present disclosure provides a comprehensive gas pollution detection method, device, equipment and storage medium based on a selective state space model.

[0005] According to the first aspect of the present disclosure, a comprehensive gas pollution detection method based on a selective state space model is provided. The method includes:

[0006] Preprocess the control device parameters and environmental parameters at the current and previous times to obtain a data matrix, convert the data in the data matrix into corresponding feature vectors, and obtain a data set;

[0007] Input the dataset into the trained selection state space model so that the trained selection state space model uses the feature vectors in the dataset to output the predicted concentration values of each pollutant element in the exhaust gas at the next moment through its own one-dimensional convolutional neural network module and Mamba module;

[0008] According to the environmental parameters at the current and previous moments, obtain the time series corresponding to each pollutant element in the exhaust gas;

[0009] Use the autoencoder constructed based on the selection state space model to encode and compress and decode and reconstruct the time series corresponding to each pollutant element respectively, and obtain the reconstructed series corresponding to each pollutant element;

[0010] Determine the abnormal series according to the time series corresponding to each pollutant element and the reconstructed series of the same pollutant element.

[0011] In some realizable ways of the first aspect, the preprocessing of the treatment device parameters and environmental parameters at the current and previous moments to obtain a data matrix includes:

[0012] Perform data cleaning and missing data filling on the treatment device parameters and environmental parameters at the current and previous moments;

[0013] Perform normalization processing on the environmental parameters after missing data filling;

[0014] Integrate the treatment device parameters after missing data filling and the normalized environmental parameters to obtain a data matrix; where

[0015] The environmental parameters include the adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.

[0016] In some realizable ways of the first aspect, the use of the feature vectors in the dataset to output the predicted concentration values of each pollutant element in the exhaust gas at the next moment through its own one-dimensional convolutional neural network module and Mamba module includes:

[0017] The trained selection state space model inputs the feature vectors in the dataset into the parallel convolutional structure in the one-dimensional convolutional neural network module, so that the data output by the two parallel convolutional structures with the smallest convolutional kernel size in the parallel convolutional structure are respectively subjected to pooling operations through two average pooling layers, splice the results of the pooling operations with the data output by the parallel convolutional structure that has not passed through the average pooling layer to obtain sequence splicing data, exchange the data in the feature dimension and the time series dimension in the sequence splicing data, and input the exchanged data into the Mamba module. Through the multiple Mamba blocks and fully connected layers stacked layer by layer in the Mamba module, obtain the predicted concentration values of each pollutant element in the exhaust gas at the next moment.

[0018] In some realizable ways of the first aspect, the Mamba block processes the swapped data through the following method:

[0019] Perform linear projection operations on the data output by the previous-layer Mamba block using the first linear projection structure and the second linear projection structure respectively;

[0020] Process the data output by the first linear projection structure sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result;

[0021] Process the data output by the second linear projection structure through a Silu activation function to obtain a second processing result;

[0022] Add the first processing result and the second processing result to obtain the output result of the current-layer Mamba block.

[0023] In some realizable ways of the first aspect, the process of processing the data output by the first linear projection structure sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result includes:

[0024] Process the data output by the first linear projection structure sequentially through a one-dimensional convolution structure and a Silu activation function, input the processed data into the Selective SSM structure and perform linear projection according to the linear projection relation formula to obtain a parameter tensor A obtained by a fully connected layer with an input feature dimension number of 2D and an output feature dimension number of N, and a parameter tensor B with a shape of M×L×N; where M represents the batch number of sample data input during the training of the selective state space model, and L represents the number of time series dimensions;

[0025] Discretize the parameter tensor A and the parameter tensor B;

[0026] Obtain the first processing result according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.

[0027] In some realizable ways of the first aspect, the linear projection relation formula is:

[0028]

[0029] Among them, Parameter represents the initialization parameter tensor in the parameter initialization process. A: (2D, N) represents the parameter tensor A obtained through a fully connected layer with an input feature dimension of 2D and an output feature dimension of N. A: (2D, N) ← Parameter means assigning the initialization parameter tensor to the parameter tensor A; s B represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N, s B (X) represents s B the operation performed on the data X input to the Selective SSM structure. B: (M, L, N) represents the parameter tensor B with a shape of M×L×N output after being transformed by s B (X); s C represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N, s C (X) represents s C the operation performed on the data X input to the Selective SSM structure. C: (M, L, N) represents the parameter tensor C with a shape of M×L×N output after being transformed by s C (X); s Δ represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of 2D, s Δ (X) is s Δ the operation performed on the data X input to the Selective SSM structure. τ represents the Softplus activation function. Δ: (M, L, 2D) represents the parameter tensor Δ with a shape of M×L×2D output after being transformed by the Softplus activation function.

[0030] In some realizable ways of the first aspect, obtaining the first processing result according to the sequence information of the data input to the Selective SSM structure and the discretized parameter tensors A and B includes:

[0031] Substituting the sequence information of the data input to the Selective SSM structure and the discretized parameter tensors A and B into the parallel calculation formula to obtain the first processing result; where

[0032] the parallel calculation formula is:

[0033]

[0034] X(t) represents the sequence information corresponding to the t-th sequence of the data X input to the Selective SSM structure, respectively represent the discretized parameter tensors A and B, h t-1 、h trespectively represent the hidden state corresponding to the (t-1)th sequence and the hidden state corresponding to the tth sequence, and y t represents the intermediate output value corresponding to the tth sequence;

[0035] Concatenate the intermediate output values corresponding to all sequences of the data X input to the Selective SSM structure along the time series dimension to obtain a first processing result.

[0036] In some realizable ways of the first aspect, the determining the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes:

[0037] Calculate the reconstruction difference between the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element, calculate the two-norm according to the reconstruction differences of each pollutant element, and use the two-norm as the reconstruction error;

[0038] If there is a reconstruction error greater than a preset threshold, determine the abnormal sequence and issue an abnormal warning; wherein, the abnormal sequence is the time series corresponding to when the reconstruction error is greater than the preset threshold.

[0039] According to the second aspect of the present disclosure, there is provided a comprehensive gas pollution detection device based on a selective state space model. The device includes:

[0040] A detection data acquisition module, configured to preprocess the governance device parameters and environmental parameters at the current and previous moments, obtain a data matrix, convert the data in the data matrix into corresponding feature vectors, and obtain a data set; and is also configured to obtain the time series corresponding to each pollutant element in the waste gas according to the environmental parameters at the current and previous moments;

[0041] An exhaust gas concentration prediction module, configured to input the data set into a trained selective state space model, so that the trained selective state space model uses the feature vectors in the data set to output the concentration prediction values corresponding to each pollutant element in the exhaust gas at the next moment through its own one-dimensional convolutional neural network module and Mamba module;

[0042] A reconstructed sequence acquisition module, configured to respectively perform encoding compression and decoding reconstruction on the time series corresponding to each pollutant element by using an autoencoder constructed based on a selective state space model, and obtain the reconstructed sequences corresponding to each pollutant element;

[0043] An abnormal sequence detection module, configured to determine an abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.

[0044] According to a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method as described above.

[0045] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, and the computer instructions are used to cause a computer to execute the method as described above.

[0046] In the present disclosure, the governance device parameters and environmental parameters at the current and previous moments are preprocessed to obtain a data matrix, the data in the data matrix is converted into corresponding feature vectors to obtain a data set; the data set is input into a trained selective state space model, so that the trained selective state space model uses the feature vectors in the data set to output the predicted concentration values of the corresponding pollutant elements in the exhaust gas at the next moment through its one-dimensional convolutional neural network module and Mamba module; according to the environmental parameters at the current and previous moments, time series corresponding to the pollutant elements in the exhaust gas are obtained; the autoencoders constructed based on the selective state space model are used to encode and compress and decode and reconstruct the time series corresponding to the pollutant elements respectively to obtain the reconstructed sequences corresponding to the pollutant elements; the abnormal sequences are determined according to the time series corresponding to the pollutant elements and the reconstructed sequences of the same pollutant element. In this way, the complex dependencies between time series data are efficiently captured, and high computational performance is still maintained when processing long time series, achieving a significant improvement in computational speed and computational efficiency.

[0047] It should be understood that the content described in the summary of the invention section is not intended to limit the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In combination with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent. The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. In the drawings, the same or similar reference numerals represent the same or similar elements, where:

[0049] Figure 1 shows a flowchart of a comprehensive gas pollution detection method based on a selective state space model provided by an embodiment of the present disclosure;

[0050] Figure 2 shows a structural diagram of a one-dimensional convolutional neural network module provided by an embodiment of the present disclosure;

[0051] Figure 3Shows the structural diagram of the Mamba module provided by the embodiments of the present disclosure;

[0052] Figure 4 Shows the structural diagram of the autoencoder provided by the embodiments of the present disclosure;

[0053] Figure 5 Shows the structural diagram of a comprehensive gas pollution detection device based on a selective state space model provided by the embodiments of the present disclosure;

[0054] Figure 6 Shows the structural diagram of an exemplary electronic device capable of implementing the embodiments of the present disclosure. Detailed implementation manners

[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.

[0056] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after.

[0057] In response to the problems in the background art, the embodiments of the present disclosure provide a comprehensive gas pollution detection method based on a selective state space model. Specifically, the treatment device parameters and environmental parameters at the current and previous moments are preprocessed to obtain a data matrix, the data in the data matrix is converted into corresponding feature vectors to obtain a data set; the data set is input into the trained selective state space model so that the trained selective state space model uses the feature vectors in the data set to output the concentration prediction values corresponding to each pollutant element in the waste gas at the next moment through its one-dimensional convolutional neural network module and Mamba module; according to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the waste gas is obtained; the autoencoder constructed based on the selective state space model is used to encode and compress and decode and reconstruct the time series corresponding to each pollutant element to obtain the reconstructed sequence corresponding to each pollutant element; the abnormal sequence is determined according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element. In this way, the complex dependence relationship between time series data is efficiently captured, and high computational performance is still maintained when processing long time series, achieving a significant improvement in computational speed and computational efficiency.

[0058] The following will combine the accompanying drawings and, through specific embodiments, elaborate in detail on the comprehensive gas pollution detection method based on the selective state space model provided by the embodiments of the present disclosure.

[0059] Figure 1 The flowchart of a comprehensive gas pollution detection method based on the selective state space model provided by the embodiments of the present disclosure is shown. Method 100 includes the following steps:

[0060] S110. Preprocess the treatment equipment parameters and environmental parameters at the current and previous times to obtain a data matrix, convert the data in the data matrix into corresponding feature vectors, and obtain a data set.

[0061] In some embodiments, the preprocessing of the treatment equipment parameters and environmental parameters at the current and previous times to obtain a data matrix includes:

[0062] Perform data cleaning and missing data filling on the treatment equipment parameters and environmental parameters at the current and previous times;

[0063] Perform normalization on the environmental parameters after missing data filling;

[0064] Integrate the treatment equipment parameters after missing data filling and the normalized environmental parameters to obtain a data matrix; where

[0065] The environmental parameters include the pressure difference of the adsorption medium, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.

[0066] In some embodiments, the mean filling method is used for missing data filling. Specifically, determine the time step range where the missing value is located, calculate the mean of the corresponding element of the missing value within this time step range, and use this mean as the filling data to fill the missing value.

[0067] In some embodiments, the Z-score standardization method is used for normalization. Specifically, the environmental parameters after missing data filling are normalized according to the following normalization formula to eliminate the differences in units and dimensions between environmental parameters:

[0068]

[0069] where y represents the normalized environmental parameter, x represents the environmental parameter before normalization, represents the mean of the environmental parameters calculated based on the environmental parameters before normalization, and s represents the standard deviation of the environmental parameters.

[0070] In some embodiments, linear projection technology is used to convert the environmental parameters in the data matrix into corresponding feature vectors;

[0071] Use the clip coding method to convert the governance device parameters in the data matrix into corresponding feature vectors.

[0072] In some embodiments, the governance device parameters and environmental parameters at each moment are collected by Internet of Things sensing devices such as differential pressure gauges, flow meters, gas sensors, and signal transmission components, and the governance device parameters and environmental parameters at the corresponding moment are transmitted to the selected state space model in the monitoring platform through optical fibers, network cables, 4G, and 5G communication methods for processing.

[0073] S120, input the dataset into the trained selected state space model, so that the trained selected state space model uses the feature vectors in the dataset to output the predicted concentration values corresponding to each pollutant element in the exhaust gas at the next moment through its one-dimensional convolutional neural network module and Mamba module.

[0074] In some embodiments, the use of the feature vectors in the dataset to output the predicted concentration values corresponding to each pollutant element in the exhaust gas at the next moment through its one-dimensional convolutional neural network module and Mamba module includes:

[0075] The trained selected state space model inputs the feature vectors in the dataset into the parallel convolutional structure in the one-dimensional convolutional neural network module, so that the data output by the two parallel convolutional structures with the smallest convolutional kernel size in the parallel convolutional structure are respectively pooled through two average pooling layers, the pooling operation results are concatenated with the data output by the parallel convolutional structure that has not passed through the average pooling layer to obtain sequence concatenated data, the data in the feature dimension and the time series dimension in the sequence concatenated data are exchanged, and the exchanged data is input into the Mamba module. Through multiple Mamba blocks and fully connected layers stacked layer by layer in the Mamba module, the predicted concentration values corresponding to each pollutant element in the exhaust gas at the next moment are obtained.

[0076] In some embodiments, the structural diagram of the one-dimensional convolutional neural network module is as Figure 2 shown. The one-dimensional convolutional neural network module includes 4 parallel convolutional structures (Conv). The convolutional kernel sizes of these 4 convolutional structures are 1×1, 1×3, 1×5, and 1×7 respectively. There is an average pooling layer pool behind the convolutional structures of 1×1 and 1×3 respectively. The results output by the convolutional structures of 1×5 and 1×7 (i.e., 1×5Conv and 1×7Conv) are concatenated with the results output by the two average pooling layers, that is, the concat operation, to obtain concatenated data with the shape of M×D×L. To meet the subsequent processing requirements, the data in the feature dimension D and the time series dimension L are exchanged to obtain data with the shape of M×L×D and use it as the final output result of the one-dimensional convolutional neural network module;

[0077] Further, when the length of the time series input into the one-dimensional convolutional neural network module is insufficient, the length of the time series is supplemented by padding with 0s;

[0078] The four parallel convolutional structures are initialized using the Kaiming initialization method, and the initialization formula is as follows:

[0079]

[0080] W is the size of the initialized convolutional kernel, and n in is the number of input units in the weight tensor of the convolutional structure.

[0081] In some embodiments, the pooling kernel size of the average pooling layer is 2, and its purpose is to prevent the one-dimensional convolutional neural network module from overfitting.

[0082] In some embodiments, the structural diagram of the Mamba module is as Figure 3 shown. The Mamba module consists of multiple stacked Mamba blocks and a fully connected layer (FC layer). Each Mamba block consists of a linear projection structure, a one-dimensional convolutional structure, a Silu activation function, a Selective SSM structure, and an adder. Specifically, the data input into the Mamba module passes through the first linear projection structure and the second linear projection structure respectively. The data output by the first linear projection structure is processed sequentially through the one-dimensional convolutional structure, the Silu activation function, and the Selective SSM structure to obtain the first processing result. The data output by the second linear projection structure is processed through the Silu activation function to obtain the second processing result. The first processing result and the second processing result are added through the adder, and the added data passes through the third linear projection structure to obtain the output result of the current layer Mamba block.

[0083] In some embodiments, the Mamba block processes the swapped data through the following method:

[0084] Perform linear projection operations on the data output by the previous layer Mamba block using the first linear projection structure and the second linear projection structure respectively;

[0085] Process the data output by the first linear projection structure sequentially through the one-dimensional convolutional structure, the Silu activation function, and the Selective SSM structure to obtain the first processing result;

[0086] Process the data output by the second linear projection structure through the Silu activation function to obtain the second processing result;

[0087] Add the first processing result and the second processing result to obtain the output result of the current layer Mamba block.

[0088] In some embodiments, the first linear projection structure and the second linear projection structure respectively expand the feature dimension of the data they receive from D to 2D.

[0089] In some embodiments, the Silu activation function can enhance the non-linear expression ability of the selective state space model.

[0090] In some embodiments, the Selective SSM structure may be a specific sequence selection or self-attention control module.

[0091] In some embodiments, processing the data output by the first linear projection structure sequentially through a one-dimensional convolutional structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result includes:

[0092] Processing the data output by the first linear projection structure sequentially through a one-dimensional convolutional structure and a Silu activation function, inputting the processed data into the Selective SSM structure and performing linear projection according to the linear projection relation formula, to obtain a parameter tensor A obtained through a fully connected layer with an input feature dimension of 2D and an output feature dimension of N and a parameter tensor B with a shape of M×L×N; where M represents the number of batches of sample data input during the training of the selective state space model, and L represents the number of time series dimensions;

[0093] Discretizing the parameter tensor A and the parameter tensor B;

[0094] Obtaining the first processing result according to the sequence information of the data input to the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.

[0095] In some embodiments, the linear projection relation formula is:

[0096]

[0097] Where Parameter represents the initialized parameter tensor during the parameter initialization process, A:(2D,N) represents the parameter tensor A obtained through a fully connected layer with an input feature dimension of 2D and an output feature dimension of N, A:(2D,N)←Parameter represents assigning the initialized parameter tensor to the parameter tensor A; s B represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N, s B (X) represents the operation performed on the data X input to s B and B:(M,L,N) represents the result after s B(X) The shape of the output after transformation is the parameter tensor B of M×L×N; s C Represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being N, s C (X) Represents s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents the s C (X) The shape of the output after transformation is the parameter tensor C of M×L×N; s Δ Represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being 2D, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, Δ: (M, L, 2D) represents the parameter tensor Δ with the shape of M×L×2D after being transformed by the Softplus activation function.

[0098] In some embodiments, the initialization process of the parameter tensor A is as follows:

[0099] A i,j = j

[0100] where i ∈ {1, 2,..., 2D}, j ∈ {1, 2,..., N};

[0101] The calculation formula for initializing the parameter tensor Parameter is as follows:

[0102] parameter = e a*(log(max)-log(min))+log(min)

[0103] This is a vector a randomly drawn from a Gaussian distribution with a dimension of 2D, the maximum value max is set to 0.1, and the minimum value min is set to 0.001.

[0104] In some embodiments, the parameter tensor A and the parameter tensor B are discretized according to the following formula:

[0105]

[0106] respectively represent the discretized parameter tensor A and parameter tensor B, ΔA, ΔB, and I respectively represent the discrete increment of the parameter tensor A, the discrete increment of the parameter tensor B, and the identity matrix.

[0107] In some embodiments, obtaining the first processing result according to the sequence information of the data input to the Selective SSM structure and the discretized parameter tensor A and parameter tensor B includes:

[0108] Substitute the sequence information of the data input to the Selective SSM structure and the discretized parameter tensors A and B into the parallel calculation formula to obtain the first processing result; where,

[0109] The parallel calculation formula is:

[0110]

[0111] X(t) represents the sequence information corresponding to the t-th sequence of the data X input to the Selective SSM structure, respectively represent the discretized parameter tensors A and B, h t-1 、h t respectively represent the hidden state corresponding to the (t - 1)-th sequence and the hidden state corresponding to the t-th sequence, y t represents the intermediate output value corresponding to the t-th sequence;

[0112] Concatenate the intermediate output values corresponding to all sequences of the data X input to the Selective SSM structure along the time series dimension to obtain the first processing result.

[0113] S130, according to the environmental parameters at the current and previous moments, obtain the time series corresponding to each pollutant element in the waste gas.

[0114] S140, use the autoencoder constructed based on the selective state space model to encode and compress and decode and reconstruct the time series corresponding to each pollutant element respectively, and obtain the reconstructed sequence corresponding to each pollutant element.

[0115] In some embodiments, the using the autoencoder constructed based on the selective state space model to encode and compress and decode and reconstruct the time series corresponding to each pollutant element respectively, and obtain the reconstructed sequence corresponding to each pollutant element includes:

[0116] If the time series corresponding to each pollutant element all meet the national waste gas pollutant emission requirements, then use the encoder in the autoencoder constructed based on the selective state space model to encode and compress the time series corresponding to each pollutant element, and the decoder in the autoencoder to decode and reconstruct the time series corresponding to each pollutant element after encoding and compression, and obtain the reconstructed sequence corresponding to each pollutant element.

[0117] In some embodiments, the structure of the autoencoder is as Figure 4 shown, the data X(0) input to the Selective SSM structure after discretization parameter tensor and parameter tensor The hidden state h(0) corresponding to the time series is obtained after processing to complete encoding and compression; h(0) is processed by the parameter tensor C to obtain C(0), and C(0) is further processed by the parameter tensor and the parameter tensor to obtain H(L) corresponding to the hidden state h(0). After being processed by the parameter tensor C′, H(L) obtains the output Y(L) corresponding to X(0) to complete decoding and reconstruction; the encoding and compression and decoding and reconstruction processes of other data such as X(1), X(2), X(3), etc. input into the Selective SSM structure are the same as those of X(0). The output of this autoencoder not only reflects the local information of the current input sequence but also incorporates the global context information, which enables the selective state space model to exhibit selectivity for different inputs. Figure 4 The decoder in

[0118] S150 determines the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.

[0119] In some embodiments, the determining the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes:

[0120] Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element, calculating the two-norm according to the reconstruction differences of each pollutant element, and taking the two-norm as the reconstruction error;

[0121] If there is a reconstruction error greater than the preset threshold, the abnormal sequence is determined and an abnormal warning is issued; wherein, the abnormal sequence is the time series corresponding to when the reconstruction error is greater than the preset threshold.

[0122] In some embodiments, the calculation formula of the two-norm ‖D‖2 is as follows:

[0123]

[0124] where d r is the reconstruction difference of the rth pollutant element at the same moment, and the vector D{d1, d2,..., d L +.

[0125] In some embodiments, if the time series corresponding to the pollutant element does not meet the national waste gas pollutant emission requirements, a first-level abnormal warning is issued, indicating that there is an abnormal sequence;

[0126] If the reconstruction error is greater than the preset threshold, a secondary anomaly warning is issued, indicating that there may be an abnormal sequence.

[0127] In some embodiments, the preset threshold can be set to 0.99.

[0128] In some embodiments, the selected state space model is trained as follows:

[0129] Convert the data in the data matrix at all times within 30 days into corresponding feature vectors and use them as training sample data, and use the concentration values corresponding to each pollutant element in the exhaust gas at the next moment as labels;

[0130] Train the selected state space model according to the training sample data and labels;

[0131] Calculate the error value between the concentration prediction value corresponding to each pollutant element output by the selected state space model and the concentration value corresponding to the same pollutant element at the same moment in the label, adjust the model parameters according to this error value, and re-enter the adjusted model parameters into the selected state space model;

[0132] Repeat the above steps until the prediction loss function converges.

[0133] In some embodiments, the calculation formula of the prediction loss function Loss is as follows:

[0134]

[0135] b r is the concentration value of the r-th pollutant element in the label at the same moment, b r * is the concentration prediction value of the r-th pollutant element output by the selected state space model at the same moment.

[0136] According to an embodiment of the present disclosure, preprocess the governance device parameters and environmental parameters at the current and previous moments to obtain a data matrix; convert the data in the data matrix into corresponding feature vectors to obtain a data set; input the data set into a trained selection state space model, so that the trained selection state space model uses the feature vectors in the data set to output the predicted concentration values of each pollutant element in the waste gas at the next moment through its one-dimensional convolutional neural network module and Mamba module; obtain the time series corresponding to each pollutant element in the waste gas according to the environmental parameters at the current and previous moments; use the autoencoder constructed based on the selection state space model to encode, compress, and decode and reconstruct the time series corresponding to each pollutant element to obtain the reconstructed sequence corresponding to each pollutant element; determine the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element. In this way, complex dependencies between time series data can be efficiently captured, and high computational performance can still be maintained when processing long time series, achieving a significant improvement in computational speed and computational efficiency.

[0137] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present disclosure is not limited by the described action sequence, because according to the present disclosure, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present disclosure.

[0138] The above is the introduction of the method embodiments. The following further illustrates the solution of the present disclosure through device embodiments.

[0139] Figure 5 The structure diagram of a comprehensive gas pollution detection device based on a selection state space model provided by an embodiment of the present disclosure is shown. The device 500 includes:

[0140] A detection data acquisition module 510, configured to preprocess the governance device parameters and environmental parameters at the current and previous moments to obtain a data matrix, convert the data in the data matrix into corresponding feature vectors to obtain a data set; and is further configured to obtain the time series corresponding to each pollutant element in the waste gas according to the environmental parameters at the current and previous moments.

[0141] In some embodiments, the detection data acquisition module 510 is specifically configured to:

[0142] The preprocessing of the governance device parameters and environmental parameters at the current and previous moments to obtain a data matrix includes:

[0143] Clean the data of the governance equipment parameters and environmental parameters at the current and previous moments and fill in the missing data;

[0144] Normalize the environmental parameters after filling in the missing data;

[0145] Integrate the governance equipment parameters after filling in the missing data and the normalized environmental parameters to obtain a data matrix; wherein,

[0146] The environmental parameters include the pressure difference of the adsorption medium, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.

[0147] The exhaust gas concentration prediction module 520 is used to input the data set into the trained selective state space model, so that the trained selective state space model uses the feature vectors in the data set to output the concentration prediction values corresponding to each pollutant element in the exhaust gas at the next moment through its own one-dimensional convolutional neural network module and Mamba module.

[0148] In some embodiments, the exhaust gas concentration prediction module 520 is specifically used for:

[0149] The output of the concentration prediction values corresponding to each pollutant element in the exhaust gas at the next moment by using the feature vectors in the data set through its own one-dimensional convolutional neural network module and Mamba module includes:

[0150] The trained selective state space model inputs the feature vectors in the data set into the parallel convolutional structure in the one-dimensional convolutional neural network module, so that the data output by the two parallel convolutional structures with the smallest convolutional kernel size in the parallel convolutional structure are respectively subjected to pooling operations through two average pooling layers, splice the results of the pooling operations with the data output by the parallel convolutional structure that has not passed through the average pooling layer to obtain sequence splicing data, exchange the data in the feature dimension and the time series dimension in the sequence splicing data, and input the exchanged data into the Mamba module. Through the multiple Mamba blocks and fully connected layers stacked layer by layer in the Mamba module, the concentration prediction values corresponding to each pollutant element in the exhaust gas at the next moment are obtained.

[0151] In some embodiments, the exhaust gas concentration prediction module 520 is specifically further used for:

[0152] The Mamba block processes the exchanged data through the following method:

[0153] Use the first linear projection structure and the second linear projection structure to perform linear projection operations on the data output by the previous Mamba block respectively;

[0154] Process the data output by the first linear projection structure sequentially through a one-dimensional convolutional structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result;

[0155] Process the data output by the second linear projection structure through the Silu activation function to obtain a second processing result;

[0156] Add the first processing result and the second processing result to obtain the output result of the current layer's Mamba block.

[0157] In some embodiments, the exhaust gas concentration prediction module 520 is further specifically configured to:

[0158] The process of processing the data output by the first linear projection structure through a one-dimensional convolutional structure, the Silu activation function, and the Selective SSM structure to obtain a first processing result includes:

[0159] Process the data output by the first linear projection structure through a one-dimensional convolutional structure and the Silu activation function in sequence, input the processed data into the Selective SSM structure and perform linear projection according to the linear projection relation formula to obtain a parameter tensor A obtained by a fully connected layer with an input feature dimension number of 2D and an output feature dimension number of N, and a parameter tensor B with a shape of M×L×N; where M represents the batch number of sample data input during the training of the selective state space model, and L represents the time series dimension number;

[0160] Discretize the parameter tensor A and the parameter tensor B;

[0161] Obtain the first processing result according to the sequence information of the data input to the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.

[0162] In some embodiments, the exhaust gas concentration prediction module 520 is further specifically configured to:

[0163] The linear projection relation formula is:

[0164]

[0165] Where Parameter represents the initialization parameter tensor during the parameter initialization process, A:(2D,N) represents the parameter tensor A obtained by a fully connected layer with an input feature dimension number of 2D and an output feature dimension number of N, A:(2D,N)←Parameter means assigning the initialization parameter tensor to the parameter tensor A; s B represents a fully connected layer with an input feature dimension number of 2D and an output feature dimension number of N, s B (X) represents the operation performed by s B on the data X input to the Selective SSM structure, B:(M,L,N) represents the result after passing through s BThe parameter tensor B with the shape of M×L×N output after (X) transformation; s C Represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being N, s C (X) represents s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents s C The parameter tensor C with the shape of M×L×N output after (X) transformation; s Δ Represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being 2D, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, Δ: (M, L, 2D) represents the parameter tensor Δ with the shape of M×L×2D output after being transformed by the Softplus activation function.

[0166] In some embodiments, the exhaust gas concentration prediction module 520 is further specifically configured to:

[0167] Obtaining the first processing result according to the sequence information of the data input to the Selective SSM structure and the discretized parameter tensors A and B includes:

[0168] Substituting the sequence information of the data input to the Selective SSM structure and the discretized parameter tensors A and B into the parallel calculation formula to obtain the first processing result; where

[0169] The parallel calculation formula is:

[0170]

[0171] X(t) represents the sequence information corresponding to the t-th sequence of the data X input to the Selective SSM structure, respectively represent the discretized parameter tensors A and B, h t-1 、h t respectively represent the hidden state corresponding to the (t - 1)-th sequence and the hidden state corresponding to the t-th sequence, y t represents the intermediate output value corresponding to the t-th sequence;

[0172] Concatenating the intermediate output values corresponding to all sequences of the data X input to the Selective SSM structure along the time series dimension to obtain the first processing result.

[0173] The reconstruction sequence acquisition module 530 is configured to respectively encode, compress, decode, and reconstruct the time series corresponding to each pollutant element by using an autoencoder constructed based on a selective state space model, so as to obtain the reconstruction sequence corresponding to each pollutant element.

[0174] The abnormal sequence detection module 540 is configured to determine an abnormal sequence according to the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element.

[0175] In some embodiments, the abnormal sequence detection module 540 is specifically configured to:

[0176] The determining the abnormal sequence according to the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element includes:

[0177] Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element, calculating the two-norm according to the reconstruction differences of each pollutant element, and using the two-norm as the reconstruction error;

[0178] If there is a reconstruction error greater than a preset threshold, determining the abnormal sequence and issuing an abnormal warning; wherein, the abnormal sequence is the time series corresponding to when the reconstruction error is greater than the preset threshold.

[0179] It can be understood that Figure 5 Each module / unit in the illustrated device 500 has the functions of implementing the respective steps in the method 100 provided in the embodiments of the present disclosure, and can achieve the corresponding technical effects. For the sake of brevity, they will not be described herein again.

[0180] Figure 6 The structure diagram of an exemplary electronic device capable of implementing the embodiments of the present disclosure is shown. The electronic device 600 is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device 600 can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary, and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0181] As Figure 6As shown, the electronic device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An I / O interface 605 is also connected to the bus 604.

[0182] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a magnetic disk, an optical disc, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0183] The computing unit 601 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 executes the various methods and processes described above, such as method 100. For example, in some embodiments, method 100 can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of method 100 described above can be executed. Alternatively, in other embodiments, the computing unit 601 can be configured to execute method 100 in any other appropriate way (e.g., by means of firmware).

[0184] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0185] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when the program codes are executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0186] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0187] It should be noted that the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute method 100 and achieve the corresponding technical effects achieved by the method of the embodiments of the present disclosure. For the sake of brevity of description, details are not repeated herein.

[0188] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0189] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0190] A computer system can include a client and a server. The client and the server are generally remote from each other and typically interact through a communication network. The relationship between the client and the server is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating a blockchain.

[0191] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is imposed herein.

[0192] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. A comprehensive gas pollution detection method based on a selective state space model, characterized in that, Including: Preprocess the governance equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix, convert the data in the data matrix into corresponding feature vectors, and obtain a data set; Input the data set into the trained selection state space model, so that the trained selection state space model uses the feature vectors in the data set to output the predicted concentration values of each pollutant element in the waste gas at the next moment through its one-dimensional convolutional neural network module and Mamba module; According to the environmental parameters at the current and previous moments, obtain the time series corresponding to each pollutant element in the waste gas; Use the autoencoder constructed based on the selection state space model to encode and compress and decode and reconstruct the time series corresponding to each pollutant element respectively, and obtain the reconstructed sequence corresponding to each pollutant element; Determine the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element; The preprocessing of the governance equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix includes: Perform data cleaning and missing data filling on the governance equipment parameters and environmental parameters at the current and previous moments; Perform normalization processing on the environmental parameters after missing data filling; Integrate the governance equipment parameters after missing data filling and the normalized environmental parameters to obtain a data matrix; where, The environmental parameters include adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, CO concentration; The output of the predicted concentration values of each pollutant element in the waste gas at the next moment by using the feature vectors in the data set through its one-dimensional convolutional neural network module and Mamba module includes: The trained selection state space model inputs the feature vectors in the data set into the parallel convolution structure in the one-dimensional convolutional neural network module, so that the data output by the two parallel convolution structures with the smallest convolution kernel size in the parallel convolution structure are respectively pooled through two average pooling layers, splice the pooling operation results with the data output by the parallel convolution structure that has not passed through the average pooling layer to obtain sequence splicing data, exchange the data in the feature dimension and the time series dimension in the sequence splicing data, and input the exchanged data into the Mamba module, and obtain the predicted concentration values of each pollutant element in the waste gas at the next moment through multiple Mamba blocks and fully connected layers stacked layer by layer in the Mamba module; The Mamba block processes the exchanged data through the following method: Perform linear projection operations on the data output by the previous Mamba block by using the first linear projection structure and the second linear projection structure respectively; Process the data output by the first linear projection structure sequentially through a one-dimensional convolution structure, a Silu activation function, and a SelectiveSSM structure to obtain a first processing result; Process the data output by the second linear projection structure through a Silu activation function to obtain a second processing result; Add the first processing result and the second processing result to obtain the output result of the current layer Mamba block; The determination of the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes: Calculate the reconstruction difference between the time series corresponding to each pollutant element and the reconstructed series of the same pollutant element, calculate the two-norm according to the reconstruction differences of each pollutant element, and use the two-norm as the reconstruction error; If there is a reconstruction error greater than a preset threshold, determine the abnormal series and issue an abnormal warning; wherein, the abnormal series is the time series corresponding to when the reconstruction error is greater than the preset threshold.

2. The method according to claim 1, wherein The process of sequentially processing the data output by the first linear projection structure through a one-dimensional convolutional structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result includes: Sequentially process the data output by the first linear projection structure through a one-dimensional convolutional structure and a Silu activation function, input the processed data into the Selective SSM structure and perform linear projection according to the linear projection relationship formula, and obtain the parameter tensor A obtained by a fully connected layer with an input feature dimension of 2D and an output feature dimension of N and the parameter tensor B with a shape of M×L×N; where M represents the batch number of the sample data input during the training of the selective state space model, and L represents the time series dimension number; Discretize the parameter tensor A and the parameter tensor B; Obtain the first processing result according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensors A and B.

3. The method according to claim 2, characterized in that, The linear projection relationship formula is: Among them, Parameter represents the initialization parameter tensor in the parameter initialization process. A: (2D, N) represents the parameter tensor A obtained through a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being N. A: (2D, N) ← Parameter means assigning the initialization parameter tensor to the parameter tensor A; s B represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being N, s B (X) represents s B the operation performed on the data X input to the Selective SSM structure. B: (M, L, N) represents the parameter tensor B with the shape of M×L×N output after being transformed by s B (X); s C represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being N, s C (X) represents s C the operation performed on the data X input to the Selective SSM structure. C: (M, L, N) represents the parameter tensor C with the shape of M×L×N output after being transformed by s C (X); s Δ represents a fully connected layer with the number of input feature dimensions being 2D and the number of output feature dimensions being 2D, s Δ (X) is s Δ the operation performed on the data X input to the Selective SSM structure. τ represents the Softplus activation function. Δ: (M, L, 2D) represents the parameter tensor Δ with the shape of M×L×2D output after being transformed by the Softplus activation function.

4. The method according to claim 3, characterized in that, The process of obtaining the first processing result according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensors A and B includes: Substitute the sequence information of the data input into the Selective SSM structure and the discretized parameter tensors A and B into the parallel calculation formula to obtain the first processing result; where The parallel calculation formula is: X(t) represents the sequence information corresponding to the t-th sequence of data X input to the Selective SSM structure, respectively representing the discretized parameter tensor A and parameter tensor B, h t-1 , h t respectively representing the hidden state corresponding to the (t - 1)-th sequence and the hidden state corresponding to the t-th sequence, y t represents the intermediate output value corresponding to the t-th sequence; Concatenate the intermediate output values corresponding to all sequences of the data X input into the Selective SSM structure according to the time series dimension to obtain the first processing result.

5. A comprehensive gas pollution detection device based on a selective state space model, adopting the method described in any one of claims 1-4, characterized in that, Includes: A detection data acquisition module, configured to preprocess the governance device parameters and environmental parameters at the current and previous moments, obtain a data matrix, convert the data in the data matrix into corresponding feature vectors, and obtain a data set; and is also configured to obtain the time series corresponding to each pollutant element in the waste gas according to the environmental parameters at the current and previous moments. A waste gas concentration prediction module, configured to input the data set into a trained selective state space model, so that the trained selective state space model uses the feature vectors in the data set to output the concentration prediction values corresponding to each pollutant element in the waste gas at the next moment through its own one-dimensional convolutional neural network module and Mamba module; A reconstructed series acquisition module, configured to respectively encode, compress, decode, and reconstruct the time series corresponding to each pollutant element by using an autoencoder constructed based on the selective state space model to obtain the reconstructed series corresponding to each pollutant element. An abnormal series detection module, configured to determine the abnormal series according to the time series corresponding to each pollutant element and the reconstructed series of the same pollutant element.

6. An electronic device, characterized in that, Includes: At least one processor; And A memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Air pollution multi-site joint prediction method based on convolutional self-encoding deep learning

    CN113935458A

  • Harmful gas diffusion process rapid prediction method based on 3DCNN-LSTM coupling model

    CN118969132A