Pollution treatment equipment state prediction method based on long-time sequence attention network

Through the pollution control equipment state prediction method based on long-time series attention network, the local causal attention module and long-term compressed memory module are used to solve the problems of low accuracy of long-time series prediction and high computing resource requirements in the existing technology, and high precision and flexibility of pollution control equipment state prediction is achieved.

CN119848421AActive Publication Date: 2025-04-18WEIHAI LANGXIN SMART TECHNOLOGY CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411946308.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-18
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

The existing pollution control equipment state prediction methods have low accuracy in long-term series prediction, high computing resource requirements and sparse training data, making it difficult to ensure the accuracy and efficiency of prediction under large-scale data.

Method used

The pollution control equipment state prediction method based on a long-time series attention network is adopted, and the predicted time series is pre-processed, and the local causal attention module and long-term compressed memory module of the long-time series attention network are used to obtain the local attention information and historical information of the time series and output the predicted time series.

Benefits of technology

It greatly improves the prediction accuracy and flexibility of long-term time series, can cope with time series of different lengths, and solves the problem of sparseness of state data of pollution control equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848421A_ABST
    Figure CN119848421A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a pollution control equipment state prediction method based on a long-time sequence attention network. Relates to the field of pollution equipment state prediction. The method comprises the following steps: preprocessing various data of to-be-predicted pollution treatment equipment to obtain a to-be-predicted time sequence; the to-be-predicted time sequence is input into a long-time sequence attention network, and the long-time sequence attention network obtains local attention information of the to-be-predicted time sequence by using a local causal attention module of the long-time sequence attention network and obtains historical information of the to-be-predicted pollution treatment equipment by using a long-term compression memory module of the long-time sequence attention network; outputting a prediction time sequence according to the local attention information and the historical information; and predicting the state of the to-be-predicted pollution treatment equipment according to the prediction time sequence. Therefore, the prediction precision and flexibility of the long-time sequence are greatly improved, the method can cope with time sequences of different lengths, and the problem of sparse state data of the pollution control equipment is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of pollution control equipment state prediction, and in particular to a pollution control equipment state prediction method based on a long time series attention network. Background Art

[0002] In recent years, with the continuous improvement of industrial automation, various complex equipment has been widely used in pollution control, production and manufacturing and other scenarios. These devices will inevitably be disturbed and affected by various environmental factors under long-term high-load operation, resulting in fluctuations in equipment performance and potential failures. At the same time, the operating data of industrial equipment usually shows a high degree of time series characteristics, and is affected by factors such as equipment type, operating environment, and maintenance status. The data pattern is often complex, and traditional equipment monitoring and early warning systems are difficult to fully capture these dynamic trends. Therefore, how to achieve accurate anomaly detection and fault warning based on historical data has become a key challenge in equipment maintenance and intelligent decision-making systems. In daily life, pollution control equipment such as sewage treatment facilities and air purification devices play a key role in improving the living environment. However, failure or abnormality of pollution control equipment can lead to problems such as air or water pollution, which directly affects the quality of life and health of residents. Therefore, there is an urgent need for an intelligent monitoring and decision-making system to monitor the status of pollution control equipment.

[0003] At present, there are mainly the following methods for predicting the status of pollution control equipment: least squares support vector machine prediction method based on Kalman filter, pollution control equipment status prediction method based on LSTM, and long time series status equipment prediction model based on recurrent neural network. Due to the complexity of actual application scenarios and huge data volume, these methods have some problems. For example, the least squares support vector machine prediction method based on Kalman filter has high computational complexity, and the pollution control equipment status prediction method based on LSTM and the long time series status equipment prediction model based on recurrent neural network have low accuracy in long time series prediction, high computing resource requirements and sparse training data, making it difficult to ensure the accuracy and efficiency of prediction under large-scale data. Summary of the invention

[0004] The present invention provides a method and apparatus for predicting the state of pollution control equipment based on a long time series attention network, a device and a storage medium.

[0005] According to a first aspect of the present disclosure, a method for predicting the state of pollution control equipment based on a long time series attention network is provided. The method comprises:

[0006] Preprocess various data of pollution control equipment to be predicted to obtain the time series to be predicted;

[0007] Input the time series to be predicted into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series according to the local attention information and the historical information;

