Method and device for long-term prediction of sensor data integrating multiple source factors
Through LSTM network and frequency domain decomposition technology, combined with deep and temporal attention modules, the dynamic correlation and redundancy problems of multi-source sensor data are solved, achieving more efficient long-term prediction effects.
Patent Information
- Application Number
- CN202310258034.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing technologies find it difficult to dynamically build the correlation of sensor data in multi-source factor scenarios, and it is difficult to reduce historical sequence redundancy and retain time series characteristics, resulting in insufficient long-term prediction accuracy.
The LSTM network is used to update the hidden state of the multi-source factor encoder. The frequency domain decomposition is used to reduce redundancy and retain the temporal features. The deep attention module and the temporal attention module are combined to construct the dynamic correlation between the target data and the multi-source factors. The fully connected layer is used to obtain the final prediction results.
It improves the long-term prediction accuracy of multi-source sensor data, reduces the resource consumption and overfitting risk of model training, and improves prediction accuracy.
Smart Images

Figure CN116561697B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a long-term prediction method and device for multi-sensor data fusing multi-source factors. Background Art
[0002] With the rapid development of IoT and deep learning technologies, more and more are entering the IoT era. A variety of sensors are being applied in various fields, such as electricity consumption monitoring, traffic flow monitoring, and historical building monitoring. Such monitoring aims to better capture and analyze conditions and make adjustments. However, existing monitoring technologies alone cannot predict future data, making it difficult to accurately make meaningful decisions. Deep learning-based time series prediction technology can learn from data and predict future data. Therefore, combining this technology with time series prediction can further enhance monitoring capabilities.
[0003] In the field of deep learning, the application of various time series prediction methods has become relatively mature. The main examples are: 1. The multi-factor spatiotemporal wind speed prediction correlation (MFSTC) model uses the improved PCA-LASSO algorithm to extract characteristic meteorological elements, and adopts the convolutional neural network long short-term memory network to obtain wind speed prediction results; 2. Considering the electricity consumption data and related features of different users, the user data with similar features are integrated and predicted through clustering algorithms to improve the prediction accuracy.
[0004] Although the above method has achieved the prediction of the target data series to a certain extent, it still has certain defects: it is difficult to dynamically build correlations among multiple source factors, and it is difficult to reduce the redundancy of historical sequences and retain the long-term prediction of time series characteristics.
[0005] It's important to note that the real world is a dynamic entity. Using static thinking to analyze and construct relationships between multiple sources of factors is elusive. Therefore, the dynamic correlations between these multiple sources and the target data must be considered and analyzed. Furthermore, long time series contain data spanning days, tens of days, or even hundreds of days. This massive amount of data not only wastes computing resources but can also lead to overfitting in algorithms. Therefore, it's crucial to consider how to remove historical redundancy while preserving the temporal characteristics of long time series.
[0006] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the Invention
[0007] The purpose of the present invention is to provide a method and device for long-term prediction of sensor data by integrating multiple source factors, so as to solve the problem that it is difficult to dynamically establish correlations among multiple source factors, reduce historical sequence redundancy and retain their temporal characteristics during the long-term prediction of sensor data.
[0008] In the scenario where multiple source factors are introduced, the dynamic correlation between the target data and the multi-source factor data is difficult to express, and the introduction of multiple source factors brings redundant information to the neural network training and learning. However, the time series characteristics of time series data are relatively unique, and it is impossible to simply decompose and remove the high-frequency information in its frequency domain.
[0009] To achieve the above objectives, the present invention proposes a method for long-term prediction of sensor data by integrating multiple source factors, comprising the following steps:
[0010] S1. Collect sensor data, perform missing fill and normalization processing on the collected data, and determine the target data and multi-source factors;
[0011] S2. Analyze the dynamic relationship between target data and multi-source factors, extract features and construct dynamic correlations between target data and multi-source factors;
[0012] S3, updating the hidden state data in the multi-source factor encoder through the LSTM network;
[0013] S4, performing frequency domain decomposition on the hidden layer state data, selecting frequency domain data to reduce the redundancy of multi-source factor sequences and retain their temporal characteristics;
[0014] S5. Construct the temporal correlation between historical time series data and current time step data to strengthen the relationship between time points and update the hidden layer data in the time series decoder;
[0015] S6. Based on the hidden state data in the temporal decoder and the data information in the test set, the final long-term prediction result of the target data is obtained through the fully connected layer.
[0016] In one or more embodiments, the collected sensor data is subjected to target data determination as {k 1,t}, and preliminarily analyzed its multi-source factors {k 2,t , k 3,t ,...,k M,t The data is completed by interpolation and normalized, which is expressed as follows:
[0017]
[0018] Among them, f t Represents each data, f min Represents the minimum value of the entire data, f maxRepresents the maximum value of the entire data.
[0019] In one or more embodiments, step S2 includes: 1,t} and multi-source factor data {k 2,t , k 3,t ,...,k M,t} Input to the deep attention module, and extract multi-source factor features through double-layer convolution operation:
[0020] X m,t =Conv2(Conv1({k 1,t},{k 2,t , k 3,t ,...,k M,t}))
[0021] Among them, Conv2(·) and Conv1(·) represent convolution operations, and the size of their convolution kernels is 1. The double-layer convolution module fuses the target data with the multi-source factor data to form a deep feature sequence containing all feature factor information.
[0022] As time goes by, the multi-source factor characteristics and the hidden layer state will change, that is, different correlation coefficients are calculated in different time steps. The change of the correlation coefficient reflects the dynamic correlation between the multi-source factors and the target data. The hidden layer state q of the previous time step is calculated by the tanh function. t-1 and multi-source factor characteristics X m,t Dynamic correlation of e m,t :
[0023]
[0024] in, W1 and U1 are both learnable parameters, and b1 is the bias weight.
[0025] Then, the importance of the correlation score is measured by normalization. The dynamic correlation coefficient is normalized using the Softmax function so that the sum of all its weight values is equal to 1:
[0026]
[0027] Finally, the normalized coefficient α m,t With the original time X m,t Perform weighted calculation to obtain weighted correlation coefficient
[0028]
[0029] Among them, ⊙ represents the Hadamard product.
[0030] The weighted correlation coefficient needs to be updated in the hidden state. Its main function is to update the hidden state and store the dynamic correlation of multiple source factors in the hidden state to achieve effective long-term prediction. The update of the hidden state is as follows:
[0031] q t =F1(q t-1 , K t )
[0032] Among them, F1 is the LSTM network function of the decoder.
[0033] In one or more embodiments, in step S3, the target data and the multi-source influencing factor data are decomposed in the frequency domain, and the hidden layer sequence data q output by the encoder is t Perform one-dimensional discrete Fourier transform to obtain the frequency domain sequence F(q t ), the time series is converted into a frequency domain series as follows:
[0034]
[0035] Here, i is the imaginary unit.
[0036] A small amount of frequency domain information can represent a large amount of time domain information. Therefore, the extraction of Fourier components can effectively represent important information such as historical time series and multi-source factor weights, and reduce the redundancy of historical series. The frequency domain sequence is obtained by selecting the Gaussian distribution of the Fourier component. It is expressed as follows:
[0037]
[0038]
[0039] GSelect stands for Gaussian distribution random selection. The upper and lower limits are set to [-1, 1], the mathematical expectation is 0, and the variance is 1 to generate a random Gaussian distribution matrix.
[0040] The Gaussian distribution selection method maximizes the selection of Fourier components in the frequency domain, helping to preserve the characteristics of the time series. To ensure reasonable component extraction, a 95% confidence interval of [-0.95, 0.95] is selected. This confidence interval preserves the characteristics of the time series as much as possible and removes redundancy in historical sequences. The advantage of the Gaussian distribution selection method is that it can simultaneously extract high-frequency and low-frequency information from the sequence without destroying important time series features.
[0041] Due to the extraction of Fourier components, the frequency domain information will be lost and cannot be restored to the time series of the original length. Therefore, it is necessary to fill the frequency domain information with zeros to obtain the frequency domain sequence ρ f .
[0042]
[0043] Among them, Pad(·) represents the padding operation, and γ is a matrix with a value of 0. The 0 value in the frequency domain will not generate time series information in the time domain, so that redundant information will not be trained during training, which is conducive to improving prediction accuracy. Its purpose is to make ρ f The dimension information of F(q t )’s dimension information remains consistent.
[0044] Finally, the discrete inverse Fourier transform is used to transform the frequency domain data into the time domain data:
[0045]
[0046] Analyzing the correlation between historical time series and current series helps improve the accuracy of prediction. Therefore, the series τ processed by the frequency domain decomposition module is t and the hidden state h t-1 Input into the time attention module to obtain the weight coefficient of the historical time series to the current time step as follows: i,t :
[0047]
[0048] in, W2 and U2 are both learnable parameters, and b2 is the bias weight. i,t is the calculated weight parameter.
[0049] Then, use the Softmax function to m,t The weight parameters are normalized so that all weight values add up to 1:
[0050]
[0051] β n,t is the normalized weight coefficient.
[0052] Then, the hidden state information h n With the temporal attention weight β n,t Perform weighted addition to obtain vector c t , whose expression is as follows:
[0053]
[0054] c t That is the weight information in each time step after weighting.
[0055] In order to combine the time series information of the context, the c t The weight information needs to be consistent with the given target sequence (y1, y2, ..., y T-1) combined with:
[0056] y′ t =W3[y t ;c t ]+b3
[0057] Among them, [y t ;c t ] is y t with c t The combined vectors, W3 and b3 are both weight parameters of the feedforward neural network.
[0058] Finally, c T With h T The joint vector [c T ;h T ] Input to the fully connected layer to obtain the final prediction result
[0059] To quantitatively evaluate the performance of the model proposed in this invention, the root mean square error (RMSE) and mean absolute error (MAE) are used as error evaluation indicators. The smaller the value of the above evaluation indicators, the higher the accuracy of the prediction task. As shown below:
[0060]
[0061]
[0062] Where: n is the number of prediction points; p i represents the true value of the i-th point; p' i Represents the predicted value of the i-th point.
[0063] Compared with the existing technology, the method for long-term prediction of sensor data by integrating multiple source factors according to the embodiment of the present invention is based on a decoder-encoder, a frequency domain decomposition module, an attention module, etc., and solves the problem that it is difficult to dynamically construct correlations among multiple source factors, reduce historical sequence redundancy and retain temporal characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flowchart of a method for long-term prediction of sensor data by fusing multiple source factors according to an embodiment of the present invention;
[0065] Figure 2 It is a schematic diagram of the overall framework of the algorithm of the present invention.
[0066] Figure 3 yes Figure 2 Schematic diagram of the mid-depth feature attention module.
[0067] Figure 4 yes Figure 2Schematic diagram of the mid-frequency domain decomposition module.
[0068] Figure 5 This is an interpretable heat map of dynamic correlation in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.
[0070] Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations such as "include" or "comprising", etc., will be understood to include the stated elements or components but not to exclude other elements or other components.
[0071] Before introducing the specific implementation of the calculation method of the present invention in detail, some basic concepts of deep learning algorithms are briefly introduced.
[0072] The long short-term memory network adds three gating units on the basis of the recurrent neural network, which can effectively solve the gradient disappearance or explosion defects that occur in long sequences.
[0073] The attention mechanism is a model that simulates the human brain's attention. It draws on the human brain's tendency to focus on a specific area at a given moment, while reducing or even ignoring attention elsewhere. The attention mechanism primarily focuses on key information by assigning probabilities, thereby helping long-term and short-term memory networks better capture long-term dependencies, thereby improving the model's prediction accuracy. Compared to traditional mathematical statistical methods, this method is more intelligent and can adaptively adjust the weighting of different key pieces of information.
[0074] Long-term series prediction has a wide range of application scenarios in the real world, such as power resource estimation, disease transmission and spread, economic development forecasting, mountain change trend forecasting, and other practical problems.
[0075] like Figures 1 to 4 As shown, it shows a flowchart of long-term prediction of sensor data by fusing multiple source factors according to one embodiment of the present invention. In one embodiment, long-term prediction of sensor data by fusing multiple source factors includes the following steps.
[0076] Step S1: Collect sensor data, perform gap filling and normalization on the collected data, and determine target data and multi-source factors. The multi-source factors may include sensor data such as weather, temperature, crack length, and vibration intensity.
[0077] The collected sensor data is processed into target data to determine {k 1,t}, and preliminarily analyzed its multi-source factors {k2,t , k 3,t ,…,k M,t The data is completed by interpolation and normalized, which is expressed as follows:
[0078]
[0079] Among them, f t Represents each data, f min Represents the minimum value of the entire data, f max Represents the maximum value of the entire data.
[0080] S2. Analyze the dynamic relationship between target data and multi-source factors, extract features and construct dynamic correlations between target data and multi-source factors;
[0081] Specifically, combined Figure 3 As shown, use Figure 2 and Figure 3 Conv1 and Conv2 shown in the figure, the target data {k 1,t} and multi-source factor data {k 2,t , k 3,t ,...,k M,t The input is fed into the deep attention module, and multi-source factor features are extracted through a double-layer convolution operation:
[0082] X m,t =Conv2(Conv1({k 1,t},{k 2,t , k 3,t ,...,k M,t}))
[0083] Among them, Conv2(·) and Conv1(·) represent convolution operations, and the size of their convolution kernels is 1. The double-layer convolution module integrates the target data with the multi-source factor data to form a deep feature sequence that includes all feature factor information. m,t It represents the target data obtained through the convolution operation and the data information fused with multi-source factors.
[0084] use Figure 2 and Figure 3 The tanh operation shown in the figure calculates different correlation coefficients in different time steps. The change of the correlation coefficient reflects the dynamic correlation between the multi-source factors and the target data. The hidden state q of the previous time step is calculated. t-1 and multi-source factor characteristics X m,t Dynamic correlation of e m,t :
[0085]
[0086] in, W1 and U1 are both learnable parameters, and b1 is the bias weight.
[0087] Then, the importance of the relevance score is measured by normalization, using Figure 2 The Softmax function shown normalizes the dynamic correlation coefficient so that all its weight values add up to 1:
[0088]
[0089] Finally, the normalized coefficient α m,t With the original time X m,t Perform weighted calculation to obtain weighted correlation coefficient
[0090]
[0091] Among them, ⊙ represents the Hadamard product.
[0092] S3, updating the hidden state data in the multi-source factor encoder through the LSTM network;
[0093] The weighted correlation coefficient needs to be updated in the hidden state. Its main function is to update the hidden state and store the dynamic correlation of multiple source factors in the hidden state to achieve effective long-term prediction. Figure 2 The LSTM network shown is used to update the hidden state information:
[0094] q t =F1(q t-1 , K t )
[0095] Among them, F1 is the network function of the decoder's long short-term memory network LSTM (Long Short-Term Memory).
[0096] S4, performing frequency domain decomposition on the hidden layer state data, selecting frequency domain data to reduce the redundancy of multi-source factor sequences and retain their temporal characteristics;
[0097] When frequency domain decomposition of target data and multi-source influencing factor data is performed, Figure 4 As shown, use Figure 2 The DFT in the frequency domain decomposition module shown is used to calculate the hidden sequence data q output by the encoder. t Perform one-dimensional discrete Fourier transform to obtain the frequency domain sequence F(q t ), the time series is converted into a frequency domain series as follows:
[0098]
[0099] Here, i is the imaginary unit.
[0100] A small amount of frequency domain information can represent a large amount of time domain information. Therefore, Fourier component extraction can effectively represent important information such as historical time series and multi-source factor weights, and reduce the redundancy of historical series. Figure 2 The N(μ,σ) in the frequency domain decomposition module shown 2 ) are randomly selected.
[0101] The frequency domain sequence is obtained by selecting the Gaussian distribution of the Fourier component It is expressed as follows:
[0102]
[0103]
[0104] GSelect stands for Gaussian distribution random selection. Setting the upper and lower limits to [-1, 1], the mathematical expectation to 0, and the variance to 1 generates a random Gaussian distribution matrix. Gaussian distribution selection maximizes the selection of Fourier components in the frequency domain, helping to preserve the characteristics of the time series. To ensure reasonable component extraction, a 95% confidence interval of [-0.95, 0.95] is selected. This confidence interval maximizes the preservation of time series characteristics and removes redundancy from historical sequences. The advantage of Gaussian distribution selection is that it can simultaneously extract both high-frequency and low-frequency information from the sequence without destroying important time series features.
[0105] Due to the extraction of Fourier components, the frequency domain information will be lost and cannot be restored to the original length of the time series, so it is necessary to use Figure 2 The zero padding in the frequency domain decomposition module shown above fills the frequency domain information with zero padding to obtain the frequency domain sequence ρ f .
[0106]
[0107] Among them, Pad(·) represents the padding operation, and γ is a matrix with a value of 0. The 0 value in the frequency domain will not generate time series information in the time domain, so that redundant information will not be trained during training, which is conducive to improving prediction accuracy. Its purpose is to make ρ f The dimension information of F(q t )’s dimension information remains consistent.
[0108] Finally, through discrete inverse Fourier transform, use Figure 2 The IDFT in the frequency domain decomposition module shown realizes the transformation of frequency domain data to time domain data:
[0109]
[0110] S5. Build the time series correlation between historical time series data and current time step data to strengthen the relationship between time points;
[0111] Specifically, analyzing the correlation between historical time series and current series helps improve the prediction accuracy. Therefore, the series τ processed by the frequency domain decomposition module is t and the hidden state h t-1 Input into the temporal attention module and use Figure 2 The temporal attention module shown obtains the weight coefficient of the historical time series to the current time step as follows: i,t :
[0112] Then, use the Softmax function to m,t The weight parameters are normalized so that all their weight values add up to 1.
[0113] Next, the hidden state information h n With the temporal attention weight β n,t Perform weighted addition to obtain vector c t .
[0114] In order to combine the time series information of the context, the c t The weight information needs to be consistent with the given target sequence (y1, y2, ..., y T-1 ) combined with:
[0115] y′ t =W3[y t ;c t ]+b3
[0116] Among them, [y t ;c t ] is y t with c t The combined vectors, W3 and b3 are both weight parameters of the feedforward neural network.
[0117] The temporal attention mechanism module is the same as the improved feature attention module. It is a feedforward network. Therefore, the update of its latent space state is as follows:
[0118] q' t =F2(q' t-1 , y' t )
[0119] Among them, F2 represents the long short-term memory network function of the decoder.
[0120] S6. Based on the hidden state data in the multi-source factor encoder and the data information in the test set, the final long-term prediction result of the target data is obtained through the fully connected layer.
[0121] cT With h T The joint vector [c T ;h T ] Input to the fully connected layer to obtain the final prediction result
[0122]
[0123] in, W4 are all learnable parameters, b4 and b5 are bias weights.
[0124] To quantitatively evaluate the performance of the model proposed in this invention, the root mean square error (RMSE) and mean absolute error (MAE) are used as error evaluation indicators. The smaller the value of the above evaluation indicators, the higher the accuracy of the prediction task. As shown below:
[0125]
[0126]
[0127] Where: n is the number of prediction points; p i represents the true value of the i-th point; p' i Represents the predicted value of the i-th point.
[0128] The prediction method of the present invention is used on the NASDAQ 100 Stock public data set, which covers 40,560 rows of data and includes 81 factors. The NDX column is selected as the target data. The first 35,100 data points are used as the training set, and the last 2,730 data points are used as the validation set. The last 2,730 data points are used as the test set for experimental analysis, and compared with SVM (support vector machine), MLP (multi-layer perceptron), LSTM (long short-term memory network), CNN-LSTM (convolution-long short-term memory network) and DA-RNN (dual-stage attention-recurrent neural network), and better results are obtained. The model is evaluated by the evaluation indicators RMSE (root mean square error) and MAE (mean absolute error). The smaller the values of these two evaluation indicators, the higher the prediction accuracy of the model algorithm. The results are shown in Table 1 below.
[0129] The prediction algorithm of the present invention outperformed the aforementioned models in terms of RMSE and MAE on the public dataset. Compared to the DA-RNN method, the RMSE improved by 9.4% and the MAE improved by 0.99%, demonstrating that the prediction algorithm of the present invention also performed well on this dataset.
[0130] Table 1 Experimental results on public datasets
[0131]
[0132] Another specific embodiment of the present invention is the sensor monitoring system for Huanxiu Villa. Settlement sensors, triaxial sensors, and crack sensors are deployed at different locations on the mountain. The model performance is verified using the real sensor data set of Huanxiu Villa, and experimental analysis is conducted on the NASDAQ 100Stock public data set. Figure 5 As shown in Tables 2 and 3, the model achieves better results compared to SVM, MLP, LSTM, CNN-LSTM, and DA-RNN. The model is evaluated using the RMSE and MAE metrics. Smaller values indicate higher prediction accuracy.
[0133] Table 2 Experimental results of Huanxiu Villa dataset
[0134]
[0135] Table 3 Experimental results on public datasets
[0136]
[0137] The foregoing descriptions of specific exemplary embodiments of the present invention are for purposes of illustration and description. These descriptions are not intended to limit the invention to the precise forms disclosed, and it is apparent that many variations and modifications are possible in light of the foregoing teachings. The exemplary embodiments have been selected and described for the purpose of explaining the specific principles of the invention and their practical application, thereby enabling those skilled in the art to realize and utilize a variety of exemplary embodiments of the invention and various options and modifications. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A method for long-term prediction of sensor data integrating multiple source factors, characterized in that: The steps include: S1. Collect sensor data, perform missing fill and normalization processing on the collected data, and determine the target data and multi-source factors; S2. Analyze the dynamic relationship between target data and multi-source factors, extract features and construct dynamic correlations between target data and multi-source factors; S3, updating the hidden state data in the multi-source factor encoder through the LSTM network; S4, performing frequency domain decomposition on the hidden layer state data, selecting frequency domain data to reduce the redundancy of multi-source factor sequences and retain their temporal characteristics; S5. Construct the temporal correlation between the historical time series data and the current time step data to strengthen the relationship between time points and update the hidden state data in the temporal decoder; S6. Based on the hidden state data in the temporal decoder of the multi-source factor encoder and the data information in the test set, the final long-term prediction result of the target data is obtained through the fully connected layer; Wherein, the step S2 includes: Multi-factor data Extract multi-source factor features through double-layer convolution operation: ; in, , It represents the convolution operation, whose convolution kernel size is 1, which fuses the target data with the multi-source factor data to form a deep feature sequence including all feature factor information; Different correlation coefficients are calculated in different time steps, and the hidden state of the previous time step is calculated by the tanh function Multi-factor characteristics Dynamic correlation : ; in, , , are all learnable parameters. is the bias weight; Then, the importance of the relevance scores is measured by normalization.
2. The method for long-term prediction of sensor data integrating multiple source factors according to claim 1, characterized in that: The step S1 comprises: The collected sensor data is used to determine the target data , and preliminarily analyzed its multi-source factors , the data is completed by interpolation and normalized, which is expressed as follows: ; in, Represents each data, Represents the minimum value of the entire data. Represents the maximum value of the entire data.
3. The method for long-term prediction of sensor data integrating multiple source factors according to claim 1, characterized in that: The step S2 further includes: The Softmax function is used to normalize the dynamic correlation coefficient so that the sum of all its weight values is equal to 1: ; Finally, the normalized coefficients With original time Perform weighted calculation to obtain weighted correlation coefficient : ; in, Represents the Hadamard product, and the weighted correlation coefficient is updated in the hidden layer state. ; in, is the LSTM network function of the decoder.
4. The method for long-term prediction of sensor data integrating multiple source factors according to claim 1, wherein: In the above S4, when the target data and the multi-source factor data are decomposed in the frequency domain, the hidden layer sequence data output by the encoder is Perform one-dimensional discrete Fourier transform to obtain frequency domain sequence , converting the time series into a frequency domain series is as follows: ; in, is an imaginary unit; The frequency domain sequence is obtained by selecting the Gaussian distribution of the Fourier component , expressed as follows: ; ; in, Represents random selection of Gaussian distribution, setting the upper and lower limits to [-1, 1], the mathematical expectation to 0, and the variance to 1 to generate a random Gaussian distribution matrix.
5. The method for long-term prediction of sensor data integrating multiple source factors according to claim 4, characterized in that: In the step S5, The sequence obtained by the frequency domain decomposition process and the hidden state , get the weight coefficient of the historical time series to the current time step ; Use the Softmax function to The weight parameters are normalized so that the sum of all weight values is equal to 1; The hidden state information With temporal attention weight Weighted vector ; Will obtain Weight information and given target sequence ( ) combined with: ; in, for The combined vector, and are all weight parameters of the feedforward neural network.
6. The method for long-term prediction of sensor data by integrating multiple source factors according to claim 1, characterized in that: In step S4, and The joint vector Input to the fully connected layer to obtain the final prediction result : ; in, , are all learnable parameters. , is the bias weight.
7. A device for long-term prediction of sensor data integrating multiple source factors, characterized in that: include: The data acquisition and processing module is used to collect sensor data, fill in missing information and perform normalization on the collected data, and determine target data and multi-source factors; Deep feature attention module, used to analyze the dynamic relationship between target data and multi-source factors, extract features and construct dynamic correlations between target data and multi-source factors; A multi-source factor encoder is used to update the hidden state data in the multi-source factor encoder through an LSTM network; The frequency domain decomposition module is used to perform frequency domain decomposition on the hidden state data in the multi-source factor encoder and select the frequency domain data by Gaussian selection to reduce the redundancy of the multi-source factor sequence and retain its temporal characteristics; The temporal attention module is used to construct the temporal correlation between historical time series data and the current time step data; The temporal decoder is used to update the hidden state data in the temporal decoder through the LSTM network; The prediction module is used to obtain the final long-term prediction result of the target data through the fully connected layer based on the hidden state data in the temporal decoder of the multi-source factor encoder and the data information in the test set; The deep feature attention module is also used to convert the target data Multi-factor data Extract multi-source factor features through double-layer convolution operation: ; in, , It represents the convolution operation, whose convolution kernel size is 1, which fuses the target data with the multi-source factor data to form a deep feature sequence including all feature factor information; Different correlation coefficients are calculated in different time steps, and the hidden state of the previous time step is calculated by the tanh function Multi-factor characteristics Dynamic correlation : ; in, , , are all learnable parameters. is the bias weight; Then, the importance of the relevance scores is measured by normalization.
8. The prediction device according to claim 7, wherein: The multi-source factor encoder is used to input the target data and the multi-source factor data into the deep feature attention module, and fuse the target data and the multi-source factor data through a two-layer convolutional neural network to generate a deep feature sequence.
9. The prediction device according to claim 7, wherein: The time series decoder includes: inputting the hidden layer state including target data and multi-source factor weights into the frequency domain decomposition module, converting it into frequency domain data through discrete Fourier transform, randomly selecting Fourier components through Gaussian, and performing zero padding to supplement the frequency domain information, and then converting it into time series data through inverse discrete Fourier transform; inputting the time series data into the time attention module to obtain the weight of the historical time series and the current time step.
Citation Information
Patent Citations
Space-time sequence prediction method and device based on multilayer attention mechanism
CN114492978A
Air quality integrated prediction method based on time sequence missing perception and multi-source factor fusion
CN114841461A