Multi-condition seismic oscillation generation method based on diffusion model

By employing a multi-condition earthquake generation method, which combines a Transformer encoder and a U-Net network with a cross-attention mechanism, the problem of inaccurate control of response spectrum and energy temporal distribution in existing technologies is solved. This method achieves accurate generation and diversity support of ground motion waveforms, making it suitable for structural seismic analysis.

CN121997759APending Publication Date: 2026-05-08JIANGHAN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGHAN UNIVERSITY
Filing Date
2026-01-29
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing diffusion-based earthquake generation methods struggle to simultaneously and accurately control both the response spectrum and energy temporal distribution, leading to inaccurate structural damage analysis.

Method used

A multi-condition earthquake generation method is adopted, which generates ground motion acceleration time histories through data preprocessing, conditional encoder training, denoising diffusion model training and inference. By combining Transformer encoder and U-Net network with cross-attention mechanism, the coordinated control of response spectrum and energy time distribution is achieved.

Benefits of technology

It achieves precise control of response spectrum and energy non-stationary characteristics, generates seismic waveforms that are highly correlated with real waveforms, supports diverse generation methods, and is suitable for structural seismic analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997759A_ABST
    Figure CN121997759A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of seismic engineering, in particular to a multi-condition seismic oscillation generation method based on a diffusion model, which comprises the following steps: firstly, extracting multi-dimensional condition parameters such as a response spectrum, a peak acceleration, Arias intensity, energy arrival time, significant duration and a Husid curve from a seismic oscillation acceleration time history, and carrying out normalization processing; the acceleration time history is converted into a normalized logarithmic magnitude spectrum through short-time Fourier transform to serve as a learning target; constructing a Transform condition encoder to capture a coupling relationship of multi-source conditions, designing a de-noising network based on U-Net, and integrating a cross attention mechanism to realize accurate condition injection; a denoising diffusion probability model training strategy is adopted to optimize the noise prediction network; during reasoning, a denoising diffusion implicit model sampling strategy is adopted, phase information is iteratively reconstructed from an amplitude spectrum through a Griffin-Lim algorithm, and a seismic oscillation acceleration time history is obtained through inverse transformation. According to the invention, cooperative accurate control of the response spectrum and the energy non-stationary characteristic is realized, training is stable, reasoning is efficient, and diversity generation is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of earthquake engineering technology, and in particular to a method for generating multi-condition ground motions based on a diffusion model. Background Technology

[0002] Performance-based seismic design and assessment typically require nonlinear time-history analysis using extensive seismic ground motion records to accurately assess the dynamic response and damage risk of structures under different seismic loads. In engineering practice, for major hydropower projects, site-dependent design seismic response spectra are necessary, i.e., the ground motion parameters of the project site are determined using a set-seismic method. Although domestic and international strong-motion databases contain a large number of seismic records, their distribution in the parameter space is usually extremely uneven. For specific scenarios of interest in engineering practice, such as large magnitude earthquakes, near-field conditions, rare earthquakes under specific site categories, or when multiple intensity parameter control requirements need to be met simultaneously, existing observational data often cannot meet the direct application needs.

[0003] In recent years, the development of deep learning technology has provided a new path for seismic motion generation. As a novel generative modeling framework that has attracted much attention in recent years, diffusion models have demonstrated outstanding performance in fields such as image and speech synthesis. Compared with GANs, the training process is more stable, it is easier to incorporate multimodal conditional information, and the generated samples are both diverse and highly realistic.

[0004] However, existing ground motion generation methods based on diffusion models mainly rely on scalar parameters such as magnitude and distance as control conditions, making it difficult to accurately guide non-stationary characteristics such as energy temporal distribution. For nonlinear structural response analysis, ground motions with the same response spectrum but different energy evolution processes will lead to significantly different cumulative structural damage effects. Therefore, a ground motion generation method that can simultaneously and accurately control both the response spectrum and energy temporal distribution characteristics is needed. Summary of the Invention