[0008] According to the prediction time series, the state of the pollution control equipment to be predicted is predicted.

[0009] In some implementations of the first aspect, the preprocessing includes:

[0010] Normalize various data of the pollution control equipment to be predicted and obtain the normalized time series;

[0011] According to the preset sequence length, the normalized time series is divided into multiple time segments, and the multiple time segments are used as the time series to be predicted.

[0012] In some implementations of the first aspect, the using its own local causal attention module to obtain local attention information of the time series to be predicted includes:

[0013] In the local causal attention module, the projection matrix is ​​used to calculate the attention query value, key-value pair and value matrix of the time series to be predicted;

[0014] According to the attention query value, key-value pair and value matrix of the time series to be predicted, the softmax function is used to calculate the local attention context representation of the time series to be predicted.

[0015] In some possible implementations of the first aspect, the using of its own long-term compression memory module to obtain historical information of the pollution control equipment to be predicted includes:

[0016] According to the attention query value of the time series to be predicted, the historical information of the pollution control equipment to be predicted is retrieved from the long-term compressed memory module.

[0017] In some implementations of the first aspect, outputting a predicted time series according to the local attention information and the historical information includes:

[0018] Concatenating the local attention information with the historical information to generate a comprehensive context representation;

[0019] Performing linear projection on the comprehensive context representation using a linear projection layer;

[0020] The linearly projected data is passed through the layer normalization module, the fully connected layer, and the residual connection layer in sequence to obtain the predicted time series.

[0021] In some implementations of the first aspect, the method further includes:

[0022] The autoregressive generation method is used to interpolate the forecast time series to generate a complete forecast time series.

[0023] In some implementations of the first aspect, the method further includes:

[0024] Based on the complete forecast time series and the actual observation sequence corresponding to the complete forecast time series, the abnormal sequence is determined.

[0025] According to a second aspect of the present disclosure, a pollution control equipment state prediction device based on a long time series attention network is provided. The device comprises:

[0026] The module for obtaining the time series to be predicted is used to preprocess various data of the pollution control equipment to be predicted and obtain the time series to be predicted;

[0027] A prediction time series output module is used to input the time series to be predicted into a long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the prediction time series according to the local attention information and the historical information;

[0028] The pollution equipment state prediction module is used to predict the state of the pollution control equipment to be predicted according to the prediction time series.

[0029] 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.

[0030] 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.

[0031] In the present disclosure, various types of data of pollution control equipment to be predicted are preprocessed to obtain the time series to be predicted; the time series to be predicted is input into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series based on the local attention information and historical information; based on the predicted time series, the state of the pollution control equipment to be predicted is predicted. In this way, the prediction accuracy and flexibility of the long time series are greatly improved, and time series of different lengths can be handled, solving the sparsity problem of the state data of the pollution control equipment.

[0032] 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

[0033] 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:

[0034] Figure 1 A flowchart of a method for predicting the state of pollution control equipment based on a long time series attention network provided by an embodiment of the present disclosure is shown;

[0035] Figure 2 A long time series attention network framework diagram provided by an embodiment of the present disclosure is shown;

[0036] Figure 3 A schematic diagram of a long time series attention module provided by an embodiment of the present disclosure is shown;

[0037] Figure 4 A structural diagram of a pollution control equipment state prediction device based on a long time series attention network provided by an embodiment of the present disclosure is shown;

[0038] Figure 5 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0039] 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.

[0040] 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.

[0041] In response to the problems arising in the background technology, the embodiments of the present disclosure provide a method for predicting the state of pollution control equipment based on a long time series attention network. Specifically, various types of data of the pollution control equipment to be predicted are preprocessed to obtain the time series to be predicted; the time series to be predicted is input into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series based on the local attention information and historical information; based on the predicted time series, the state of the pollution control equipment to be predicted is predicted. In this way, the prediction accuracy and flexibility of the long time series are greatly improved, and time series of different lengths can be handled, solving the sparsity problem of the state data of pollution control equipment.

[0042] In the following, in combination with the accompanying drawings, the pollution control equipment state prediction method and device based on the long time series attention network provided by the embodiment of the present disclosure are described in detail through specific embodiments.

[0043] Figure 1 A flowchart of a method for predicting the state of pollution control equipment based on a long time series attention network provided by an embodiment of the present disclosure is shown. The method 100 includes the following steps:

