Alarm detection method of selective state space model based on time-frequency attention
Through the selective state space model based on time-frequency attention, the weight is calculated using wavelet transform and Rényi entropy, and feature weighting is combined with multi-layer perceptron and convolutional neural network for feature weighting, the abnormal detection problem of complex time series data in industrial monitoring is solved, and high-precision and efficient alarm detection are achieved.
Patent Information
- Application Number
- CN202510449249.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-02-11
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
In industrial monitoring, it is difficult to effectively detect abnormalities in complex and variable time series data, especially when dealing with long time series, there are problems such as excessive generalization, insufficient detection capability, high computational complexity, insufficient real-timeness and robustness.
The selective state space model based on time-frequency attention is adopted, the time-frequency features are extracted through continuous wavelet transformation, the weight is calculated using Rényi entropy, and the attention mechanism is constructed by combining multi-layer perceptrons and convolutional neural networks to weight the time-frequency features, and abnormal detection is achieved through the selective state space model for decoding and reconstruction error calculation.
It improves the detection accuracy and real-timeness of complex time series data, and can effectively capture a variety of abnormal events, including mutations and periodic changes, to meet the real-time alarm needs of industrial monitoring.
Smart Images

Figure CN120375564A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial monitoring, and in particular to an alarm detection method based on a selective state space model with time-frequency attention. Background Art
[0002] In modern industrial production, with the continuous improvement of the levels of automation and informatization, the complexity and data volume of industrial systems have shown an explosive growth. These data not only cover various parameters in the production process, but also include multi-dimensional time series data such as equipment operating status and environmental monitoring. However, among these massive data, there are often some abnormal signals, which may be precursors of equipment failures, abnormal fluctuations in the production process, or even potential safety hazards. Therefore, how to accurately detect these abnormalities from complex industrial time series data and give alarms in a timely manner is of great significance for ensuring production safety and improving production efficiency.
[0003] Time series anomaly detection is a key task in industrial data analysis, and its core goal is to identify irregular patterns in time series data and give alarm signals in a timely manner. Traditional anomaly detection methods mainly rely on statistical models such as Z-score, Grubbs hypothesis test, autoregressive moving average (ARMA), etc. Although these methods perform well in certain specific scenarios, due to their relatively strict assumptions about data distribution, it is difficult to cope with complex and variable industrial data.
[0004] In recent years, deep learning technology has made remarkable progress in the field of time series anomaly detection. Especially unsupervised deep learning methods, due to their strong feature extraction ability and low dependence on labeled data, have been widely used. Alarm detection methods based on reconstruction and prediction are one of the currently widely used deep learning methods. These methods train a model to capture the features of normal data and identify anomalies through reconstruction error or prediction error in the test stage. However, when dealing with long time series data, methods based on reconstruction and prediction are prone to over-generalization problems, resulting in insufficient detection ability of the model for subtle anomalies. In addition, although deep learning methods have improved the performance of anomaly detection to a certain extent, there are still problems with insufficient modeling of the long-term dependence of time series data.
[0005] In an industrial scenario, industrial data usually has characteristics such as high dimensionality, non-stationarity, and strong noise interference. Traditional single-feature modeling methods are difficult to effectively capture these complex characteristics. In the time domain processing method, when dealing with anomalies with small amplitude changes or subtle context differences, it often performs poorly, resulting in frequent false alarms or missed alarms. Finally, the industrial scenario has high requirements for the real-time performance and robustness of the detection model. Existing methods often face problems such as high computational complexity and long training time when dealing with large-scale data, and it is difficult to meet the requirements of real-time alarm. Summary of the Invention
[0006] To solve the limitations and defects of the existing technology, the present invention provides an alarm detection method based on a selective state space model with time-frequency attention, including:
[0007] Obtain the periodic characteristics and non-stationarity characteristics of the data;
[0008] Calculate the time-domain weight and frequency-domain weight based on Rényi entropy, construct an attention mechanism according to a multi-layer perceptron and a convolutional neural network, perform weighted processing on the time-frequency features, and obtain time-domain feature embeddings;
[0009] Use a selective state space model to decode the hidden space embedding representation and reconstruct the time-frequency image;
[0010] Implement anomaly detection by calculating the reconstruction error, use the POT algorithm to determine the threshold, and trigger the alarm mechanism when the anomaly score is greater than or equal to the threshold.
[0011] Optionally, before the step of obtaining the periodic characteristics and non-stationarity characteristics of the data, it includes:
[0012] Obtain a time series;
[0013] Use continuous wavelet transform to convert the time series into a time-frequency domain representation.
[0014] Optionally, before the step of using continuous wavelet transform to convert the time series into a time-frequency domain representation and after the step of obtaining the time series, it includes:
[0015] Normalize the time series.
[0016] Optionally, the step of normalizing the time series includes:
[0017] Obtain training samples X = {x1, x2,..., x n};
[0018] Normalize the training samples to obtain the samples X' = {x'1, x'2,..., x' n} after normalization, and the expression is as follows:
[0019]
[0020] Among them, μ is the mean of the training sample X, σ is the standard deviation of the training sample X, and n is the number of samples.
[0021] Optionally, the step of using continuous wavelet transform to convert the time series into a time-frequency domain representation includes:
[0022] Perform continuous wavelet transform on the time series after normalization to obtain the wavelet coefficient C(s,k) at scale s and time position k, and the expression is as follows:
[0023]
[0024] Among them, x′(t) is the signal after normalization, and ψ a,b (t) is the mother wavelet function, which is adjusted by the scaling parameter s and the parameter k. is the complex conjugate of the mother wavelet function, which is used to ensure the stability of the transform.
[0025] Optionally, the step of calculating the time domain weight and the frequency domain weight based on Rényi entropy includes:
[0026] Calculate the square of each wavelet coefficient to obtain the energy spectrum, and the energy spectrum is used to measure the energy of the signal at a preset scale and time position. The expression is as follows:
[0027] E(s i ,k) = |C(s i ,k)| 2 (5)
[0028] Among them, E(s i ,k) represents the energy spectrum at scale s i and time position k, s i represents the i-th wavelet scale, and the average energy of all time positions k is taken to obtain the average energy of each wavelet scale. The expression is as follows:
[0029]
[0030] Among them, K is the length of the time series;
[0031] Normalize the average energy and calculate the probability distribution p i at each wavelet scale. The expression is as follows:
[0032]
[0033] Among them, N is the total number of wavelet scales;
[0034] Calculate the Rényi entropy H of the signal at all scales α , and the expression is as follows:
[0035]
[0036] where α is the order of the Rényi entropy;
[0037] Take the Rényi entropy H α as the weight for quantifying the periodicity of the signal, and use the sigmoid function for non-linear mapping to obtain the time-domain weight w t and the frequency-domain weight w f , and the expression is as follows:
[0038]
[0039] where H max = lnN is the maximum theoretical value of the Rényi entropy, λ is the mapping coefficient, and the mapping coefficient is used to control the steepness of the mapping, and x0 is the center point of the control curve.
[0040] Optionally, the step of constructing the attention mechanism according to the multi-layer perceptron and the convolutional neural network, weighting the time-frequency features, and obtaining the time-domain feature embedding includes:
[0041] Obtain the time-frequency diagram after wavelet transform where B represents the batch size, L represents the time step, and D represents the frequency dimension. Global average pooling operations and global maximum pooling operations are respectively performed in the time domain and the frequency domain to obtain the time-domain global information AP t , the frequency-domain global information AP f and the time-domain local saliency information MP t , the frequency-domain local saliency information MP f , and the expression is as follows:
[0042]
[0043] Input AP f and MP f into the multi-layer perceptron for non-linear transformation mapping to obtain the attention weight in the frequency dimension , and the expression is as follows:
[0044] A f = Sigmoid(W2·ReLU(W1·concat(AP f ,MP f )+b1)+b2) (15)
[0045] where W1, W2, b1, and b2 are learnable parameters, ReLU is the activation function, and concat represents the concatenation of features;
[0046] Connect AP t and MP t and input them into the convolutional neural network for non - linear transformation to obtain attention weights. The expression is as follows:
[0047] A t = Sigmoid(Conv(concat(AP t , MP t ))) (16)
[0048] where Conv represents the convolution operation;
[0049] Weight the output attention matrix with the input feature C to obtain the frequency - domain feature F f and the time - domain feature F t , and the expression is as follows:
[0050]
[0051] Calculate the frequency - domain feature and the time - domain feature through the time - domain weight w t and the frequency - domain weight w f to perform cross - domain interaction and encoding to obtain the latent space embedding representation H. The expression is as follows:
[0052] H = W3·(Conv(concat(F f ×w f , F t ×w t )))+b3 (18)
[0053] where W3 and b3 are learnable parameters.
[0054] Optionally, the steps of using the selective state - space model to decode the latent space embedding representation and reconstruct the time - frequency image include:
[0055] The selective state - space model maps the input sequence to the output sequence through the latent state . The expression is as follows:
[0056] h(t)′ = Ah(t)+Bx(t) (19)
[0057] y(t)=Ch(t)
[0058] where, and are learnable matrices;
[0059] Discretize the continuous sequence using a step size Δ, and represent the discretized selective state space model as follows:
[0060]
[0061] where h t is the state vector at discrete time step t, x t is the input vector at discrete time step t, y t is the output vector at discrete time step t, I is the identity matrix;
[0062] The decoder f d constructed by the bidirectional Mamba model reconstructs the time-frequency image to obtain the reconstructed time-frequency image The expression is as follows:
[0063]
[0064] where the Mamba model is an efficient sequence processing architecture based on the selective state space model.
[0065] Optionally, the steps of implementing anomaly detection by calculating the reconstruction error, determining the threshold using the POT algorithm, and triggering the alarm mechanism when the anomaly score is greater than or equal to the threshold include:
[0066] Calculate the reconstruction error using the mean square error as the loss function, and construct a score matrix AnomalyScore(X) for monitoring alarm events. The expression is as follows:
[0067]
[0068] where represents the square of the Frobenius norm;
[0069] According to the score matrix, if the score is greater than or equal to the threshold δ, it is determined as an alarm event.
[0070] Optionally, it further includes:
[0071] If the score is greater than or equal to the threshold δ, it is determined as an alarm event; if the score is less than the threshold δ, it is determined as a normal event. The expression is as follows:
[0072]
[0073] where is the alarm label of the i-th sample, 1 represents an alarm event, and 0 represents a normal event.
[0074] The present invention has the following beneficial effects:
[0075] The present invention provides an alarm detection method based on a selective state space model with time-frequency attention. Continuous wavelet transform is used to extract time-frequency features from time series, the time-frequency domain weights are calculated based on Rényi entropy, and an attention mechanism is constructed through a multi-layer perceptron and a convolutional neural network to weight the time-frequency features, thereby obtaining more representative time-domain feature embeddings. Further, the present invention uses a selective state space model to decode the hidden space embedding representation, reconstruct the time-frequency image, and realizes anomaly detection by calculating the reconstruction error. The present invention enhances the attention to key time-frequency features through the attention mechanism, can effectively capture abnormal events in time series, and realizes high-precision alarm detection. The present invention is particularly applicable to the anomaly detection task of periodic complex time series data in the industrial monitoring field, and can effectively detect various types of anomalies including mutations, drifts, and periodic changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 It is a model structure diagram of the alarm detection method based on the selective state space model with time-frequency attention provided in the first embodiment of the present invention.
[0077] Figure 2 It is a working flowchart of the alarm detection method based on the selective state space model with time-frequency attention provided in the first embodiment of the present invention.
[0078] Figure 3 It is an anomaly score map under pattern anomaly provided in the first embodiment of the present invention.
[0079] Figure 4 It is an anomaly score map under time warping provided in the first embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0080] To enable those skilled in the art to better understand the technical solutions of the present invention, the alarm detection method based on the selective state space model with time-frequency attention provided by the present invention will be described in detail below with reference to the drawings.
[0081] First Embodiment
[0082] This embodiment proposes an alarm detection method based on a selective state space model with time-frequency attention. By combining wavelet transform time-frequency analysis and a selective state space model, this method can effectively capture the long-range dependence relationship and complex frequency characteristics in time series data. Specifically, in this embodiment, a state space model is first used to capture the long-range dependence relationship of time series, and the information in the time domain and frequency domain is fused through a time-frequency attention mechanism to improve the modeling ability of the model for complex time series data. In addition, this embodiment also proposes a multi-scale spatial channel fusion strategy, which further improves the anti-interference ability and detection accuracy of the model by fusing spatial and channel features of different scales.
[0083] To verify the performance of this embodiment, this embodiment uses a dataset containing multiple types of time series anomalies as the object for alarm detection. The experimental results show that the method proposed in this embodiment exhibits excellent performance in various anomaly alarms, can effectively detect various anomalies in time series data, and has high real-time performance and robustness. Through the method of this embodiment, the accuracy and timeliness of alarms can be significantly improved, providing a strong guarantee for the safe operation of industrial production.
[0084] To solve the problems of insufficient accuracy and high computational complexity in existing time series anomaly detection methods when dealing with complex time domain features, this embodiment provides an alarm detection method based on a selective state space model with time-frequency attention to accurately detect anomalies and give alarms to ensure production safety. This embodiment mainly includes the following steps: time-frequency feature extraction, feature embedding based on time-frequency attention mechanism, time-frequency domain reconstruction based on selective state space, anomaly detection, and alarm.
[0085] Time-frequency feature extraction: Use the Continuous Wavelet Transform (CWT) to convert the original time series into a time-frequency domain representation, so as to capture the potential periodic and non-stationary features in the data. Compared with the traditional Fourier transform, wavelet transform can better represent the local time-frequency characteristics of signals and is more sensitive to abrupt and non-periodic anomalies.
[0086] Feature embedding based on time-frequency attention mechanism: To highlight important time-frequency features, this embodiment adopts an attention mechanism based on Rényi entropy. First, quantify the signal energy distribution at different time scales and frequencies through Rényi entropy and convert it into time domain and frequency domain weights. Then, use a Multi-Layer Perceptron (MLP) and Convolutional Neural Networks (CNN) to learn the time-frequency attention weights, adaptively enhance the attention to key time-frequency information, suppress the interference of irrelevant information, and thus improve the representation ability of the model.
[0087] Time-frequency domain reconstruction based on selective state space: This embodiment adopts a selective state space model, especially the efficient Mamba model, to model the weighted time-frequency features. The selective state space model can effectively capture the long-range dependence relationship of time series and reduce the computational complexity through a selective mechanism, improving the model efficiency. By learning the state transition matrix, this model can effectively reconstruct the time-frequency representation of the input time series.
[0088] Anomaly detection and alarm: By comparing the reconstructed time-frequency image with the original time-frequency image, the mean square error is calculated as the anomaly score. When the anomaly score exceeds the preset threshold, it is determined as an abnormal event and the alarm mechanism is triggered.
[0089] In this embodiment, the time-frequency features of the time series are extracted through time-frequency analysis, the feature weights are dynamically adjusted by combining the attention mechanism, and efficient reconstruction and anomaly detection are realized through the selective state space model, thereby improving the detection accuracy and calculation efficiency of the model. Through the experimental results
[0090] it can be seen that this embodiment is easy to use and has obvious effects, has excellent generalization performance and good stability, and can be widely applied in the industrial field.
[0091] (1) Obtain the training sample X = {x1, x2,..., x n} and perform normalization processing on it to obtain the normalized sample X′ = {x′1, x′2,..., x′ n} to eliminate the influence of the dimension on the model. The normalization process is shown in formulas (1), (2), and (3):
[0092]
[0093] where μ and σ are the mean and standard deviation of the training sample X, and n is the number of samples.
[0094] (2) Perform continuous wavelet transform on the normalized time series to obtain the wavelet coefficient C(s, k) at the scale s and time position k:
[0095]
[0096] where x′(t) is the normalized signal, and ψ a,b (t) is the wavelet mother function, which is adjusted by the scaling parameter s (scale) and the displacement parameter k (time), is the complex conjugate of the wavelet mother function, which is used to ensure the stability of the transform.
[0097] (3) Calculate the time-domain weight and frequency-domain weight according to the periodic quantization method based on Rényi entropy:
[0098] Calculate the square of each wavelet coefficient to obtain the energy spectrum:
[0099] E(s i , k) = |C(s i , k)| 2 (5)
[0100] where E(s i , k) represents at the scale s iand the energy spectrum s at time position k i represents the i-th wavelet scale. It is used to measure the energy of the signal at a specific scale and time position. Then, we take the average of the energies at all time positions k to obtain the average energy at each wavelet scale:
[0101]
[0102] where K is the length of the time series. Next, to calculate the Rényi entropy, we normalize the average energy and calculate the probability distribution p at each wavelet scale i :
[0103]
[0104] where N is the total number of wavelet scales. Subsequently, we calculate the Rényi entropy H of the signal at all scales α :
[0105]
[0106] where α is the order of the Rényi entropy. To use the Rényi entropy H α as a weight to quantify the periodicity of the signal, we use the sigmoid function for non-linear mapping to obtain the time-domain weight w t and the frequency-domain weight w f as:
[0107]
[0108] where H max = lnN is the maximum theoretical value of the Rényi entropy, λ is the mapping coefficient used to control the steepness of the mapping, and x0 controls the center point of the curve.
[0109] (4) Feature embedding based on time-frequency attention:
[0110] Given the time-frequency map after wavelet transform where B represents the batch size, L represents the time step, and D represents the frequency dimension. Global average pooling and global max pooling operations are performed in the time domain and frequency domain respectively to obtain the global information AP t 、AP f and the local saliency information MP t 、MP f :
[0111]
[0112] Combine AP f and MP fIt is input into a multi-layer perceptron (MLP) for non-linear transformation mapping to obtain the attention weights in the frequency dimension
[0113] A f = Sigmoid(W2·ReLU(W1·concat(AP f , MP f )) + b1) + b2) (15)
[0114] where W1, W2, b1, and b2 are learnable parameters, H is the dimension of the hidden layer, ReLU is the activation function, and concat represents the concatenation of features
[0115] AP t and MP t are concatenated and input into a convolutional neural network (CNN) for non-linear transformation to further obtain the attention weights
[0116] A t = Sigmoid(Conv(concat(AP t , MP t ))) (16)
[0117] where Conv represents the convolution operation. The output attention matrix is weighted with the input feature C to obtain the frequency-domain feature F f and the time-domain feature F t :
[0118]
[0119] Finally, the frequency-domain feature and the time-domain feature are calculated through the time-domain weight w t and the frequency-domain weight w f to achieve cross-domain interaction and encode to obtain the final latent space embedding representation
[0120] H = W3·(Conv(concat(F f × w f , F t × w t ))) + b3 (18)
[0121] (5) Reconstruct the time-frequency domain image by decoding the latent space embedding representation through a selective state space model
[0122] The Mamba model is an efficient sequence processing architecture based on a selective state space model. The state space model can map the input sequence to the output sequence through the latent state as shown in the following equation
[0123] h(t)' = Ah(t) + Bx(t) (19)
[0124] y(t) = Ch(t)
[0125] where and are learnable matrices. Then, the continuous sequence is discretized by a step size Δ, and the discretized SSM model is expressed as:
[0126]
[0127] where h t , x t and y t are the state vector, input vector, and output vector at discrete time step t, respectively; and I is the identity matrix. The decoder f d (·) constructed by bidirectional Mamba is used to reconstruct the samples, obtaining the reconstructed time-frequency image The process is as follows:
[0128]
[0129] (6) Calculate the anomaly score and issue an alarm:
[0130] Finally, we use the mean square error as the loss function to calculate the reconstruction error, that is, construct the score matrix AnomalyScore(X) for monitoring alarm events:
[0131]
[0132] Based on the above score matrix, if its score exceeds the threshold δ, then the output is determined as an alarm event, that is:
[0133]
[0134] where is the alarm label of the i-th sample, 1 represents an alarm event, and 0 represents a normal event.
[0135] The case study shown in Table 1 indicates that this embodiment exhibits strong detection capabilities for various types of anomalies (such as pattern anomalies, reversals, noises, etc.), shows strong detection capabilities and low alarm delays, and has strong adaptability.
[0136] Table 1 Detection capabilities of this embodiment for various types of anomalies
[0137]
[0138] In this embodiment, continuous wavelet transform is used to extract time-frequency features from time series. Subsequently, the time-frequency domain weights are calculated based on Rényi entropy, and an attention mechanism is constructed through a multi-layer perceptron and a convolutional neural network to weight the time-frequency features, thereby obtaining more representative time-domain feature embeddings. Further, this embodiment uses a selective state space model to decode the latent space embedding representation, reconstruct the time-frequency image, and achieve anomaly detection by calculating the reconstruction error. This embodiment can effectively capture abnormal events in time series and achieve high-precision alarm detection by enhancing the attention to key time-frequency features through the attention mechanism. This embodiment is particularly applicable to the anomaly detection task of periodic complex time series data in the industrial monitoring field. Experimental results show that this embodiment can effectively detect various types of anomalies including mutations, drifts, and periodic changes.
[0139] It can be understood that the above embodiments are merely exemplary embodiments adopted to illustrate the principle of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.
Claims
1. An alarm detection method based on a selective state space model with time-frequency attention, characterized in that, Including: Obtain the periodic and non-stationary characteristics of the data; Calculate the time-domain weight and frequency-domain weight based on Rényi entropy, construct an attention mechanism according to the multi-layer perceptron and convolutional neural network, perform weighted processing on the time-frequency features, and obtain the time-domain feature embedding; Use the selective state space model to decode the hidden space embedding representation and reconstruct the time-frequency image; Realize anomaly detection by calculating the reconstruction error, use the POT algorithm to determine the threshold, and trigger the alarm mechanism when the anomaly score is greater than or equal to the threshold.
2. The alarm detection method based on the time-frequency attention selective state space model according to claim 1, wherein Before the step of obtaining the periodic and non-stationary characteristics of the data, it includes: Obtain the time series; Use continuous wavelet transform to convert the time series into a time-frequency domain representation.
3. The alarm detection method based on the time-frequency attention selective state space model according to claim 2, wherein Before the step of using continuous wavelet transform to convert the time series into a time-frequency domain representation and after the step of obtaining the time series, it includes: Normalize the time series.
4. The alarm detection method based on the time-frequency attention selective state space model according to claim 3, characterized in that, The step of normalizing the time series includes: Obtain training samples \(X = \{x_1, x_2, \ldots, x\) n}; Normalize the training samples to obtain the samples X' = {x1', x'2,..., x' n}, and the expression is as follows: where μ is the mean of the training sample X, σ is the standard deviation of the training sample X, and n is the number of samples.
5. The alarm detection method based on the time-frequency attention-based selective state space model according to claim 4, wherein, The step of using continuous wavelet transform to convert the time series into a time-frequency domain representation includes: Perform continuous wavelet transform on the normalized time series to obtain the wavelet coefficient C(s,k) at scale s and time position k, and the expression is as follows: where x′(t) is the signal after normalization, and ψ a,b (t) is the mother wavelet function, which is adjusted by the scaling parameter s and the parameter k, is the complex conjugate of the mother wavelet function, which is used to ensure the stability of the transform.
6. The alarm detection method of the selective state space model based on time-frequency attention according to claim 5, characterized in that The step of calculating the time-domain weight and frequency-domain weight based on Rényi entropy includes: Calculate the square of each wavelet coefficient to obtain the energy spectrum, which is used to measure the energy of the signal at the preset scale and time position, and the expression is as follows: E(s i ,k) = |C(s i ,k)| 2 (5) Among them, E(s i , k) represents the energy spectrum at scale s i and time position k. s i represents the i-th wavelet scale. The average energy of all time positions k is taken to obtain the average energy of each wavelet scale, and the expression is as follows: where K is the length of the time series; Normalize the average energy and calculate the probability distribution p at each wavelet scale i , and the expression is as follows: where N is the total number of wavelet scales; Calculate the Rényi entropy \(H\) of the signal at all scales α , and the expression is as follows: where α is the order of Rényi entropy; Take the Rényi entropy H α as the weight for quantifying the periodicity of the signal, and use the sigmoid function for non-linear mapping to obtain the time-domain weight w t and the frequency-domain weight w f , and the expression is as follows: Among them, H max = lnN is the maximum theoretical value of the Rényi entropy, λ is the mapping coefficient, which is used to control the steepness of the mapping, and x0 is the center point of the control curve.
7. The alarm detection method based on the time-frequency attention-based selective state space model according to claim 6, wherein The step of constructing an attention mechanism according to the multi-layer perceptron and convolutional neural network, performing weighted processing on the time-frequency features, and obtaining the time-domain feature embedding includes: Obtain the time-frequency diagram after wavelet transform where B represents the batch size, L represents the time step, and D represents the frequency dimension. Global average pooling operations and global maximum pooling operations are performed in the time domain and frequency domain respectively to obtain the global information AP in the time domain t , the global information AP in the frequency domain f and the local saliency information MP in the time domain t , the local saliency information MP in the frequency domain f , and the expressions are as follows: Input AP f and MP f into the multi-layer perceptron for non-linear transformation mapping to obtain the attention weights in the frequency dimension The expression is as follows: A f = Sigmoid(W2 · ReLU(W1 · concat(AP f , MP f ) + b1) + b2) (15) where W1, W2, b1, and b2 are learnable parameters, ReLU is the activation function, and concat represents the concatenation of features; Connect AP t and MP t and input them into the convolutional neural network for non-linear transformation to obtain attention weights. The expression is as follows: A t = Sigmoid(Conv(concat(AP t , MP t ))) (16) where Conv represents the convolution operation; Weight the output attention matrix with the input feature C to obtain the frequency-domain feature F f and the time-domain feature F t , and the expression is as follows: Calculate the frequency-domain features and the time-domain features through the time-domain weight w t and the frequency-domain weight w f to perform cross-domain interaction and encoding, obtaining the latent space embedding representation H, with the expression as follows: H = W3·(Conv(concat(F f × w f , F t × w t )))+ b3 (18) where W3 and b3 are learnable parameters.
8. The alarm detection method based on the selective state space model with time-frequency attention according to claim 7, wherein The step of using the selective state space model to decode the hidden space embedding representation and reconstruct the time-frequency image includes: The selective state space model maps an input sequence to an output sequence through a latent state, and the expression is as follows: The expression is as follows: h(t)′ = Ah(t) + Bx(t) (19) y(t) = Ch(t) Among them, and are learnable matrices; Discretize the continuous sequence with a step size Δ, and represent the discretized selective state space model as follows: where h t is the state vector at discrete time step t, x t is the input vector at discrete time step t, y t is the output vector at discrete time step t, I is the identity matrix; Decoder f constructed by the bidirectional Mamba model d (·) Reconstruct the time-frequency image to obtain the reconstructed time-frequency image The expression is as follows: where the Mamba model is an efficient sequence processing architecture based on the selective state space model.
9. The alarm detection method based on the time-frequency attention-based selective state space model according to claim 8, characterized in that, The step of realizing anomaly detection by calculating the reconstruction error, using the POT algorithm to determine the threshold, and triggering the alarm mechanism when the anomaly score is greater than or equal to the threshold includes: Use the mean square error as the loss function to calculate the reconstruction error, and construct a score matrix AnomalyScore(X) for monitoring alarm events, and the expression is as follows: wherein, represents the square of the Frobenius norm; According to the score matrix, if the score is greater than or equal to the threshold δ, it is determined as an alarm event.
10. The alarm detection method based on the selective state space model with time-frequency attention according to claim 9, characterized in that It also includes: If the score is greater than or equal to the threshold δ, it is determined as an alarm event; If the score is less than the threshold δ, it is determined as a normal event; the expression is as follows: Among them, is the alarm label of the i-th sample, where 1 indicates an alarm event and 0 indicates a normal event.
Citation Information
Cited By
Three-dimensional lane detection method based on multi-stage query trimming and liquid neural network
CN121686392A
