Gas pollution comprehensive detection method based on selection state space model
Through the comprehensive detection method of gas pollution based on the selected state space model, the problem that the prior art cannot effectively deal with complex time series data in gas pollutant prediction analysis and abnormal detection is solved, and efficient calculation performance and accurate abnormal detection effect are achieved.
Patent Information
- Application Number
- CN202411946249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-27
AI Technical Summary
The prior art has the problem of not being able to effectively capture nonlinear relationships and dealing with multivariable complex time series data in the prediction analysis and abnormal detection of gas pollutants. It also has high computational complexity and high resource requirements, which are prone to overfitting and gradient explosion problems.
The comprehensive detection method of gas pollution based on the selective state space model is adopted. By pre-processing the parameters of the control equipment and environmental parameters, the data matrix is obtained and converted into feature vectors, and the trained selective state space model is input to output the concentration prediction value of pollutant elements in the exhaust gas. Use the autoencoder to perform encoding compression and decoding reconstruction to determine the exception sequence.
This method efficiently captures the complex dependencies between time series data, maintains efficient computing performance when processing long time series, achieves improvements in computing speed and efficiency, and can more accurately identify abnormal sequences.
Smart Images

Figure CN119804772A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of environmental monitoring, and in particular to a comprehensive gas pollution detection method based on a selected state space model. Background Art
[0003] The composition content of various gaseous pollutants emitted by industries is a time series, which is characterized by being sorted in chronological order. By analyzing historical data and finding out the law of its dynamic changes, the data of future time is predicted, which plays a vital role in the prediction of components with time properties. Predicting and analyzing the data of various gaseous pollutants emitted by industries and taking timely control measures is an effective way to improve air quality. Therefore, the abnormal detection of gaseous pollutants has important and practical significance for sustainable development and improving the social living environment.
[0004] There are many problems with the existing exhaust gas concentration prediction and anomaly detection methods. For example, the traditional time series prediction method cannot capture nonlinear relationships well and has difficulty in processing multivariate and complex time series data; the time series prediction method based on machine learning does not take into account the time dependence of historical time data and sequences, and the prediction of multidimensional and multivariate data is computationally intensive and complex; the time series prediction method based on deep learning usually requires a larger data set for learning and training to obtain a more accurate model; the time series prediction method based on convolutional neural networks usually processes data with local correlation, and the input is fixed width, which has limitations; the time series prediction method based on recurrent neural networks has poor performance when processing long time series; the time series prediction method based on long short-term memory networks has high computational complexity and is prone to gradient explosion problems when processing long time series; the time series prediction method based on Transformer has high computing and memory resource requirements when processing long time series, and is prone to overfitting when the data set is insufficient. Summary of the invention
[0005] The present invention provides a method and device for comprehensive detection of gas pollution based on a selected state space model, equipment, and storage medium.
[0006] According to a first aspect of the present disclosure, a method for comprehensive detection of gas pollution based on a selected state space model is provided. The method comprises:
[0007] Preprocess the treatment 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;
[0008] Inputting the data set into the trained selective state space model, so that the trained selective state space model uses the feature vector in the data set to output the predicted concentration value 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;
[0009] According to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the exhaust gas is obtained;
[0010] The autoencoder constructed based on the selected state space model is used to encode and compress the time series corresponding to each pollutant element and decode and reconstruct it to obtain the reconstructed sequence corresponding to each pollutant element;
[0011] The abnormal sequence is determined based on the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
[0012] In some implementations of the first aspect, preprocessing the treatment equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix includes:
[0013] Clean the data and fill in the missing data of the current and previous management equipment parameters and environmental parameters;
[0014] Normalize the environmental parameters after filling in the missing data;
[0015] The treatment equipment parameters after missing data filling and the normalized environmental parameters are integrated to obtain the data matrix;
[0016] Environmental parameters include adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.
[0017] In some implementations of the first aspect, the method of using the feature vector in the data set to output the predicted concentration value 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 includes:
[0018] The trained selective 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, and the pooling operation results are concatenated with the data output by the parallel convolution structure that has not passed through the average pooling layer to obtain sequence concatenation data, and the data in the feature dimension and the time series dimension in the sequence concatenation data are exchanged, and the exchanged data is input into the Mamba module, and the concentration prediction value corresponding to each pollutant element in the exhaust gas at the next moment is obtained through multiple Mamba blocks and fully connected layers stacked in the Mamba module.
[0019] In some implementations of the first aspect, the Mamba block processes the exchanged data by:
[0020] Using the first linear projection structure and the second linear projection structure, respectively, linear projection operations are performed on the data output by the Mamba block of the previous layer;
[0021] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result;
[0022] Processing the data output by the second linear projection structure through the Silu activation function to obtain a second processing result;
[0023] The first processing result is added to the second processing result to obtain the output result of the Mamba block of the current layer.
[0024] In some implementations of the first aspect, the data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result, including:
[0025] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure and a Silu activation function, and the processed data is input into a Selective SSM structure and linearly projected according to a linear projection relationship, to obtain a parameter tensor A obtained by 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; wherein 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;
[0026] Discretize parameter tensor A and parameter tensor B;
[0027] A first processing result is obtained according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.
[0028] In some implementations of the first aspect, the linear projection relationship is:
[0029]
[0030] Among them, Parameter represents the initialization parameter tensor in the parameter initialization process, A: (2D, N) represents the parameter tensor A obtained by the fully connected layer with an input feature dimension of 2D and an output feature dimension of N, and A: (2D, N) ← Parameter represents 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. B (X) indicates s B The operation performed on the data X input to the Selective SSM structure, B: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. B (X) The transformed output is a parameter tensor B of shape M×L×N; s C represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N. C (X) indicates s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. C (X) The transformed output is a parameter tensor C of shape M×L×N; s Δ represents a fully connected layer with a 2D input feature dimension and a 2D output feature dimension, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, and Δ: (M, L, 2D) represents the parameter tensor Δ with a shape of M×L×2D after being transformed by the Softplus activation function.
[0031] In some implementations of the first aspect, obtaining 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 includes:
[0032] Substitute the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B into the parallel calculation formula to obtain the first processing result; wherein,
[0033] The parallel calculation formula is:
[0034]
[0035] X(t) represents the sequence information corresponding to the tth sequence of data X input to the Selective SSM structure. They represent the discretized parameter tensor A and parameter tensor B, respectively. t-1 、h tThey represent the hidden state corresponding to the t-1th sequence and the hidden state corresponding to the tth sequence, y t Represents the intermediate output value corresponding to the tth sequence;
[0036] The intermediate output values corresponding to all sequences of the data X input into the Selective SSM structure are concatenated according to the time series dimension to obtain a first processing result.
[0037] In some possible implementations of the first aspect, determining the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes:
[0038] Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element, calculating the bi-norm according to the reconstruction difference of each pollutant element, and using the bi-norm as the reconstruction error;
[0039] If there is a reconstruction error greater than a preset threshold, an abnormal sequence is determined and an abnormal warning is issued; wherein the abnormal sequence is a time series corresponding to when the reconstruction error is greater than the preset threshold.
[0040] According to a second aspect of the present disclosure, a comprehensive gas pollution detection device based on a selected state space model is provided. The device comprises:
[0041] The detection data acquisition module is used to pre-process the treatment equipment parameters and environmental parameters at the current and previous moments, obtain the data matrix, convert the data in the data matrix into the corresponding feature vector, and obtain the data set; it is also used to obtain the time series corresponding to each pollutant element in the exhaust gas according to the environmental parameters at the current and previous moments;
[0042] An exhaust gas concentration prediction module is used to input the data set into a trained selection state space model so that the trained selection state space model uses the feature vector in the data set to output the concentration prediction value 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;
[0043] A reconstruction sequence acquisition module is used to encode and compress the time series corresponding to each pollutant element and decode and reconstruct the time series corresponding to each pollutant element by using an autoencoder constructed based on the selected state space model to obtain a reconstruction sequence corresponding to each pollutant element;
[0044] The abnormal sequence detection module is used to determine the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
[0045] 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 connected to the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method described above.
[0046] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method as described above.
[0047] In the present disclosure, the treatment equipment parameters and environmental parameters at the current and previous moments are preprocessed to obtain a data matrix, and the data in the data matrix is converted into a corresponding feature vector to obtain a data set; the data set is input into a trained selection state space model so that the trained selection state space model uses the feature vector in the data set to output the concentration prediction value 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; according to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the exhaust gas is obtained; the autoencoder constructed based on the selection state space model is used to encode, compress and decode the time series corresponding to each pollutant element, respectively, 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 dependencies between time series data are efficiently captured, and efficient computing performance is still maintained when processing long time series, so as to achieve a significant improvement in computing speed and efficiency.
[0048] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended 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
[0049] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, among which:
[0050] Figure 1 A flow chart of a comprehensive gas pollution detection method based on a selected state space model provided by an embodiment of the present disclosure is shown;
[0051] Figure 2 A structural diagram of a one-dimensional convolutional neural network module provided by an embodiment of the present disclosure is shown;
[0052] Figure 3A structural diagram of a Mamba module provided by an embodiment of the present disclosure is shown;
[0053] Figure 4 A structural diagram of an autoencoder provided by an embodiment of the present disclosure is shown;
[0054] Figure 5 A structural diagram of a comprehensive gas pollution detection device based on a selected state space model provided by an embodiment of the present disclosure is shown;
[0055] Figure 6 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0057] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0058] In view of the problems in the background technology, the embodiment of the present disclosure provides a comprehensive gas pollution detection method based on a selection state space model. Specifically, the treatment equipment parameters and environmental parameters at the current and previous moments are preprocessed to obtain a data matrix, and the data in the data matrix is converted into a corresponding feature vector to obtain a data set; the data set is input into a trained selection state space model so that the trained selection state space model uses the feature vector in the data set to output the concentration prediction value 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; according to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the exhaust gas is obtained; the autoencoder constructed based on the selection state space model is used to encode, compress and decode the time series corresponding to each pollutant element, and 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 dependencies between time series data are efficiently captured, and efficient computing performance is still maintained when processing long time series, so as to achieve a significant improvement in computing speed and efficiency.
[0059] The comprehensive gas pollution detection method based on the selected state space model provided by the embodiment of the present disclosure is described in detail below through specific embodiments in conjunction with the accompanying drawings.
[0060] Figure 1 A flow chart of a comprehensive gas pollution detection method based on a selected state space model provided by an embodiment of the present disclosure is shown. The method 100 includes the following steps:
[0061] S110, pre-processing the treatment equipment parameters and environmental parameters at the current and previous moments, obtaining a data matrix, converting the data in the data matrix into corresponding feature vectors, and obtaining a data set.
[0062] In some embodiments, the preprocessing of the treatment equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix includes:
[0063] Clean the data and fill in the missing data of the current and previous management equipment parameters and environmental parameters;
[0064] Normalize the environmental parameters after filling in the missing data;
[0065] The treatment equipment parameters after missing data filling and the normalized environmental parameters are integrated to obtain the data matrix;
[0066] Environmental parameters include adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.
[0067] In some embodiments, missing data is filled by a mean filling method. Specifically, the time step range where the missing value is located is determined, the mean of the element corresponding to the missing value within the time step range is calculated, and the missing value is filled using this mean as filling data.
[0068] In some embodiments, the Z-score normalization method is used for normalization processing. Specifically, the environmental parameters after missing data filling are normalized according to the following normalization formula to eliminate the differences between the units and dimensions of each environmental parameter:
[0069]
[0070] Among them, y represents the normalized environmental parameters, and x represents the environmental parameters before normalization. It represents the mean value of the environmental parameters calculated based on the environmental parameters before normalization, and s represents the standard deviation of the environmental parameters.
[0071] In some embodiments, the environmental parameters in the data matrix are converted into corresponding feature vectors using a linear projection technique;
[0072] The clip encoding method is used to convert the governance equipment parameters in the data matrix into corresponding feature vectors.
[0073] In some embodiments, IoT sensing devices such as differential pressure meters, flow meters, gas sensors, and signal transmission components are used to collect the management equipment parameters and environmental parameters at each moment, and the management equipment parameters and environmental parameters at the corresponding moment are transmitted to the selected state space model in the monitoring platform through optical fiber, network cable, 4G, and 5G communication methods for processing.
[0074] S120, inputting the data set into the trained selection state space model, so that the trained selection state space model uses the feature vector in the data set to output the concentration prediction value 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.
[0075] In some embodiments, the method of using the feature vector in the data set to output the predicted concentration value 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 includes:
[0076] The trained selective 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, and the pooling operation results are concatenated with the data output by the parallel convolution structure that has not passed through the average pooling layer to obtain sequence concatenation data, and the data in the feature dimension and the time series dimension in the sequence concatenation data are exchanged, and the exchanged data is input into the Mamba module, and the concentration prediction value corresponding to each pollutant element in the exhaust gas at the next moment is obtained through multiple Mamba blocks and fully connected layers stacked in the Mamba module.
[0077] In some embodiments, the structure diagram of the one-dimensional convolutional neural network module is as follows Figure 2 As shown in the figure, the one-dimensional convolutional neural network module includes four parallel convolutional structures (Conv). The convolution kernel sizes of these four convolutional structures are 1×1, 1×3, 1×5, and 1×7 respectively. The 1×1 and 1×3 convolutional structures are followed by an average pooling layer, respectively. The output results of the 1×5 and 1×7 convolutional structures (i.e., 1×5Conv and 1×7Conv) are concatenated with the output results of the two average pooling layers, i.e., the concat operation, to obtain concatenated data with a shape of M×D×L. To meet the requirements of subsequent processing, the data in the feature dimension D and the time series dimension L are exchanged to obtain data with a shape of M×L×D and use it as the final output result of the one-dimensional convolutional neural network module.
[0078] Furthermore, when the time series length input to the one-dimensional convolutional neural network module is insufficient, the time series length is supplemented by padding with 0;
[0079] The Kaiming initialization method is used to initialize the four parallel convolution structures. The initialization formula is as follows:
[0080]
[0081] W is the size of the convolution kernel after initialization, n in The number of input units in the convolutional structure weight tensor.
[0082] In some embodiments, the pooling kernel size of the average pooling layer is 2, the purpose of which is to prevent overfitting of the one-dimensional convolutional neural network module.
[0083] In some embodiments, the structure diagram of the Mamba module is as follows Figure 3 As shown, the Mamba module is composed of multiple stacked Mamba blocks (Mamba block) and a fully connected layer (FC layer), and each Mamba block is composed of a linear projection structure, a one-dimensional convolution structure, a Silu activation function, a Selective SSM structure and an adder; specifically, the data input to 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 by the one-dimensional convolution structure, the Silu activation function, and the Selective SSM structure in turn to obtain a first processing result, the data output by the second linear projection structure is processed by the Silu activation function to obtain a second processing result, the first processing result and the second processing result are added by the adder, and the added data passes through the third linear projection structure to obtain the output result of the Mamba block of the current layer.
[0084] In some embodiments, the Mamba block processes the exchanged data by:
[0085] Using the first linear projection structure and the second linear projection structure, respectively, linear projection operations are performed on the data output by the Mamba block of the previous layer;
[0086] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result;
[0087] Processing the data output by the second linear projection structure through the Silu activation function to obtain a second processing result;
[0088] The first processing result is added to the second processing result to obtain the output result of the Mamba block of the current layer.
[0089] In some embodiments, the first linear projection structure and the second linear projection structure respectively expand the feature dimension of the data received from D to 2D.
[0090] In some embodiments, the Silu activation function can enhance the nonlinear expression capability of the selected state space model.
[0091] In some embodiments, the Selective SSM structure may be a specific sequence selection or self-attention control module.
[0092] In some embodiments, the data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result, including:
[0093] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure and a Silu activation function, and the processed data is input into a Selective SSM structure and linearly projected according to a linear projection relationship, to obtain a parameter tensor A obtained by 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; wherein 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;
[0094] Discretize parameter tensor A and parameter tensor B;
[0095] A first processing result is obtained according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.
[0096] In some embodiments, the linear projection relationship is:
[0097]
[0098] Among them, Parameter represents the initialization parameter tensor in the parameter initialization process, A: (2D, N) represents the parameter tensor A obtained by the fully connected layer with an input feature dimension of 2D and an output feature dimension of N, and A: (2D, N) ← Parameter represents 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. B (X) indicates s B The operation performed on the data X input to the Selective SSM structure, B: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. B(X) The transformed output is a parameter tensor B of shape M×L×N; s C represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N. C (X) indicates s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. C (X) The transformed output is a parameter tensor C of shape M×L×N; s Δ represents a fully connected layer with a 2D input feature dimension and a 2D output feature dimension, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, and Δ: (M, L, 2D) represents the parameter tensor Δ with a shape of M×L×2D after being transformed by the Softplus activation function.
[0099] In some embodiments, the parameter tensor A is initialized as follows:
[0100] A i,j =j
[0101] Among them, i∈{1, 2, ..., 2D+, j∈{1, 2, ..., N+;
[0102] The calculation formula for the initialization parameter tensor Parameter is as follows:
[0103] parameter=e a*(log(max)-log(min))+log(min)
[0104] a is a 2D vector randomly drawn from a Gaussian distribution, with the maximum value max set to 0.1 and the minimum value min set to 0.001.
[0105] In some embodiments, parameter tensor A and parameter tensor B are discretized according to the following formula:
[0106]
[0107] They represent the discretized parameter tensor A and parameter tensor B respectively, ΔA, ΔB, and I represent the discrete increment of parameter tensor A, the discrete increment of parameter tensor B, and the unit matrix respectively.
[0108] In some embodiments, the obtaining of 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 includes:
[0109] Substitute the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B into the parallel calculation formula to obtain the first processing result; wherein,
[0110] The parallel calculation formula is:
[0111]
[0112] X(t) represents the sequence information corresponding to the tth sequence of data X input to the Selective SSM structure. They represent the discretized parameter tensor A and parameter tensor B, respectively. t-1 、h t They represent the hidden state corresponding to the t-1th sequence and the hidden state corresponding to the tth sequence, y t Represents the intermediate output value corresponding to the tth sequence;
[0113] The intermediate output values corresponding to all sequences of the data X input into the Selective SSM structure are concatenated according to the time series dimension to obtain a first processing result.
[0114] S130, obtaining a time series corresponding to each pollutant element in the exhaust gas according to the environmental parameters at the current time and the previous time.
[0115] S140, using an autoencoder constructed based on the selected state space model to perform encoding compression and decoding reconstruction on the time series corresponding to each pollutant element, to obtain a reconstructed sequence corresponding to each pollutant element.
[0116] In some embodiments, the autoencoder constructed based on the selected state space model is used to encode and compress the time series corresponding to each pollutant element and decode and reconstruct the time series to obtain the reconstructed sequence corresponding to each pollutant element, including:
[0117] If the time series corresponding to each pollutant element meets the national exhaust pollutant emission requirements, the encoder in the autoencoder constructed based on the selection state space model is used to encode and compress the time series corresponding to each pollutant element, and the decoder in the autoencoder decodes and reconstructs the time series corresponding to each pollutant element after encoding and compression to obtain the reconstructed sequence corresponding to each pollutant element.
[0118] In some embodiments, the structure of the autoencoder is as follows Figure 4 As shown, the parameter tensor after discretization of the data X(0) input to the Selective SSM structure and the parameter tensor After processing, the hidden state h(0) corresponding to the time series is obtained, and the encoding compression is completed; h(0) is processed by the parameter tensor C to obtain C(0), and C(0) is then processed by the parameter tensor And the parameter tensor The processing obtains H(L) corresponding to the hidden state h(0). After H(L) is processed by the parameter tensor C′, the output Y(L) corresponding to X(0) is obtained, completing the decoding reconstruction. The encoding, compression and decoding reconstruction process of other data input to the Selective SSM structure, such as X(1), X(2), and X(3), is the same as that of X(0). The output of the 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 show selectivity for different inputs. Figure 4 The decoder in the algorithm gradually constructs the output sequence in a "backtracking" manner, which helps to more accurately capture and restore the temporal dependencies in the input sequence during the decoding and reconstruction process, so that the selected state space model can more accurately identify abnormal sequences and improve the accuracy and reliability of detection.
[0119] S150, determining an abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
[0120] In some embodiments, determining the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes:
[0121] Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element, calculating the bi-norm according to the reconstruction difference of each pollutant element, and using the bi-norm as the reconstruction error;
[0122] If there is a reconstruction error greater than a preset threshold, an abnormal sequence is determined and an abnormal warning is issued; wherein the abnormal sequence is a time series corresponding to when the reconstruction error is greater than the preset threshold.
[0123] In some embodiments, the two-norm ‖D‖ 2 The calculation formula is as follows:
[0124]
[0125] Among them, d r is the reconstruction difference of the rth pollutant element at the same time, and the vector D{d 1 , d 2 , ..., d L +.
[0126] In some embodiments, if the time series corresponding to the pollutant element does not meet the national exhaust pollutant emission requirements, a first-level abnormality warning is issued, which indicates that an abnormal sequence exists;
[0127] If there is a reconstruction error greater than a preset threshold, a second-level abnormality warning is issued, which indicates that an abnormal sequence may exist.
[0128] In some embodiments, the preset threshold may be set to 0.99.
[0129] In some embodiments, the state-space model is selected to be trained as follows:
[0130] The data in the data matrix at all times within 30 days are converted into corresponding feature vectors and used as training sample data, and the concentration values corresponding to each pollutant element in the exhaust gas at the next moment are used as labels;
[0131] The state space model is selected for training based on the training sample data and annotations;
[0132] Calculate the error between the predicted concentration 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 time in the annotation, adjust the model parameters according to the error value, and re-input the adjusted model parameters into the selected state space model;
[0133] Repeat the above steps until the prediction loss function converges.
[0134] In some embodiments, the calculation formula of the prediction loss function Loss is as follows:
[0135]
[0136] b r is the concentration value of the rth pollutant element in the same time mark, b r * Select the predicted concentration value of the rth pollutant element output by the state-space model at the same time.
[0137] According to the embodiment of the present disclosure, the treatment equipment 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 selection state space model so that the trained selection state space model uses the feature vectors in the data set to output the concentration prediction value 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; according to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the exhaust gas is obtained; the autoencoder constructed based on the selection state space model is used to encode, compress and decode 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 dependencies between time series data are efficiently captured, and efficient computing performance is still maintained when processing long time series, achieving a significant improvement in computing speed and efficiency.
[0138] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0139] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0140] Figure 5 The structure diagram of a gas pollution comprehensive detection device based on a selected state space model provided by an embodiment of the present disclosure is shown. The device 500 includes:
[0141] The detection data acquisition module 510 is used to pre-process the treatment equipment 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; it is also used to obtain the time series corresponding to each pollutant element in the exhaust gas based on the environmental parameters at the current and previous moments.
[0142] In some embodiments, the detection data acquisition module 510 is specifically used to:
[0143] The preprocessing of the treatment equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix includes:
[0144] Clean the data and fill in the missing data of the current and previous management equipment parameters and environmental parameters;
[0145] Normalize the environmental parameters after filling in the missing data;
[0146] The treatment equipment parameters after missing data filling and the normalized environmental parameters are integrated to obtain the data matrix;
[0147] Environmental parameters include adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.
[0148] The exhaust gas concentration prediction module 520 is used to input the data set into the trained selection state space model so that the trained selection state space model uses the feature vector in the data set through its own one-dimensional convolutional neural network module and Mamba module to output the concentration prediction value corresponding to each pollutant element in the exhaust gas at the next moment.
[0149] In some embodiments, the exhaust gas concentration prediction module 520 is specifically used to:
[0150] The method of using the feature vectors in the data set to output the predicted concentration value 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 includes:
[0151] The trained selective 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, and the pooling operation results are concatenated with the data output by the parallel convolution structure that has not passed through the average pooling layer to obtain sequence concatenation data, and the data in the feature dimension and the time series dimension in the sequence concatenation data are exchanged, and the exchanged data is input into the Mamba module, and the concentration prediction value corresponding to each pollutant element in the exhaust gas at the next moment is obtained through multiple Mamba blocks and fully connected layers stacked in the Mamba module.
[0152] In some embodiments, the exhaust gas concentration prediction module 520 is further used to:
[0153] The Mamba block processes the exchanged data in the following way:
[0154] Using the first linear projection structure and the second linear projection structure, respectively, linear projection operations are performed on the data output by the Mamba block of the previous layer;
[0155] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result;
[0156] Processing the data output by the second linear projection structure through the Silu activation function to obtain a second processing result;
[0157] The first processing result is added to the second processing result to obtain the output result of the Mamba block of the current layer.
[0158] In some embodiments, the exhaust gas concentration prediction module 520 is further used to:
[0159] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result, including:
[0160] The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure and a Silu activation function, and the processed data is input into a Selective SSM structure and linearly projected according to a linear projection relationship, to obtain a parameter tensor A obtained by 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; wherein 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;
[0161] Discretize parameter tensor A and parameter tensor B;
[0162] A first processing result is obtained according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.
[0163] In some embodiments, the exhaust gas concentration prediction module 520 is further used to:
[0164] The linear projection relationship is:
[0165]
[0166] Among them, Parameter represents the initialization parameter tensor in the parameter initialization process, A: (2D, N) represents the parameter tensor A obtained by the fully connected layer with an input feature dimension of 2D and an output feature dimension of N, and A: (2D, N) ← Parameter represents 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. B (X) indicates s B The operation performed on the data X input to the Selective SSM structure, B: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. B(X) The transformed output is a parameter tensor B of shape M×L×N; s C represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N. C (X) indicates s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. C (X) The transformed output is a parameter tensor C of shape M×L×N; s Δ represents a fully connected layer with a 2D input feature dimension and a 2D output feature dimension, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, and Δ: (M, L, 2D) represents the parameter tensor Δ with a shape of M×L×2D after being transformed by the Softplus activation function.
[0167] In some embodiments, the exhaust gas concentration prediction module 520 is further used to:
[0168] The step of obtaining a 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 includes:
[0169] Substitute the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B into the parallel calculation formula to obtain the first processing result; wherein,
[0170] The parallel calculation formula is:
[0171]
[0172] X(t) represents the sequence information corresponding to the tth sequence of data X input to the Selective SSM structure. They represent the discretized parameter tensor A and parameter tensor B, respectively. t-1 、h t They represent the hidden state corresponding to the t-1th sequence and the hidden state corresponding to the tth sequence, y t Represents the intermediate output value corresponding to the tth sequence;
[0173] The intermediate output values corresponding to all sequences of the data X input into the Selective SSM structure are concatenated according to the time series dimension to obtain a first processing result.
[0174] The reconstructed sequence acquisition module 530 is used to use the autoencoder constructed based on the selected state space model to encode and compress and decode and reconstruct the time series corresponding to each pollutant element, so as to obtain the reconstructed sequence corresponding to each pollutant element.
[0175] The abnormal sequence detection module 540 is used to determine the abnormal sequence according to the time sequence corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
[0176] In some embodiments, the abnormal sequence detection module 540 is specifically used to:
[0177] The determining of the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes:
[0178] Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element, calculating the bi-norm according to the reconstruction difference of each pollutant element, and using the bi-norm as the reconstruction error;
[0179] If there is a reconstruction error greater than a preset threshold, an abnormal sequence is determined and an abnormal warning is issued; wherein the abnormal sequence is a time series corresponding to when the reconstruction error is greater than the preset threshold.
[0180] Understandably, Figure 5 Each module / unit in the illustrated device 500 has the function of implementing each step in the method 100 provided in the embodiment of the present disclosure and can achieve its corresponding technical effect, which will not be described in detail here for the sake of brevity.
[0181] Figure 6 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. The electronic device 600 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 600 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0182] like 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 via a bus 604. An I / O interface 605 is also connected to the bus 604.
[0183] 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 disk, an optical disk, 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.
[0184] The computing unit 601 may be a variety of general and / or special 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, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0185] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0186] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0187] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0188] 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 enable a computer to execute method 100 and achieve the corresponding technical effect achieved by executing the method in the embodiment of the present disclosure. For the sake of concise description, they are not repeated here.
[0189] 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 trackball) through which the user can provide input to the computer. Other types 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).
[0190] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0191] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0192] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0193] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A comprehensive gas pollution detection method based on a selected state space model, characterized in that: include: Preprocess the treatment 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; Inputting the data set into the trained selective state space model, so that the trained selective state space model uses the feature vector in the data set to output the predicted concentration value 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; According to the environmental parameters at the current and previous moments, the time series corresponding to each pollutant element in the exhaust gas is obtained; The autoencoder constructed based on the selected state space model is used to encode and compress the time series corresponding to each pollutant element and decode and reconstruct it to obtain the reconstructed sequence corresponding to each pollutant element; The abnormal sequence is determined based on the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
2. The method according to claim 1, characterized in that The preprocessing of the treatment equipment parameters and environmental parameters at the current and previous moments to obtain a data matrix includes: Clean the data and fill in the missing data of the current and previous management equipment parameters and environmental parameters; Normalize the environmental parameters after filling in the missing data; The treatment equipment parameters after missing data filling and the normalized environmental parameters are integrated to obtain the data matrix; Environmental parameters include adsorption medium pressure difference, temperature, particulate matter concentration, SO2 concentration, NOx concentration, and CO concentration.
3. The method according to claim 1, characterized in that The method of using the feature vectors in the data set to output the predicted concentration value 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 includes: The trained selective 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, and the pooling operation results are concatenated with the data output by the parallel convolution structure that has not passed through the average pooling layer to obtain sequence concatenation data, and the data in the feature dimension and the time series dimension in the sequence concatenation data are exchanged, and the exchanged data is input into the Mamba module, and the concentration prediction value corresponding to each pollutant element in the exhaust gas at the next moment is obtained through multiple Mamba blocks and fully connected layers stacked in the Mamba module.
4. The method according to claim 3, characterized in that The Mamba block processes the exchanged data in the following way: Using the first linear projection structure and the second linear projection structure, respectively, linear projection operations are performed on the data output by the Mamba block of the previous layer; Processing the data output by the first linear projection structure through a one-dimensional convolution structure, a Silu activation function, and a SelectiveSSM structure in sequence to obtain a first processing result; Processing the data output by the second linear projection structure through the Silu activation function to obtain a second processing result; The first processing result is added to the second processing result to obtain the output result of the Mamba block of the current layer.
5. The method according to claim 4, characterized in that The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure, a Silu activation function, and a Selective SSM structure to obtain a first processing result, including: The data output by the first linear projection structure is processed sequentially through a one-dimensional convolution structure and a Silu activation function, and the processed data is input into a Selective SSM structure and linearly projected according to a linear projection relationship, to obtain a parameter tensor A obtained by 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; wherein 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; Discretize parameter tensor A and parameter tensor B; A first processing result is obtained according to the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B.
6. The method according to claim 5, characterized in that The linear projection relationship is: Among them, Parameter represents the initialization parameter tensor in the parameter initialization process, A: (2D, N) represents the parameter tensor A obtained by the fully connected layer with an input feature dimension of 2D and an output feature dimension of N, and A: (2D, N) ← Parameter represents 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. B (X) indicates s B The operation performed on the data X input to the Selective SSM structure, B: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. B (X) The transformed output is a parameter tensor B of shape M×L×N; s C represents a fully connected layer with an input feature dimension of 2D and an output feature dimension of N. C (X) indicates s C The operation performed on the data X input to the Selective SSM structure, C: (M, L, N) represents the operation performed on the data X input to the Selective SSM structure. C (X) The transformed output is a parameter tensor C of shape M×L×N; s Δ represents a fully connected layer with a 2D input feature dimension and a 2D output feature dimension, s Δ (X) is s Δ The operation performed on the data X input to the Selective SSM structure, τ represents the Softplus activation function, and Δ: (M, L, 2D) represents the parameter tensor Δ with a shape of M×L×2D after being transformed by the Softplus activation function.
7. The method according to claim 6, characterized in that The step of obtaining a 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 includes: Substitute the sequence information of the data input into the Selective SSM structure and the discretized parameter tensor A and parameter tensor B into the parallel calculation formula to obtain the first processing result; wherein, The parallel calculation formula is: X(t) represents the sequence information corresponding to the tth sequence of data X input to the Selective SSM structure. They represent the discretized parameter tensor A and parameter tensor B, respectively. t-1 、h t They represent the hidden state corresponding to the t-1th sequence and the hidden state corresponding to the tth sequence, y t Represents the intermediate output value corresponding to the tth sequence; The intermediate output values corresponding to all sequences of the data X input into the Selective SSM structure are concatenated according to the time series dimension to obtain a first processing result.
8. The method according to claim 1, characterized in that: The determining of the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element includes: Calculating the reconstruction difference between the time series corresponding to each pollutant element and the reconstruction sequence of the same pollutant element, calculating the bi-norm according to the reconstruction difference of each pollutant element, and using the bi-norm as the reconstruction error; If there is a reconstruction error greater than a preset threshold, an abnormal sequence is determined and an abnormal warning is issued; wherein the abnormal sequence is a time series corresponding to when the reconstruction error is greater than the preset threshold.
9. A comprehensive gas pollution detection device based on a selected state space model, characterized in that: include: The detection data acquisition module is used to pre-process the treatment equipment parameters and environmental parameters at the current and previous moments, obtain the data matrix, convert the data in the data matrix into the corresponding feature vector, and obtain the data set; it is also used to obtain the time series corresponding to each pollutant element in the exhaust gas according to the environmental parameters at the current and previous moments; An exhaust gas concentration prediction module is used to input the data set into a trained selection state space model so that the trained selection state space model uses the feature vector in the data set to output the concentration prediction value 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; A reconstruction sequence acquisition module is used to encode and compress the time series corresponding to each pollutant element and decode and reconstruct the time series corresponding to each pollutant element by using an autoencoder constructed based on the selected state space model to obtain a reconstruction sequence corresponding to each pollutant element; The abnormal sequence detection module is used to determine the abnormal sequence according to the time series corresponding to each pollutant element and the reconstructed sequence of the same pollutant element.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
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
Air pollutants concentration forecasting method and apparatus and storage medium
US20220214322A1
Cited By
Method for rapidly detecting concentration of mixed gas based on Mamba
CN120685851A
Environmental pollution inspection method and system
CN121118974A