[0044] S110, preprocessing various data of the pollution control equipment to be predicted to obtain the time series to be predicted.

[0045] In some embodiments, various types of data of pollution quality equipment are collected at multiple frequencies and dimensions through high-precision sensors; wherein the various types of data include temperature, pressure, vibration, energy consumption, operating time, work efficiency, temperature and humidity of the environment where the pollution control equipment is located, replacement and maintenance records of pollution control equipment parts, and pollutant concentrations.

[0046] In some embodiments, the preprocessing comprises:

[0047] Normalize various data of the pollution control equipment to be predicted and obtain the normalized time series;

[0048] According to the preset sequence length, the normalized time series is divided into multiple time segments, and the multiple time segments are used as the time series to be predicted.

[0049] In some embodiments, the data is normalized according to the following formula:

[0050]

[0051] Among them, x1 represents the normalized data, x represents the data before normalization, u represents the mean calculated based on various data of the pollution control equipment to be predicted, and σ represents the standard deviation calculated based on various data of the pollution control equipment to be predicted.

[0052] In some embodiments, the normalized time series is divided into a plurality of time segments according to a preset sequence length, including:

[0053] The normalized time series is divided into multiple time segments, each of which consists of multiple time steps, and the number of time steps is the same as the preset sequence length;

[0054] Specifically, the preset sequence length is ω, the normalized time series is X, and X is divided into T consecutive time segments, that is, X = {X1, X2, ..., X T}, where each time segment X i It consists of ω time steps, namely: X i ={x (i-1)w+1, x (i-1)w+2 , ..., x iw} And each time segment has several minimum time series units

[0055] Finally, multiple time segments are used as the time series X to be predicted. S .

[0056] S120, input the time series to be predicted into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series based on the local attention information and historical information.

[0057] In some embodiments, the long time series attention network framework is as shown in Figure 2 As shown in the figure, the long time series attention network consists of L layers of long time series attention Transformer modules stacked in sequence, and each long time series attention Transformer module consists of a long time series attention module, a layer normalization module, a fully connected layer, and a residual connection layer connected in sequence;

[0058] Furthermore, each long-time series attention Transformer module extracts features of different levels in the time series to be predicted based on the long-time attention mechanism, thereby gradually capturing the long-distance dependencies in the time series to be predicted;

[0059] The long time series attention module can capture the global dependencies of the time series to be predicted, the layer normalization module can stabilize the feature distribution of different levels in the time series to be predicted, the fully connected layer can enhance the nonlinear expression of the long time series attention network, and the residual connection layer can retain the input data of the long time series attention network to stabilize the model training process.

[0060] In some embodiments, the method of using its own local causal attention module to obtain local attention information of the time series to be predicted includes:

[0061] In the local causal attention module, the projection matrix is ​​used to calculate the attention query value, key-value pair and value matrix of the time series to be predicted;

[0062] According to the attention query value, key-value pair and value matrix of the time series to be predicted, the local attention context representation of the time series to be predicted is calculated using the softmax function;

[0063] Specifically, according to the following formula, according to the time series X to be predicted S , use the projection matrix to calculate the attention query value Q, key-value pair K and value matrix V of the time series to be predicted:

[0064] Q=X S W Q , K = X S W K , V = X S W V

[0065] Among them, W Q , W K , W V They are the projection matrices respectively;

[0066] Use the upper triangular mask matrix to transform the matrix QK TMasking is performed to impose causal constraints; the upper triangular positions in the upper triangular mask matrix represent future time steps, which are set to negative infinity, and the lower triangular and diagonal positions are set to 0. The matrix QK T represents the product of Q and the transpose of K;

[0067] The softmax function is used to change the weights at future time steps to 0, so that each time step can only focus on the current and previous time steps, avoiding the leakage of future information;

[0068] The local attention context representation A is calculated according to the following formula dot (i.e. local attention information):

[0069]

[0070] Among them, d model Represents the dimension of the vector input to the long time series attention network, and N represents the total time steps of the time series to be predicted.

