Transform-based seismic wave abstract feature extraction and multi-feature combination generation method
By using a Transformer-based method for extracting abstract features of seismic waves and generating multiple features through combination, the problem of insufficient extraction of deep, high-dimensional features in seismic wave synthesis is solved, thereby improving the accuracy and reliability of seismic wave data and enhancing the results of structural seismic analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-03-17
AI Technical Summary
Existing technologies lack effective methods for extracting and synthesizing deep, high-dimensional features in seismic wave synthesis, resulting in insufficient fitting of ground motion data and affecting the accuracy and reliability of structural seismic analysis.
A method based on Transformer for seismic wave abstract feature extraction and multi-feature combination generation is adopted. By combining the Transformer self-attention module and encoder-decoder, a deep learning model is used to extract and generate features from seismic wave data. Combined with data preprocessing and Fourier transform, new seismic wave data is generated.
It enables the generation and analysis of seismic wave data, improves the accuracy and reliability of seismic wave data, provides more representative input, and significantly improves the results of structural seismic analysis.
Smart Images

Figure CN121679700A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of structural seismic analysis technology, and in particular to a method for extracting abstract features of seismic waves and generating multiple features based on Transformer. Background Technology
[0002] my country is located at the intersection of multiple seismic zones, experiencing frequent earthquakes. Seismic safety analysis of building structures has always been a crucial topic in civil engineering. Currently, the mainstream method for structural seismic analysis is vulnerability analysis. The key to the effective implementation of this method lies in the reasonable selection of seismic waves. Only by selecting seismic motion data that closely matches the characteristics of the site can the reliability of the analysis results be guaranteed. While the widely used wave selection method based on the design response spectrum can match the basic characteristics of local seismic motion to a certain extent, the degree of fit between the standard response spectrum and the actual response of local seismic motions may still differ significantly due to the randomness of seismic motion.
[0003] While local ground motion data most accurately reflects regional geological conditions, its availability is typically extremely limited, making it insufficient for seismic vulnerability analysis. Against this backdrop, seismic wave synthesis technology based on limited local ground motion data may be a potential solution in this field. However, current mainstream seismic wave synthesis techniques are mostly based on shallow ground motion characteristics such as acceleration, velocity, spectral acceleration, and duration. Due to a lack of effective technical means, existing ground motion feature extraction and synthesis methods remain insufficient in their ability to extract deep, high-dimensional features of ground motions. Summary of the Invention
[0004] The main objective of this invention is to provide a Transformer-based method for extracting abstract features of seismic waves and generating multiple features through combination, thereby improving the robustness of deep learning models in post-earthquake assessment scenarios. The proposed method can utilize a small portion of finely labeled image data and a large amount of image data with only coarse labels for collaborative training, overcoming the problem of insufficient high-quality data in the field of post-earthquake assessment.
[0005] Another objective of this invention is to propose a device for extracting abstract features of seismic waves and generating multiple features based on Transformer.
[0006] To achieve the above objectives, a first aspect of the present invention proposes a method for extracting abstract features of seismic waves and generating multiple features based on Transformer, comprising: Collect and establish a seismic wave dataset containing different intensity levels and different geographical locations. Perform standardized preprocessing on each ground motion in the dataset and establish a data quality inspection mechanism to remove abnormal data and records with excessive noise interference. The seismic motion signal is input into the Fourier decomposition module and decomposed into waveforms of different frequency components. These components are then combined into a two-dimensional matrix and subjected to block encoding to form a standardized feature matrix. The standardized feature matrix is input into the Transformer self-attention module, which calculates the feature block association weight matrix through multiple attention heads, performs a non-linear transformation in combination with the feedforward neural network, and outputs the global self-attention feature matrix. The global self-attention feature matrix is subjected to multiple rounds of convolution and downsampling operations, and then transformed into a deep abstract feature vector through global average pooling. The symmetric encoder-decoder is reconstructed by processing the deep abstract feature vectors through fully connected layers, multiple rounds of upsampling, channel concatenation, and convolution, and then fusing them with the initial feature map to restore the original length of the ground motion signal. Using feature map differences as the optimization objective, the network parameters are optimized using a loss function and optimizer, and the effectiveness of the features is verified by correlation coefficient and signal-to-noise ratio. Historical ground motion records are input into the network to obtain feature vectors. An empirical probability distribution model of the feature vectors is established. New feature vectors are reconstructed by combining them through probabilistic random sampling.
[0007] Optionally, the seismic wave dataset should contain no fewer than 5,000 ground motion records; the standardization preprocessing uses the maximum absolute value normalization method to uniformly scale the amplitude value of each ground motion record to the range of [-1,1]; the data quality inspection mechanism removes abnormal data by calculating the signal-to-noise ratio, peak acceleration rationality, and waveform continuity indicators.
[0008] Optionally, the Fourier decomposition module decomposes the N-length seismic motion signal into 64 waveforms with different frequency components using the Fast Fourier Transform algorithm; the block coding uses a fixed-size sliding window to segment the waveform, with a sliding window length of N / 64, converting each waveform into a feature vector of length 64; the final standardized feature matrix has a size of 64×64, where the rows of the matrix represent different frequency components and the columns represent time-domain features.
[0009] Optionally, the Transformer self-attention module computes the associated weight matrix of feature blocks in parallel using 8 attention heads; the feedforward neural network is set to two layers, the first layer uses the ReLU activation function to expand the feature dimension, and the second layer uses a linear transformation to restore the original dimension; the size of the output global self-attention feature matrix is kept at 64×64.
[0010] Optional operations for multi-layered convolutional neural networks include: Perform a 3×3 convolution operation on the global self-attention feature matrix, using 16 convolution kernels, to generate an initial feature map K of size 64×64×16; First downsampling: Perform 3×3 convolution and 2×2 max pooling downsampling on feature map K to obtain feature map K1 with size 32×32×32; Second downsampling: 3×3 convolution and 2×2 max pooling are performed on feature map K1 to obtain feature map K2 with size 16×16×64; Third downsampling: 3×3 convolution and 2×2 max pooling are performed on feature map K2 to obtain feature map K3 with size 8×8×128; Global average pooling: Compresses the spatial dimension of feature map K3, converting it into eight 128-dimensional deep abstract feature vectors L1-L8.
[0011] Optional, the reconstruction operation of the symmetric encoder-decoder includes: Fully connected layer reconstruction: The deep abstract feature vectors L1-L8 are reconstructed into a feature map U3 with a size of 8×8×128 through a fully connected layer; First upsampling: The feature map U3 is upsampled by 2 times bilinearly to 16×16×128, concatenated with the channel dimension of the feature map K2, and then processed by 3×3 convolution to obtain the feature map U2 with a size of 16×16×64. Second upsampling: The feature map U2 is upsampled by 2 times bilinearly to 32×32×64, concatenated with the channel dimension of the feature map K1, and then processed by 3×3 convolution to obtain the feature map U1 with a size of 32×32×32; Third upsampling: The feature map U1 is upsampled by 2 times bilinearly to 64×64×32, concatenated with the feature map K channel dimension, and then processed by 3×3 convolution to obtain the feature map U with a size of 64×64×16; Feature fusion and restoration: The initial feature map K and feature map U are added and fused element by element, and restored to a 64×64×1 feature map AS by 1×1 convolution. Then, the original length of the ground motion signal is obtained by inverse block coding and inverse Fourier transform.
[0012] Optionally, self-supervised training takes the Frobenius norm difference between the reconstructed feature map AS and the global self-attention feature matrix A as the main optimization objective; the mean squared error loss function is adopted, and the network parameters are optimized end-to-end through backpropagation in combination with the Adam optimizer; the feature validity is verified by calculating the correlation coefficient and signal-to-noise ratio between the reconstructed signal and the original input signal.
[0013] Optionally, new feature vectors can be combined through probabilistic random sampling, including: Feature vector acquisition: Input M historical ground motion records into the trained network to obtain M sets of feature vectors, each set containing 8 128-dimensional vectors; Probabilistic model establishment: For each feature vector position i, the distribution of that position in the M groups of features is statistically analyzed, where the higher the frequency of historical ground motion, the greater the sampling probability weight of the corresponding feature vector. Random sampling and generation: Independently sample from 8 feature locations to form new feature vector groups Ln1-Ln8, input them into the reconstruction module to generate new ground motion records, and control the number of samplings to achieve large-scale generation.
[0014] Optional, also includes: The newly generated ground motion records are analyzed in the time and frequency domains, and compared with ground motion records generated by traditional methods. Based on the evaluation results, the sampling strategy and model parameters are optimized.
[0015] To achieve the above objectives, a second aspect of the present invention provides a Transformer-based device for extracting abstract features of seismic waves and generating multiple features by combining them, comprising: The first module is used to collect and build a seismic wave dataset containing different intensity levels and different geographical locations. It performs standardized preprocessing on each ground motion in the dataset and establishes a data quality inspection mechanism to remove abnormal data and records with excessive noise interference. The second module is used to decompose the seismic motion signal into the Fourier decomposition module into waveforms of different frequency components, combine them into a two-dimensional matrix, and perform block encoding processing to form a standardized feature matrix. The third module is used to input the standardized feature matrix into the Transformer self-attention module, calculate the feature block association weight matrix through multiple attention heads, perform nonlinear transformation in combination with the feedforward neural network, and output the global self-attention feature matrix. The fourth module is used to perform multiple rounds of convolution and downsampling operations on the global self-attention feature matrix, and then convert it into a deep abstract feature vector through global average pooling. The fifth module is used to reconstruct the symmetric encoder-decoder. It processes the deep abstract feature vector through fully connected layers and multiple rounds of upsampling, channel concatenation, and convolution, and then restores the original length of the ground motion signal after fusing it with the initial feature map. The sixth module is used to optimize network parameters by using the feature map difference as the optimization objective and employing a loss function and optimizer. The effectiveness of the features is verified by the correlation coefficient and signal-to-noise ratio. The seventh module is used to input historical ground motion records into the network to obtain feature vectors, establish an empirical probability distribution model of the feature vectors, and reconstruct new ground motion records by combining new feature vectors through probabilistic random sampling.
[0016] The embodiments of the present invention have the following beneficial effects: the present invention can generate more high-quality seismic wave data that conforms to local geological conditions based on limited real ground motion data, providing more representative input for structural vulnerability analysis and significantly improving the accuracy and reliability of structural seismic analysis results. Attached Figure Description
[0017] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 A flowchart illustrating a method for extracting abstract seismic wave features and generating multiple features based on Transformer, provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the seismic depth feature extraction and upsampling method provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a seismic motion generation method provided in an embodiment of the present invention; Figure 4 A structural diagram of a device for extracting abstract seismic wave features and generating multiple features based on Transformer, provided in an embodiment of the present invention; Detailed Implementation It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0019] In recent years, deep learning technology has developed rapidly, especially the Transformer model architecture, which is adept at processing time-series data and iterates rapidly. This may provide a new and powerful tool for solving the problem of deep feature extraction of seismic motion.
[0020] In view of this, this invention proposes a method for extracting abstract features of seismic waves and generating multiple features based on Transformer. This method can generate more high-quality seismic wave data that conforms to local geological conditions based on limited real ground motion data, providing more representative input for structural vulnerability analysis, thereby improving the accuracy and reliability of structural seismic analysis results.
[0021] The following describes, with reference to the accompanying drawings, a method and apparatus for extracting abstract features of seismic waves and generating multiple features based on Transformer, according to an embodiment of the present invention.
[0022] This embodiment provides a method for extracting abstract features of seismic waves and generating multiple features based on Transformer. For example... Figure 1 , Figure 2 and Figure 3 As shown, the method includes the following steps: S1. Collect and establish a seismic wave dataset containing different intensity levels and geographical locations. Perform standardized preprocessing on each ground motion in the dataset and establish a data quality inspection mechanism to remove abnormal data and records with excessive noise interference.
[0023] In this embodiment, step S1 is first performed, which involves collecting and establishing a seismic wave dataset containing different intensity levels and geographical locations. In this step, a large amount of ground motion data is obtained from public earthquake databases, regional seismic monitoring networks, and historical strong earthquake records. This ensures that the constructed dataset covers multiple intensity levels from minor to moderate to strong earthquakes, and also encompasses ground motion types under different geological structures, site types, and focal depths, thereby guaranteeing the diversity and breadth of the data samples. In this embodiment, the established dataset contains no fewer than 5000 ground motion records to ensure sufficient data for model training and to enable the training results to have higher statistical stability and generalization ability.
[0024] After data collection, each ground motion record in the dataset undergoes standardized preprocessing. This embodiment employs maximum absolute value normalization to uniformly scale the amplitude value of each ground motion record to the [-1, 1] interval. This normalization method not only eliminates dimensional differences between different records caused by variations in instrument sensitivity, magnitude, or station amplification, but also enables the subsequent model to converge more stably during training, thus accelerating training speed and improving training effectiveness. Simultaneously, the time-series characteristics of the ground motion waveform are preserved during preprocessing, allowing the model to fully learn the effective physical properties of seismic waves.
[0025] In this embodiment, a rigorous data quality inspection mechanism is also established to ensure that the data input into the final model has high reliability and representativeness. This quality inspection mechanism includes, but is not limited to, calculating the signal-to-noise ratio (SNR) of the ground motion records, analyzing whether their peak ground acceleration (PGA) is within a reasonable range, and detecting the continuity and completeness of the waveform. Records with excessively low SNR, significantly abnormal PGA, long periods of missing data in the waveform, abrupt changes, or severe interference will be automatically identified as unqualified data and removed from the dataset. Through the above quality screening steps, records with excessive noise interference or measurement errors can be effectively eliminated, making the ground motion data used for model training more realistic, accurate, and reliable, thereby improving the model's performance in subsequent prediction or generation tasks.
[0026] S2 inputs the seismic motion signal into the Fourier decomposition module, decomposes it into waveforms of different frequency components, combines them into a two-dimensional matrix, and performs block encoding processing to form a standardized feature matrix.
[0027] In this embodiment, step S2 is used to convert the ground motion signal into a standardized feature matrix with a uniform format and significant frequency domain characteristics, so as to facilitate processing by the subsequent deep feature extraction module. First, the original ground motion signal of length N is input into the Fourier decomposition module, and frequency domain decomposition is performed using the Fast Fourier Transform (FFT) algorithm. The FFT can convert time-domain signals into frequency-domain signals with high computational efficiency, enabling accurate description of the energy distribution characteristics of the ground motion at each frequency component. In this embodiment, the ground motion signal is decomposed into 64 different frequency components, each corresponding to a specific frequency band, to ensure that the precision of the frequency domain division meets the analysis requirements of the ground motion characteristics.
[0028] After Fourier decomposition, the resulting 64 frequency-domain waveforms of length N are arranged in ascending order of frequency and combined to form a 64×N two-dimensional matrix. Each row of this matrix represents a waveform corresponding to a specific frequency component, and each column corresponds to the frequency-domain response value of the original seismic motion at different times. In this way, the structural characteristics of the seismic motion in the frequency domain can be completely preserved, enabling subsequent processing to more accurately capture the correlation between different frequency bands.
[0029] To further standardize the feature representation format and enhance the model's feature expressive capabilities, this embodiment performs block encoding on each waveform. Specifically, a fixed-size sliding window is used to segment each waveform of length N, with the window length set to N / 64, dividing each waveform into 64 consecutive segments of equal length. This segmentation method converts each waveform into a feature vector of length 64, thus mapping the features of waveforms of different lengths to a unified dimensional space, facilitating centralized processing by the model. Finally, the processed feature vectors of all frequency components are combined to form a 64×64 standardized feature matrix, where the row dimension represents different frequency components and the column dimension represents the corresponding segmented time-domain features. This matrix not only significantly compresses the original data size but also maintains the key correlation between frequency and time-domain features in its structure, serving as a unified input format for subsequent deep feature extraction modules and improving the overall performance of the model in seismic motion analysis and generation tasks.
[0030] S3 inputs the standardized feature matrix into the Transformer self-attention module, calculates the feature block association weight matrix through multiple attention heads, performs nonlinear transformation in combination with the feedforward neural network, and outputs the global self-attention feature matrix.
[0031] In this embodiment, step S3 is used to perform global correlation modeling on the normalized feature matrix in the joint frequency-time feature space to obtain a self-attention feature representation containing deep spatiotemporal features of seismic motion. Specifically, the 64×64 normalized feature matrix obtained in step S2 is used as input and fed into the Transformer self-attention module. In this embodiment, the Transformer self-attention module is configured with eight parallel attention heads, each of which models the correlation between different feature blocks in the feature matrix. Through the multi-head mechanism, different attention heads can focus on different combinations of frequency components, features of different time periods, and coupling patterns of frequency and time, thereby capturing feature interaction information of multiple scales and different emphases in the same layer structure.
[0032] During computation, the Transformer self-attention module first generates query vectors, key vectors, and value vectors based on the input 64×64 feature matrix, and then calculates the association weight matrix between feature blocks within each attention head. By normalizing the association weights, a measure of the relative importance between different feature blocks can be obtained, allowing features with stronger correlations to have a greater impact on the output. Each attention head outputs its corresponding weighted feature representation, and then the outputs of the eight attention heads are concatenated along the channel dimension, followed by dimensional integration through a linear transformation to obtain a comprehensive self-attention representation that includes multi-view feature interaction information.
[0033] In this embodiment, to further enhance the nonlinear expressive power and modeling complexity of the features, the output of the self-attention module undergoes nonlinear transformation processing via two layers of feedforward neural networks. Specifically, the first layer of the feedforward neural network employs the ReLU activation function and expands the feature dimension, mapping the features in a high-dimensional space, thereby enhancing the model's ability to fit complex nonlinear relationships. The second layer of the feedforward neural network uses a linear transformation to restore the expanded feature dimension to its original dimension, ensuring that the output features are dimensionally consistent with the input features, facilitating integration with other modules. This "expansion-nonlinear activation-restoration" structural design significantly enhances the richness and discriminative power of feature representation without altering the overall feature dimension.
[0034] Finally, after processing by the Transformer self-attention module and the feedforward neural network, a 64×64 feature matrix A that integrates global self-attention information is output. Each element in feature matrix A carries not only information about the location feature itself, but also contains the correlation information between it and all other feature blocks, realizing the global dependency modeling of the seismic signal in the frequency and time dimensions. Through the above processing, a deep spatiotemporal feature representation of the seismic signal is formed in this embodiment, providing a high-quality feature foundation for subsequent seismic generation, classification, or other application tasks.
[0035] S4 performs multiple rounds of convolution and downsampling operations on the global self-attention feature matrix, and then converts it into a deep abstract feature vector through global average pooling.
[0036] In this embodiment, step S4 is used to perform multiple rounds of convolution and downsampling operations on the global self-attention feature matrix to progressively compress the spatial dimension and extract multi-scale deep features. Finally, the high-dimensional feature map is converted into a deep abstract feature vector through global average pooling, providing a compact and highly discriminative feature representation for subsequent generation or discrimination modules.
[0037] Specifically, the global self-attention feature matrix A obtained in step S3 is used as input. The feature matrix A has a size of 64×64 and can be regarded as a single-channel two-dimensional feature map. First, a 3×3 convolution operation is performed on the feature matrix A. The convolution layer has 16 convolution kernels. By sliding the convolution kernels in the spatial dimension, the features of adjacent regions are locally weighted and aggregated to extract local spatial correlation and texture features. After this convolution operation, an initial feature map K with a size of 64×64×16 is obtained. That is, while keeping the spatial size unchanged at 64×64, the number of channels is expanded to 16 feature channels to represent different types of local response patterns.
[0038] In this embodiment, the feature map K is then subjected to a first downsampling feature extraction. Specifically, a 3×3 convolution operation is performed on the feature map K, with 32 kernels, to further extract richer and more complex local features and expand the features along the channel dimension. After this convolution operation, 2×2 max pooling downsampling is used to compress the spatial size of the feature map, reducing the original 64×64 spatial resolution to 32×32, thereby reducing the spatial size of the feature map and highlighting salient feature regions with high response intensity. After the above combined convolution and pooling operations, a feature map K1 with a size of 32×32×32 is obtained.
[0039] Next, a second downsampling feature extraction is performed on feature map K1. Specifically, a 3×3 convolution operation is performed on K1 with 64 kernels to extract more abstract mid-to-high-level features at a lower spatial resolution, enabling the model to integrate responses from different regions within a larger receptive field. Subsequently, a 2×2 max pooling operation is used to downsample the convolution output, further compressing the spatial size from 32×32 to 16×16. After this round of convolution and pooling, a feature map K2 with a size of 16×16×64 is obtained, achieving further condensation of spatial information while increasing the number of channels.
[0040] In this embodiment, a third downsampling feature extraction is performed on feature map K2. Specifically, a 3×3 convolution operation is performed on K2 with 128 kernels to extract higher-order and more global feature representations at the current scale, enabling the fusion of responses from different regions in a deeper feature space. After convolution, a 2×2 max pooling operation is applied again to compress the spatial size from 16×16 to 8×8. After the third convolution and max pooling operation, a feature map K3 with a size of 8×8×128 is obtained. Thus, the original 64×64 feature matrix is progressively reduced in spatial dimension while progressively increasing in the number of channels, forming a deep feature representation with rich layers and a higher degree of semantic abstraction.
[0041] To convert the aforementioned three-dimensional feature map into a one-dimensional deep abstract feature representation suitable for subsequent network structure processing, in this embodiment, a global average pooling operation is performed on feature map K3. Specifically, the 8×8×128 feature map is divided into eight spatial regions according to spatial dimensions, each region corresponding to a sub-region in the feature map, and the feature responses within each region are averaged and aggregated, thereby compressing the spatial features of each region into a 128-dimensional feature vector. Through this processing method, eight 128-dimensional feature vectors L1-L8 are finally obtained, each feature vector corresponding to a spatial region on feature map K3. These feature vectors together constitute the deep abstract feature representation of the seismic motion signal.
[0042] Through the combination of multiple rounds of convolution, downsampling, and global average pooling, this embodiment of the application achieves an effective mapping from the global self-attention feature matrix A to the multi-scale deep feature vectors L1-L8. This ensures that the obtained features retain the key information of the ground motion signal in both the frequency and time domains, while also being more compact in structure, making it easier for subsequent models to generate, identify, or process ground motions for other applications.
[0043] S5 reconstructs the symmetric encoder-decoder, which processes the deep abstract feature vector through a fully connected layer with multiple rounds of upsampling, channel concatenation, and convolution, and then restores the original length of the ground motion signal after fusing it with the initial feature map.
[0044] In this embodiment, step S5 is used to construct an encoder-decoder structure that is symmetrical to the aforementioned feature extraction process. Through multiple rounds of upsampling, feature concatenation and convolution operations, the deep abstract features are gradually restored to a ground motion signal of the same length as the original input, thereby achieving high-fidelity reconstruction from the feature space to the time domain signal space.
[0045] Specifically, the deep abstract feature vectors L1-L8 obtained in step S4 are first input into a fully connected layer for reconstruction. In this embodiment, multiple 128-dimensional deep feature vectors are combined and mapped by the fully connected layer to reconstruct a feature map U3 with a size of 8×8×128. This feature map U3 has the same spatial size as feature map K3 and maintains 128 channels, enabling it to serve as the initial high-level feature representation at the decoding end, providing a foundation for the subsequent upsampling reconstruction process.
[0046] In the first upsampling reconstruction stage, feature map U3 undergoes a 2x bilinear upsampling operation, expanding its spatial size from 8×8 to 16×16 while maintaining 128 channels, resulting in an upsampled feature map of size 16×16×128. Bilinear upsampling, through interpolation calculations on adjacent pixels, achieves smooth spatial enlargement of the feature map, which helps preserve the structural continuity of features during the upsampling process. Subsequently, this upsampled feature map is concatenated with the corresponding feature map K3 from the encoding stage along the channel dimension, forming a joint feature representation. In this way, high-level semantic features extracted in the low-resolution space during the encoding stage can be efficiently fused with the features gradually recovered during the decoding stage. Next, a 3×3 convolution operation is applied to the concatenated feature map, with 64 convolutional kernels in the convolutional layer, to recombine and refine features between channels and within the spatial neighborhood, ultimately resulting in a feature map U2 of size 16×16×64. This step achieves both spatial dimensional expansion and reasonable compression of the number of channels, making the features more compact and ordered.
[0047] In the second upsampling reconstruction stage, feature map U2 is again subjected to a 2x bilinear upsampling operation, expanding its spatial size from 16×16 to 32×32 while maintaining the number of channels at 64, resulting in an upsampled feature map of size 32×32×64. This upsampled feature map is then concatenated with the corresponding feature map K2 from the encoding stage along the channel dimension, forming a joint feature map containing multi-scale feature information. By fusing with K2, structural features and texture details from the intermediate layers of the encoding stage can be introduced at a higher spatial resolution, compensating for the detail loss that might result from simple upsampling. Subsequently, a 3×3 convolutional layer with 32 kernels is used to convolve the concatenated feature map, further fusing and refining the feature information between different channels, outputting a feature map U1 of size 32×32×32, achieving further optimization and compression of features in both spatial and channel dimensions.
[0048] In the third upsampling reconstruction stage, the same 2x bilinear upsampling operation is performed on feature map U1, expanding its spatial size from 32×32 to 64×64 while maintaining the number of channels at 32, resulting in an upsampled feature map of size 64×64×32. Subsequently, this feature map is concatenated with the corresponding feature map K1 from the encoding stage along the channel dimension, allowing the decoding stage to fully utilize the multi-scale feature information extracted during the encoding stage at the highest spatial resolution. Channel concatenation allows for the integration of feature representations from different stages at the same spatial scale, enhancing the reconstruction process's ability to consider both local details and overall structure. After concatenation, a 3×3 convolutional layer with 16 kernels is used to perform a convolution operation, weighting and integrating the fused features to finally obtain a feature map U of size 64×64×16. This feature map contains both global semantic information from deep abstract features and superimposed detailed structural information from the fusion of features at various scales.
[0049] In this embodiment, to further improve the stability and fidelity of the reconstruction results, the initial feature map K and the reconstructed feature map U are fused element-wise to obtain a fused feature representation that includes residual correction effects. This element-wise addition method preserves the low-level edge, contour, and local texture information extracted from the initial convolutional layer in the encoding stage, while simultaneously using the high-level semantic and structural information recovered in the decoding stage to correct and enhance it. Subsequently, a 1×1 convolution operation is applied to the fused feature map, compressing the number of channels from 16 to 1, forming a feature map AS with a size of 64×64×1. The 1×1 convolution here is mainly used for linear combination and dimensionality reduction of information between channels, integrating multi-channel features into a single-channel representation, providing a unified feature carrier for the subsequent inverse transformation step.
[0050] After completing the feature reconstruction of the aforementioned symmetric encoder-decoder structure, the single-channel feature map AS is input into the inverse block encoding module and the inverse Fourier transform module for time-domain signal restoration. Specifically, firstly, the feature map AS is subjected to inverse block encoding in the reverse manner of block encoding in step S2, reassembling the 64×64 feature matrix into 64 corresponding frequency component waveforms of length N, and restoring them into a complete two-dimensional frequency domain representation in ascending order of frequency. Subsequently, the frequency domain representation is converted back to the time domain signal through inverse Fourier transform, obtaining a ground motion record with the same length as the original input. In this embodiment, through the above-mentioned inverse reconstruction process, high-precision restoration of the original ground motion signal can be achieved while maintaining the consistency of frequency domain and time domain features, thereby constructing an end-to-end ground motion signal generation and reconstruction framework based on deep abstract features.
[0051] S6 uses feature map differences as the optimization objective, employs a loss function and optimizer to optimize network parameters, and verifies the effectiveness of features through correlation coefficients and signal-to-noise ratio.
[0052] In this embodiment, step S6 is used to optimize the network parameters by using the feature map difference as the optimization objective and employing a loss function and optimizer, thereby ensuring that the deep learning network can effectively learn and reconstruct the key time-frequency features of the seismic motion signal. Specifically, this step minimizes the difference between the reconstructed feature map and the self-attention feature matrix, enabling the network to learn more accurate and representative deep abstract features, thereby improving the accuracy and stability of the seismic motion signal reconstruction.
[0053] First, the optimization objective is based on the Frobenius norm difference between the reconstructed feature map AS and the self-attention feature matrix A. The Frobenius norm is a commonly used method to measure the difference between two matrices; it represents the square root of the sum of the squares of the differences between all elements in the matrix, accurately reflecting the global difference between the two matrices. By using the Frobenius norm difference between the reconstructed feature map AS and the self-attention feature matrix A as the primary optimization objective, the network strives to minimize the error during the reconstruction process, ensuring that the reconstructed signal retains as much key information as possible from the original signal.
[0054] To achieve this optimization goal, this embodiment uses mean squared error (MSE) as the loss function. The mean squared error loss function is a common loss function in regression tasks; it calculates the squared difference between the predicted and true values and averages the error over all samples. By minimizing the MSE, the network can gradually reduce the difference between the reconstructed signal and the target features, making the output of each layer more closely match the feature representation of the original signal. During the optimization process, the Adam optimizer is used for parameter updates. As an adaptive optimization method, the Adam optimizer can automatically adjust the learning rate according to changes in the gradient, helping to accelerate network convergence and avoid local optima.
[0055] During training, the entire network parameters are optimized end-to-end using the backpropagation algorithm. Backpropagation calculates the gradient of the loss function with respect to each network parameter and propagates this gradient back to each layer, thereby adjusting the network parameters. In this way, the network can continuously reduce reconstruction errors and gradually learn more accurate feature representations by adjusting parameters layer by layer.
[0056] In the optimization process, in addition to minimizing the loss function, the effectiveness and representativeness of the features are further verified by calculating the correlation coefficient and signal-to-noise ratio (SNR) between the reconstructed signal and the original input signal. The correlation coefficient measures the linear relationship between two signals and reflects the similarity between the reconstructed and original signals. The SNR measures the ratio of effective information to noise in a signal and is a commonly used metric for evaluating signal quality. By calculating these two metrics, it can be verified whether the deep abstract features L1-L8 can adequately preserve the key time-frequency features in the original seismic motion signal. Higher correlation coefficients and SNRs indicate that the reconstructed signal retains the effective information of the original signal well, and the feature representation has high effectiveness and representativeness.
[0057] Through the above steps, the embodiments of this application can optimize network parameters, so that the deep abstract features L1-L8 can not only effectively reconstruct ground motion signals, but also ensure the representativeness of the features in the time and frequency domain, ensuring that the generated signals have high accuracy and realism, and providing reliable feature support for ground motion prediction, generation and related applications.
[0058] S7 inputs historical ground motion records into the network to obtain feature vectors, establishes an empirical probability distribution model of the feature vectors, and reconstructs and generates new ground motion records by combining new feature vectors through probabilistic random sampling.
[0059] In this embodiment, step S7 is used to input historical ground motion records into the network and generate new ground motion records. The core of this step is to generate new feature vectors based on historical ground motion data, and then combine these feature vectors through probabilistic random sampling to generate diverse new ground motion records. The specific implementation process is as follows: First, M historical ground motion records from a specific location are sequentially input into a trained deep feature extraction network to obtain M sets of ground motion feature vectors. In this embodiment, each set of feature vectors strictly contains eight feature vectors of length 128, representing abstract features of the ground motion signal at different frequency components and time periods. These feature vectors are extracted from the ground motion signal through the self-attention module, convolution operation, and upsampling reconstruction process in the aforementioned deep learning network, thus effectively representing the time-frequency characteristics of the ground motion signal.
[0060] Next, based on the feature vectors extracted from historical seismic ground motion records, an empirical probability distribution model for the feature vectors is established. For each feature vector location i (i=1 to 8), the probability distribution of each feature vector location is estimated by statistically analyzing the frequency of that location in all M sets of feature vectors. Specifically, the higher the frequency of seismic ground motions in the dataset, the greater the sampling probability weight of its corresponding feature vector. In this way, we can define a probability distribution for each feature vector location, which reflects the frequency of different features in historical seismic ground motion records.
[0061] Then, probabilistic random sampling is performed using this probability distribution model. By independently sampling each feature vector location i (i=1 to 8), a feature vector can be extracted from the historical ground motion feature database for each location. These sampling results are combined into a new feature vector set Ln1-Ln8, representing the time-frequency characteristics of the new ground motion record. Because the sampling process is based on an empirical probability distribution, the generated new feature vector set Ln1-Ln8 will retain the statistical characteristics of the historical ground motion record while also possessing sufficient diversity.
[0062] Next, the newly generated feature vector group Ln1-Ln8 is combined through a fully connected layer to form a matrix representation. This matrix representation incorporates feature information from historical seismic ground motion records and is recombined within the feature space. Subsequently, the combined feature matrix is input into the seismic ground motion generation module mentioned in step S5. After a network decoding and reconstruction process, a completely new seismic ground motion record is finally reconstructed.
[0063] Throughout the process, large-scale and diverse seismic ground motion records can be generated by controlling the number of samplings. By continuously repeating the above sampling and generation process, each generated seismic ground motion record will be different, thus obtaining multiple seismic ground motion records with different characteristics and patterns. These generated seismic ground motion records can not only simulate the statistical characteristics of real seismic ground motions, but also provide diverse datasets for training, testing, or other research applications.
[0064] By employing this probabilistic random sampling method based on historical data, the embodiments of this application can generate a large number of representative new seismic ground motion records while ensuring data quality and diversity. These records can provide richer input data for fields such as earthquake engineering, post-disaster assessment, and structural response analysis, thereby improving the application effectiveness and reliability of the model.
[0065] In addition, embodiments of the present invention also include: S8 performs time-domain and frequency-domain analysis on the newly generated ground motion records, compares and verifies them with ground motion records generated by traditional methods, and optimizes the sampling strategy and model parameters based on the evaluation results.
[0066] In this embodiment, step S8 is used to perform time-domain and frequency-domain analysis on the generated new ground motion record, and to verify it by comparing it with ground motion records generated by traditional methods, thereby ensuring that the generated ground motion signal conforms to the statistical laws of actual ground motion and has high quality and high practicality. The specific implementation process is as follows: First, a time-domain analysis of the generated ground motions is performed, mainly including the following aspects: Peak ground acceleration (PGA): PGA is an important time-domain characteristic of ground motion, reflecting its intensity. By calculating the PGA of a generated ground motion and comparing it with the PGA in real ground motion data, the reasonableness of the generated motion's intensity can be verified.
[0067] Duration: Duration is an important indicator for measuring the duration of earthquake action, and it has significant implications for the impact on buildings and structures. By comparing the duration of generated earthquakes with that of actual earthquakes, the performance of the generative model in this characteristic can be evaluated.
[0068] Energy distribution: The energy distribution of ground motion reflects the contribution of different frequency components. By calculating the energy distribution of generated ground motions and comparing it with the energy distribution of actual ground motions, the performance of the model in each frequency band can be analyzed.
[0069] Next, a frequency domain analysis of the generated ground motion is performed, mainly including: Fourier spectrum: The Fourier spectrum shows the energy distribution of earthquake motion across different frequency ranges. By calculating the Fourier spectrum of a generated earthquake motion and comparing it with the Fourier spectrum of a real earthquake motion, it is possible to assess whether the generated signal accurately reflects the frequency characteristics of the earthquake motion.
[0070] Response spectrum: The response spectrum is used to describe the effect of seismic motion on the structural response at different periods. Comparing the response spectrum of a generated seismic motion with that of an actual seismic motion can verify whether the generated signal conforms to the response characteristics of different structural systems.
[0071] After completing the time-domain and frequency-domain analyses, the results were compared and validated with those generated by the traditional random vibration method and the empirical Green's function method. These two traditional methods are widely used in earthquake engineering and can generate ground motion signals that conform to statistical laws. Random vibration method: Based on statistical theory, it generates random processes of ground motion and is suitable for simple ground motion simulation.
[0072] Empirical Green's function method: This method generates ground motion by combining empirical models with Green's functions from actual earthquake records, and can better simulate the time-frequency characteristics of actual earthquakes.
[0073] By comparing the generated ground motions with those generated by these two traditional methods across multiple time and frequency domain metrics, the rationality and diversity of the generated ground motions can be comprehensively evaluated. If the generated ground motions exhibit similar performance and high consistency with those generated by traditional methods in both the time domain (e.g., peak ground acceleration, duration) and frequency domain (e.g., Fourier spectrum, response spectrum), then the effect of the generative model can be considered reasonable and effective.
[0074] Based on the above evaluation results, the feature sampling strategy for generating seismic ground motions and the network parameters of the generation module are optimized. The optimization strategy mainly includes: Optimization of probability weight allocation in feature sampling strategy: Based on the performance of the generated ground motion in the time and frequency domains, the probability weight allocation during feature sampling is adjusted. By increasing or decreasing the weight of certain features in the sampling, the generated ground motion can better fit the characteristics of real ground motion. For example, if the Fourier spectrum of the generated ground motion does not match the spectrum of the actual ground motion in certain frequency bands, the sampling weight of features in these frequency bands can be increased to enhance the fitting ability of the generated model in those frequency bands.
[0075] Optimization of convolutional kernel parameters in the generation module: By evaluating the reconstruction quality of the generated ground motions, the number, size, and other hyperparameters of the convolutional kernels in the generation module can be adjusted. Adjusting the convolutional kernels can help the network better capture features at different scales, improve the reconstruction process, and enhance the quality of the generated ground motions.
[0076] By iteratively optimizing the sampling strategy and network parameters, the quality of the generated ground motion can be improved, making it more consistent with the statistical laws of real ground motion in terms of time and frequency domain characteristics. The resulting ground motion is not only more realistic, but also more diverse and applicable.
[0077] Through the optimization process described above, the model's ability to generate ground motions can be continuously improved. By controlling the number of samplings and adjusting the optimization strategy, large-scale and diverse generation of ground motion signals can be achieved. The generated ground motion records can provide richer simulation data for fields such as earthquake engineering, seismic design of buildings, and post-disaster assessment, thereby improving the reliability and scientific rigor of analysis and decision-making in these fields.
[0078] This invention also provides a Transformer-based device for extracting abstract features of seismic waves and generating multiple features by combining them, such as... Figure 4 As shown, the device includes: The first module 100 is used to collect and establish a seismic wave dataset containing different intensity levels and different geographical locations, perform standardized preprocessing on each ground motion in the dataset, and establish a data quality inspection mechanism to remove abnormal data and records with excessive noise interference. The second module 200 is used to decompose the seismic motion signal into the Fourier decomposition module into waveforms of different frequency components, combine them into a two-dimensional matrix, and perform block encoding processing to form a standardized feature matrix. The third module 300 is used to input the standardized feature matrix into the Transformer self-attention module, calculate the feature block association weight matrix through multiple attention heads, perform nonlinear transformation in combination with the feedforward neural network, and output the global self-attention feature matrix. The fourth module 400 is used to perform multiple rounds of convolution and downsampling operations on the global self-attention feature matrix, and then convert it into a deep abstract feature vector through global average pooling. The fifth module, 500, is used to reconstruct the symmetric encoder-decoder. It processes the deep abstract feature vector through fully connected layers, multiple rounds of upsampling, channel concatenation, and convolution, and then fuses the initial feature map to restore the original length of the ground motion signal. The sixth module 600 is used to optimize network parameters by using the feature map difference as the optimization objective and employing a loss function and optimizer. The effectiveness of the features is verified by the correlation coefficient and signal-to-noise ratio. The seventh module 700 is used to input historical ground motion records into the network to obtain feature vectors, establish an empirical probability distribution model of the feature vectors, and reconstruct new ground motion records by combining new feature vectors through probabilistic random sampling.
[0079] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0080] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0081] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for extracting and generating abstract features of seismic waves based on a Transformer, characterized in that, The application relates to a method for generating new seismic wave records based on a convolutional neural network. The method comprises the following steps: Collecting and establishing a seismic wave data set containing different intensity levels and different geographical locations, standardizing and preprocessing each seismic motion in the data set, and establishing a data quality inspection mechanism to remove abnormal data and records with excessive noise interference; Inputting the seismic motion signal into a Fourier decomposition module to decompose the seismic motion signal into waveforms of different frequency components, combining the waveforms into a two-dimensional matrix and performing block coding processing to form a standardized feature matrix; Inputting the standardized feature matrix into a Transformer self-attention module, calculating the feature block correlation weight matrix through multiple attention heads, combining a forward neural network for nonlinear transformation, and outputting a global self-attention feature matrix; Performing multi-round convolution and down-sampling operations on the global self-attention feature matrix, and converting the global self-attention feature matrix into a deep abstract feature vector through global average pooling; Reconstructing a symmetric encoder-decoder, and converting the deep abstract feature vector into a seismic motion signal of the original length through a full connection layer, multi-round up-sampling, channel splicing and convolution processing, and fusing an initial feature map to restore the seismic motion signal; Taking feature map difference as an optimization target, using a loss function and an optimizer to optimize network parameters, and verifying feature effectiveness through a correlation coefficient and a signal-to-noise ratio; 2. The method according to claim 1, wherein, Inputting a historical seismic motion record into the network to obtain a feature vector, establishing a feature vector empirical probability distribution model, combining a new feature vector through probabilistic random sampling, and reconstructing and generating a new seismic motion record.
3. The method according to claim 2, wherein, The data scale of the seismic wave data set is not less than 5000 seismic motion records; the standardized preprocessing adopts a maximum absolute value normalization method, and the amplitude values of each seismic motion record are uniformly scaled to the interval [-1, 1]; the data quality inspection mechanism removes abnormal data by calculating a signal-to-noise ratio, a peak acceleration rationality and a waveform continuity index.
4. The method according to claim 3, wherein, The Fourier decomposition module decomposes a seismic motion signal with a length of N into 64 waveforms of different frequency components through a fast Fourier transform algorithm; block coding adopts a fixed-size sliding window to segment the waveforms, the sliding window length is N / 64, each waveform is converted into a feature vector with a length of 64, and finally a standardized feature matrix with a size of 64*64 is formed, wherein the rows of the matrix represent different frequency components, and the columns represent time domain features.
5. The method according to claim 4, wherein, The Transformer self-attention module calculates the feature block correlation weight matrix in parallel through 8 attention heads; the forward neural network is provided with two layers, the first layer uses a ReLU activation function to expand the feature dimension, and the second layer uses linear transformation to restore the original dimension; the size of the output global self-attention feature matrix is kept as 64*64. The operation of the multi-level convolutional neural network comprises the following steps: Performing a 3*3 convolution operation on the global self-attention feature matrix, using 16 convolution kernels to generate an initial feature map K with a size of 64*64*16; First down-sampling: performing 3*3 convolution and 2*2 maximum pooling down-sampling on the feature map K to obtain a feature map K1 with a size of 32*32*32; Second down-sampling: performing 3*3 convolution and 2*2 maximum pooling down-sampling on the feature map K1 to obtain a feature map K2 with a size of 16*16*64; Third down-sampling: 3x3 convolution and 2x2 max-pooling down-sampling are performed on the feature map K2 to obtain a feature map K3 with a size of 8x8x128; Global average pooling: the spatial dimensions of the feature map K3 are compressed to convert into 8 depth abstract feature vectors L1-L8 with a dimension of 128; 6. The method according to claim 5, wherein, The reconstruction operation of the symmetric encoder-decoder includes: Fully connected layer reconstruction: the depth abstract feature vectors L1-L8 are reconstructed into a feature map U3 with a size of 8x8x128 through a fully connected layer; First up-sampling: 2 times bilinear up-sampling is performed on the feature map U3 to 16x16x128, which is spliced with the channel dimension of the feature map K2, and then 3x3 convolution processing is performed to obtain a feature map U2 with a size of 16x16x64; Second up-sampling: 2 times bilinear up-sampling is performed on the feature map U2 to 32x32x64, which is spliced with the channel dimension of the feature map K1, and then 3x3 convolution processing is performed to obtain a feature map U1 with a size of 32x32x32; Third up-sampling: 2 times bilinear up-sampling is performed on the feature map U1 to 64x64x32, which is spliced with the channel dimension of the feature map K, and then 3x3 convolution processing is performed to obtain a feature map U with a size of 64x64x16; Feature fusion and restoration: the initial feature map K and the feature map U are element-wise added and fused, and then 1x1 convolution is performed to restore the feature map AS with a size of 64x64x1, and then inverse block encoding and inverse Fourier transform are performed to obtain the original length of the seismic motion signal.
7. The method according to claim 6, wherein, The self-supervised training takes the Frobenius norm difference between the reconstructed feature map AS and the global self-attention feature matrix A as the main optimization objective; the mean square error loss function is adopted, and the network parameters are optimized through back propagation end-to-end by using the Adam optimizer; the feature effectiveness verification is realized by calculating the correlation coefficient and signal-to-noise ratio of the reconstructed signal and the original input signal.
8. The method according to claim 7, wherein, The new feature vectors are combined by probabilistic random sampling, including: Feature vector acquisition: M historical seismic motion records are input into the trained network to obtain M groups of feature vectors, each group containing 8 128-dimensional vectors; Probability model establishment: for each feature vector position i, the distribution of the position in the M groups of features is counted, wherein the higher the frequency of the historical seismic motion, the greater the sampling probability weight of the corresponding feature vector; Random sampling and generation: 8 feature positions are independently sampled to combine into a new feature vector group Ln1-Ln8, which is input into the reconstruction module to generate a new seismic motion record, and the sampling number is controlled to realize large-scale generation.
9. The method according to claim 8, wherein, Further including: The generated new seismic motion record is analyzed in time domain and frequency domain, and compared with the seismic motion generated by the traditional method to verify and optimize the sampling strategy and model parameters according to the evaluation results.
10. A device for extracting and generating abstract features of seismic waves based on a Transformer, characterized in that, It includes: The first module is used for collecting and establishing a seismic wave data set containing different intensity levels and different geographical locations, standardizing and preprocessing each seismic motion in the data set, and establishing a data quality inspection mechanism to eliminate abnormal data and records with excessive noise interference; The second module is used for inputting the seismic motion signal into a Fourier decomposition module to decompose it into waveforms of different frequency components, combining them into a two-dimensional matrix and performing block encoding processing to form a standardized feature matrix; The third module is configured to input the standardized feature matrix into a Transformer self-attention module, calculate a feature block correlation weight matrix through multiple attention heads, combine a forward neural network to perform nonlinear transformation, and output a global self-attention feature matrix; The fourth module is configured to perform multi-round convolution and down-sampling operation on the global self-attention feature matrix, and convert the global self-attention feature matrix into a deep abstract feature vector through global average pooling; The fifth module is configured to reconstruct a symmetric encoder-decoder, pass the deep abstract feature vector through a full connection layer, multi-round up-sampling, channel splicing and convolution processing, fuse an initial feature map, and restore the initial feature map to a seismic ground motion signal with an original length; The sixth module is configured to take a feature map difference as an optimization target, optimize network parameters by using a loss function and an optimizer, and verify feature effectiveness by using a correlation coefficient and a signal-to-noise ratio; The seventh module is configured to input a historical seismic ground motion record into the network to obtain a feature vector, establish an empirical probability distribution model of the feature vector, combine a new feature vector by using probabilistic random sampling, and reconstruct a new seismic ground motion record.