A method for predicting building structure failure
By introducing the Fourier transform convolution module and the time loop attention module into the building structure fault data processing, the problem of non-stationary time data processing is solved, the accuracy of the model's prediction of building structure faults is improved, and the building's safety is ensured. Security and reliability.
Patent Information
- Application Number
- CN202410903008.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-08
AI Technical Summary
In the processing of building structure failure data, the processing of non-stationary time data is a significant challenge, especially because the data may contain multiple nested time period components, sensor data may be missing or noisy, and the response characteristics of building structures change with time. , making it difficult for the model to dynamically adjust to capture these changes.
An FTLN prediction model is proposed, including the Fourier transform convolution module (FTC) and the temporal loop attention module (TLA), which processes the frequency characteristics of building structure fault data through Fourier transform and uses the temporal loop attention module to process Non-stationary time features, combined with linear layers for non-linear transformation to improve data extraction accuracy.
It improves the ability to extract non-stationary time features, enhances the accuracy of the model in predicting building structure failure, and ensures the safety and reliability of the building.
Smart Images

Figure CN118445625B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine learning, and in particular relates to a method for predicting building structure failures. Background Art
[0002] As buildings age and are affected by the natural environment, their structures may suffer varying degrees of damage and aging. Failure prediction of building structures is of great significance in modern construction projects. In structural failure prediction, sensor data is crucial. These sensors may include accelerometers, strain gauges, displacement sensors, and environmental sensors, etc. They are installed in key parts of buildings to continuously collect the dynamic response of the structure and environmental conditions. Predicting this type of building data through advanced technical means can not only ensure the safety of the building, but also extend its service life, optimize maintenance strategies, and reduce maintenance costs.
[0003] In the data processing of building structure failures, the processing of non-stationary time data is a significant challenge. Non-stationary time data refers to data in time series data whose statistical characteristics change over time. This type of data is common in building structure failure data. For example, structural response changes caused by environmental conditions, usage loads, and material aging. The difficulties in processing non-stationary periodic data include: the data may contain multiple nested time period components, sensors may cause data missing or noise due to various reasons, and the response characteristics of the building structure may change over time, which requires the model to be able to dynamically adjust to capture these changes.
[0004] In order to effectively process and analyze non-stationary time data, researchers and engineers have developed a variety of methods and techniques, such as attention mechanisms, which can effectively deal with the difficulties in non-stationary time data. The attention mechanism can adaptively capture complex temporal patterns and long-term dependencies, improve the accuracy of data analysis and the predictive performance of the model. Through the attention method, the model can better monitor and predict structural failures to ensure the safety and reliability of buildings. Summary of the invention
[0005] The present invention provides a method for predicting building structure faults. Aiming at multivariate building structure fault related data, an FTLN prediction model is proposed, which consists of a Fourier transform convolution module (FTC), a temporal recurrent attention module (TLA), and a linear layer.
[0006] The technical solution adopted by the present invention to achieve the above-mentioned purpose specifically comprises the following steps:
[0007] S1. Collect data related to building structure failures, including features and target variables, and perform preprocessing operations on the collected data;
[0008] S2, use moving average filter to denoise the building structure fault data, and use The method is used to perform normalization operations and divide the data into training sets and test sets;
[0009] S3. Construct an FTC module to process the frequency characteristics of input building structure failure data, which specifically includes the following steps:
[0010] S31. Input building structure failure data Perform Fourier transform to convert the building structure failure data in the time domain into the frequency domain, which is expressed as ;
[0011] S32, use multiple convolution kernels to perform convolution operations in the frequency domain, and convert the convolution results in the frequency domain Converted back to the time domain, it is expressed as ;
[0012] S33, through the parameter matrix Implement temporal feature embedding, capture the temporal position information of building structure failures, and obtain feature representation ;
[0013] S4. Represent the input building structure failure data characteristics Split into multiple windows and get the segmented features ;
[0014] S5. Construct a TLA module to process the non-stationary time characteristics of the input building structure failure data, which specifically includes the following steps:
[0015] S51, input features Get the query by linear transformation ,key , and value , and use the convolutional subnetwork to generate the time cycle score matrix ;
[0016] S52, combined with the time cycle score matrix , weighted calculation of attention score ;
[0017] S53, combine the attention scores to get the final output ;
[0018] S6. Recombine the segmented features into the original feature shape ;
[0019] S7, the reorganized features Input linear layer, output prediction result .
[0020] Furthermore, in step S1, the building structure fault related data includes building vibration frequency data, accelerometer data, strain gauge data, displacement sensor data, temperature sensor data and humidity sensor data, and the mean method is used to fill the missing data values. The specific formula is as follows:
[0021] ;
[0022] In the formula, is the mean value of the fill, is the number of missing values, is a non-missing value.
[0023] Furthermore, in step S2, a moving average filter is used to denoise the building structure fault data, and the specific formula is as follows:
[0024] ;
[0025] In the formula, is the window width, is the output value at the nth sampling point after filtering, is the value of the input data at the nth sampling point, is the relative index within the window;
[0026] use The denoised building structure fault data is normalized and divided into a training set and a test set. The specific formula is as follows:
[0027] ;
[0028] In the formula, is the building structure failure data, is the normalized building structure failure data, is the maximum value in the building structure failure data, It is the minimum value in the building structure failure data.
[0029] Furthermore, in the steps S3 and S31, the input building structure fault data Perform Fourier transform, where the frequency domain representation is obtained , the specific formula is as follows:
[0030] ;
[0031] In the formula, for The frequency domain representation of is the number of channels, is the length of the time series in the building structure failure data, is the time domain data of building structure failure data, is a complex exponential function, where is the angular frequency.
[0032] Furthermore, in the steps S3 and S32, multiple convolution kernels are used to perform convolution operations in the frequency domain, and the specific formula is as follows:
[0033] ;
[0034] In the formula, is the frequency domain result after the convolution operation, where is the number of channels, is the length of the time series in the building structure failure data, In the frequency domain The convolution operation, the convolution kernel is , For frequency domain input Middle sampling point The value of is the convolution kernel At the sampling point The weight of
[0035] The convolution result in the frequency domain Converted back to the time domain, it is expressed as , the specific formula is as follows:
[0036] ;
[0037] In the formula, is the output in the time domain, is the frequency domain result after the convolution operation, is the length of the building structure failure data.
[0038] Furthermore, in the steps S3 and S33, the parameter matrix Implement temporal feature embedding, capture the temporal position information of building structure failures, and obtain feature representation , the specific formula is as follows:
[0039] ;
[0040] In the formula, is the parameter matrix, is the output in the time domain, is the final feature representation.
[0041] Furthermore, in step S4, the input feature Split according to the specified window size. The specific formula is as follows:
[0042] ;
[0043] In the formula, For the The segmentation features of the layer, is the window size, is the sliding step length.
[0044] Furthermore, in the steps S5 and S51, the segmented features The query is obtained by linear transformation ,key Sum , the specific formula is as follows:
[0045] ;
[0046] ;
[0047] ;
[0048] In the formula, , , is the weight matrix, is the attention dimension;
[0049] The convolutional subnetwork is used to generate the time cycle score matrix. The specific formula is as follows:
[0050] ;
[0051] In the formula, For the Layer and The time cycle score matrix of attention calculation units, For the The segmentation features of the layer, is the deformable convolution, is the activation function, is the weight matrix, is the offset, indicating the position adjustment of the convolution kernel.
[0052] Furthermore, the steps S5 and S52 are combined with the time cycle score matrix , calculate the attention score , the specific formula is as follows:
[0053] ;
[0054] In the formula, is the scaling factor, Count the number of attention units For the Layer, The query matrix of the attention calculation unit, For the Layer, The key matrix of the attention calculation unit, For the Layer, The value matrix of the attention calculation unit, For the Layer, The time cycle score matrix of attention calculation units, where Represents the computational unit index in the attention mechanism.
[0055] Furthermore, in the steps S5 and S53, after calculating the attention score of each attention calculation unit, the outputs of all attention calculation units are combined and spliced to obtain the final attention output through linear transformation. , the specific formula is as follows:
[0056] ;
[0057] In the formula, is the linear transformation matrix, Score for attention, For splicing operation.
[0058] Furthermore, in step S6, the attention output Recombined , the specific formula is as follows:
[0059] ;
[0060] In the formula, is the final recombined feature, is the window size, is the sliding step length.
[0061] Furthermore, in step S7, the reorganized features Input linear layer for further nonlinear transformation and output the final prediction result , the specific formula is as follows:
[0062] ;
[0063] In the formula, is the predicted value, is the output layer weight matrix, is the bias term of the linear layer, The final recombined features.
[0064] In summary, due to the adoption of the present technical solution, the beneficial effects of the present invention are as follows: The present invention proposes a FTLN prediction model, which is applied to the building structure fault prediction scenario, including a Fourier transform convolution module, a time recurrent attention module and a linear layer. The Fourier transform convolution module processes the frequency characteristics of the input building structure fault data, the time recurrent attention module processes the non-stationary time characteristics of the input building structure fault data, and the linear layer is used for further nonlinear transformation of the building structure fault data, thereby improving the extraction of non-stationary time characteristics in the data, thereby improving the accuracy of the model prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A step diagram of a building structure failure prediction method.
[0066] Figure 2 This is the structural diagram of the FTLN prediction model.
[0067] Figure 3 This is the coding layer structure diagram.
[0068] Figure 4 This is the structure diagram of the time-recurrent attention module.
[0069] Figure 5 Fitting effect diagram of building structure failure prediction for FTLN model. DETAILED DESCRIPTION
[0070] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0071] See also Figure 1-Figure 5 The present invention provides a technical solution: a method for predicting building structure faults, which processes the frequency characteristics of input building structure fault data by constructing a Fourier transform convolution module, and processes the non-stationary time characteristics of input building structure fault data by constructing a time cycle attention module, thereby improving the extraction of non-stationary time characteristics in building structure fault data, thereby improving the accuracy of the model in predicting building structure faults. The specific steps are as follows: Figure 1 shown.
[0072] Furthermore, in step S1, data related to building structure failures are collected, including building vibration frequency data, accelerometer data, strain gauge data, displacement sensor data, temperature sensor data, and humidity sensor data, and the mean method is used to fill in the missing data values. The specific formula is as follows:
[0073] ;
[0074] In the formula, is the mean value of the fill, is the number of missing values, is a non-missing value.
[0075] Furthermore, in step S2, a moving average filter is used to denoise the building structure fault data, and the specific formula is as follows:
[0076] ;
[0077] In the formula, is the window width, is the output value at the nth sampling point after filtering, is the value of the input data at the nth sampling point, is the relative index within the window;
[0078] use The denoised building structure fault data is normalized and the data is divided into a training set and a test set at a ratio of 8:2. The specific formula is as follows:
[0079] ;
[0080] In the formula, is the building structure failure data, is the normalized building structure failure data, is the maximum value in the building structure failure data, It is the minimum value in the building structure failure data.
[0081] Furthermore, the position of the FTC module constructed in step S3 is as follows: Figure 2 As shown, it is responsible for the building structure fault data just input in S31 Perform Fourier transform, where the frequency domain representation is obtained , the specific formula is as follows:
[0082] ;
[0083] In the formula, for The frequency domain representation of is the number of channels, is the length of the time series in the building structure failure data, is the time domain data of building structure failure data, is a complex exponential function, where is the angular frequency.
[0084] Furthermore, in the steps S3 and S32, multiple convolution kernels are used to perform convolution operations in the frequency domain, and the specific formula is as follows:
[0085] ;
[0086] In the formula, is the frequency domain result after the convolution operation, where is the number of channels, is the length of the time series in the building structure failure data, In the frequency domain The convolution operation, the convolution kernel is , For frequency domain input Middle sampling point The value of is the convolution kernel At the sampling point The weight of
[0087] The convolution result in the frequency domain Converted back to the time domain, it is expressed as , the specific formula is as follows:
[0088] ;
[0089] In the formula, is the output in the time domain, is the frequency domain result after the convolution operation, is the length of the building structure failure data.
[0090] Furthermore, in the steps S3 and S33, the parameter matrix Implement temporal feature embedding, capture the temporal position information of building structure failures, and obtain feature representation , the specific formula is as follows:
[0091] ;
[0092] In the formula, is the parameter matrix, is the output in the time domain, is the final feature representation.
[0093] Furthermore, in step S4, the input feature Split according to the specified window size. The location of the feature window segmentation step is as follows: Figure 2 As shown, the specific formula is as follows:
[0094] ;
[0095] In the formula, For the The segmentation features of the layer, is the window size, is the sliding step length.
[0096] Furthermore, the TLA module position constructed in step S5 is as follows: Figure 3 As shown, in S51, the segmented features The query is obtained by linear transformation ,key Sum , the specific formula is as follows:
[0097] ;
[0098] ;
[0099] ;
[0100] In the formula, , , is the weight matrix, is the attention dimension;
[0101] The convolutional subnetwork is used to generate the time cycle score matrix. The specific formula is as follows:
[0102] ;
[0103] In the formula, For the Layer and The time cycle score matrix of attention calculation units, For the The segmentation features of the layer, is the deformable convolution, is the activation function, is the weight matrix, is the offset, indicating the position adjustment of the convolution kernel.
[0104] Furthermore, the steps S5 and S52 are combined with the time cycle score matrix , calculate the attention score , the specific formula is as follows:
[0105] ;
[0106] In the formula, is the scaling factor, Count the number of attention units For the Layer, The query matrix of the attention calculation unit, For the Layer, The key matrix of the attention calculation unit, For the Layer, The value matrix of the attention calculation unit, For the Layer, The time cycle score matrix of attention calculation units, where Represents the computational unit index in the attention mechanism.
[0107] Furthermore, the TLA module structure constructed in step S5 is as follows: Figure 4 As shown, in S53, after calculating the attention score of each attention calculation unit, the outputs of all attention calculation units are combined and spliced, and the final attention output is obtained through linear transformation. , the specific formula is as follows:
[0108] ;
[0109] In the formula, is the linear transformation matrix, Score for attention, For splicing operation.
[0110] Furthermore, in step S6, the attention output Recombined , the specific formula is as follows:
[0111] ;
[0112] In the formula, is the final recombined feature, is the window size, is the sliding step length.
[0113] Furthermore, in step S7, the reorganized features Input linear layer for further nonlinear transformation and output the final prediction result , the specific formula is as follows:
[0114] ;
[0115] In the formula, is the predicted value, is the output layer weight matrix, is the bias term of the linear layer, The final recombined features.
[0116] Furthermore, the 150-day building structure failures were preprocessed and then input into the FTLN prediction model. Adam was selected as the optimizer, the kernel size of the Fourier transform convolution was set to 3, and the optimal hyperparameters were determined by grid search. The learning rate range was , the number of attention computation units of the time-cycle attention ranges from , the results of building structure failure prediction are as follows Figure 5 As shown, the triangular solid line is the true value, and the dotted line is the predicted value. It can be seen from the figure that the model proposed in the present invention can achieve accurate prediction of building structure failures, and the predicted value is basically consistent with the true value.
Claims
1. A method for predicting building structure failures, It is characterized in that The following steps are involved: S1. Collect data related to building structure failures. Including features and target variables, preprocessing operations are performed on the collected data; S2, using a moving average filter to denoise the building structure fault data, and using the Max-Min method to normalize the data, dividing the data into a training set and a test set; S3. Construct a Fourier transform convolution module, referred to as FTC module, to process the frequency characteristics of input building structure fault data, specifically including the following steps: S31, input building structure fault data X∈R 1×C×L , where C is the number of channels, L is the length of the time series in the building structure failure data, and Fourier transform is performed to convert the building structure failure data in the time domain into the frequency domain, expressed as X f ∈R 1×C×L ; S32, use multiple convolution kernels to perform convolution operation in the frequency domain, and convert the convolution result Y in the frequency domain f ∈R 1×c×L Convert back to the time domain, represented as Y∈R 1×C×L ; S33, through the parameter matrix E po s realizes temporal feature embedding, captures the temporal position information of building structure failure, and obtains feature representation X point ; S4. Represent the input building structure fault data feature X point Split into multiple windows and get the segmented features S5. Construct a time-recurrent attention module, referred to as a TLA module, to process the non-stationary time characteristics of the input building structure fault data, specifically including the following steps: S51, input features The query Q, key K, and value V are obtained through linear transformation, and the convolutional subnetwork is used to generate the time cycle score matrix S52, combined with the time cycle score matrix Weighted calculation of attention score Attention(Q, K, V); S53, combine the attention scores to get the final output S6. Recombine the segmented features into the original feature shape S7, the reorganized features Input the linear layer and output the predicted result Y.
2. A method for predicting building structure failure according to claim 1, It is characterized in that In step S31, the building structure fault data X∈R is input. 1×C×L Perform Fourier transform, where the frequency domain representation X is obtained f ∈R 1×c×L , the specific formula is as follows: In the formula, X f ∈R 1×C×L For X∈R 1×C×L The frequency domain representation of the building structure failure data, C is the number of channels, L is the length of the time series in the building structure failure data, f(t) is the time domain data in the building structure failure data, e -iwt is a complex exponential function, where w is the angular frequency.
3. A method for predicting building structure failure according to claim 1, It is characterized in that In step S32, multiple convolution kernels are used to perform convolution operation in the frequency domain. The specific formula is as follows: Where Y f ∈R 1×C×L is the frequency domain result after the convolution operation, where C is the number of channels, L is the length of the time series in the building structure failure data, Conv(X f , W) is the frequency domain X f The convolution operation, the convolution kernel is W, x(p k ) is the frequency domain input X f The sampling point p k The value of W ij (p k ) is the convolution kernel W ij At the sampling point p k The weight of The convolution result Y in the frequency domain f ∈R 1×C×L Convert back to the time domain, represented as Y∈R 1×C×L , the specific formula is as follows Where Y is the output in the time domain, Y f (k) is the frequency domain result after the convolution operation, and N is the length of the building structure failure data.
4. A method for predicting building structure failure according to claim 1, It is characterized in that In step S33, the parameter matrix E pos Implement temporal feature embedding, capture the temporal position information of building structure failures, and obtain feature representation X point , the specific formula is as follows: X point =Y+E pos ; In the formula, E pos is the parameter matrix, Y is the output in the time domain, X poini is the final feature representation.
5. A method for predicting building structure failure according to claim 1, It is characterized in that In step S4, the input feature X point Split according to the specified window size. The specific formula is as follows: In the formula, is the segmentation feature of the lth layer, scale (l) is the window size, stride (l) is the sliding step length.
6. A method for predicting building structure failure according to claim 1, It is characterized in that In step S51, the segmented features The query Q, key K and value V are obtained through linear transformation respectively. The specific formula is as follows: In the formula, is the weight matrix, d k is the attention dimension; The convolutional subnetwork is used to generate the time cycle score matrix. The specific formula is as follows: In the formula, is the time cycle score matrix of the l-th layer and the s-th attention calculation unit, is the segmentation feature of the lth layer, DeformableConv is the deformable convolution, σ is the activation function, W p is the weight matrix, Δp i is the offset, indicating the position adjustment of the convolution kernel.
7. A method for predicting building structure failure according to claim 1, It is characterized in that In step S52, the time cycle score matrix is combined Calculate the attention score Attention(Q, K, V). The specific formula is as follows: In the formula, is the scaling factor, M is the number of attention calculation units, Q (l,m) is the query matrix of the lth layer and the mth attention calculation unit, K (l,m) is the key matrix of the l-th layer and the m-th attention calculation unit, V (l,m) is the value matrix of the lth layer and the mth attention calculation unit, is the time cycle score matrix of the l-th layer and the m-th attention calculation unit, where m represents the calculation unit index in the attention mechanism.
8. A method for predicting building structure failure according to claim 1, It is characterized in that After calculating the attention score of each attention calculation unit in step S53, the outputs of all attention calculation units are combined and spliced to obtain the final attention output through linear transformation The specific formula is as follows: Where W o is the linear transformation matrix, Attention(Q, K, V) is the attention score, and Concat is the concatenation operation.
9. A method for predicting building structure failure according to claim 1, It is characterized in that In step S6, the output of the TLA module Recombined The specific formula is as follows: In the formula, is the final recombined feature, scale (l) is the window size, stride (l) is the sliding step length.