[0071] In some embodiments, the long time series attention network computes Z independent attention heads in parallel, each with its own projection matrix W Q , W K , W V , in order to capture the multi-level dependencies of the time series to be predicted, the local attention context representation obtained by each attention head is concatenated along the second dimension, the concatenated result is linearly projected, and the linear projection result is mapped back to the long time series attention network space, thereby generating the final attention context representation obtained by different attention heads.

[0072] In some embodiments, the method of using its own long-term compressed memory module to obtain historical information of the pollution control equipment to be predicted includes:

[0073] According to the attention query value of the time series to be predicted, the historical information of the pollution control equipment to be predicted is retrieved from the long-term compressed memory module;

[0074] Further, retrieve the historical information A of the pollution control equipment to be predicted mem The formula is as follows:

[0075]

[0076] Among them, M s-1 Represents the memory state of the previous time series, g(Q), P s-1 They represent the nonlinear activation function value of the attention query value Q of the time series to be predicted and the normalization term of the previous time series key-value pair respectively;

[0077] Specifically, g(Q)=ELU(Q)+1,

[0078] Among them, ELU is the exponential linear activation function, K is the key-value pair of the t-th time series, α is an adjustable hyperparameter, nonlinear activation function and P s-1 Together, they ensure numerical stability during computation and convergence during spatial training of long-time series attention networks.

[0079] In some embodiments, the memory in the long-term compressed memory module and the normalized item of the current time series key-value pair are updated to obtain the memory state of the next time series;

[0080] Specifically, update according to the following formula:

[0081] M s ←M s-1 +σ(K) T V

[0082]

[0083] M s-1 Represents the memory state of the previous time series, M s Represents the memory state of the current time series, P s Represents the normalization term of the current time series key-value pair, σ(K) T V is the association binding operator; where the initial memory state of the time series is the zero vector;

[0084] The memory state of the current time series and the normalized item of the key-value pair of the current time series are passed to the next time series, thereby obtaining the memory state of the next time series;

[0085] Further, g(K) T Represents the value of the nonlinear activation function with respect to the transposition of the key-value pair K. The associative binding operator first retrieves the value of the key-value pair already existing in the long-term compressed memory module, and then subtracts the retrieved value of the key-value pair from the key-value pair of the time series newly input into the long-term series attention network, and finally applies the associative binding to obtain the memory state of the current time series; if the associative binding operator already exists in the long-term compressed memory module, the associative binding method is kept unchanged, and the method for obtaining the normalized item of the key-value pair is ensured to be the same.

[0086] In some embodiments, outputting a predicted time series according to the local attention information and the historical information includes:

[0087] Concatenating the local attention information with the historical information to generate a comprehensive context representation;

[0088] Performing linear projection on the comprehensive context representation using a linear projection layer;

[0089] The linearly projected data is passed through the layer normalization module, the fully connected layer, and the residual connection layer in sequence to obtain the predicted time series.

[0090] In some embodiments, a schematic diagram of a long time series attention module is as follows: Figure 3 As shown, the long-term compressed memory module and the local causal attention module are connected to the linear projection layer through the concatenation layer respectively;

[0091] Specifically, the memory state M of the previous time series s-1 The attention query value Q of the current time series is obtained through the long-term compressed memory module to obtain historical information. The attention query value Q of the current time series and the memory state M of the current time series are s The local attention information is obtained through the local causal attention module. The historical information and the local attention information are spliced ​​through the splicing layer respectively. The spliced ​​data passes through the linear projection layer to obtain the final output of the long time series attention module. The final output is expressed by the following equation:

[0092] Q, M s =Long-time-series-attention(X s , M s-1 )

[0093] X S It represents the time series to be predicted (i.e., the current time series) input to the long-time series attention module, Q is the attention query value of the current time series, Long-time-series represents the processing process of the long-time series, and attention represents the attention mechanism.

[0094] In some embodiments, the local attention information and the historical information are concatenated to generate a comprehensive context representation, including:

[0095] According to the gated scalar β, adjust the proportion of local attention information and historical information to generate a comprehensive context representation A;

[0096] Specifically, A = sigmoid(β)·A mem +(1-sigmoid(β))·A dot , sigmoid is the activation function.

[0097] In some embodiments, for multi-head attention, the output O obtained by concatenating the outputs of the local causal attention module and the long-term compressed memory module can be expressed as: O = [A 1 ,......A Z ]R, R is the weight.

[0098] In some embodiments, the normalization method of the layer normalization module is as follows:

