Seismic signal classification model training method and device and medium
By converting earthquake signal data into two-dimensional grayscale maps and self-supervised learning, optimizing model weights, and building a high-precision seismic signal classification model, the classification inaccuracy caused by data scarcity is solved, and the accuracy of earthquake warning is improved.
Patent Information
- Application Number
- CN202510335568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, due to the scarcity of supervised seismic signal data sets, the seismic signal classification accuracy of the deep learning model is low, affecting the accuracy of seismic monitoring and early warning.
By converting seismic signal data into two-dimensional grayscale maps, the visual coding model and feature coding model are used for self-supervised learning, the initial model weight is optimized, the initial seismic signal classification model is constructed, and the target seismic signal classification model is obtained through iterative training.
Under the limited seismic signal data samples, the potential value of the data is fully explored, the accuracy and performance of seismic signal classification are improved, and the accuracy of earthquake early warning is improved.
Smart Images

Figure CN120298760A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of seismic data processing, and in particular, to a method, apparatus, and medium for training a seismic signal classification model. Background Art
[0002] Seismic signal classification is one of the key technologies in seismic monitoring and disaster warning. By accurately identifying the types of seismic signals (such as natural earthquakes, artificial blasts, induced earthquakes, etc.), it is possible to provide an important basis for the rapid response and emergency decision-making of earthquake disasters. Traditional seismic signal classification methods mainly rely on manually selecting signal features such as frequency, amplitude, phase, etc., but this method has strong subjectivity, large information loss, and low efficiency, and it is difficult to meet the requirements of timeliness and accuracy.
[0003] In recent years, the rapid development of deep learning technology has provided new ideas for seismic signal classification. After being trained on a supervised seismic signal dataset, a deep learning model can automatically extract complex signal features, avoiding the limitations of manual feature selection. Among them, a supervised seismic signal dataset refers to a data set that contains annotated seismic signals and can be used to train and validate a seismic specific model.
[0004] However, although the overall amount of data in the field of seismology is huge, the supervised seismic signal classification dataset is relatively scarce, resulting in limited performance of the deep learning model and low accuracy of the classification results, thus affecting the accuracy of seismic monitoring and early warning.
[0005] Therefore, how to solve the problem of inaccurate seismic signal classification caused by the limited supervised seismic signal dataset and improve the accuracy of seismic early warning is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, one aspect of the present application provides a method for training a seismic signal classification model, the method comprising:
[0007] Obtaining target seismic signal data;
[0008] Converting the target seismic signal data into a two-dimensional grayscale image;
[0009] Under the initial model weights of the visual coding model, performing visual coding on the two-dimensional grayscale image through the visual coding model to obtain a visual coding vector;
[0010] Performing feature coding on the target seismic signal data through a feature coding model to obtain a feature coding vector;
[0011] Inputting the visual coding vector and the feature coding vector into a contrast learning model for self-supervised learning to optimize the initial model weights to obtain target model weights;
[0012] Construct an initial seismic signal classification model with the target model weights as the initial model parameters;
[0013] Iteratively train the initial seismic signal classification model with the training data set labeled by seismic signal types to obtain a target seismic signal classification model for seismic signal classification.
[0014] Optionally, the obtaining of the target seismic signal data includes:
[0015] Obtain initial seismic signal data;
[0016] Select data points with a preset data volume from the initial seismic signal data;
[0017] Normalize the values of the data points to obtain normalized data;
[0018] Based on the original data order of the initial seismic signal data, equally-spaced group the normalized data to obtain data groups with a preset number of groups;
[0019] Stitch the data groups based on the grouping order to obtain the target seismic signal data in the form of a two-dimensional matrix; the elements of the two-dimensional matrix are the normalized data.
[0020] Optionally, the converting of the target seismic signal data into a two-dimensional grayscale image includes:
[0021] Map the normalized data to grayscale image pixels to obtain the two-dimensional grayscale image; the larger the normalized data, the larger the grayscale value of the grayscale image pixels.
[0022] Optionally, visually encoding the two-dimensional grayscale image through the visual encoding model to obtain a visual encoding vector includes:
[0023] Perform patch embedding processing on the two-dimensional grayscale image to obtain a target grayscale image;
[0024] Slice the target grayscale image into N image patches of the same size;
[0025] Map the image patches into low-dimensional vectors through linear projection;
[0026] Add a preset position embedding vector to the low-dimensional vector to obtain a target vector with position information; the position embedding vector includes the relative position information of the image patch in the target grayscale image;
[0027] Input the target vector into the visual encoding model for encoding to obtain the visual encoding vector; the visual encoding model is the DeiT model.
[0028] Optionally, the feature encoding of the target seismic signal data by the feature encoding model to obtain a feature encoding vector includes:
[0029] Extracting feature data from the target seismic signal data;
[0030] After normalizing the feature data, a feature input vector is formed;
[0031] Inputting the feature input vector into the feature encoding model for feature encoding to obtain the feature encoding vector; wherein, the feature encoding model is an encoding model based on the KAN network architecture.
[0032] Optionally, inputting the visual encoding vector and the feature encoding vector into a contrastive learning model for self-supervised learning to optimize the initial model weights to obtain target model weights, includes:
[0033] Constructing positive and negative samples by corresponding the visual encoding vector and the feature encoding vector one by one;
[0034] Determining the similarity of each positive and negative sample; and forming a similarity matrix with the similarities;
[0035] Determining the loss function of the contrastive learning model according to the similarity matrix;
[0036] Through the backpropagation algorithm, iterative training is carried out with the goal of minimizing the loss function until a preset iteration condition is reached;
[0037] Determining the target model weights according to the minimized loss function.
[0038] Optionally, constructing an initial seismic signal classification model with the target model weights as the model initial parameters, includes:
[0039] Building an image classification model with the target model weights as the model initial parameters;
[0040] Constructing a seismic signal classification head composed of fully connected layers and including a preset number of neurons;
[0041] Adding a Transformer architecture and the seismic signal classification head to the image classification model to obtain the initial seismic signal classification model; wherein, the Transformer architecture includes a multi-head self-attention mechanism layer and a feed-forward neural network layer.
[0042] Another aspect of the present application provides a training device for a seismic signal classification model, the device includes:
[0043] An earthquake signal acquisition module for acquiring target earthquake signal data;
[0044] A signal conversion module for converting the target earthquake signal data into a two-dimensional grayscale image;
[0045] A visual encoding module for performing visual encoding on the two-dimensional grayscale image through the visual encoding model under the initial model weights of the visual encoding model to obtain a visual encoding vector;
[0046] A feature encoding module for performing feature encoding on the target earthquake signal data through a feature encoding model to obtain a feature encoding vector;
[0047] A self-learning module for inputting the visual encoding vector and the feature encoding vector into a contrastive learning model for self-supervised learning to optimize the initial model weights to obtain target model weights;
[0048] A classification model construction module for constructing an initial earthquake signal classification model with the target model weights as the initial model parameters;
[0049] A model training module for iteratively training the initial earthquake signal classification model through a training data set labeled with earthquake signal types to obtain a target earthquake signal classification model for earthquake signal classification.
[0050] Another aspect of the present application provides a training device for an earthquake signal classification model, including a memory and a processor. A computer program that can run on the processor is stored on the memory. When the processor executes the program, the steps of the training method of the earthquake signal classification model are implemented.
[0051] Another aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of the training method of the earthquake signal classification model are implemented.
[0052] The beneficial effects of the training method, device and medium for an earthquake signal classification model provided by the present application are as follows: Through self-supervised learning of the visual encoding vector and the feature encoding vector by the contrastive learning model, the potential value in the data can be fully learned and mined under limited earthquake signal data samples. Further, using the target model weights optimized by self-supervised learning as the initial parameters of the initial earthquake signal classification model reduces the calculation of unnecessary model training steps. At the same time, iteratively training the initial earthquake signal classification model to obtain a target initial earthquake signal classification model with high classification accuracy and high performance, thereby realizing accurate classification of earthquake signals and improving the accuracy of earthquake early warning. Description of the Drawings
[0053] Figure 1 Schematic flowchart of a method for training an earthquake signal classification model provided by an embodiment of the present application;
[0054] Figure 2 Schematic diagram of the principle of a method for training an earthquake signal classification model provided by an embodiment of the present application;
[0055] Figure 3 Schematic flowchart of a method for training an earthquake signal classification model provided by another embodiment of the present application;
[0056] Figure 4 Schematic flowchart of a method for training an earthquake signal classification model provided by still another embodiment of the present application;
[0057] Figure 5 Schematic flowchart of a method for training an earthquake signal classification model provided by yet another embodiment of the present application;
[0058] Figure 6 Schematic diagram of the signal classification principle of an earthquake signal classification model provided by an embodiment of the present application;
[0059] Figure 7 Structural schematic of a training device for an earthquake signal classification model provided by an embodiment of the present application;
[0060] Figure 8 Structural schematic diagram of a training device for an earthquake signal classification model provided by another embodiment of the present application.
[0061] Reference numerals are as follows: 80 is a memory, 81 is a processor, 82 is a display screen, 83 is an input / output interface, 84 is a communication interface, 85 is a power supply, 86 is a communication bus, 801 is a computer program, 802 is an operating system, and 803 is data. Detailed implementation manners
[0062] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms of "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0063] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to a determination".
[0064] Figure 1 The flowchart of a method for training an earthquake signal classification model provided by an embodiment of this application is shown as Figure 1 shown, and the method includes:
[0065] S10: Obtain target earthquake signal data;
[0066] S11: Convert the target earthquake signal data into a two-dimensional grayscale image;
[0067] In a specific embodiment, in order to ensure the training effect and accurately obtain the effective data information in the earthquake signal, after obtaining the earthquake signal data, key information is selected as the target earthquake signal data. Further, in order to facilitate the subsequent analysis of the earthquake signal data, the obtained target earthquake signal data is converted into a two-dimensional grayscale image.
[0068] Figure 2 The schematic diagram of a method for training an earthquake signal classification model provided by an embodiment of this application is shown as Figure 2 shown. In a specific embodiment, the target earthquake signal data is one-dimensional earthquake waveform data, and the one-dimensional earthquake waveform data is converted into a two-dimensional grayscale image with intuitive visual features.
[0069] S12: Under the initial model weights of the visual encoding model, perform visual encoding on the two-dimensional grayscale image through the visual encoding model to obtain a visual encoding vector;
[0070] S13: Perform feature encoding on the target earthquake signal data through the feature encoding model to obtain a feature encoding vector;
[0071] Further, as Figure 2 shown, by performing visual encoding on the two-dimensional grayscale image through the visual encoding model, a visual encoding vector can be obtained. Among them, in an optional embodiment, the visual encoding model may be a DeiT (Data-efficient Image Transformers) model.
[0072] At the same time, perform feature encoding on the target earthquake signal data to obtain a feature encoding vector. It can be understood that the earthquake signal data includes a lot of feature information of the earthquake signal. For example, asFigure 2 As shown, it may include, but is not limited to, the sampling point where the P phase arrives is 599.00, the sampling point where the S phase arrives is 40.00, the distance (in kilometers) between the earthquake and the station is 11.07, the depth (in kilometers) of the earthquake is 1.800, and the magnitude is 1.4.
[0073] Among them, in seismology, the P phase and the S phase are two main types of seismic waves, representing seismic waves with different propagation characteristics respectively. The P wave is a body wave in seismic waves, that is, a compressional wave (Primary Wave or Pressure Wave). The vibration direction of the P wave particle is consistent with the propagation direction of the wave, similar to the propagation mode of sound waves. The S wave is another body wave in seismic waves, that is, a shear wave (Secondary Wave or Shear Wave). The vibration direction of its particle is perpendicular to the propagation direction of the wave. In a specific embodiment, after extracting the characteristic data in the target seismic signal, the characteristic data can be encoded to obtain a characteristic encoding vector.
[0074] S14: Input the visual encoding vector and the characteristic encoding vector into the contrastive learning model for self-supervised learning to optimize the initial model weights to obtain the target model weights;
[0075] In an alternative embodiment, through a multi-modal contrastive learning model of grayscale images and numerical features, the optimized model weights of the visual encoder are obtained through self-supervised learning. That is, in a specific embodiment, the visual encoding vector and the characteristic encoding vector are input into the contrastive learning model for self-supervised learning. In the continuous iterative learning process, the contrastive learning model gradually learns the internal relationship between the two-dimensional grayscale image and the seismic numerical features, so as to obtain the optimized target model weights.
[0076] S15: Use the target model weights as the initial model parameters to construct an initial seismic signal classification model;
[0077] S16: Through the training data set labeled with seismic signal types, perform iterative training on the initial seismic signal classification model to obtain a target seismic signal classification model for seismic signal classification.
[0078] Furthermore, use the optimized target model weights as the initial model parameters to construct an initial seismic signal classification model. Furthermore, perform iterative training on the initial seismic signal classification model through the training data set, and continuously optimize the model weight parameters until the iteration condition is reached, to obtain a high-precision classification model that can be used for seismic signal classification, that is, the target seismic signal classification model.
[0079] In fact, it can be understood that the visual coding model in step S12 is a general model, that is, a model that can encode multiple two-dimensional grayscale images. The target seismic signal classification model can be understood as a high-precision model constructed and optimized on the basis of the visual coding model. Specifically, the target model weight after self-supervised learning optimization is used as the initial model parameter, and the constructed classification model is iteratively trained to further optimize the model parameters, thereby obtaining a high-precision target seismic signal classification model.
[0080] Thus, the training method of the seismic signal classification model provided by the embodiment of the present application, by contrasting the learning model, carries out self-supervision learning to visual coding vectors and feature coding vectors, and can fully learn and tap into the potential value in the data under limited seismic signal data samples. Further, the target model weight after self-supervision learning optimization is used as the initial parameter of the initial seismic signal classification model to reduce the calculation of unnecessary model training steps. At the same time, the initial seismic signal classification model is iteratively trained to obtain the target initial seismic signal classification model with high classification accuracy and high performance, so as to achieve the accurate classification of seismic signals and improve the accuracy of earthquake early warning.
[0081] Figure 3 A flow chart of a training method for a seismic signal classification model provided in another embodiment of the present application is shown in FIG. Figure 3 As shown, obtaining target seismic signal data includes:
[0082] S30: Acquire initial seismic signal data;
[0083] S31: selecting a preset amount of data points from the initial seismic signal data;
[0084] In a specific embodiment, after obtaining the one-dimensional initial seismic signal data, it is necessary to perform certain data processing on it so as to subsequently convert it into a two-dimensional grayscale image.
[0085] It is understandable that the initial seismic signal data obtained are not all valid data. In order to reduce unnecessary data processing and improve the accuracy and efficiency of model training. In an optional embodiment, a preset amount of data points are selected from the collected one-dimensional seismic waveform data sequence (i.e., the initial seismic signal data), and the selected data points are data that can effectively reflect the characteristics of the seismic signal. It should be noted that the selected preset amount of data can be determined based on the analysis of a large amount of seismic data, or it can be set according to empirical values, and it can also be adjusted according to different application fields, which is not limited in this application.
[0086] Taking the Stanford Earthquake Dataset (STEAD), a publicly available seismological dataset, as an example for illustration. For instance, the preset data volume can be set to 6,000. That is, a signal with a length of 6,000 can be selected, resulting in 6,000 data points. These data points contain the key information during an earthquake and can effectively reflect the characteristics of the earthquake signal.
[0087] S32: Normalize the values of the data points to obtain normalized data;
[0088] Furthermore, in order to eliminate the amplitude differences caused by factors such as differences in acquisition equipment and transmission losses for different earthquake signals and ensure the consistency and comparability of the data for subsequent processing. In an optional embodiment, the values of the data points are normalized to obtain normalized data.
[0089] Specifically, in an optional embodiment, the min-max normalization method can be used for processing. The specific normalization formula is formula (1):
[0090]
[0091] where, X norm is the normalized data, X is one of the original unnormalized data point values, X min is the minimum value of the values in the data points, X max is the maximum value of the values in the data points.
[0092] After normalization processing, each data point in the signal can be transformed so that the value range of the transformed signal is strictly limited within the interval [0, 1].
[0093] S33: Based on the original data order of the initial earthquake signal data, group the normalized data at equal intervals to obtain data groups with a preset number of groups;
[0094] After obtaining the normalized data, a grouping operation is performed on the normalized data. Specifically, it is carefully grouped according to the original data order of the initial earthquake signal data. When grouping, an equal-interval grouping strategy is adopted to evenly divide the normalized data into a preset number of groups. In a specific embodiment, this grouping method helps with subsequent structured processing of the data and also takes into account the dimensional requirements when constructing a two-dimensional matrix and the integrity of the data characteristics.
[0095] For example, in the above example of STEAD, 6,000 normalized data can be equally spaced into 30 groups, with each group containing 200 data points.
[0096] S34: Concatenate the data groups based on the grouping order to obtain the target seismic signal data in the form of a two-dimensional matrix; the elements of the two-dimensional matrix are normalized data.
[0097] Further, when concatenating the data groups, to ensure that the original information and logical relationships of the data are not destroyed, it is necessary to concatenate them strictly in the grouping order. In fact, it can also be understood as concatenating them strictly in the original data order of the initial seismic signal data. After concatenation, a target seismic signal data in the form of a two-dimensional matrix can be obtained. It can be understood that the elements in the two-dimensional matrix are normalized data. In the two-dimensional matrix, the number of rows is equal to the number of data points included in each group, and the number of columns is equal to the preset number of data groups. For ease of understanding, an example will be given below.
[0098] For example, in the above example of STEAD, 30 data groups are concatenated one by one along the column direction in the grouping order to construct a 30×200 two-dimensional matrix. In this matrix, there are 200 rows and 30 columns. Each column is the normalized data included in a data group. This two-dimensional matrix can intuitively reflect the distribution and characteristics of the seismic signal data.
[0099] Based on the above embodiments, converting the target seismic signal data into a two-dimensional grayscale image includes:
[0100] Map the normalized data to the grayscale image pixels to obtain a two-dimensional grayscale image; the larger the normalized data, the larger the grayscale value of the grayscale image pixel.
[0101] In a specific embodiment, convert the constructed two-dimensional matrix into a two-dimensional grayscale image to realize the conversion of one-dimensional seismic signal data into a two-dimensional grayscale image. During the conversion process, as an optional embodiment, an image generation algorithm can be used to map each element in the two-dimensional matrix to a pixel point in the two-dimensional grayscale image.
[0102] The brightness of each point in the two-dimensional grayscale image is determined by the size of the normalized data of the corresponding point element in the two-dimensional matrix. Specifically, the larger the normalized data, the larger the grayscale value of the grayscale image pixel, and the brighter it appears in the two-dimensional grayscale image. On the contrary, the smaller the normalized data, the smaller the grayscale value of the grayscale image pixel, and the darker it appears in the two-dimensional grayscale image. Through this mapping method, the one-dimensional seismic signal data is converted into a two-dimensional grayscale image with intuitive visual features, which is convenient for subsequent seismic signal classification and analysis based on image recognition and processing technologies.
[0103] Figure 4 The following is a schematic flowchart of a method for training a seismic signal classification model provided by another embodiment of the present application. In an optional embodiment, as Figure 4 shown, perform visual encoding on the two-dimensional grayscale image through a visual encoding model to obtain a visual encoding vector, including:
[0104] S40: Perform patch embedding processing on the two-dimensional grayscale image to obtain the target grayscale image;
[0105] In a specific embodiment, before performing visual encoding on the two-dimensional grayscale image through a visual encoding model, the two-dimensional grayscale image needs to be processed to a certain extent. It can be understood that the transformed two-dimensional grayscale image may not necessarily be a complete image. Therefore, after obtaining the two-dimensional grayscale image, patch embedding processing is first performed on the two-dimensional grayscale image to obtain a complete target grayscale image.
[0106] S41: Divide the target grayscale image into N image blocks of the same size;
[0107] Furthermore, divide the target grayscale image I into N image blocks p of the same size i , in a specific embodiment, assume that the size of the image block p to be divided i is m×n, and the size of the target grayscale image I after patch embedding is H×W. Thus, the number of image blocks p that can be divided i is
[0108] S42: Map the image blocks to low-dimensional vectors through linear projection;
[0109] After obtaining the image block p i , each image block p i is mapped to a low-dimensional vector x i through a linear projection layer, and its mapping process can be expressed by formula (2):
[0110] x i = W p ·p i + b p (2)
[0111] where, W p is the weight matrix of the linear projection layer, and b p is the bias vector of the linear projection layer.
[0112] S43: Add a preset position embedding vector to the low-dimensional vector to obtain a target vector with position information; the position embedding vector includes the relative position information of the image block in the target grayscale image;
[0113] In order to enable the visual encoding model to capture the positional relationship between the image blocks p i and effectively process two-dimensional image data, in an alternative embodiment, a position embedding vector e i is added to each image block p i to obtain a target vector z i with position information, where, zi = x i + e i . Among them, the position embedding vector e i is pre-trained and contains the relative position information of the image patch p i in the target grayscale image.
[0114] S44: Input the target vector into the visual encoding model for encoding to obtain the visual encoding vector; the visual encoding model is the DeiT model.
[0115] Furthermore, the target vector z i with position information is visually encoded by the visual encoding model. In an alternative embodiment, the visual encoding model is the DeiT model, and the DeiT model is a visual model based on the Transformer architecture. In a specific embodiment,
[0116] the target vector z i is input into the visual model based on multiple layers of Transformer. In each layer of the Transformer architecture, it includes the multi-head self-attention mechanism (abbreviated as MHSA) and the multi-layer perceptron mechanism (abbreviated as MLP), which are the core components of the DeiT model. The model can pay attention to the associations between different image patches p i through the multi-head self-attention mechanism, and the multi-layer perceptron mechanism can further extract and transform the features.
[0117] In an alternative embodiment, the target vector z i is operated on through the multi-head self-attention mechanism. First, the target vector z i is linearly transformed respectively to obtain the query vector q i , the key vector k i and the value vector v i . Among them, the specific calculation formula is: q i = W q ·z i , k i = W k ·z i , v i = W v ·z i , where W q , W k and W v are the corresponding weight matrices respectively.
[0118] Furthermore, the attention score can be calculated, and the calculation formula is formula (3):
[0119]
[0120] Among them, a ij is the attention score, d k is the dimension of the key vector k i After Softmax normalization, the attention weight α ij = softmax(a ij ). Finally, the output y of the multi-head self-attention mechanism is obtained through weighted summation i :
[0121]
[0122] Among them, α ij is the attention weight, and v i is the value vector
[0123] For the output y i obtained through the multi-head self-attention mechanism, it is further processed through a multi-layer perceptron mechanism. The multi-layer perceptron contains two fully connected layers, and its calculation process is formula (5):
[0124] y' i = W2·GELU(W1y i + b1)+ b2 (5)
[0125] Among them, W1 and W2 are the weight matrices of the fully connected layers, b1 and b2 are the bias vectors, and GELU is the activation function
[0126] After being processed layer by layer through the multi-layer Transformer architecture, the visual coding vector [y1 ′ , y2 ′ , …, y ′ N of the target seismic signal data is finally obtained. This vector contains the characteristic information of the seismic signal data contained in the seismic two-dimensional grayscale image, and provides a key feature representation for the subsequent process of seismic information based on contrast learning
[0127] In the embodiments of the present application, for the convenience of understanding and to better show the efficient coding effect of converting the target seismic signal data into a two-dimensional grayscale image, the embodiments of the present application are based on the target seismic signal data to describe and compare different coding methods. Among them, the coding methods include the two-dimensional grayscale image coding, pure picture coding, recursive graph coding, Fourier coding, Markov transition field coding, Gramian angular field GASF coding, and Gramian angular field GADF coding provided by the embodiments of the present application
[0128] To demonstrate the effect of efficient encoding for converting seismic waveform diagrams into grayscale images, the present invention uses a seismic waveform pre-training task as a benchmark and selects different encoding methods for comparative experiments, namely grayscale image encoding, pure image encoding, recurrence plot encoding, Fourier encoding, Markov transition field encoding, Gramian Angular Summation Field (GASF for short) encoding, and Gramian Angular Difference Field (GADF for short) encoding.
[0129] Pure image encoding plots the seismic signal data as a line graph, and the line graph is directly mapped to image pixel values. This encoding method is simple and direct, but it does not fully consider the time series characteristics of seismic waveform data.
[0130] Recurrence plot encoding is a non-linear method for analyzing time series data. For the seismic waveform time series x(t), first define an embedding dimension m and a time delay τ. By reconstructing the phase space, the original time series is transformed into a sequence of m-dimensional vectors X i =[x(i), x(i + τ), …, x(i + (m - 1)τ)], where i = 1, 2, …, N - (m - 1)τ, and N is the length of the time series. Then, calculate the recurrence matrix R, whose element R ij is defined as: when ||X i - X j || ≤ ∈, R ij = 1; otherwise R ij = 0. Here ∈ is a distance threshold, and ||·|| represents the Euclidean distance. The recurrence plot is an image composed of the recurrence matrix R, which can reflect the recurrence of similar states in the time series, thereby capturing the dynamic characteristics of the seismic waveform.
[0131] Fourier encoding is based on the principle of Fourier transform, which converts the time-domain signal of the seismic waveform into a frequency-domain signal. For the discrete seismic waveform time series x(n), its discrete Fourier transform (DFT) is defined by formula (6):
[0132]
[0133] where k = 0, 1, 2, …, N - 1, N is the length of the sequence. Through Fourier transform, the seismic waveform data is converted from the time domain to the frequency domain, obtaining the amplitude information and phase information of different frequency components. These frequency characteristics can be used as the basis for image encoding. For example, the amplitude information is mapped to the grayscale value of the image pixels, thereby realizing the Fourier encoding of the seismic waveform.
[0134] Markov transition field encoding is based on Markov chain theory. For seismic waveform time series, it is first quantized into a finite number of states. Suppose the quantized state set is [s1, s2, …, s K . Then calculate the state transition probability matrix P, whose element P ij represents the probability of transitioning from state s i to state s j . The Markov transition field is an image composed of the state transition probability matrix. By appropriately mapping the matrix elements, they are converted into pixel values of the image. This encoding method can capture the transition rules of seismic waveforms between different states and reflect the dynamic change process of seismic signals.
[0135] GASF encoding is a method for processing time series data. For the seismic waveform time series x(t), it is first normalized to the interval [-1, 1]. Then the time series is converted to polar coordinate form, that is, r(t) = |x(t)|, θ(t) = sgn(x(t)) arccos(x(t)), where sgn(x) is the sign function. The elements of the Gram angle field matrix GASF ij are calculated as GASF ij = r i r j cos(θ i + θ j ), where i, j = 0, 1, 2, …, N, and N is the length of the time series. By visualizing the Gram angle field matrix and converting it into an image, this encoding method can retain the phase and amplitude information of the time series in the image, which is helpful for analyzing the periodicity and trend of seismic waveforms.
[0136] GADF encoding is similar to GASF encoding and is also based on polar coordinate transformation. The difference lies in that the elements of the Gram angle field matrix GADF ij are calculated as GADF ij = r i r j cos(θ i - θ j ). The Gram angle field matrix obtained in this way can also be converted into an image for representing seismic waveform data. GADF encoding focuses on capturing the phase differences between different moments in the time series and has certain advantages for analyzing the local change characteristics of seismic waveforms. The dataset used is STEAD, which contains approximately 1,030,000 three-component signals and comes with complete eight-event information (including phase and source).
[0137] In an alternative embodiment, one million instances are used for training, and 30,000 instances are reserved for validation. Table 1 shows the accuracy table of a validation set provided by the embodiments of the present application, and the accuracy on the validation set is shown in Table 1 below.
[0138] Table 1 Accuracy Table of Validation Set
[0139] Coding method Accuracy rate (%) Pure picture coding 5.98 Recursive graph coding 6.36 Fourier coding 21.82 Two-dimensional grayscale picture coding 48.73 Markov transition field coding 16.81 GASF coding 8.55 GADF coding 10.90
[0140] According to Table 1, through the two-dimensional grayscale image encoding provided by the embodiments of the present application, effective information can be efficiently encoded. The essence of the multi-modal pre-training task for seismic waveforms is a contrastive learning task of matching numerical features and image features. Therefore, it is necessary to distinguish the abstract semantic information of different fine-grained categories. It can be seen that the better the generalization on the validation set, the more complete the encoding of the seismic signal data can be achieved by the two-dimensional grayscale image encoding provided by the embodiments of the present application.
[0141] As an alternative embodiment, the target seismic signal data is feature-encoded through a feature encoding model to obtain a feature encoding vector, including:
[0142] Extract the feature data in the target seismic signal data;
[0143] After normalizing the feature data, form a feature input vector;
[0144] Input the feature input vector into the feature encoding model for feature encoding to obtain a feature encoding vector; where the feature encoding model is an encoding model based on the KAN network architecture.
[0145] It can be understood that, for the convenience of subsequent learning of the matching between the numerical features and image features of seismic signal data through a contrastive learning model, in an alternative embodiment, the target seismic signal data is encoded into a feature encoding vector through a feature encoding model.
[0146] Specifically, first extract the feature data in the target seismic signal data. It should be noted that the feature data refers to the numerical values used to characterize the seismic signal features, which may include but are not limited to the sampling points of P-phase arrival, the sampling points of S-phase arrival, the distance between the earthquake and the station, the depth of the earthquake, and the magnitude. For example, as Figure 2 shown, the sampling point of P-phase arrival is 599.00, the sampling point of S-phase arrival is 40.00, the distance (km) between the earthquake and the station is 11.07, the depth (km) of the earthquake is 1.800, and the magnitude is 1.4. Therefore, the extracted feature data includes 599.00, 40.00, 11.07, 1.800, and 1.4.
[0147] The extracted feature data is formed into an input vector [k1, k2,..., kn , where n is the number of feature data. And for the input vector k n After normalization, the feature input vector is obtained. Among them, the normalization process can adopt formula (7):
[0148]
[0149] Among them, is the feature input vector after normalization, k n is the input vector without normalization, min(k n ) is the minimum vector in the input vector, max(k n ) is the maximum vector in the input vector. Mapping the input vector k n to the interval [0, 1] can eliminate the differences in magnitude among different feature data.
[0150] Furthermore, input the feature input vector into the feature encoding model for feature encoding. Among them, the feature encoding model is an encoding model based on the KAN network architecture. The full name of the KAN network is the Kolmogorov - Arnold network, which emphasizes learnable activation functions. These functions are adopted at the edges of the network and replace the traditional weight parameters usually used in neural networks with spline functions. The KAN layer network with n in -dimensional input and n out -dimensional output can be defined as a matrix of one-dimensional functions Φ = {φ q,p}, where p = 0, 1, 2, …, n in , q = 0, 1, 2, …, n out , and the numerical transfer between layers in matrix form is formula (8):
[0151]
[0152] Therefore, the processing form of the KAN network architecture can be expressed as formula (9):
[0153]
[0154] Figure 5 is a schematic flowchart of a method for training an earthquake signal classification model provided by another embodiment of the present application. In an alternative embodiment, as Figure 5 shown, input the visual encoding vector and the feature encoding vector into the contrast learning model for self-supervised learning to optimize the initial model weights to obtain the target model weights, including:
[0155] S50: Construct positive and negative samples by corresponding the visual encoding vector and the feature encoding vector one by one;
[0156] In an alternative embodiment, the contrastive learning model is a contrastive learning model based on the CLIP architecture. In a specific embodiment, by jointly encoding the visual encoding vector and the feature encoding vector of the two-dimensional grayscale image, cross-retrieval between the grayscale image and the feature values can be achieved, and the matching relationship between the two-dimensional grayscale image and the numerical feature can be learned by comparing the similarity between the visual encoding vector and the feature encoding vector.
[0157] Therefore, in a specific embodiment, positive and negative samples of the contrastive learning model are established based on the visual encoding vector and the feature encoding vector. Among them, the positive sample refers to the matching pair of the real two-dimensional grayscale image and the numerical feature, that is, the matching pair of the real visual encoding vector and the feature encoding vector. The negative sample is a random matching pair of the two-dimensional grayscale image and the numerical feature, that is, a random matching pair of the visual encoding vector and the feature encoding vector.
[0158] As Figure 2 shown, in a specific embodiment, after obtaining the visual encoding vector through the visual encoding model and the feature encoding vector through the feature encoding model, positive and negative samples can be formed. Among them, Figure 2 in the positive and negative sample table shown, the samples on the diagonal I1·Z1, I1·Z1,..., I n ·Z n are positive samples, and other samples are negative samples.
[0159] S51: Determine the similarity of each positive and negative sample; and form a similarity matrix with the similarities;
[0160] Define the loss function of the contrastive learning model based on the CLIP architecture as L. Assume there are N positive and negative samples, and each sample contains a pair of visual encoding vectors and feature encoding vectors. In a specific embodiment, after obtaining the positive and negative samples, calculate the similarity of the positive and negative samples, and then a similarity matrix S ij can be constructed according to the obtained similarities, where the similarity matrix S ij is calculated by formula (10):
[0161]
[0162] where γ is the temperature hyperparameter, and sim represents the function for calculating the similarity between two vectors. In an alternative embodiment, it can be calculated by cosine similarity. Specifically, refer to formula (11):
[0163]
[0164] where a and b respectively represent the two vectors participating in the similarity calculation.
[0165] S52: Determine the loss function of the contrastive learning model according to the similarity matrix;
[0166] Further, based on the similarity matrix S ij the loss function L of the contrastive learning model can be calculated. In an alternative embodiment, it can be calculated through the InfoNCE loss function, and the specific calculation formula is formula (12):
[0167]
[0168] The loss function L aims to maximize the similarity between the feature representations of the same sample pairs, that is, to maximize the similarity of positive samples. At the same time, minimize the similarity between different sample pairs, that is, minimize the similarity of negative samples.
[0169] S53: Through the backpropagation algorithm, iterative training is performed with the goal of minimizing the loss function until the preset iteration condition is reached;
[0170] S54: Determine the target model weights according to the minimized loss function.
[0171] Further, through the backpropagation algorithm, iterative training is performed with the goal of minimizing the loss function until the preset iteration condition is reached. Specifically, the updated weights of the visual coding model are determined by minimizing the loss function L, that is, the target model weights are determined.
[0172] In an alternative embodiment, let θ new be the set of weight parameters to be updated, and the learning rate be β, then the update formula for the target model weights θ new is formula (13):
[0173]
[0174] where θ old is the model weights updated after the iterative training of the loss function L in the previous round, and the initial model weights of the visual coding model for the first training.
[0175] By continuously iterating this process, self-supervised learning is performed on a large number of seismic signal data samples, so that the multi-modal contrastive learning model of the CLIP architecture can gradually learn the internal relationship between the seismic two-dimensional grayscale map and the numerical features, thereby obtaining the updated target model weights θ new , and the updated target model weights θ new can encode the seismic two-dimensional grayscale map more effectively, providing a better feature representation basis for the subsequent more accurate seismic signal classification model.
[0176] As an alternative embodiment, with the target model weights as the initial parameters of the model, an initial seismic signal classification model is constructed, including:
[0177] Build an image classification model with the weights of the target model as the initial model parameters;
[0178] Construct a seismic signal classification head composed of fully connected layers and including a preset number of neurons;
[0179] Add a Transformer architecture and a seismic signal classification head to the image classification model to obtain an initial seismic signal classification model; among them, the Transformer architecture includes a multi-head self-attention mechanism layer and a feed-forward neural network layer.
[0180] In a specific embodiment, in order to obtain a high-precision target seismic signal classification model, first build an image classification model, which integrates the target model weights obtained in the above embodiment, that is, use the target model weights as the initial model parameters of the image classification model. Thus, it can be ensured that the image classification model can utilize the effective feature representations extracted by the previous self-supervised learning. The inheritance of the target model weights enables the image classification model to perform a more in-depth analysis based on the learned feature basis when processing the two-dimensional grayscale images of earthquakes.
[0181] Figure 6 This is a schematic diagram of the signal classification principle of a seismic signal classification model provided by an embodiment of the present application. On the basis of inheriting the target model weights, a Transformer architecture is added to the image classification model. The Transformer architecture includes a multi-head self-attention mechanism layer and a feed-forward neural network layer. As Figure 6 shown, in a specific embodiment, the input of the Transformer architecture is the visual encoding vector E I-final .
[0182] In the multi-head self-attention mechanism layer of the Transformer architecture, the visual encoding vector E I-final is linearly transformed to obtain a query vector Q i , a key vector K j and a value vector V j , and the calculation formulas are respectively: Q i =W Q ·E I-final , K j =W K ·E I-final , V j =W V ·Ex -final , where W Q , W K and W V are the corresponding weight matrices.
[0183] Furthermore, calculate the attention score A ij according to formula (14):
[0184]
[0185] Among them, d k is the dimension of the key vector K j .
[0186] The attention weight α ij is obtained through Softmax normalization, and the calculation formula is: α ij = softmax(A ij ). Finally, the output O MSA of the multi-head self-attention mechanism is obtained through weighted summation:
[0187]
[0188] Furthermore, the output O MSA of the multi-head self-attention mechanism is input into a feed-forward neural network (assuming the feed-forward neural network includes two fully connected layers to obtain the output O Transformer , and the calculation formula is formula (16):
[0189] O Transformer = W2·GELU(W1O MSA + b1)+ b2 (16)
[0190] Among them, W1 and W2 are weight matrices respectively, and b1 and b2 are biases respectively.
[0191] In addition, in an optional embodiment, further, a seismic signal classification head composed of fully connected layers and including a preset number of neurons is constructed, and the seismic signal classification head is used in the image classification model.
[0192] Specifically, the seismic signal classification head is composed of fully connected layers. Assuming the preset number of neurons is m, it is used to map the features output by the Transformer architecture to different seismic event categories. As Figure 6 shown, the input of the seismic signal classification head is O Transformer , and the output of the seismic signal classification head is y, and the calculation formula is formula (17):
[0193] y ik = W class O Transformer + b class (17)
[0194] Among them, W class is the weight matrix of the fully connected layer of the seismic signal classification head, and b class is the bias.
[0195] In a specific embodiment, the output y of the seismic signal classification head is a vector whose dimension is equal to the number of categories of seismic event classification, and each element in the vector represents the score of the corresponding category.
[0196] By adding a Transformer architecture and a seismic signal classification head to the image classification model, an initial seismic signal classification model can be obtained. Further, in order to obtain a target seismic signal classification model with high classification accuracy, the initial seismic signal classification model needs to be iteratively trained to optimize the target model weights.
[0197] Specifically, the training dataset D = {(x1, y1), (x2, y2), …, (x n , y n )} is used to iteratively train the initial seismic signal classification model, where the training dataset D is a data set after seismic signal type annotation.
[0198] Define the cross-entropy loss function L ce to measure the difference between the model prediction result and the true label, and the calculation formula is formula (18):
[0199]
[0200] where y ic is the true label of the sample belonging to category c, and p ic is the probability that the model predicts the sample belongs to category c. Among them, the probability p ic can be obtained by performing a Softmax function conversion on the output y ik of the seismic signal classification head, and the calculation formula is formula (19):
[0201]
[0202] where C is the total number of categories of seismic signal classification.
[0203] Through the backpropagation algorithm, and according to the cross-entropy loss L ce to update all learnable parameters in the initial seismic signal classification model, including but not limited to the parameters of the Transformer architecture and the seismic signal classification head. Let θ all be the set of all learnable parameters, and the learning rate is δ, then the parameter update formula is formula (20):
[0204]
[0205] After multiple rounds of iterative training, continuously adjusting the model parameters, the performance of the model on the downstream seismic event classification dataset (i.e., the training dataset) is gradually improved, and finally a target seismic signal classification model with fine-tuned high accuracy for seismic signal classification is obtained.
[0206] As Figure 6 shown, the target seismic signal classification model can be obtained through the training method provided in this application. This model is a classification model based on the Transformer architecture and the seismic signal classification head. In a specific embodiment, as Figure 6 shown, the seismic signal data to be classified is preprocessed, where the preprocessing at least includes converting it into a two-dimensional grayscale image. The preprocessed two-dimensional grayscale image is used as the input of the target seismic signal classification model, and after visual encoding in sequence to obtain a visual encoding vector, and then through the calculations of the Transformer layer and the seismic signal classification head in sequence, the type of the seismic signal can be finally output.
[0207] In summary, in the training method of the seismic signal classification model provided in this application, the one-dimensional seismic signal data is converted into the form of a two-dimensional grayscale image, so that the seismic wave can be processed by the subsequent visual encoding model as image information, improving the encoding effect. Then, the DeiT model is used to encode the two-dimensional grayscale image, thereby obtaining the visual encoding vector of the seismic waveform information. At the same time, for the various numerical features corresponding to the seismic waveform, a model based on the KAN network architecture is used as the feature encoding model to obtain the feature encoding vector. Further, a multi-modal contrast learning model of the grayscale image and the numerical features is adopted, and the updated target model weights of the two-dimensional grayscale image are obtained through self-supervised learning. Finally, the target model weights are inherited, and a Transformer layer and a seismic signal classification are added subsequently to the seismic signal classification model, and the fine-tuned target seismic signal classification model is obtained through training with the training dataset.
[0208] In the above embodiment, the training method of the seismic signal classification model is described in detail. This application also provides an embodiment corresponding to a training device for the seismic signal classification model.
[0209] Figure 7 is a schematic structural diagram of a training device for a seismic signal classification model provided in an embodiment of this application. As Figure 7 shown, the device includes:
[0210] A seismic signal acquisition module 70, configured to acquire target seismic signal data;
[0211] A signal conversion module 71, configured to convert the target seismic signal data into a two-dimensional grayscale image;
[0212] A visual encoding module 72, configured to perform visual encoding on the two-dimensional grayscale image through a visual encoding model under the initial model weights of the visual encoding model to obtain a visual encoding vector;
[0213] A feature encoding module 73, configured to perform feature encoding on the target seismic signal data through a feature encoding model to obtain a feature encoding vector;
[0214] A self - learning module 74, which is used to input the visual encoding vector and the feature encoding vector into a contrastive learning model for self - supervised learning to optimize the initial model weights to obtain the target model weights;
[0215] A classification model construction module 75, which is used to construct an initial seismic signal classification model with the target model weights as the initial model parameters;
[0216] A model training module 76, which is used to iteratively train the initial seismic signal classification model through a training data set labeled with seismic signal types to obtain a target seismic signal classification model for seismic signal classification.
[0217] In addition, the training device for the seismic signal classification model provided by the embodiments of the present application further includes:
[0218] A seismic signal acquisition module, which is further used to acquire initial seismic signal data;
[0219] A data point selection module, which is used to select data points with a preset data volume from the initial seismic signal data;
[0220] A normalization module, which is used to perform normalization processing on the numerical values of the data points to obtain normalized data;
[0221] A grouping module, which is used to perform equally - spaced grouping on the normalized data based on the original data order of the initial seismic signal data to obtain data groups with a preset number of groups;
[0222] A splicing module, which is used to splice the data groups based on the grouping order to obtain target seismic signal data in the form of a two - dimensional matrix; the elements of the two - dimensional matrix are normalized data.
[0223] A mapping module, which is used to map the normalized data into grayscale image pixels to obtain a two - dimensional grayscale image; the larger the normalized data, the larger the grayscale value of the grayscale image pixels.
[0224] A patch embedding module, which is used to perform patch embedding processing on the two - dimensional grayscale image to obtain a target grayscale image;
[0225] A splitting module, which is used to split the target grayscale image into N image blocks of the same size;
[0226] A mapping module, which is further used to map the image blocks into low - dimensional vectors through linear projection;
[0227] A position vector adding module, which is used to add a preset position embedding vector to the low - dimensional vector to obtain a target vector with position information; the position embedding vector includes the relative position information of the image block in the target grayscale image;
[0228] The visual encoding module is further configured to input the target vector into a visual encoding model for encoding to obtain a visual encoding vector; the visual encoding model is a DeiT model.
[0229] The feature data extraction module is configured to extract feature data from the target seismic signal data;
[0230] The normalization module is further configured to normalize the feature data and then form a feature input vector;
[0231] The feature encoding module is further configured to input the feature input vector into a feature encoding model for feature encoding to obtain a feature encoding vector; wherein, the feature encoding model is an encoding model based on the KAN network architecture.
[0232] The positive and negative sample construction module is configured to construct positive and negative samples by corresponding the visual encoding vector and the feature encoding vector one by one;
[0233] The similarity determination module is configured to determine the similarity of each positive and negative sample; and form a similarity matrix with the similarities;
[0234] The loss function determination module is configured to determine the loss function of the contrastive learning model according to the similarity matrix;
[0235] The iterative training module is configured to perform iterative training by the backpropagation algorithm with the goal of minimizing the loss function until a preset iterative condition is reached;
[0236] The target model weight determination module is configured to determine the target model weight according to the minimized loss function.
[0237] The model building module is configured to build an image classification model with the target model weight as the initial model parameters;
[0238] The classification head construction module is configured to construct a seismic signal classification head including a preset number of neurons composed of fully connected layers;
[0239] The processing module is configured to add a Transformer architecture and a seismic signal classification head to the image classification model to obtain an initial seismic signal classification model; wherein, the Transformer architecture includes a multi-head self-attention mechanism layer and a feed-forward neural network layer.
[0240] Figure 8 This is a schematic structural diagram of a training device for a seismic signal classification model provided in another embodiment of the present application. As Figure 8 shown, the training device for the seismic signal classification model includes: a memory 80 for storing a computer program;
[0241] A processor 81, which is configured to implement the steps of the method for training an earthquake signal classification model as mentioned in the foregoing embodiments when executing a computer program.
[0242] The training device for the earthquake signal classification model provided in this embodiment may include, but is not limited to, a tablet computer, a notebook computer, a desktop computer, etc.
[0243] Among them, the processor 81 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 81 may be implemented in at least one of the following hardware forms: a digital signal processor (DSP for short), a field-programmable gate array (FPGA for short), and a programmable logic array (PLA for short). The processor 81 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as a central processing unit (CPU for short); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 81 may be integrated with a graphics processing unit (GPU for short), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 81 may further include an artificial intelligence (AI for short) processor, and the AI processor is used to process computational operations related to machine learning.
[0244] The memory 80 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 80 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 80 is at least used to store the following computer program 801. After the computer program is loaded and executed by the processor 81, it can implement the relevant steps of the method for training an earthquake signal classification model disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 80 may further include an operating system 802 and data 803, etc., and the storage method may be transient storage or permanent storage. Among them, the operating system 802 may include Windows, Unix, Linux, etc. The data 803 may include, but is not limited to, the relevant data involved in the method for training an earthquake signal classification model.
[0245] In some embodiments, the training device of the seismic signal classification model may further include a display screen 82, an input / output interface 83, a communication interface 84, a power supply 85, and a communication bus 86.
[0246] Those skilled in the art can understand that Figure 8 the structure shown in does not constitute a limitation on the training device of the seismic signal classification model, and may include more or fewer components than those shown in the figure.
[0247] The training device of the seismic signal classification model provided by the embodiments of the present application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the training method of the seismic signal classification model in the above embodiments.
[0248] It should be noted that although the operations are depicted in a specific order in the drawings, this should not be construed as requiring the operations to be performed in the specific order shown or sequentially, or requiring all of the illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. In addition, the separation of the various system modules and components in the above embodiments should not be understood as required in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
Claims
1. A training method for an earthquake signal classification model, characterized in that, The method includes: Obtain target seismic signal data; Convert the target seismic signal data into a two-dimensional grayscale image; Under the initial model weights of the visual encoding model, perform visual encoding on the two-dimensional grayscale image through the visual encoding model to obtain a visual encoding vector; Perform feature encoding on the target seismic signal data through a feature encoding model to obtain a feature encoding vector; Input the visual encoding vector and the feature encoding vector into a contrastive learning model for self-supervised learning to optimize the initial model weights to obtain target model weights; Construct an initial seismic signal classification model with the target model weights as the initial model parameters; Iteratively train the initial seismic signal classification model through a training data set labeled with seismic signal types to obtain a target seismic signal classification model for seismic signal classification.
2. The training method of the seismic signal classification model according to claim 1, characterized in that, The obtaining of the target seismic signal data includes: Obtain initial seismic signal data; Select data points with a preset data volume from the initial seismic signal data; Perform normalization processing on the values of the data points to obtain normalized data; Based on the original data order of the initial seismic signal data, perform equally spaced grouping on the normalized data to obtain data groups with a preset number of groups; Stitch the data groups based on the grouping order to obtain the target seismic signal data in the form of a two-dimensional matrix; the elements of the two-dimensional matrix are the normalized data.
3. The training method of the earthquake signal classification model according to claim 2, wherein, The converting of the target seismic signal data into a two-dimensional grayscale image includes: Map the normalized data to grayscale image pixels to obtain the two-dimensional grayscale image; the larger the normalized data, the larger the grayscale value of the grayscale image pixels.
4. The training method of the seismic signal classification model according to claim 1, wherein, Performing visual encoding on the two-dimensional grayscale image through the visual encoding model to obtain a visual encoding vector includes: Perform patch embedding processing on the two-dimensional grayscale image to obtain a target grayscale image; Cut the target grayscale image into N image blocks of the same size; Map the image blocks into low-dimensional vectors through linear projection; Add a preset position embedding vector to the low-dimensional vector to obtain a target vector with position information; the position embedding vector includes the relative position information of the image block in the target grayscale image; Input the target vector into the visual encoding model for encoding to obtain the visual encoding vector; the visual encoding model is a DeiT model.
5. The training method of the seismic signal classification model according to claim 1, characterized in that Performing feature encoding on the target seismic signal data through a feature encoding model to obtain a feature encoding vector includes: Extract feature data from the target seismic signal data; After normalizing the feature data, form a feature input vector; Input the feature input vector into the feature encoding model for feature encoding to obtain the feature encoding vector; wherein, the feature encoding model is an encoding model based on the KAN network architecture.
6. The training method of the seismic signal classification model according to claim 1, characterized in that, Inputting the visual encoding vector and the feature encoding vector into a contrastive learning model for self-supervised learning to optimize the initial model weights to obtain target model weights includes: Construct positive and negative samples by corresponding the visual encoding vector and the feature encoding vector one by one; Determine the similarity of each of the positive and negative samples; and form a similarity matrix with the similarities; Determine the loss function of the contrastive learning model according to the similarity matrix; Through the backpropagation algorithm, perform iterative training with the goal of minimizing the loss function until a preset iteration condition is reached; Determine the weights of the target model according to the minimized loss function.
7. The training method of the earthquake signal classification model according to claim 1, characterized in that Using the weights of the target model as the initial model parameters, construct an initial seismic signal classification model, including: Build an image classification model with the weights of the target model as the initial model parameters; Construct a seismic signal classification head composed of fully connected layers and including a preset number of neurons; Add a Transformer architecture and the seismic signal classification head to the image classification model to obtain the initial seismic signal classification model; where the Transformer architecture includes a multi-head self-attention mechanism layer and a feed-forward neural network layer.
8. A training device for an earthquake signal classification model, characterized in that The device includes: A seismic signal acquisition module for acquiring target seismic signal data; A signal conversion module for converting the target seismic signal data into a two-dimensional grayscale image; A visual encoding module for performing visual encoding on the two-dimensional grayscale image through the visual encoding model under the initial model weights of the visual encoding model to obtain a visual encoding vector; A feature encoding module for performing feature encoding on the target seismic signal data through a feature encoding model to obtain a feature encoding vector; A self-learning module for inputting the visual encoding vector and the feature encoding vector into a contrastive learning model for self-supervised learning to optimize the initial model weights to obtain the weights of the target model; A classification model construction module for constructing an initial seismic signal classification model with the weights of the target model as the initial model parameters; A model training module for iteratively training the initial seismic signal classification model through a training data set labeled with seismic signal types to obtain a target seismic signal classification model for seismic signal classification.
9. A training device for an earthquake signal classification model, comprising a memory and a processor, wherein a computer program that can run on the processor is stored on the memory, and is characterized in that When the processor executes the program, it implements the steps of the training method of the seismic signal classification model according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the training method of the seismic signal classification model according to any one of claims 1 to 7.
Citation Information
Cited By
Cable insulation damage adaptive detection method based on adversarial disturbance learning
CN120611247A
Self-supervised seismic wave screening method
CN121091355A
Elevator running state evaluation method based on multi-domain comparative learning
CN121580095A