[0005] The purpose of this application is to provide a multi-condition ground motion generation method based on a diffusion model, which aims to solve the problems in the prior art.

[0006] This application provides a method for generating multi-condition ground motion based on a diffusion model, including the following steps: Step 1: Data preprocessing; specifically, this involves acquiring the ground motion acceleration time history dataset and performing the following preprocessing steps: unifying the sampling rate and duration, extracting multidimensional conditional parameters, normalizing the conditional parameters, converting the acceleration time history into a time-spectrum graph using short-time Fourier transform, and performing logarithmic compression and normalization on the amplitude spectrum. Step 2: Conditional encoder training; including constructing the conditional encoder and a three-layer Transformer encoder; each layer of the Transformer encoder contains a multi-head self-attention module and a position feedforward network; Step 3: Training the denoising diffusion model; including constructing a denoising network based on U-Net; integrating a cross-attention mechanism into the attention blocks of U-Net to inject conditional information; using sinusoidal positional encoding for time-step encoding; and optimizing the noise prediction network using the denoising diffusion probability model DDPM training strategy. Step 4: Infer and generate the time history of ground motion acceleration.

[0007] Preferably, the multidimensional condition parameters in step one include scalar intensity indices and vector parameters; the scalar intensity indices include peak ground acceleration (PGA) and Arias intensity I. A 5% energy arrival time T5 and significant duration D 5-95 The vector parameters include the reaction spectrum and the normalized Husid energy accumulation curve.

[0008] Preferably, the peak acceleration PGA is the maximum absolute value of the acceleration time history; Arias intensity ; 5% energy arrival time T5 is the moment when the accumulated energy reaches 5%; significant duration D 5−95 The time interval is from 5% accumulated energy to 95% accumulated energy; the reaction spectrum is the acceleration reaction spectrum at multiple periodic points, and the normalized Husid energy accumulation curve is used. .

[0009] Preferably, the normalization process for the condition parameters in step one specifically involves: normalizing the peak acceleration PGA and the Arias intensity I... A The processing method involves taking the logarithm and then using the empirical cumulative distribution function to transform and map it to the [-1, 1] interval; for the energy arrival time T5 and significant duration D... 5-95 Linear normalization to the [-1, 1] interval is adopted; sample-by-sample peak acceleration normalization is adopted for the reaction spectrum; the normalized Husid energy accumulation curve is defined as [0, 1] and used directly.

[0010] Preferably, the condition encoder in step two includes a scalar condition projection module, a vector condition segmentation module, and a position encoding module; the scalar condition projection module maps each scalar condition to a single condition token using a multilayer perceptron; the vector condition segmentation module divides the response spectrum and Husid curve into multiple patches, and each patch is mapped to a condition token using a multilayer perceptron; the position encoding module adds sinusoidal position encoding to the token sequence of the vector conditions.

[0011] Preferably, step three specifically includes the following steps: S3.1: Construct a denoising network based on U-Net, including an encoder, a bottleneck layer, and a decoder, and achieve multi-scale feature fusion through skip connections; S3.2: Integrate a cross-attention mechanism into the attention block of U-Net: flatten the temporal spectrogram features into a sequence form, and obtain the query matrix Q by linear projection of the sequence; obtain the key matrix K and value matrix V by linear projection of the token sequence output by the conditional encoder; calculate the scaled dot product attention of the query matrix Q and the key matrix K to obtain the attention weights, and use the attention weights to perform a weighted summation of the value matrix to obtain the attention output; S3.3: Time step encoding: Sine position encoding is used to convert the diffusion time step t into a high-dimensional embedding vector, which is then fused with U-Net features after MLP projection; S3.4: Training strategy for the Denoising Diffusion Probability Model (DDPM); S3.5: The model parameters are smoothed using the exponential moving average technique, with a decay rate set to 0.999.