[0099]

[0100] y, y1 represent the data before and after normalization of the layer normalization module, μ1, σ1 2 They represent the mean and variance of the data before normalization by the layer normalization module, and γ and β1 represent the scaling parameter and translation parameter, respectively.

[0101] In some embodiments, the fully connected layer includes a combination of two linear transformations and a nonlinear activation function, i.e., FFN(j)=ReLU(jW1+b1)W2+b2, j represents the input of the fully connected layer, FFN represents the operation of the fully connected layer, ReLU is a nonlinear activation function, and ReLU(q)=max(0,q), which is a nonlinear activation function with respect to the variable q, W1 and W2 are weight matrices, respectively, and b1 and b2 are bias terms, respectively.

[0102] In some embodiments, the prediction training process of the long time series attention network is as follows:

[0103] Collect data covering multiple fields such as rainfall, human health data, electricity meter readings, smart home device usage data, river water levels, air quality index, soil temperature and humidity change data, and manage these data in layers. Then pre-process the data after layer management to obtain training sample sets; layer management of data can contain various data to the maximum extent, ensuring that the amount of data in each field is relatively balanced, and the data complexity increases with the increase of the number of statistical feature layers;

[0104] Several minimum time series units in the training sample set are input into the long time series attention network according to the batch size. The batch size can be adjusted according to the computing resources, data scale, etc.

[0105] According to the above time series prediction method, the long time series attention network is trained according to the training sample set;

[0106] According to the following formula, the predicted time series is obtained:

[0107]

[0108] Among them, W e , W d Respectively represent the encoding and decoding operations in the corresponding steps, TE m represents the unit vector of the time series corresponding to the mth time point, Represents the unit vector of the time series corresponding to the mth time point after the encoding operation, Hl is a vector composed of unit vectors of the time series corresponding to the first time point to the lth time point after the encoding operation, H l-1 is a vector composed of unit vectors of the time series corresponding to the 1st time point to the l-1th time point after the encoding operation, H L is a vector composed of unit vectors of the time series corresponding to the 1st time point to the Lth time point after the encoding operation, L is the number of l, Block is the operation performed by the long time series attention Transformer module, s m represents the mth time series input into the long time series attention network, Represents the m+1th predicted time series output by the long time series attention network;

[0109] Calculate the mean square error between the predicted time series output by the long time series attention network and the corresponding actual time series, adjust the network parameters according to the mean square error and re-input the adjusted network parameters into the long time series attention network;

[0110] Repeat the prediction training steps until the prediction loss function converges; where the prediction loss function is the mean square error between the predicted time series output by the long time series attention network and the corresponding actual time series.

[0111] In some embodiments, the interpolation training process of the long time series attention network is as follows:

[0112] A set of observation time series is set in the training sample set, and some time series units are randomly selected in the observation time series for masking, and the data in some time series units are set to 0 to simulate missing conditions;

[0113] Train the long time series attention network based on the training sample set;

[0114] Calculate the mean square error between the interpolated sequence output by the long time series attention network and the corresponding observed time series, adjust the network parameters according to this mean square error and re-input the adjusted network parameters into the long time series attention network;

[0115] The interpolation training steps are repeated until the interpolation loss function converges; the interpolation loss function is the mean square error between the interpolation sequence output by the long time series attention network and the corresponding observation time series.

[0116] In some embodiments, the long time series attention network when both the prediction loss function and the interpolation loss function converge is a trained long time series attention network, and the trained long time series attention network is used to interpolate the predicted time series.

[0117] In some embodiments, the method 100 further includes:

[0118] The autoregressive generation method is used to interpolate the forecast time series, generate a complete forecast time series and output it;

[0119] Specifically, if the obtained predicted time series is a time series with vacancies, the long time series attention network generates the first interpolation value based on the predicted time series before the vacant time point, and then generates the second interpolation value based on the time series before the first interpolation value. In this way, all interpolation values ​​corresponding to the vacant time series can be generated, and all the generated interpolation values ​​are filled into the corresponding vacant time points to obtain a complete predicted time series.

[0120] In some embodiments, an interpolation sequence is calculated based on the predicted time series before the missing time point using an autoregressive generation method, so that the next interpolation sequence is calculated based on the interpolation sequence, thereby obtaining a complete predicted time series.

