Debris flow seismic oscillation signal identification method based on machine learning
By using the Patch FourierTransformer (PFT) model in the identification of seismic signal of mudslide flow, and using the combined technology of Transformer and LSTM, the problems of insufficient feature extraction and model overfitting in the existing technology are solved, and high-precision mudslide flow recognition is achieved.
Patent Information
- Application Number
- CN202510160487.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-02-13
AI Technical Summary
The prior art has problems such as redundant or insufficient feature extraction and overfitting of models in the identification of earthquake signals of mudslides, resulting in low recognition accuracy.
The improved model Patch FourierTransformer (PFT) based on Transformer is used to perceive the energy changes in the time-frequency graph through the Patch attention mechanism, and the slice timing features are extracted in combination with the LSTM model, embedded in position encoding, and finally calculate the attention weight through the multi-head attention mechanism to achieve recognition.
The PFT model has achieved more than 96% accuracy in the recognition of earthquake waveforms in the mudslide, and can accurately identify it in multiple mudslides, demonstrating its potential in practical applications.
Smart Images

Figure CN120085351A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geological disaster identification, and particularly to a method for identifying debris flow ground motion signals based on machine learning. Background Art
[0002] Debris flow is a common surface material process, which is formed by the rapid sliding of a large amount of water, mud, rocks and other debris under the action of gravity. It has extremely high fluidity and impact force and is extremely destructive. Since debris flow is often sudden and has great uncertainty, rapid and accurate identification of it is a very important prerequisite for disaster prevention and mitigation of geological disasters.
[0003] Traditional debris flow identification methods mainly include: identifying debris flow by monitoring the sudden increase in the flow depth or velocity in the river (gully) bed through a mud level gauge or a flow velocity meter. Although the effect is good, the conditions for installing instruments are often not available in the river (gully) channel; judging by listening to abnormal sounds, for example, if a rumbling sound is heard in a mountain gully or a deep valley, it may indicate that a debris flow has occurred, but it can only be roughly guessed and it is impossible to accurately judge which position the debris flow has occurred, and the timeliness is poor. Identifying debris flow by real-time monitoring of the river (gully) channel through video monitoring technology, but limited by factors such as mountainous area lighting, power supply, and video signal transmission, the effect is not ideal.
[0004] In recent years, machine learning methods have been widely used in the identification of debris flow ground motion signals, but still face many challenges: 1) Traditional models cannot directly process the original waveform signals and rely on manual feature extraction, which is easy to introduce redundant or insufficient features, resulting in unreasonable inductive bias; 2) Convolutional neural networks (CNNs) need to be stacked in multiple layers when reducing dimensions, which is easy to cause overfitting. For this reason, the present invention proposes an improved model based on Transformer - Patch Fourier Transformer (PFT). Through the Patch attention mechanism, PFT can effectively perceive the energy changes in the time - frequency diagram and show attention weights that are highly consistent with its spatio - temporal distribution. Using more than a dozen debris flow events in 2020 in Illgraben for testing, the PFT model has an accuracy of more than 96% in the identification of debris flow ground motion waveforms. The results show the great potential and advantages of PFT in the debris flow identification task. Summary of the Invention
[0005] In view of the above - mentioned deficiencies in the prior art, the present invention provides a method for identifying debris flow ground motion signals based on machine learning.
[0006] In order to achieve the above - mentioned invention purpose, the technical solution adopted by the present invention is as follows:
[0007] A method for identifying debris flow ground motion signals based on machine learning, comprising the following steps:
[0008] S1. Obtain debris flow ground motion signals;
[0009] S2. Construct a debris flow ground motion signal recognition model based on a sliced attention mechanism;
[0010] S3. Based on the constructed debris flow ground motion signal recognition model, extract the temporal features of the debris flow ground motion signals and embed positional encodings at different positions;
[0011] S4. Use a multi-head attention mechanism to calculate attention weights and obtain the recognition result of the debris flow ground motion signals through a fully connected layer.
[0012] Further, the S3 specifically includes the following steps:
[0013] S31. Use the debris flow ground motion signal recognition model based on the sliced attention mechanism to perform instance normalization on the debris flow ground motion signals;
[0014] S32. Cut the debris flow ground motion signals through an overlapping sliding window, and perform Fourier transform on each cut slice to obtain a slice sequence;
[0015] S33. Extract the slice temporal features of the slice sequence after Fourier transform through an LSTM model and embed the positional encoding of the corresponding position slice.
[0016] Further, the specific method of normalization in S21 is:
[0017]
[0018] In the formula, x(t) is the original value at time point t, μ and σ are the mean and standard deviation in the waveform respectively, and γ and β are learnable scaling and offset parameters.
[0019] Further, the S33 specifically includes the following steps:
[0020] S331. Cut the slice sequence after Fourier transform through an overlapping sliding window to make it a slice sequence with a smaller dimension;
[0021] S332. Extract the temporal features of each slice in the obtained slice sequence with a smaller dimension through an LSTM model, make the original slice sequence become a new slice sequence with a smaller dimension and the same number of slices, and make the LSTM model share weights in all new slice sequences;
[0022] S333. Embed the position information of the new slice sequence into the constructed debris flow ground motion signal recognition model through positional encoding.
[0023] Furthermore, the specific embedding method in S333 is as follows:
[0024]
[0025] In the formula, PE is the embedding at the corresponding position and corresponding vector dimension, pos is the current position, i is the dimension index in the position vector, and d model is the dimension of the input vector.
[0026] Furthermore, the slice representation after the embedding position encoding in S333 is:
[0027]
[0028] In the formula, is the slice after the embedding position encoding, W pos is the position encoding, is the slice in the new slice sequence.
[0029] Furthermore, S4 specifically includes the following steps:
[0030] S41: Use the slice after the embedding position encoding as the input of the encoder;
[0031] S42: Use the multi-head attention mechanism to transform the encoder input into a query matrix, a key matrix, and a value matrix respectively;
[0032] S43: Calculate the attention using the transformed query matrix, key matrix, and value matrix;
[0033] S44: Concatenate the outputs of all heads, and map the concatenated result to the set dimension of the constructed debris flow ground motion signal recognition model through a linear layer;
[0034] S45: Design a loss function to measure the difference between the predicted probability and the true probability label, and then output the recognition result of the debris flow ground motion signal.
[0035] Furthermore, the query matrix, key matrix, and value matrix in S42 are respectively represented as:
[0036]
[0037] In the formula, are respectively the query matrix, key matrix, and value matrix of the h-th head, are respectively the linear transformation matrices of the query matrix, key matrix, and value matrix of the h-th head.
[0038] Furthermore, the specific method of mapping the concatenated result to the set dimension of the constructed debris flow ground motion signal recognition model through a linear layer in S44 is:
[0039] MultiHead(Q i , K i , V i ) = Concat(head 1 , head 2 … head H )W O
[0040] Q i , K i , V i are the query matrix, key matrix, and value matrix in sequence; head H is the output of each head, with subscript H being its number, and W O is the weight matrix of the linear layer.
[0041] Furthermore, the loss function in S45 is expressed as:
[0042]
[0043] In the formula, N is the number of samples, y i is the true label of the i-th sample, is the predicted probability of the i-th sample, and BCE is the binary cross-entropy loss function.
[0044] The present invention has the following beneficial effects:
[0045] The present invention is used to identify debris flows in continuous vibration signals. The PFT attention weight distribution is highly similar to the time-frequency diagram, which is the key factor for high-precision identification. The model shows high precision in debris flow waveform identification and can accurately identify debris flows multiple times with a short time interval, demonstrating its potential in practical applications. Description of the Drawings
[0046] Figure 1 is a schematic flow diagram of the debris flow ground motion signal identification method based on machine learning according to the present invention.
[0047] Figure 2 is a schematic diagram of the performance of the PFT model at different wavelengths in the embodiments of the present invention.
[0048] Figure 3a is a schematic diagram of the original waveform in the embodiments of the present invention.
[0049] Figure 3b is the time-frequency diagram of the original waveform in the embodiments of the present invention.
[0050] Figure 3c is the attention weight distribution of the PFT model in the first-layer attention mechanism in the embodiments of the present invention.
[0051] Figure 3d This is the attention weight distribution of the PFT model of the embodiment of the present invention in the second-layer attention mechanism.
[0052] Figure 3e This is the attention weight distribution of the PFT model of the embodiment of the present invention in the third-layer attention mechanism. Detailed implementation manners
[0053] The following describes the detailed implementation manners of the present invention to facilitate those skilled in the art of the present technology to understand the present invention. However, it should be clear that the present invention is not limited to the scope of the detailed implementation manners. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are within the scope of protection.
[0054] A debris flow ground motion signal recognition method based on machine learning, as Figure 1 shown, includes the following steps:
[0055] S1. Obtain debris flow ground motion signals;
[0056] Since the debris flow (positive) and noise (negative) samples in the entire dataset are unbalanced, to ensure that the model can fully learn the waveform features of debris flow, in this embodiment, the noise samples from 2017 to 2019 are randomly sampled to make the positive and negative sample ratio 1:1. Subsequently, the dataset is divided into a training set, a validation set, and a test set, with the proportions being 80%, 10%, and 10% respectively. The training set is mainly used for the model to learn the high-level feature representation of waveform data, the validation set is used to prevent the model from overfitting, and the optimal model state is saved in time through the early stopping strategy. The test set is then used for the final model performance evaluation to ensure the unbiasedness of the results. The data in 2020 is used to evaluate the continuous recognition and early warning performance of the vibration signal during the actual operation of the final model.
[0057] This study adopts a supervised learning method. The start and end times of each debris flow event in the training set are defined by timestamps. Within these time intervals, the labels of the relevant samples are set to 1. Considering the uncertainty of manual annotation and the specific characteristics of debris flow events, in this embodiment, linearly increasing and decreasing labels are set respectively before and after the start of debris flow and before and after the end, gradually increasing from 0 to 1 and gradually decreasing from 1 to 0, so as to blur the specific start and end moments of debris flow and enhance the model's ability to recognize event boundaries.
[0058] In order to obtain sufficient context information, in the present invention, the three-component waveform is cut into 5-minute-long waveforms, and the overlap rate is 80%, that is, the step size of each cut is 1 minute.
[0059] S2. Construct a debris flow ground motion signal recognition model based on the slice attention mechanism;
[0060] The Transformer architecture with only an encoder (Encoder - only) is mainly used to process tasks that do not require generating sequences, such as text classification, entity recognition, or sentence embedding generation. In this architecture, only the encoder part of the Transformer is included, and each encoder layer consists of a self - attention mechanism and a feed - forward network. This architecture can generate high - quality feature representations by capturing the global dependencies between elements in the input sequence, thus effectively supporting downstream classification or other tasks.
[0061] We define the following problem: Given a three - component data sample, where L is the length of the waveform, our model takes to represent, where C represents the classification probability for each minute of the waveform, and the model uses a Transformer encoder as the core architecture of this embodiment.
[0062] S3. Based on the constructed debris flow ground motion signal recognition model based on the slice attention mechanism, extract the time - series features of the debris flow ground motion signal and embed the position encodings at different positions;
[0063] In this embodiment, it specifically includes the following steps:
[0064] S31. Use the debris flow ground motion signal recognition model based on the slice attention mechanism to perform instance normalization on the debris flow ground motion signal;
[0065] Instance normalization performs independent data normalization on each channel in each sample to adjust the scale and distribution of the data, making the training process of the model more stable and helping the model converge quickly in the initial stage of training.
[0066]
[0067] where x(t) is the original value at time point t, μ and σ are the mean and standard deviation in the waveform respectively, and γ and β are learnable scaling and offset parameters.
[0068] S32. Cut the debris flow ground motion signal through an overlapping sliding window, and perform Fourier transform on each cut slice to obtain a slice sequence;
[0069] For the data of each channel in the input sample In this embodiment, it is divided into overlapping slices, and the length of each slice in this embodiment is denoted as and the step size of the slice in this embodiment is denoted as Then x in this process i will become where N is the number of slices, and
[0070] In the time series model, the Fourier transform can effectively capture the frequency characteristics in the data, helping the model better identify and understand the patterns hidden in the time dimension. At the same time, the Fourier transform can effectively separate noise, especially high-frequency noise, in the frequency domain, thereby improving the quality of the signal. In addition, by transforming complex time series data from the time domain into simple frequency components in the frequency domain, the Fourier transform can simplify data processing and reduce the complexity of the model.
[0071] S33. Extract the slice time series features of the slice sequence after Fourier transform through the LSTM model, and embed the position encoding of the slice at the corresponding position.
[0072] The specific method is as follows:
[0073] S331. Cut the slice sequence after Fourier transform again through an overlapping sliding window to make it a slice sequence with a smaller dimension;
[0074] S332. Extract the time series features of each slice in the obtained slice sequence with a smaller dimension through the LSTM model, making the original slice sequence become a new slice sequence with a smaller dimension and the same number of slices, and making the LSTM model share weights in all new slice sequences;
[0075] When the sequence length increases, the dimension of each patch in the sequence will also increase accordingly. In this embodiment, LSTM is used to capture the dependencies in the patch sequence and retain these key information during the dimensionality reduction process. For each patch: In this embodiment, it is changed to a smaller patch: where j = 1, 2... K is the index of the small patch, is the dimension of each small patch, satisfying Each patch becomes after passing through the LSTM, and finally the original sequence becomes LSTM shares weights among all patches.
[0076] S333. Embed the position information of the new slice sequence into the constructed debris flow ground motion signal recognition model through position encoding.
[0077] In the attention mechanism of the Transformer, the process of calculating the attention weights is unordered, and it cannot directly capture the sequential relationship between patches in the waveform. The order of patches is particularly important for waveform recognition. Therefore, in this embodiment, the position information of the patches in the waveform is explicitly injected into the model through position encoding. The embedding method of this embodiment is as follows:
[0078]
[0079] where pos is the current position (index in the sequence), i is the dimension index in the position vector, and d model is the dimension of the input vector.
[0080] S4. Calculate the attention weights using the multi-head attention mechanism, and obtain the recognition result of the debris flow ground motion signal through a fully connected layer.
[0081] In this embodiment, it specifically includes the following steps:
[0082] S41. Use the sliced data after embedding the position encoding as the input of the encoder;
[0083] The Transformer architecture with only the encoder (Encoder-only) is mainly used to process tasks that do not require generating sequences, such as text classification, entity recognition, or sentence embedding generation. In this architecture, only the encoder part of the Transformer is included, and each encoder layer consists of a self-attention mechanism and a feed-forward network. This architecture can generate high-quality feature representations by capturing the global dependencies between elements in the input sequence, thus effectively supporting downstream classification or other tasks.
[0084] S42. Use the multi-head attention mechanism to transform the encoder input into query matrix, key matrix, and value matrix respectively;
[0085] For each input token, calculate the Query, Key, and Value vectors, which are obtained through linear transformation (weight matrix). The size of the matrix is N×d. Therefore, the complexity of calculating Query, Key, and Value is O(N·d 2 ).
[0086] For each Query, calculate the dot product with all other Keys to obtain an attention score matrix with a size of N×N. Therefore, the complexity of the dot product is O(N 2 ).
[0087] Calculate the Softmax for each Query to obtain the weights, and the complexity of this operation is also O(N 2 ).
[0088] The output corresponding to each Query is the weighted sum of all Values, and the complexity of this weighted summation is O(N 2 ), because the output at each position needs to be weighted and summed with N Values.
[0089] Therefore, the total complexity of a single Self-Attention calculation is: O(N·d 2 )
[0090] S43. Calculate the attention using the transformed query matrix, key matrix, and value matrix;
[0091] Each Transformer layer also contains a feed-forward network, which is usually composed of two linear transformations and an activation function (such as ReLU). Assuming the hidden layer dimension of each layer is d ff (usually d ff >> d), then the calculation process of the Feedforward network includes:
[0092] The first linear transformation: from dimension d to d ff , and the calculation complexity is O(N·d·d ff ).
[0093] Activation function: Assuming the complexity of the activation function is a constant O(1), the complexity of this operation is O(N·d ff ).
[0094] The second linear transformation: from d ff back to d, and the calculation complexity is O(N·d ff ·d).
[0095] Therefore, the total complexity of the Feedforward network is: O(N·d ff ·d).
[0096] The space complexity mainly consists of the following parts:
[0097] Storage of input and output: The input and output of each token need to be stored, so the space complexity of the input and output is O(N·d).
[0098] Weight matrix of Self-Attention: Self-Attention needs to store an N×N attention score matrix, and the space complexity is O(N 2 ).
[0099] Parameters of the Feedforward network: The Feedforward network has two weight matrices for linear transformations, which are d×d ff and d ff× d, so the space complexity is O(d ff · d).
[0100] Therefore, the space complexity of each layer is: O(N 2 + N · d + d ff · d).
[0101] where L is the number of layers of the Transformer, N is the length of the input sequence, d is the hidden layer dimension, and d ff is the hidden layer dimension of the Feedforward network.
[0102] When this embodiment divides a one-dimensional sequence into slices and considers the case where the stride is s, the division method will be different from the case without using a stride. The stride s represents the distance between two consecutive Patches, and usually the stride is less than the Patch length L patch (also known as "overlap"). This method is similar to the operation of a sliding window.
[0103] To calculate the number of Patches after division, this embodiment can deduce a formula based on the stride and the Patch length. The length N of the sequence will be divided into multiple Patches, and the starting position of each Patch is 0, s, 2s,..., until the starting position of the last Patch does not exceed N - L patch . Therefore, the number of Patches after division is:[[]]
[0104] When considering the stride s, the time complexity of Self-Attention depends on the new sequence length N patch and the dimension d of each Patch. The time complexity of Self-Attention for each layer is still O(N patch 2 · d), and the space complexity is O(N patch 2 + N patch · d)
[0105] S44. Concatenate the outputs of all heads, and map the concatenated result to the set dimension of the constructed debris flow ground motion signal recognition model through a linear layer;
[0106] After calculating the positional encodings of Patches at different positions, first this embodiment projects to the feature space d of the model of this embodiment through a linear layer model , and embed the positional encoding, that is Here Then As the input of the encoder, the attention mechanism of this embodiment adopts multi-head attention (Figure c) so that the model can capture different features and dependencies of the input data from different perspectives or subspaces. Here, h = 1, 2, 3... H represents the number of heads in this embodiment, and each head will transform its input into Query, Key, and Value matrices respectively: and where Subsequently, by calculating its attention
[0107]
[0108] Then, the outputs of all heads are concatenated, and then the concatenated result is mapped to the dimension required by the model through a linear layer:
[0109] MultiHead(Q i ,K i ,V i ) = Concat(head 1 ,head 2 …head H )W O
[0110] where head i is the output of each head, Finally, this embodiment passes it through a feed-forward layer to obtain the classification result for each minute of the waveform: where y k ∈(0, 1), k = 0, 1…C.
[0111] S45. Design a loss function to measure the difference between the predicted probability and the true probability label, and then output the recognition result of the debris flow ground motion signal.
[0112] Adopt BCELoss (Binary Cross-Entropy Loss) as the loss function in the classification problem of this embodiment to measure the difference between the predicted probability and the true probability label. Its expression is as follows:
[0113]
[0114] where N is the number of samples, y i is the true label of the i-th sample, is the predicted probability of the i-th sample.
[0115] Since debris flow itself is different from an earthquake (point source) and is a moving line source, due to the collisions between particles in the fluid and between the particles themselves and the riverbed, the debris flow continuously radiates surface waves outward during its movement in the gully. To capture context information of different lengths, the experiment kept the same training samples for different models, but the sample lengths in different models were not the same; the verification results in the 2017 - 2019 dataset are as Figure 2 shown.
[0116] It can be Figure 2 found that the F1 Score and Accuracy generally show an upward trend between 1 - 5 minutes. This indicates that when the waveform is appropriately extended, the waveform itself can provide more context information to help the model learn. When the waveform is greater than 5 minutes, the overall performance decreases. This indicates that an overly long waveform will first lead to a significant increase in the number of model parameters and is prone to underfitting due to limited training samples. Secondly, a larger window may introduce more noise or cause information overload in some cases, thus reducing the recognition accuracy of the model.
[0117] When using a short waveform (<3 minutes) for input, the Recall of the 1 - minute model for recognition is very high but the Precision is low, indicating that the model performs well in recognizing debris flow events at this waveform length, but it will also misclassify a large number of negative samples (non - debris flow events) as positive samples. The Precision of the 2 - minute model is high, but the Recall is low, indicating that the model is very accurate in recognizing positive samples, but the model misses many positive samples. When the waveform is appropriately extended (3 - 5 minutes), the difference between Recall and Precision shows a decreasing trend, but when the waveform is too long (>5 minutes), this difference is gradually amplified, meaning that the model is very cautious in recognizing positive class samples and will only classify the waveform as a positive class when it is very certain. Among the tested waveform lengths, the 5 - minute waveform well balances the Recall (0.955) and Precision (0.959) metrics, indicating that a good balance has been achieved between the false alarm rate and the missed alarm rate in actual early warning.
[0118] From these experimental results, it can be clearly seen that the PFT model has advantages in many aspects of the debris flow early warning task: different from traditional models that require complex feature engineering, the PFT model can directly extract the key features of the time series from the original waveform without human intervention. This enables the model to have a stronger ability to capture the potential patterns of the data, and the PTF model can not only adapt to different lengths of time windows but also maintain relatively stable performance on an appropriate time scale (2 - 5 minutes), with PTF_5min performing the best.
[0119] To more intuitively observe the overall performance of the PTF model and its classification performance for each category, in this embodiment, the ROC curve and the confusion matrix are calculated: the former is a tool for evaluating the performance of a classification model, which shows the relationship between the false positive rate (FPR) and the true positive rate (TPR) of the model; the latter shows the comparison between the predicted results and the actual results of the model in the form of a matrix, so as to analyze the correct and incorrect classification situations of the model.
[0120] Among them, the true positive rate (TPR): represents the proportion of positive classes correctly classified, also known as recall or sensitivity; the false positive rate is the proportion of the number of misjudgments of the model to the true value of negative.
[0121]
[0122] Where TP is the number of correctly predicted positive classes, FN is the number of actual positive classes but predicted as negative classes, FP is the number of actual negative classes but predicted as positive classes, and TN is the number of correctly predicted negative classes;
[0123] It can be found from the confusion matrix that when the waveform is less than 5 minutes, appropriately extending the waveform is beneficial to the recognition of positive examples (mudslides) (0.93 -> 0.95); when the waveform is greater than 5 minutes, its ability to recognize positive examples decreases, but the model performs more accurately in the recognition of negative class samples (0.97 -> 0.99). The reason may be that when the mudslide waveform is too long, due to the change in the dynamic process of the mudslide itself (such as erosion), the mudslide signals before and after in the waveform are different, resulting in a decrease in the model accuracy.
[0124] Generally speaking, the model based on PFT shows strong robustness in the mudslide classification task, especially for a wavelength of 5 minutes. At this wavelength, the model has a high ability to recognize both positive and negative class samples.
[0125] The attention mechanism of the model can learn the importance of different Patches in the original waveform, that is, the distribution of attention weights. The model can form a global understanding of the waveform, thereby "perceiving" the energy changes in the waveform, and the attention weight distribution shows consistency with the time-frequency diagram of the waveform in space-time.
[0126] Specifically, we visualized and analyzed the attention weights at different levels of the model. As shown in Figure 3(c), when feature extraction is performed at the first layer of the model, the weight difference of the model for different patches is only 0.93% (weight range: 0.00845 - 0.00853). This result indicates that at the primary stage, the model focuses on the overall features of the waveform, forming a global understanding, and at the same time, its weight distribution shows a high degree of consistency with the energy changes in the time-frequency diagram. At the second layer of the model (Figure 3(d)), the attention mechanism assigns higher weights to the parts with larger energy changes in the waveform (the weight is increased by about 2 times compared to the first layer), and the weight difference between different patches is amplified by about 70%. This phenomenon indicates that the model begins to focus on the regions with significant energy changes in the waveform. At the last layer of the model (Figure 3(e)), the weight difference between patches is further amplified (about 80%), and the weight distribution becomes clearer. Generally speaking, during the feed-forward process of the model, the change in the attention distribution presents a process similar to denoising, and its attention weight distribution always maintains a high spatio-temporal consistency with the energy changes in the time-frequency diagram.
[0127] We further analyzed the influence of different Fourier transform positions on the attention distribution. The results show that directly performing Fourier transform on the original waveform will cause the model to over-focus on a specific frequency band, while when no Fourier transform is used, the model can hardly effectively distinguish the energy changes in different parts at the first layer, indicating that it is difficult for the model to effectively learn the waveform features at this time. Both of these situations will lead to a significant decline in the model performance, which indicates that accurate attention weight distribution is crucial for the high-precision recognition of the model.
[0128] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0129] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1The functions specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one Figure 1 one process or more processes and / or boxes Figure 1 or more boxes.
[0131] In the present invention, specific embodiments are used to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. At the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation on the present invention.
[0132] Those of ordinary skill in the art will realize that the embodiments described herein are for helping the reader understand the principles of the present invention, and it should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those of ordinary skill in the art can make various other specific deformations and combinations that do not depart from the essence of the present invention based on the technical revelations disclosed in the present invention, and these deformations and combinations are still within the protection scope of the present invention.
Claims
1. A method for identifying debris flow seismic signals based on machine learning, characterized in that: The steps include: S1, obtaining debris flow seismic signals; S2. Construct a debris flow seismic signal recognition model based on slice attention mechanism; S3, extracting the time series features of debris flow earthquake signals based on the constructed slice attention mechanism of debris flow earthquake signal recognition model, and embedding the position codes of different positions; S4. The multi-head attention mechanism is used to calculate the attention weight, and the debris flow seismic signal recognition result is obtained through the fully connected layer.
2. The method for identifying debris flow seismic signals based on machine learning according to claim 1, characterized in that: The S3 specifically includes the following steps: S31, performing instance normalization processing on the debris flow seismic signal using a debris flow seismic signal recognition model based on a slice attention mechanism; S32, cutting the debris flow seismic signal through overlapping sliding windows, and performing Fourier transform on each cut slice to obtain a slice sequence; S33. Extract the slice temporal features from the slice sequence after Fourier transformation through the LSTM model, and embed the position code of the slice at the corresponding position.
3. The method for identifying debris flow seismic signals based on machine learning according to claim 2, characterized in that: The specific method of normalization in S21 is: Where x(t) is the original value at time point t, μ and σ are the mean and standard deviation in the waveform, and γ and β are learnable scaling and offset parameters, respectively.
4. The method for identifying debris flow seismic signals based on machine learning according to claim 2, characterized in that: The S33 specifically includes the following steps: S331, cutting the slice sequence after Fourier transformation through overlapping sliding windows to transform it into a slice sequence with a smaller dimension; S332, extracting the time series features of the corresponding slices from each slice in the obtained slice sequence with a smaller dimension through the LSTM model, so that the original slice sequence is converted into a new slice sequence with a smaller dimension and the same number of slices, and the LSTM model shares weights in all new slice sequences; S333. Embed the position information of the new slice sequence into the constructed debris flow seismic signal recognition model through position coding.
5. The method for identifying debris flow seismic signals based on machine learning according to claim 4 is characterized in that: The specific method of embedding in S333 is: Where PE is the embedding of the corresponding position and the corresponding vector dimension, pos is the current position, i is the dimension index in the position vector, and d model is the dimension of the input vector.
6. The method for identifying debris flow seismic signals based on machine learning according to claim 4, characterized in that: The slice after embedding position coding in S333 is represented as: In the formula, is the slice after embedding position encoding, W pos is the position code, is a slice in the new slice sequence, W P is the linear layer projection matrix.
7. The method for identifying debris flow seismic signals based on machine learning according to claim 4, characterized in that: The S4 specifically includes the following steps: S41, using the slice after embedding position encoding as the input of the encoder; S42, using a multi-head attention mechanism to convert the encoder input into a query matrix, a key matrix, and a value matrix respectively; S43, calculating attention using the transformed query matrix, key matrix and value matrix; S44, splicing the outputs of all heads, and mapping the spliced results to the set dimension of the constructed debris flow seismic signal recognition model through a linear layer; S45. Design a loss function to measure the difference between the predicted probability and the true probability label, and then output the debris flow seismic signal recognition result.
8. The method for identifying debris flow seismic signals based on machine learning according to claim 7, characterized in that: The query matrix, key matrix and value matrix in S42 are respectively expressed as: In the formula, in the formula, They are the query matrix, key matrix, and value matrix of the h-th head, respectively. These are the linear transformation matrices of the query matrix, key matrix, and value matrix of the h-th head, respectively.
9. The method for identifying debris flow seismic signals based on machine learning according to claim 7, characterized in that: The specific method of mapping the spliced result to the set dimension of the constructed debris flow seismic signal recognition model through the linear layer in S44 is: MultiHead(Q i ,K i ,V i )=Concat(head1,head2…head H )W O In the formula, Q i , K i 、V i They are query matrix, key matrix and value matrix respectively; head H The subscript H is the number of each head output, and W O is the weight matrix of the linear layer.
10. The method for identifying debris flow seismic signals based on machine learning according to claim 7, characterized in that: The loss function in S45 is expressed as: Where N is the number of samples, y i is the true label of the i-th sample, is the predicted probability of the i-th sample, and BCE is the binary cross entropy loss function.
Citation Information
Patent Citations
Motion intention recognition method and system based on multi-head re-attention mechanism
CN115177273A
Brain electrical emotion recognition method based on attention mechanism space-time position coding
CN115736923A
Earthquake random noise suppression method based on self-attention convolution auto-encoder
CN116559945A
Neural machine translation method based on discrete Fourier transform and skipping sublayers
CN116595996A
Seismic signal processing method based on multi-feature fusion
CN116660992A
Cited By
Mine earthquake intelligent identification method based on multi-mode deep learning and signal processing
CN120742406A
Debris flow velocity monitoring method and system based on Hilbert transform envelope analysis
CN121721308A
Debris flow seismic oscillation monitoring and early warning method and system
CN122085357A