[0012] Preferably, the operation of S3.4 is as follows: Set the diffusion step count T=1000, and the noise scheduling β t From 10 −4 It increased linearly to 0.02; For each training sample, a random sampling time step t and standard Gaussian noise ε are used; According to the formula Calculate the time-frequency spectrum after adding noise, x t It is the noisy data at step t, α t =1−β t The noise addition rate is defined. This represents the cumulative noise scheduling product up to step t; Training the denoising network ε θ (x t (t,c) Predict noise ε, where c is the conditional code; The optimization objective is to minimize the mean square error between the predicted noise and the actual noise. .

[0013] Preferably, step four specifically includes: S4.1: Given target condition parameters, they are encoded into a sequence of condition tokens using a condition encoder; S4.2: Fast inference is achieved using the denoised diffusion implicit model (DDIM) sampling strategy: specifically, sampling from standard Gaussian noise x... TStarting from ~N(0,I), where I is the identity matrix representing isotropic Gaussian noise; the sampling step count is set to 50 steps, with uniform sampling of the time step sequence; for each time step, based on the predicted noise ε θ (x t Calculate x (t, c) t−1 : σ t By controlling the randomness of each step, z ~ N(0, I) is independent of x. t Standard Gaussian noise; S4.3: Obtain the generated normalized logarithmic amplitude spectrum, and perform inverse normalization to restore the amplitude spectrum; S4.4: The phase information is reconstructed iteratively from the amplitude spectrum using the Griffin-Lim algorithm, including initializing the random phase spectrum. Then, the process is iterated 128 times to obtain the final phase spectrum. S4.5: Combining the amplitude spectrum and the reconstructed phase spectrum, the generated seismic acceleration time history is obtained through inverse STFT transformation.

[0014] Preferably, the iterations in S4.4 are performed in the following order: constructing the complex spectrum. The inverse STFT yields the time-domain signal x, and the re-STFT yields the new phase. .

[0015] The beneficial effects of this invention are as follows: The multi-condition constrained ground motion generation method based on a diffusion model proposed in this invention achieves coordinated and precise control of response spectrum and energy non-stationary characteristics, resulting in stable training, efficient inference, and support for diverse generation. This method can directly establish a probabilistic mapping relationship between conditions and waveforms, providing ground motion inputs that take into account both response spectrum matching and energy evolution characteristics for structural seismic analysis, while also supporting uncertainty quantification based on condition diversity sampling. Attached Figure Description

[0016] Figure 1 This is a method framework diagram of the present invention; Figure 2 This is a comparison chart of the correlation between the waveform intensity parameters generated and the true values ​​in two working conditions tested using this invention. The first row is working condition 1 and the second row is working condition 2. Figure 3 This is a comparison diagram of the waveforms generated and observed by applying this invention to ground motion.

[0017] Figure 4 A comparison diagram of the generated and observed waveform response spectra of seismic motions using this invention.

[0018] Figure 5A comparison chart of the Husid curve of the generated and observed seismic motion waveforms using this invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0020] like Figures 1 to 5 The multi-condition ground motion generation method based on a diffusion model, as shown, includes the following steps: Step 1: Data preprocessing; specifically, this involves acquiring the ground motion acceleration time history dataset and performing the following preprocessing steps: unifying the sampling rate and duration, extracting multidimensional conditional parameters, normalizing the conditional parameters, converting the acceleration time history into a time-spectrum graph using short-time Fourier transform, and performing logarithmic compression and normalization on the amplitude spectrum. Step 2: Conditional encoder training; including building the conditional encoder and building a three-layer Transformer encoder; each layer of the Transformer encoder contains a multi-head self-attention module and a position feedforward network, enabling each conditional token to capture global conditional dependencies through layer-by-layer information interaction; Step 3: Training the denoising diffusion model; including constructing a denoising network based on U-Net; integrating a cross-attention mechanism into the attention blocks of U-Net to inject conditional information; using sinusoidal positional encoding for time-step encoding; and optimizing the noise prediction network using the denoising diffusion probability model DDPM training strategy. Step 4: Infer and generate the time history of ground motion acceleration.

[0021] The multidimensional conditional parameters in step one include scalar intensity indices and vector parameters; the scalar intensity indices include peak ground acceleration (PGA) and Arias intensity (I). A 5% energy arrival time T5 and significant duration D 5-95 The vector parameters include the reaction spectrum Sa(T) and the normalized Husid energy accumulation curve.

[0022] The peak acceleration PGA is the maximum absolute value of the acceleration time history; Arias intensity a(t) is the acceleration time history, T d The total duration is given by g, where g is the gravitational acceleration; the 5% energy arrival time T5 is the moment when the accumulated energy reaches 5%; the significant duration is D. 5−95 D is the time interval from 5% accumulated energy to 95% accumulated energy.5−95 =T 95 -T5 reflects the main energy release phase of the earthquake, and the response spectrum is the acceleration response spectrum at multiple periodic points, normalized Husid energy accumulation curve. .

[0023] The specific operation of normalizing the condition parameters in step one is as follows: Normalizing the peak acceleration PGA and the Arias intensity I... A The processing method involves taking the logarithm and then using the empirical cumulative distribution function to transform and map it to the [-1, 1] interval; for the energy arrival time T5 and significant duration D... 5-95 Linear normalization to the [-1, 1] interval is adopted; sample-by-sample peak acceleration normalization is adopted for the reaction spectrum; the normalized Husid energy accumulation curve is defined as [0, 1] and used directly.

[0024] In step two, the conditional encoder includes a scalar conditional projection module, a vector conditional segmentation module, and a positional encoding module. The scalar conditional projection module maps each scalar condition to a single conditional token using a multilayer perceptron (MLP). The vector conditional segmentation module divides the response spectrum and Husid curve into multiple patches, and each patch is mapped to a conditional token using a multilayer perceptron. The positional encoding module adds sinusoidal positional encoding to the token sequence of the vector conditions, enabling the model to understand the relative position of the token in the sequence.

[0025] Step three specifically includes the following steps: S3.1: Construct a denoising network based on U-Net, including an encoder, a bottleneck layer, and a decoder, and achieve multi-scale feature fusion through skip connections; S3.2: Integrating a cross-attention mechanism into the attention block of U-Net: Flattening the temporal spectrogram features into a sequence form, and then linearly projecting this sequence to obtain the query matrix Q; linearly projecting the token sequence output by the conditional encoder to obtain the key matrix K and value matrix V; calculating the scaled dot product attention between the query matrix Q and the key matrix K to obtain the attention weights, as shown in the following formula: The attention output is obtained by weighting and summing the value matrix using attention weights. ; S3.3: Time step encoding: Sine position encoding is used to convert the diffusion time step t into a high-dimensional embedding vector, which is then fused with U-Net features after MLP projection; S3.4: Training strategy for the Denoising Diffusion Probability Model (DDPM); S3.5: The model parameters are smoothed using the exponential moving average technique, with a decay rate set to 0.999.

[0026] The operation of S3.4 is as follows: Set the diffusion step count T=1000, and the noise scheduling β t From 10 −4 It increased linearly to 0.02; For each training sample, a random sampling time step t and standard Gaussian noise ε are used; According to the formula Calculate the time-frequency spectrum after adding noise, x t It is the noisy data at step t, α t =1−β t The noise addition rate is defined. This represents the cumulative noise scheduling product up to step t; Training the denoising network ε θ (x t (t,c) Predict noise ε, where c is the conditional code; The optimization objective is to minimize the mean square error between the predicted noise and the actual noise. .

[0027] Step four specifically includes: S4.1: Given target condition parameters (e.g., reaction spectrum, PGA, I) A T5, D 5-95 The Husid curve is encoded into a sequence of conditional tokens using a conditional encoder. S4.2: Fast inference is achieved using the denoised diffusion implicit model (DDIM) sampling strategy: specifically, sampling from standard Gaussian noise x... T Starting from ~N(0,I), where I is the identity matrix representing isotropic Gaussian noise and N represents a Gaussian distribution; the sampling step count is set to 50 steps, with uniform sampling of the time step sequence; for each time step, based on the predicted noise ε θ (x t Calculate x (t, c) t−1 : Set σ t =0 enables deterministic sampling, improving inference efficiency; σ t By controlling the randomness of each step, z ~ N(0, I) is independent of x. t Standard Gaussian noise; for given conditions, σ is set during the denoising diffusion implicit model DDIM sampling process. t >0 Introduces controllable randomness to generate multiple diverse seismic motion samples that satisfy the same constraints, which can be used for Monte Carlo simulations and quantification of seismic motion parameter uncertainties in structural vulnerability analysis. S4.3: Obtain the generated normalized logarithmic amplitude spectrum, and perform inverse normalization to restore the amplitude spectrum; S4.4: The phase information is reconstructed iteratively from the amplitude spectrum using the Griffin-Lim algorithm, including initializing the random phase spectrum. Then iterate through the process. Iterative execution: constructing the complex spectrum → Obtain the time-domain signal x by reversing the STFT → Obtain the new phase by performing a new STFT The final phase spectrum was obtained after 128 iterations. S4.5: Combining the amplitude spectrum and the reconstructed phase spectrum, the generated seismic acceleration time history is obtained through inverse STFT transformation.

[0028] The following detailed description is based on specific embodiment 1. Example

[0029] Step 1: Data Preparation 19,760 high-quality H1 component seismic acceleration records were extracted from the NGA-West2 database. All records underwent the following preprocessing: Unified sampling rate: Low sampling rate records are upsampled to 100Hz using linear interpolation, and high sampling rate records are downsampled to 100Hz after low-pass filtering; Standardize duration: Standardize the duration of all records to 125.44 seconds (12544 sampling points), achieved through truncation or zero padding; Conditional parameter extraction: For each record, calculate the following parameters: Peak acceleration (PGA) is the maximum absolute value of the acceleration time history; Arias intensity. ; Response spectrum calculation: Acceleration response spectrum at 130 period points with a period range of 0.01-10s (damping ratio 5%); Husid curve H (t) To normalize the cumulative energy curve, downsampling was performed at 256 discrete points; T5 represents the time when the cumulative energy reaches 5%; D 5−95 The time interval from 5% accumulated energy to 95% accumulated energy.

[0030] Conditional parameter normalization: for PGA and I A After taking the logarithm, an ECDF transformation is used to map to [-1, 1]; for T5 and D 5-95 Linear normalization to [-1, 1] is applied; the reaction spectrum is normalized by dividing each sample by the PGA; the Husid curve is defined as [0,1] and is used directly.

[0031] STFT time-frequency transform: The Hanning window is used as the window function, with a window length of N=256, a frame shift of H=96, and 256 FFT points. It retains 128 independent frequency points from 0 to the Nyquist frequency, and the output dimension is a 128 (frequency) × 128 (time) amplitude spectrum matrix.

[0032] Amplitude spectrum preprocessing: Logarithmic compression of the amplitude spectrum Then, linear normalization is performed to map the dataset to the [-1, 1] interval. Dataset partitioning: 90% of the data (17784 records) is randomly selected for training, and 10% of the data (1976 records) is used for testing. For each time frame m and frequency point k, the short-time Fourier transform generates complex-valued STFT coefficients X(m, k), from which the amplitude spectrum A(m, k) can be extracted.

[0033] Step 2: Model Building Scalar conditional encoding: Input is PGA, I A T5, D 5-95 There are four scalar conditions, each with a dimension of 1. Through the MLP structure (1 → 128 → 256), the output is a token with a dimension of 256 corresponding to each scalar condition, for a total of 4 scalar tokens.

[0034] Vector conditional encoding: The response spectrum (Sa) input has a dimension of 130, divided into 13 patches (10 points per patch). Each patch is mapped to one token using an MLP (10 → 128 → 256), for a total of 13 tokens. The Husid curve input has a dimension of 256, divided into 16 patches (16 points per patch). Each patch is mapped to one token using an MLP (16 → 128 → 256), for a total of 16 tokens. Sine wave position encoding is added to the vector conditional tokens, representing the frequency... .

[0035] Transformer encoder: It adopts a 3-layer structure, each layer contains multi-head self-attention (4 heads, 64 dimensions per head) + LayerNorm + feedforward network (256 → 1024 → 256) + LayerNorm, the input is 33 condition tokens (4 scalars + 13 response spectra + 16 Husids), and the output is 33 mixed condition tokens.

[0036] Network architecture: The basic number of channels is 64, the channel multiples are [1, 2, 4, 4], the downsampling level is 3 layers (the resolution is 128×128 → 64×64 → 32×32 → 16×16 in sequence), each layer contains 2 residual blocks, and the attention layer is set in the feature layer (32×32 and 16×16) with a downsampling rate of 1 / 8.

[0037] Time step encoding: Sinusoidal position encoding (dimension 256, frequency) is used. The diffusion time step is converted into a high-dimensional embedding vector, which is then projected by MLP (256 → 512 → 512) and fused with residual block features by element-wise addition.

[0038] Cross-attention module: Implemented within the attention blocks of U-Net (32×32 and 16×16 resolutions). The query Q originates from the temporal spectrogram features (flattened into a sequence), and the key K and value V originate from the token sequence output by the conditional encoder. A multi-head attention mechanism with four heads (64 dimensions per head) is employed, with the computation flow being Q=x seq W Q (Dimensions H×W×256), K=C mixed W K (Dimensions 33×256), V=C mixed W V (Dimensions 33×256) (Dimensions H×W×33) (Dimensions H×W×256), and finally the original features are added back through residual connections.

[0039] Step 3: Training Process (1) Training configuration: Adam optimizer is used with a learning rate of 1×10⁻⁶. −4 β1=0.9, β2=0.999; batch size is 110 (total batch size during distributed training); training epochs are 100; diffusion steps T=1000; linear scheduling is used for noise scheduling, β1=10 −4 ,β T =0.02; EMA decay rate 0.999; hardware configuration consists of 3 NVIDIA L20 GPUs, using distributed data parallelism (DDP); training time is approximately 5 hours.

[0040] (2) Training algorithm: Sample batch data (x0, c), where x0 is the normalized logarithmic amplitude spectrum and c is the condition parameter; Conditional encoding: c tokens =ConditionEncoder(c); Random sampling time step: t ~ Uniform(1,T); Sampling standard Gaussian noise: ε∼N(0,I); Calculate the noisy data: ; Predicted noise: ; Calculate the loss: ; Backpropagation updates parameters; Update EMA parameter: θema =0.999 θ ema +0.001 θ.

[0041] (3) Comparison of operating conditions: Condition 1 (baseline) uses only the reaction spectrum Sa and PGA as conditions (15 tokens: 1 PGA + 13 Sa + 1 padding); Condition 2 (complete) uses the reaction spectrum Sa, PGA, and I A T5, D 5-95 The Husid curve is used as a condition (33 tokens).

[0042] Step 4: Reasoning and Generation (1) Inference configuration: The sampling method is DDIM deterministic sampling (σ t =0), sampling steps are 50, time step sequence is uniformly sampled [1, 20, 40, …, 980, 1000], batch size is 256, hardware configuration is a single NVIDIA L20 GPU, inference time is about 10 minutes (1976 test samples).

[0043] (2) DDIM sampling algorithm: Conditional encoding: c tokens =ConditionEncoder(c); Initial noise: The tensor dimension is 128×128; For time steps t=T,T−Δt,...,Δt,0 (Δt=20), execute sequentially: Predicted noise: ; predict : ; renew :

[0044] Output the generated normalized logarithmic magnitude spectrum .

[0045] (3) Phase reconstruction and waveform generation: Inverse normalization: recover the logarithmic amplitude spectrum L(m,k); Exponential transformation: The amplitude spectrum is obtained; Complete the full amplitude spectrum (256 frequency points) using conjugate symmetry. Griffin-Lim algorithm (128 iterations): a. Initialize the random phase: ; B. Repeat for i=1 to 128: Constructing the complex spectrum: ; Inverse STFT: ; Re-STFT: ; Update phase:;

[0046] Output final phase: ; Constructing the final complex spectrum: ; Acceleration time history obtained by reversing STFT: ; Output the generated seismic acceleration time history at a sampling rate of 100Hz.

[0047] The above embodiments are not intended to limit the present invention. Unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; a mechanical connection or an electrical connection; a direct connection or an indirect connection through an intermediate medium; or a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. The present invention is not limited to the above examples. Changes, modifications, additions, or substitutions made by those skilled in the art within the scope of the technical solutions of the present invention are also within the protection scope of the present invention. Furthermore, the technical features involved in the different embodiments of the present application described above can be combined with each other as long as they do not conflict with each other.

[0048] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for generating multi-condition ground motion based on a diffusion model, characterized in that, Includes the following steps: Step 1: Data preprocessing; Specifically, the process involves acquiring a ground motion acceleration time history dataset and performing the following preprocessing steps: unifying the sampling rate and duration, extracting multidimensional conditional parameters, normalizing the conditional parameters, converting the acceleration time history into a time spectrum using short-time Fourier transform, and performing logarithmic compression and normalization on the amplitude spectrum. Step 2: Conditional encoder training; including constructing the conditional encoder and a three-layer Transformer encoder; each layer of the Transformer encoder contains a multi-head self-attention module and a position feedforward network; Step 3: Training the denoising diffusion model; This includes constructing a denoising network based on U-Net; integrating a cross-attention mechanism into the attention blocks of U-Net to achieve conditional information injection; and using sinusoidal positional coding for time-step coding. The noise prediction network is optimized using the Denoising Diffusion Probability Model (DDPM) training strategy. Step 4: Infer and generate the time history of ground motion acceleration.

2. The multi-condition seismic motion generation method based on a diffusion model according to claim 1, characterized in that, The multidimensional conditional parameters in step one include scalar intensity indices and vector parameters; the scalar intensity indices include peak ground acceleration (PGA) and Arias intensity (I). A 5% energy arrival time T5 and significant duration D 5-95 The vector parameters include the reaction spectrum and the normalized Husid energy accumulation curve.

3. The multi-condition seismic motion generation method based on a diffusion model according to claim 2, characterized in that, The peak acceleration PGA is the maximum absolute value of the acceleration time history; Arias intensity ; 5% energy arrival time T5 is the moment when the accumulated energy reaches 5%; significant duration D 5−95 The time interval is from 5% accumulated energy to 95% accumulated energy; the reaction spectrum is the acceleration reaction spectrum at multiple periodic points, and the normalized Husid energy accumulation curve is used. .

4. The multi-condition seismic motion generation method based on a diffusion model according to claim 1, characterized in that, The specific operation of normalizing the condition parameters in step one is as follows: The peak acceleration PGA and the Arias intensity I... A The processing method involves taking the logarithm and then using the empirical cumulative distribution function to transform and map it to the [-1, 1] interval; for the energy arrival time T5 and significant duration D... 5-95 Linear normalization to the [-1, 1] interval is adopted; sample-by-sample peak acceleration normalization is adopted for the reaction spectrum; the normalized Husid energy accumulation curve is defined as [0, 1] and used directly.

5. The multi-condition seismic motion generation method based on a diffusion model according to claim 1, characterized in that, In step two, the condition encoder includes a scalar condition projection module, a vector condition segmentation module, and a position encoding module. The scalar condition projection module maps each scalar condition to a single condition token using a multilayer perceptron. The vector condition segmentation module divides the response spectrum and Husid curve into multiple patches, and each patch is mapped to a condition token using a multilayer perceptron. The position encoding module adds sinusoidal position encoding to the token sequence of the vector conditions.

6. The multi-condition seismic motion generation method based on a diffusion model according to claim 1, characterized in that, Step three specifically includes the following steps: S3.1: Construct a denoising network based on U-Net, including an encoder, a bottleneck layer, and a decoder, and achieve multi-scale feature fusion through skip connections; S3.2: Integrate a cross-attention mechanism into the attention block of U-Net: flatten the temporal spectrogram features into a sequence form, and obtain the query matrix Q by linear projection of the sequence; obtain the key matrix K and value matrix V by linear projection of the token sequence output by the conditional encoder; calculate the scaled dot product attention of the query matrix Q and the key matrix K to obtain the attention weights, and use the attention weights to perform a weighted summation of the value matrix to obtain the attention output; S3.3: Time step encoding: Sine position encoding is used to convert the diffusion time step t into a high-dimensional embedding vector, which is then fused with U-Net features after MLP projection; S3.4: Training strategy for the Denoising Diffusion Probability Model (DDPM); S3.5: The model parameters are smoothed using the exponential moving average technique, with a decay rate set to 0.

999.

7. The multi-condition seismic motion generation method based on a diffusion model according to claim 6, characterized in that, The operation of S3.4 is as follows: Set the diffusion step count T=1000, and the noise scheduling β t From 10 −4 It increased linearly to 0.02; For each training sample, a random sampling time step t and standard Gaussian noise ε are used; According to the formula Calculate the time-frequency spectrum after adding noise, x t It is the noisy data at step t, α t =1−β t The noise addition rate is defined. This represents the cumulative noise scheduling product up to step t; Training the denoising network ε θ (x t (t,c) Predict noise ε, where c is the conditional code; The optimization objective is to minimize the mean square error between the predicted noise and the actual noise. .

8. The multi-condition seismic motion generation method based on a diffusion model according to claim 1, characterized in that, Step four specifically includes: S4.1: Given target condition parameters, they are encoded into a sequence of condition tokens using a condition encoder; S4.2: Fast inference is achieved using the denoised diffusion implicit model (DDIM) sampling strategy: specifically, sampling from standard Gaussian noise x... T Starting from ~N(0,I), where I is the identity matrix representing isotropic Gaussian noise; the sampling step count is set to 50 steps, with uniform sampling of the time step sequence; for each time step, based on the predicted noise ε θ (x t Calculate x (t, c) t−1 : σ t By controlling the randomness of each step, z ~ N(0, I) is independent of x. t Standard Gaussian noise; S4.3: Obtain the generated normalized logarithmic amplitude spectrum, and perform inverse normalization to restore the amplitude spectrum; S4.4: The phase information is reconstructed iteratively from the amplitude spectrum using the Griffin-Lim algorithm, including initializing the random phase spectrum. Then, the process is iterated 128 times to obtain the final phase spectrum. S4.5: Combining the amplitude spectrum and the reconstructed phase spectrum, the generated seismic acceleration time history is obtained through inverse STFT transformation.

9. The multi-condition seismic motion generation method based on a diffusion model according to claim 8, characterized in that, The iterations in S4.4 are executed in the following order: constructing the complex spectrum. The inverse STFT yields the time-domain signal x, and the re-STFT yields the new phase. .