[0121] In some embodiments, the method 100 further includes:

[0122] Determine the abnormal sequence based on the complete forecast time series and the actual observation sequence corresponding to the complete forecast time series;

[0123] Specifically, on the training sample set, several minimum time series units are randomly perturbed to simulate anomalies, and the above-mentioned time prediction method is used to generate the corresponding predicted time series for these perturbed time segments. The error series is obtained by calculating the mean square error (MSE) between the predicted time series and its corresponding actual observation series. U is the error sequence The total time steps in e u represents the error data corresponding to the u-th time step in the error sequence, represents the u+jth predicted time series generated by the time segment after the disturbance, y u+j Representation and The corresponding actual observation sequence, v represents the number of time segments of the disturbance, and the error sequence is used to find the anomaly threshold for anomaly detection;

[0124] For this error sequence Perform distribution analysis and select quantile α as the abnormal threshold τ, that is, τ = Q α (e u ), where Q α Represents the error sequence α quantile, for the time segment where the confidence exceeds the abnormal threshold τ, that is, satisfies e u >τ time step, marking it as a potential abnormal location;

[0125] After the anomaly detection training is completed, in practical applications, the corresponding error sequence is obtained by calculating the mean square error between the complete predicted time series and its corresponding actual observation sequence, and the time segment in the error sequence whose confidence exceeds the anomaly threshold τ is marked as an anomaly sequence.

[0126] S130, predicting the state of the pollution control equipment to be predicted according to the prediction time series.

[0127] In some embodiments, the time series to be predicted is input into a long time series attention network to generate a group of predicted time series, which are concatenated with the time series to be predicted and input into the long time series attention network as a new time series to be predicted to generate a predicted time series for the next time step. This process continues until the generated predicted time series reaches a preset target length. If the length of the generated predicted time series exceeds the preset target length, the excess part at the end of the predicted time series is cut off to ensure that the length of the generated predicted time series is consistent with the preset target length.

[0128] According to the embodiments of the present disclosure, various types of data of the pollution control equipment to be predicted are preprocessed to obtain the time series to be predicted; the time series to be predicted is input into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series based on the local attention information and historical information; based on the predicted time series, the state of the pollution control equipment to be predicted is predicted. In this way, the prediction accuracy and flexibility of the long time series are greatly improved, and time series of different lengths can be handled, solving the sparsity problem of the state data of the pollution control equipment.

[0129] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described 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.

[0130] 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.

[0131] Figure 4 The structure diagram of a pollution control equipment state prediction device based on a long time series attention network provided by an embodiment of the present disclosure is shown. The device 400 includes:

[0132] The module 410 for obtaining the time series to be predicted is used to pre-process various data of the pollution control equipment to be predicted and obtain the time series to be predicted.

[0133] In some embodiments, the module for obtaining the time series to be predicted 410 is specifically used for:

[0134] The preprocessing comprises:

[0135] Normalize various data of the pollution control equipment to be predicted and obtain the normalized time series;

[0136] According to the preset sequence length, the normalized time series is divided into multiple time segments, and the multiple time segments are used as the time series to be predicted.

[0137] The predicted time series output module 420 is used to input the time series to be predicted into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series based on the local attention information and historical information.

[0138] In some embodiments, the predicted time series output module 420 is specifically used to:

[0139] The method of using its own local causal attention module to obtain local attention information of the time series to be predicted includes:

[0140] In the local causal attention module, the projection matrix is ​​used to calculate the attention query value, key-value pair and value matrix of the time series to be predicted;

[0141] According to the attention query value, key-value pair and value matrix of the time series to be predicted, the softmax function is used to calculate the local attention context representation of the time series to be predicted.

[0142] In some embodiments, the predicted time series output module 420 is further used to:

[0143] The method of using its own long-term compressed memory module to obtain historical information of the pollution control equipment to be predicted includes:

[0144] According to the attention query value of the time series to be predicted, the historical information of the pollution control equipment to be predicted is retrieved from the long-term compressed memory module.

[0145] In some embodiments, the predicted time series output module 420 is further used to:

[0146] Outputting a predicted time series according to the local attention information and the historical information includes:

[0147] Concatenating the local attention information with the historical information to generate a comprehensive context representation;

[0148] Performing linear projection on the comprehensive context representation using a linear projection layer;

[0149] The linearly projected data is passed through the layer normalization module, the fully connected layer, and the residual connection layer in sequence to obtain the predicted time series.

[0150] In some embodiments, the apparatus 400 is further configured to:

[0151] The autoregressive generation method is used to interpolate the forecast time series to generate a complete forecast time series.

[0152] The pollution equipment state prediction module 430 is used to predict the state of the pollution control equipment to be predicted according to the prediction time series.

[0153] In some embodiments, the apparatus 400 is further configured to:

[0154] Based on the complete forecast time series and the actual observation sequence corresponding to the complete forecast time series, the abnormal sequence is determined.

[0155] Understandably, Figure 4 Each module / unit in the illustrated device 400 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.

[0156] Figure 5 A block diagram of an exemplary electronic device capable of implementing an embodiment of the present disclosure is shown. Electronic device 500 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. Electronic device 500 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.

[0157] like Figure 5As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O interface 505 is also connected to the bus 504.

[0158] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0159] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 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 501 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 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).

[0160] 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.

[0161] 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.

[0162] 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.

[0163] 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.

[0164] 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).

[0165] 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.

[0166] 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.

[0167] 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.

[0168] 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 pollution control equipment state prediction method based on long time series attention network, characterized in that: include: Preprocess various data of pollution control equipment to be predicted to obtain the time series to be predicted; Input the time series to be predicted into the long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the predicted time series according to the local attention information and the historical information; According to the prediction time series, the state of the pollution control equipment to be predicted is predicted.

2. The method according to claim 1, characterized in that: The preprocessing comprises: Normalize various data of the pollution control equipment to be predicted and obtain the normalized time series; According to the preset sequence length, the normalized time series is divided into multiple time segments, and the multiple time segments are used as the time series to be predicted.

3. The method according to claim 1, characterized in that: The method of using its own local causal attention module to obtain local attention information of the time series to be predicted includes: In the local causal attention module, the projection matrix is ​​used to calculate the attention query value, key-value pair and value matrix of the time series to be predicted; According to the attention query value, key-value pair and value matrix of the time series to be predicted, the softmax function is used to calculate the local attention context representation of the time series to be predicted.

4. The method according to claim 3, characterized in that The method of using its own long-term compressed memory module to obtain historical information of the pollution control equipment to be predicted includes: According to the attention query value of the time series to be predicted, the historical information of the pollution control equipment to be predicted is retrieved from the long-term compressed memory module.

5. The method according to claim 1, characterized in that Outputting a predicted time series according to the local attention information and the historical information includes: Concatenating the local attention information with the historical information to generate a comprehensive context representation; Performing linear projection on the comprehensive context representation using a linear projection layer; The linearly projected data is passed through the layer normalization module, the fully connected layer, and the residual connection layer in sequence to obtain the predicted time series.

6. The method according to claim 5, characterized in that The method further comprises: The autoregressive generation method is used to interpolate the predicted time series, generate a complete predicted time series and output it.

7. The method according to claim 6, characterized in that The method further comprises: Based on the complete forecast time series and the actual observation sequence corresponding to the complete forecast time series, the abnormal sequence is determined.

8. A pollution control equipment state prediction device based on a long time series attention network, characterized in that: include: The module for obtaining the time series to be predicted is used to preprocess various data of the pollution control equipment to be predicted and obtain the time series to be predicted; A prediction time series output module is used to input the time series to be predicted into a long time series attention network, so that the long time series attention network uses its own local causal attention module to obtain the local attention information of the time series to be predicted, and uses its own long-term compression memory module to obtain the historical information of the pollution control equipment to be predicted, and outputs the prediction time series according to the local attention information and the historical information; The pollution equipment state prediction module is used to predict the state of the pollution control equipment to be predicted according to the prediction time series.

9. 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 7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Long-term memory enhanced paragraph-level image description generation method

    CN113591874A

  • Abnormality detection method and device, electronic equipment and storage medium

    CN114417326A

  • Traffic flow prediction method based on improved space-time Transform

    CN115273464A

  • Long-time sequence prediction method for hail intensity in region with few features

    CN116662683A

  • Cultivated land extraction method based on bidirectional convolution time self-attention mechanism

    CN116844041A