A method and system for dividing a construction water inrush catastrophe stage based on a Transformer architecture
Patent Information
- Application Number
- CN202611041989.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-14
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]为了解决现有构造突水灾变阶段划分方法由于对多物理场时序数据的长程依赖与阶段边界模糊特征捕捉能力不足,导致阶段划分精度低、鲁棒性差的技术问题,本发明提供一种基于Transformer架构的构造突水灾变阶段划分方法及系统
1、本发明通过构建基于Transformer自监督表示的时间序列分段与阶段识别模型,利用随机掩码特征重建策略对多物理场时序数据进行自监督预训练,实现了无需先验经验假设的构造突水灾变演化阶段无监督自动划分,避免了传统方法依赖专家经验阈值导致主观性强、适用性受限的技术缺陷。
Smart Images

Figure CN122818094A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coal mine water hazard prevention and control and deep learning intersection technology, and in particular to a method and system for constructing water inrush disaster stage division based on Transformer architecture. Background Technology
[0002] With the continuous increase in coal mining depth, deep mines are subjected to the combined effects of high ground stress, high water pressure, and complex geological structures, making tectonic floor water inrush a major type of water hazard restricting safe production. Engineering practice shows that tectonic water inrush is not an instantaneous event, but a gradual catastrophic process involving energy accumulation, structural evolution, and eventual instability and connection under the coupling effects of mining disturbances and multi-physics fields. Therefore, identifying the key evolutionary stages of water inrush from the perspective of the entire catastrophic evolution process is of great engineering significance for achieving accurate early warning and prevention of water hazards.
[0003] Currently, methods for classifying tectonic water inrush stages mainly include qualitative judgment methods based on expert experience and quantitative identification methods based on data-driven approaches. The former uses engineering experience to set single or combined thresholds such as stress and water pressure for stage classification; the latter mainly uses traditional machine learning models to achieve stage identification by extracting and classifying features from multiphysics monitoring data. However, the above-mentioned existing technologies still have significant shortcomings: methods based on expert experience are highly dependent on prior assumptions, the determination of stage boundaries is highly subjective, it is difficult to adapt to the differentiated disaster characteristics under different geological conditions, and it cannot achieve real-time dynamic identification; data-driven methods based on traditional machine learning are insufficient in capturing the non-stationary characteristics of multiphysics time series of tectonic water inrush, the ambiguity of stage boundaries, and long-range time series dependencies, resulting in low stage classification accuracy and poor robustness, making it difficult to meet the actual needs of accurate early warning of water inrush disasters in deep mines. At present, there is a need for a method and system for classifying tectonic water inrush disaster stages based on the Transformer architecture. Summary of the Invention
[0004] To address the technical problems of low accuracy and poor robustness in existing methods for dividing stages of tectonic flood disasters due to their insufficient ability to capture the long-range dependence of multiphysics time-series data and the fuzzy features of stage boundaries, this invention provides a method and system for dividing stages of tectonic flood disasters based on the Transformer architecture.
[0005] Firstly, the present invention provides a method for constructing a flood catastrophe stage division based on the Transformer architecture, which adopts the following technical solution: A method for constructing phase division of a flood disaster based on the Transformer architecture, comprising: Construct a numerical model of the evolution of water inrush in the base plate with structural features, and obtain a multi-physics time series dataset of the entire mining process; Feature filtering was performed on multiphysics time series datasets to identify key feature parameters strongly correlated with water inrush evolution; Cluster analysis based on key feature parameters is used to determine the optimal number of water inrush stages. Based on the key feature parameters and the optimal number of water inrush stages, a time series segmentation and stage identification model based on Transformer self-supervised representation is constructed, and the stage segmentation results are output. Based on the stage division results and the key feature parameters, a staged representation model is constructed and the stage transition threshold is determined, outputting the stage division results of the water inrush disaster.
[0006] Furthermore, the acquisition of the multi-physics time series dataset for the entire mining process includes constructing a numerical model of the evolution of water inrush in the floor with structural features based on the actual geological conditions of the target mine, setting up monitoring points in key structural areas, aquifer boundaries and floor failure zones, collecting time series data of three types of physical quantities: water pressure, stress and displacement, and constructing a multi-physics time series dataset.
[0007] Furthermore, the determination of key characteristic parameters strongly correlated with water inrush evolution includes calibrating the integral of the flow velocity in the goaf floor as a characterization parameter for constructing the water inrush evolution process, and normalizing the multiphysics time series dataset. Using each characteristic parameter as the independent variable and the velocity integral as the dependent variable, a multinomial regression model is constructed to quantify the nonlinear relationship between the characteristic parameters and the velocity integral. The coefficients of determination for each feature parameter in the multinomial regression model are calculated using cross-validation. The parameters are then sorted from largest to smallest by their coefficients, and the top n parameters are retained as key feature parameters. The formula for calculating the coefficients of determination is as follows: , in, As the coefficient of determination, This is the sum of squares of the differences between the actual observed values and the model predictions of the integral flow velocity. It is the sum of squares of the differences between the actual observed values and their mean values for the integral of the flow velocity.
[0008] Furthermore, determining the optimal number of water inrush stage divisions includes constructing a clustering input matrix based on key feature parameters, wherein the rows of the clustering input matrix correspond to multi-dimensional feature samples at time steps, and the columns of the clustering input matrix correspond to the dimensions of key feature parameters. Within the preset number of clusters, the K-Means clustering algorithm is used to iteratively divide the samples at each time step until the centroids converge, thus obtaining the cluster allocation results and cluster centroids under each number of clusters. Calculate the sum of squares within each cluster corresponding to the number of clusters, plot a broken line curve of the sum of squares within each cluster as a function of the number of clusters, and analyze the elbow inflection characteristics of the broken line curve. The CHI index is introduced as an auxiliary evaluation index to calculate the ratio of inter-cluster dispersion to intra-cluster dispersion for each number of clusters, thereby evaluating the effectiveness of clustering. Calculate the relative decrease rate of the sum of squares within clusters between adjacent clusters, compare the relative decrease rate with a preset significance threshold, and determine the critical point at which the decrease in the sum of squares within clusters changes from significant to insignificant; Based on the elbow turning characteristics, CHI index, and critical point, the optimal number of water inrush stages is determined, and the formula for calculating the relative descent rate is as follows: , in, The number of the Kth cluster relative to the Kth cluster The relative decrease rate of the sum of squares within a cluster for a given number of clusters. Let K be the sum of squares within each cluster. K is the number of clusters The sum of squares within the cluster at time 1.
[0009] Furthermore, the construction of the time series segmentation and stage recognition model based on Transformer self-supervised representation includes inputting the key feature parameter dataset into the Transformer encoder network, injecting temporal position information into the input sequence through sine-cosine position encoding, and performing self-supervised pre-training of the Transformer encoder network using a random mask feature reconstruction strategy. Based on the trained Transformer encoder network, the sliding window embedding representation is extracted, the dynamic similarity of adjacent window embeddings is calculated, the stage change score is obtained, and after smoothing, the peak point is extracted as the stage boundary. The full time series data is divided into the corresponding number of evolution stages, and the stage division result is output.
[0010] Furthermore, the self-supervised pre-training includes: Using the Transformer encoder as the basic component, a reconstruction head consisting of fully connected layers and activation functions is added to embed and map the encoded features back to the original input dimension. Define learnable mask markers, randomly select time steps according to a preset mask ratio to generate mask indexes, construct a Boolean mask matrix, and replace the original features of the mask positions with the mask markers to obtain the mask input sequence; A Transformer encoder network is trained using a masked input sequence. The mean square error loss of the masked position reconstruction is used as the optimization objective. The optimization is iteratively performed until convergence, and the trained Transformer encoder is saved. The formula for calculating the mean square error loss of the masked position reconstruction is as follows: , in, Loss due to mask reconstruction For the set of mask locations, The reconstructed value at the t-th mask position. This is the original value at the t-th mask position.
[0011] Furthermore, the calculation of the dynamic similarity of adjacent window embeddings includes setting the sliding window size, constructing a time window embedding representation, calculating the average vector of adjacent sliding window embeddings before and after each window position, measuring the similarity of feature distributions before and after time periods through cosine similarity, and calculating a change score. The change score sequence is smoothed using a Savitzky-Golay filter to filter candidate change points. The candidate change points are adjusted according to the number of optimal water inrush stages, and the window sequence is divided into the corresponding number of evolution stages. The formula for calculating the change score is: , in, , These are the average vectors of the sliding window embedding before and after window position t, respectively. To adjust the sliding window size, For cosine similarity, Score for changes, Let be the embedding vector of the t-th window.
[0012] Furthermore, the output constructs a stage division result for a sudden flood disaster, which includes using principal component analysis to reduce the dimensionality of multidimensional features based on the key feature parameter dataset and the stage division results, and constructing a single-dimensional function representation model. Substitute the sample values corresponding to the stage transition points into the single-dimensional function representation model to calculate the representation threshold of the water inrush evolution stage transition points. Substituting the key feature parameters of the sample to be judged into the single-dimensional function representation model, a single-dimensional comprehensive early warning index is calculated. The single-dimensional comprehensive early warning index is compared with the representation threshold to determine the stage of tectonic water inrush evolution, and the stage division result of the tectonic water inrush disaster is output. The expression of the single-dimensional function representation model is: , in, It is a single-dimensional comprehensive early warning indicator. Let be the weight coefficient of the i-th principal component. To retain the number of principal components, Let i be the i-th eigenvalue of the covariance matrix. For the intercept term, This represents the total number of dimensions of the original key features.
[0013] Furthermore, the comparison of the single-dimensional comprehensive early warning index with the characterization threshold includes setting a minimum stage transition threshold and a maximum stage transition threshold; When the single-dimensional comprehensive early warning index is less than the minimum stage transition threshold, it is determined to be the initial stable stage. At this time, the tectonic structure is not significantly disturbed by mining, and the water pressure and stress parameters remain stable. When the single-dimensional comprehensive early warning index is greater than or equal to the lowest stage conversion threshold and less than the highest stage conversion threshold, it is determined to be in the activation and evolution stage. At this time, the structure is activated by mining disturbance and fractures gradually develop. When the single-dimensional comprehensive early warning index is greater than or equal to the highest stage transition threshold, it is determined to be in the unstable connection stage, at which point the water diversion channel is basically formed.
[0014] Secondly, a system for dividing the stages of a flood disaster based on the Transformer architecture includes: The data acquisition module is used to construct a numerical model of the evolution of water inrush in the foundation with structural features, and to acquire a multi-physics time series dataset of the entire mining process; The feature selection module, connected to the data acquisition module, is used to perform feature selection on multiphysics time series datasets to determine key feature parameters that are strongly correlated with the evolution of water inrush. The stage number determination module, connected to the feature filtering module, is used to perform cluster analysis based on key feature parameters to determine the optimal number of water inrush stages. The stage identification module, connected to the feature filtering module and the stage number determination module, is used to construct a time series segmentation and stage identification model based on Transformer self-supervised representation based on key feature parameters and the optimal number of water inrush stages, and output the stage segmentation results. The characterization and threshold determination module, connected to the stage identification module and the feature filtering module, is used to construct a staged characterization model and determine the stage transition threshold based on the stage division results and key feature parameters, and output the stage division results of the flood disaster.
[0015] In summary, the present invention has the following beneficial technical effects: 1. This invention constructs a time series segmentation and stage identification model based on Transformer self-supervised representation, and uses a random mask feature reconstruction strategy to perform self-supervised pre-training on multi-physics time series data. This achieves unsupervised automatic segmentation of the evolution stages of a sudden flood disaster without prior experience assumptions, avoiding the technical defects of traditional methods that rely on expert experience thresholds, resulting in strong subjectivity and limited applicability.
[0016] 2. This invention extracts the sliding window embedding representation based on the trained Transformer encoder, calculates the dynamic similarity of adjacent window embeddings to obtain the stage change score, and uses a Savitzky-Golay filter to smooth the change score sequence to extract the stage boundary. This effectively captures the non-stationary characteristics and long-range temporal dependencies of multi-physics temporal data, and improves the identification accuracy and robustness of the classification results of the constructed water inrush evolution stage boundary.
[0017] 3. This invention uses principal component analysis to reduce the dimensionality of multidimensional features based on key feature parameter datasets and stage division results to construct a single-dimensional function representation model, and calculates the representation threshold of the transition point of the water inrush evolution stage. This realizes the dynamic quantitative representation of the water inrush disaster evolution process, and provides quantitative indicators and stage discrimination basis with monotonicity and physical interpretability for water inrush disaster early warning.
[0018] 4. This invention performs feature screening and normalization on the multi-physics time series dataset of the entire mining process, and analyzes the variation characteristics of the sum of squares within the cluster based on the elbow rule to determine the optimal number of stages. This achieves data-driven adaptive determination of the number of stages and effective selection of key feature parameters, enhancing the adaptability of the stage division model to the differentiated disaster characteristics under different geological conditions. Attached Figure Description
[0019] Figure 1 This is an overall flowchart of a method for dividing a flood disaster phase based on the Transformer architecture, according to an embodiment of the present invention.
[0020] Figure 2 This is a schematic diagram of the numerical calculation model according to an embodiment of the present invention; wherein, Figure 2 (a) is a diagram showing the location and numbering of the model detection points. Figure 2 (b) is a diagram showing the water pressure distribution during the extraction process. Figure 2 (c) is a pressure distribution diagram during the mining process. Figure 2 (d) is a displacement distribution diagram during the mining process.
[0021] Figure 3 This is a ranking chart of the fitting accuracy of key feature parameters in embodiments of the present invention.
[0022] Figure 4 The diagram shows the result of determining the optimal number of stages for the elbow rule in an embodiment of the present invention.
[0023] Figure 5 This is a flowchart illustrating the water inrush stage division in an embodiment of the present invention.
[0024] Figure 6 This is a flowchart of the model self-supervised pre-training process according to an embodiment of the present invention.
[0025] Figure 7 This is a diagram showing the stage change score and boundary detection results of an embodiment of the present invention; wherein, Figure 7 (a) is a score chart of stage change points. Figure 7 (b) is a diagram showing the stages of characterizing parameters and displacement features. Figure 7 (c) is a diagram showing the characterization parameters and water pressure characteristic stages. Figure 7 (d) is a diagram showing the characterization parameters and stress characteristic stages.
[0026] Figure 8 This is a graph of the staged function representation model of an embodiment of the present invention. Detailed Implementation
[0027] The present invention will be further described in detail below with reference to the accompanying drawings.
[0028] Example 1 Reference Figure 1 This embodiment of a method for constructing a flood catastrophe phase division based on the Transformer architecture includes: S1. Construct a numerical model of the evolution of water inrush in the base plate with structural features, and obtain a multi-physics time series dataset of the entire mining process; S2. Perform feature filtering on the multiphysics time series dataset to determine the key feature parameters that are strongly correlated with the evolution of water inrush. S3. Perform cluster analysis based on key feature parameters to determine the optimal number of water inrush stages; S4. Based on the key feature parameters and the optimal number of water inrush stage divisions, construct a time series segmentation and stage identification model based on Transformer self-supervised representation, and output the stage division results. S5. Based on the stage division results and the key feature parameters, construct a staged representation model and determine the stage transition threshold, and output the stage division results of the water inrush disaster.
[0029] Specifically, a method for constructing a flood disaster phase division based on the Transformer architecture includes the following steps: like Figure 1 As shown in Figure S1, this embodiment takes a typical structurally developed mining face in the target mining area as the application scenario and constructs a multiphysics time series dataset according to the following steps. First, the geological structural characteristics and hydrogeological conditions of the target mining area are comprehensively studied, and the actual stratigraphic structure, structural distribution and hydrogeological parameters are reasonably generalized. A numerical model of the evolution of bottom water inrush containing the structure is established using FLAC3D finite difference software.
[0030] The model's geometric dimensions are set to 900m × 300m × 600m (length × width × height), with the coal seam buried at a depth of approximately 900m and an average thickness of 4m. The structural zone width is set to 3m, with a drop of 10m and a dip angle of 60° to simulate the control effect of actual fault structures on the evolution of water inrush in the floor. Regarding boundary conditions, a 16.8MPa equivalent uniformly distributed vertical load is applied to the top boundary to simulate the self-weight of the overlying strata; the bottom boundary is set as a fixed constraint; normal displacement constraints and a 9.8MPa normal stress are applied to the four lateral boundaries; and a constant water pressure of 6.8MPa is applied to the Ordovician limestone aquifer below the floor to simulate the effect of confined water. In terms of mining process simulation, the mining step length is set to 50m per step, with six sequential steps and a total advance distance of 300m. The dynamic evolution of the mining stress field, seepage field, and displacement field is simulated through gradual excavation.
[0031] like Figure 2 As shown, in terms of monitoring deployment, 14 monitoring points were set up at key locations such as the aquifer-structure interface, the bottom plate-structure interface, the roof collapse zone, and the bottom plate failure zone. Time series data of three physical quantities, namely water pressure, displacement, and stress, were collected in real time. A total of 32 sets of time series data with a length of 3600 were collected to construct a time series dataset containing multi-physics coupling information, providing a data foundation for subsequent feature selection and stage division.
[0032] S2. Perform feature filtering on the multiphysics time series dataset constructed in step S1 to determine key feature parameters strongly correlated with the water inrush evolution. First, calibrate the integral of the flow velocity in the goaf floor as a characterization parameter for constructing the water inrush evolution process. This parameter is obtained by integrating the time history of the seepage velocity in the goaf floor and can comprehensively reflect the cumulative effect of the seepage field during the water inrush evolution process. At the same time, the Min-Max normalization method is used to normalize the original feature data, mapping each feature parameter to the [0,1] interval to eliminate the influence of differences in the dimensions of different physical quantities on the subsequent stage division. The calculation formula is as follows: , in, The time series data are the original feature parameters. The feature parameter data after normalization. This is the minimum value of the feature parameter across all time series. This is the maximum value of the feature parameter across all time series.
[0033] Subsequently, using the velocity integral as the dependent variable and each candidate feature parameter as the independent variable, first- to third-order polynomial regression models were constructed to quantify the nonlinear relationship between the feature parameters and the velocity integral. For the i-th candidate feature parameter... The constructed multinomial regression model is as follows: , in, For the 1st to the 1st i One feature parameter, For the 1st to the 1st i The velocity integral of each characteristic parameter; For the 1st to the 1st i The random error term of each characteristic parameter; , , , They are respectively number 1 to number 2. i The 0th to 3rd order coefficients of each characteristic parameter to be estimated.
[0034] like Figure 3 As shown, the 5-fold cross-validation method is then used to calculate the coefficient of determination for each feature parameter corresponding to the multinomial regression model to evaluate the model fitting accuracy. The features are then sorted from largest to smallest by coefficient of determination, and the top 13 features with coefficients of determination higher than 0.8 are retained as key features, including disp_8, disp_12, disp_11, stress_5, disp_4, stress_6, stress_8, stress_12, disp_3, pp_10, disp_2, pp_4, and disp_14, constituting the stage partitioning input dataset. The coefficient of determination is calculated using the following formula: , in, As the coefficient of determination, This is the sum of squares of the differences between the actual observed values and the model predictions of the integral flow velocity. It is the sum of squares of the differences between the actual observed values and their mean values for the integral of the flow velocity.
[0035] S3. Determine the optimal number of water inrush stage divisions based on the key feature parameters obtained in step S2. First, expand the 13 key feature parameters by time step to construct a clustering input matrix. Each row of the matrix corresponds to a multi-dimensional feature sample of one time step, and each column corresponds to a key feature parameter dimension. This serves as the input data structure for elbow rule clustering analysis. Subsequently, within the preset cluster number range K=1 to K=6, the K-Means clustering algorithm is used to calculate the sum of squares within each cluster corresponding to the number of clusters K. The optimal number of water inrush stage divisions is determined based on the key feature parameters obtained in step S2. First, the 13 key feature parameters (disp_8, disp_12, disp_11, stress_5, disp_4, stress_6, stress_8, stress_12, disp_3, pp_10, disp_2, pp_4, disp_14) are expanded along time steps to construct a clustering input matrix. Each row of the matrix corresponds to a multidimensional feature sample at a time step. ,in, For the observed value of the i-th key feature parameter at the t-th time step, each column corresponds to a key feature parameter dimension, which serves as the input data structure for elbow rule clustering analysis.
[0036] Subsequently, within the preset cluster number range to Within this process, the K-Means clustering algorithm is used to divide the samples at each time step. For a given number of clusters... The algorithm performs the following iterative process: Initialization phase: Randomly select K samples from dataset X as initial cluster centers, i.e., centroids. ; Sample allocation phase: Calculate each sample To each centroid The Euclidean distance is used to assign it to the nearest cluster. : ,in Indicates Euclidean distance; During the centroid update phase, each cluster is recalculated based on the allocation results. center of mass : in For clusters Number of samples , Repeat the above sample allocation and centroid update steps until the centroid no longer changes or the maximum number of iterations is reached.
[0037] Furthermore, based on the elbow rule, the sum of squares within each cluster (WCSS) corresponding to the number of clusters K is calculated to evaluate the clustering effect. WCSS reflects the compactness of samples within a cluster, and its calculation formula is as follows: , in, The number of clusters, For the first Clusters, For sample points within a cluster, Let K be the centroid of the cluster. As the K value increases, the WCSS gradually decreases. When the K value reaches its optimum, the reduction in WCSS resulting from further increasing the number of clusters becomes significantly less, forming a turning point similar to an "elbow" on the line graph. To further improve the accuracy of the judgment, the CHI index is introduced as an auxiliary evaluation index. The CHI index evaluates the clustering effect by calculating the ratio of inter-cluster dispersion to intra-cluster dispersion. Its calculation formula is: , in, This represents the total number of samples (total number of time steps). This is the sum of squares within the cluster (i.e., the WCSS mentioned above). For the inter-cluster sum of squares, , For the first Number of samples in a cluster This is the global data centroid.
[0038] like Figure 4 As shown, a curve was plotted with the number of clusters K on the x-axis and the sum of squares within each cluster on the y-axis to analyze the decreasing characteristics of the sum of squares within each cluster as the number of clusters K increases. With the increase of the number of clusters K, the sum of squares within each cluster generally shows a decreasing trend. However, when the number of clusters exceeds a certain critical value, the rate of decrease in the sum of squares within each cluster significantly decreases, and the curve shows an inflection point resembling an elbow. By calculating the rate of change of the sum of squares within each cluster between adjacent cluster numbers, the inflection point where the rate of change significantly decreases was determined.
[0039] Specifically, this embodiment introduces the relative decrease rate index of intra-cluster square sum to quantify the meaning of the WCSS decrease magnitude and sets a judgment threshold. The Kth cluster number is defined relative to the Kth... The relative decrease rate of the number of clusters is: , in, Let K be the sum of squares within each cluster. To reflect the percentage reduction in error resulting from adding a cluster, a significance threshold is set. (In this embodiment, the data distribution characteristics are set) , or based on the previous few The average rate of decrease of the value is dynamically set. When the decrease in the sum of squares within a cluster is no longer significant, it is considered that the 'elbow' inflection point has been reached.
[0040] draw The relationship curve between the value and WCSS. In this embodiment, the curve shows a clear elbow inflection point at K=3. The rate of change of the sum of squares within clusters differs significantly before and after K=3. After K=3, the decreasing trend of the sum of squares within clusters tends to flatten out, indicating that further increasing the number of clusters has limited effect on improving the compactness of the clusters. Therefore, the number of clusters K=3 corresponding to this inflection point is taken as the optimal number of stages for water inrush, corresponding to the three evolutionary processes of the initial stable stage, the activation evolution stage, and the unstable connection stage of water inrush.
[0041] like Figure 5 As shown in step S4, based on the key feature parameters obtained in step S2 and the optimal number of stage divisions determined in step S3, a time series segmentation and stage recognition model based on Transformer self-supervised representation is constructed, and the stage division results are output. First, the normalized key feature parameter dataset is input into the Transformer encoder network. The model dimension is set to 128, containing 3 encoding layers, each with 4 attention heads. The feedforward network dimension is set to 512, and the dropout rate is set to 0.1. Sine-cosine position encoding is added to the input sequence to inject temporal position information, enabling the model to perceive the relative positional relationships in the time series. The sine-cosine position encoding is calculated according to the following formula: , in, Encode the sinusoidal position of the t-th time location in the 2i-th dimension. Encode the cosine position of the t-th time position in the (2i+1)th dimension. The model dimension is 128 in this embodiment.
[0042] like Figure 6 As shown, a random mask feature reconstruction strategy is then employed to perform self-supervised pre-training on the Transformer encoder network to improve the model's ability to capture long-range dependencies in the constructed water inrush time series data. Using the Transformer encoder as the basic component, a reconstruction head consisting of two fully connected layers and a ReLU activation function is added to its output. The first fully connected layer embeds and maps 128-dimensional features to a 256-dimensional intermediate representation, and the second fully connected layer maps the 256-dimensional intermediate representation back to the original input dimension, achieving a reconstruction mapping from encoded features to the original input space. Simultaneously, a learnable mask label is defined, which is a trainable vector with the same dimension as the model. During model training, the parameters are continuously updated through backpropagation to better represent the feature information of the occluded locations.
[0043] During the masking process, a portion of time steps are randomly selected as mask positions for each batch of input data at a masking ratio of 15%. A mask index is independently generated for each sample, and a Boolean mask matrix with the same dimension as the input sequence is constructed. Mask positions in the matrix are set to True, and non-masked positions are set to False. Then, the original features at the mask positions are replaced with expanded, learnable mask labels to obtain the masked input sequence, thus realizing the input corruption process in self-supervised learning. The masked input sequence is used as the input to the Transformer encoder network. After temporal positional information is injected through the positional encoding layer, the Transformer encoder performs feature extraction and representation learning, and then the reconstruction head predicts the feature values for all positions.
[0044] The predicted features of the mask positions are extracted from the model output using a Boolean mask matrix. The mean squared error loss between the predicted mask position features and the original features is calculated. Iterative optimization is performed using the Adam W optimizer and the Cosine Annealing LR learning rate scheduler, with an initial learning rate set to 1e-3. The mean squared error loss of the mask position reconstruction is the sole optimization objective. After training for 50 epochs until the model converges, the Transformer encoder parameters are saved. The mean squared error loss of the reconstruction is calculated using the following formula: , in, Loss due to mask reconstruction For the set of mask locations, The reconstructed value at the t-th mask position. Let be the original value at the t-th mask position. This represents the total number of mask positions.
[0045] Furthermore, stage boundary detection is performed based on the trained Transformer encoder network. The sliding window size is set to 30 and the stride to 1. The input dataset is divided into window sequences. A pre-trained encoder is used to perform forward propagation on all window sequences, extracting a 128-dimensional embedding representation for each window to construct a temporal window embedding sequence. The sliding contrast window size is defined as 10. The average vector of the embeddings of adjacent sliding windows before and after each window position is calculated: for window position t, the arithmetic mean of the embedding vectors of the preceding w windows is taken as the average vector of the previous time period, and the arithmetic mean of the embedding vectors of the following w windows is taken as the average vector of the subsequent time period. Cosine similarity is used to measure the similarity of feature distributions before and after time periods, and a change score is calculated. A higher change score indicates a greater difference in feature distributions before and after the current position, and a higher probability of stage transition. The change score is calculated using the following formula: , in, , These are the average vectors of the sliding window embedding before and after window position t, respectively. To adjust the sliding window size, For cosine similarity, Score for changes, Let be the embedding vector of the t-th window.
[0046] After obtaining the change score sequence, a Savitzky-Golay filter was used to smooth the sequence to suppress noise interference and highlight the true stage transition trend. The filter window length was set to 11, and the polynomial order was set to 3. Peak detection was performed on the smoothed change score sequence, and local maxima were selected as candidate change points. The candidate change points were adjusted according to the optimal number of stage divisions K=3 determined in step S3. The two most significant peak points were extracted as stage boundaries, dividing the full time series data into three evolution stages. Testing showed that the mean silhouette coefficient of this division was 0.7237, and the Davis-Bourdin exponent was 0.4437, demonstrating excellent stage division performance and achieving unsupervised, high-precision stage identification for constructing the water inrush evolution process.
[0047] S5. Perform PCA decomposition on the high-dimensional parameter matrix composed of 13 key feature parameters, reducing the dimensionality of the parameter matrix from multidimensional to single-dimensional while preserving the maximum data variance. Let the key feature parameter dataset matrix be... ,in, The dataset matrix contains key feature parameters. d represents the total length of the time series, i.e., the sample size; d represents the total number of dimensions of the original key features, which is 13 in this embodiment.
[0048] Furthermore, the dataset matrix of key feature parameters is centered by subtracting the mean of that dimension from all values of each feature dimension, making the mean of each feature zero and eliminating the influence of dimensions; simultaneously, the sample covariance matrix is calculated using the following formula: , in, The sample covariance matrix of the key feature parameters. Let X be the transpose of the centered dataset. Then, construct the characteristic equation and solve for the eigenvalues and eigenvectors of the covariance matrix. The calculation formula is as follows: , in, For the characteristic value index, Let k be the k-th eigenvalue of the covariance matrix. For the corresponding eigenvalues The single-dimensional feature vector.
[0049] Based on the eigenvalues and eigenvectors of the covariance matrix, the cumulative contribution rate of the principal components is calculated to determine the number of principal components to be retained. The cumulative contribution rate is calculated using the following formula: , in, Let be the cumulative contribution rate of the first m principal components; m be the number of principal components to be retained; and d be the total dimension of the original key features. Calculations show that retaining the first two principal components with a cumulative contribution rate higher than 90% can minimize data dimensionality while ensuring information retention.
[0050] like Figure 7 , Figure 8 As shown, the multiple independent principal components obtained from PCA decomposition are then combined linearly with weights to form a single-dimensional comprehensive early warning index, thus constructing a single-dimensional function representation model. This single-dimensional function representation model is calculated using the following formula: , in, It is a single-dimensional comprehensive early warning indicator. Let be the weight coefficient of the i-th principal component. To retain the number of principal components, Let i be the i-th eigenvalue of the covariance matrix. For the intercept term, The total number of dimensions of the original key features is m=2 in this embodiment.
[0051] Subsequently, the stage transition threshold is determined based on the stage transition times objectively identified through unsupervised learning in step S4. Let the two stage transition times determined in step S4 be... and ,and Substituting the key feature parameter samples corresponding to these two moments into the above single-dimensional function representation model, the corresponding comprehensive early warning index value is calculated, i.e. , This is used as a characterization threshold for the transition of water inrush evolution stages. Due to the comprehensive early warning indicators... Y It exhibits extremely strong monotonicity (Spearman rank correlation coefficient is 0.9963), therefore it naturally satisfies... This avoids the subjectivity of manually setting thresholds. In this embodiment, the transition thresholds for the two stages are calculated based on the stage division results. and .
[0052] Finally, the key feature parameters of the sample to be judged are substituted into the single-dimensional function representation model to calculate the single-dimensional comprehensive early warning index. The index is numerically compared with the stage transition threshold to determine the construction of the water inrush evolution stage and output the division result: when When the initial stability phase is reached, the structural structure is not significantly disturbed by mining, water pressure and stress parameters remain stable, and there is no risk of water inrush. When the geological structure is activated due to mining disturbance, fractures gradually develop, and the risk of water inrush gradually increases, requiring the activation of early warning monitoring. When the tectonic water-diverting channel is basically formed, the risk of water inrush is extremely high, and immediate prevention and control measures must be taken. Calculations show that the Spearman rank correlation coefficient of this comprehensive early warning indicator is 0.9963, exhibiting strong monotonicity and stably reflecting the evolution of the disaster, providing a reliable quantitative basis for accurate early warning of tectonic water inrush disasters.
[0053] Example 2 The difference between this embodiment and Embodiment 1 is that this embodiment provides a system for constructing a flood disaster phase division system based on the Transformer architecture, including: The data acquisition module is used to construct a numerical model of the evolution of water inrush in the foundation with structural features, and to acquire a multi-physics time series dataset of the entire mining process; The feature selection module, connected to the data acquisition module, is used to perform feature selection on multiphysics time series datasets to determine key feature parameters that are strongly correlated with the evolution of water inrush. The stage number determination module, connected to the feature filtering module, is used to perform cluster analysis based on key feature parameters to determine the optimal number of water inrush stages. The stage identification module, connected to the feature filtering module and the stage number determination module, is used to construct a time series segmentation and stage identification model based on Transformer self-supervised representation based on key feature parameters and the optimal number of water inrush stages, and output the stage segmentation results. The characterization and threshold determination module, connected to the stage identification module and the feature filtering module, is used to construct a staged characterization model and determine the stage transition threshold based on the stage division results and key feature parameters, and output the stage division results of the flood disaster.
[0054] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for constructing phase division of a flood disaster based on the Transformer architecture, characterized in that, include: Construct a numerical model of the evolution of water inrush in the base plate with structural features, and obtain a multi-physics time series dataset of the entire mining process; Feature filtering was performed on multiphysics time series datasets to identify key feature parameters strongly correlated with water inrush evolution; Cluster analysis based on key feature parameters is used to determine the optimal number of water inrush stages. Based on the key feature parameters and the optimal number of water inrush stages, a time series segmentation and stage identification model based on Transformer self-supervised representation is constructed, and the stage segmentation results are output. Based on the stage division results and the key feature parameters, a staged representation model is constructed and the stage transition threshold is determined, outputting the stage division results of the water inrush disaster.
2. The method for constructing phase division of a flood catastrophe based on the Transformer architecture according to claim 1, characterized in that, The acquisition of the multi-physics time series dataset for the entire mining process includes constructing a numerical model of the evolution of water inrush in the floor with structural features based on the actual geological conditions of the target mine, setting up monitoring points in key structural areas, aquifer boundaries and floor failure zones, collecting time series data of three types of physical quantities: water pressure, stress and displacement, and constructing a multi-physics time series dataset.
3. The method for constructing a flood catastrophe stage division based on the Transformer architecture according to claim 1, characterized in that, The determination of key characteristic parameters strongly correlated with water inrush evolution includes calibrating the integral of the flow velocity in the goaf floor as a characterization parameter for constructing the water inrush evolution process, and normalizing the multiphysics time series dataset. Using each characteristic parameter as the independent variable and the velocity integral as the dependent variable, a multinomial regression model is constructed to quantify the nonlinear relationship between the characteristic parameters and the velocity integral. The coefficients of determination for each feature parameter in the multinomial regression model are calculated using cross-validation. The parameters are then sorted from largest to smallest by their coefficients, and the top n parameters are retained as key feature parameters. The formula for calculating the coefficients of determination is as follows: , in, As the coefficient of determination, This is the sum of squares of the differences between the actual observed values and the model predictions of the integral flow velocity. It is the sum of squares of the differences between the actual observed values and their mean values for the integral of the flow velocity.
4. The method for constructing a flood catastrophe stage division based on the Transformer architecture according to claim 1, characterized in that, Determining the optimal number of water inrush stage divisions includes constructing a clustering input matrix based on key feature parameters. The rows of the clustering input matrix correspond to multi-dimensional feature samples at time steps, and the columns of the clustering input matrix correspond to the dimensions of key feature parameters. Within the preset number of clusters, the K-Means clustering algorithm is used to iteratively divide the samples at each time step until the centroids converge, thus obtaining the cluster allocation results and cluster centroids under each number of clusters. Calculate the sum of squares within each cluster corresponding to the number of clusters, plot a broken line curve of the sum of squares within each cluster as a function of the number of clusters, and analyze the elbow inflection characteristics of the broken line curve. The CHI index is introduced as an auxiliary evaluation index to calculate the ratio of inter-cluster dispersion to intra-cluster dispersion for each number of clusters, thereby evaluating the effectiveness of clustering. Calculate the relative decrease rate of the sum of squares within clusters between adjacent clusters, compare the relative decrease rate with a preset significance threshold, and determine the critical point at which the decrease in the sum of squares within clusters changes from significant to insignificant; Based on the elbow turning characteristics, CHI index, and critical point, the optimal number of water inrush stages is determined, and the formula for calculating the relative descent rate is as follows: , in, The number of the Kth cluster relative to the Kth cluster The relative decrease rate of the sum of squares within a cluster for a given number of clusters. Let K be the sum of squares within each cluster. K is the number of clusters The sum of squares within the cluster at time 1.
5. The method for constructing phase division of a flood catastrophe based on the Transformer architecture according to claim 1, characterized in that, The construction of a time series segmentation and stage recognition model based on Transformer self-supervised representation includes inputting a key feature parameter dataset into a Transformer encoder network, injecting temporal position information into the input sequence through sine-cosine position encoding, and performing self-supervised pre-training of the Transformer encoder network using a random mask feature reconstruction strategy. Based on the trained Transformer encoder network, the sliding window embedding representation is extracted, the dynamic similarity of adjacent window embeddings is calculated, the stage change score is obtained, and after smoothing, the peak point is extracted as the stage boundary. The full time series data is divided into the corresponding number of evolution stages, and the stage division result is output.
6. The method for constructing a flood catastrophe stage division based on the Transformer architecture according to claim 5, characterized in that, The self-supervised pre-training includes: Using the Transformer encoder as the basic component, a reconstruction head consisting of fully connected layers and activation functions is added to embed and map the encoded features back to the original input dimension. Define learnable mask markers, randomly select time steps according to a preset mask ratio to generate mask indexes, construct a Boolean mask matrix, and replace the original features of the mask positions with the mask markers to obtain the mask input sequence; A Transformer encoder network is trained using a masked input sequence. The mean square error loss of the masked position reconstruction is used as the optimization objective. The optimization is iteratively performed until convergence, and the trained Transformer encoder is saved. The formula for calculating the mean square error loss of the masked position reconstruction is as follows: , in, For mask reconstruction loss, For the set of mask locations, The reconstructed value at the t-th mask position. This is the original value at the t-th mask position.
7. The method for constructing a flood disaster phase division based on the Transformer architecture according to claim 6, characterized in that, The calculation of the dynamic similarity of adjacent window embeddings includes setting the sliding window size, constructing a time window embedding representation, calculating the average vector of the adjacent sliding window embeddings before and after each window position, measuring the similarity of feature distributions before and after time periods by cosine similarity, and calculating the change score. The change score sequence is smoothed using a Savitzky-Golay filter to filter candidate change points. The candidate change points are adjusted according to the number of optimal water inrush stages, and the window sequence is divided into the corresponding number of evolution stages. The formula for calculating the change score is: , in, , These are the average vectors of the sliding window embedding before and after window position t, respectively. To adjust the sliding window size, For cosine similarity, Score for changes, Let be the embedding vector of the t-th window.
8. The method for constructing phase division of a flood catastrophe based on the Transformer architecture according to claim 1, characterized in that, The output constructs a stage division result for a sudden water disaster, including stage transition points based on the key feature parameter dataset and stage division results, using principal component analysis to reduce the dimensionality of multidimensional features, and constructing a single-dimensional function representation model. Substitute the sample values corresponding to the stage transition points into the single-dimensional function representation model to calculate the representation threshold of the stage transition points in the water inrush evolution. Substituting the key feature parameters of the sample to be judged into the single-dimensional function representation model, a single-dimensional comprehensive early warning index is calculated. The single-dimensional comprehensive early warning index is compared with the representation threshold to determine the stage of tectonic water inrush evolution, and the stage division result of the tectonic water inrush disaster is output. The expression of the single-dimensional function representation model is: , in, It is a single-dimensional comprehensive early warning indicator. Let be the weight coefficient of the i-th principal component. To retain the number of principal components, Let i be the i-th eigenvalue of the covariance matrix. For the intercept term, This represents the total number of dimensions of the original key features.
9. A method for constructing phase division of a flood catastrophe based on a Transformer architecture according to claim 8, characterized in that, The comparison between the single-dimensional comprehensive early warning index and the characterization threshold includes setting a minimum stage transition threshold and a maximum stage transition threshold. When the single-dimensional comprehensive early warning index is less than the minimum stage transition threshold, it is determined to be the initial stable stage. At this time, the tectonic structure is not significantly disturbed by mining, and the water pressure and stress parameters remain stable. When the single-dimensional comprehensive early warning index is greater than or equal to the lowest stage conversion threshold and less than the highest stage conversion threshold, it is determined to be in the activation and evolution stage. At this time, the structure is activated by mining disturbance and fractures gradually develop. When the single-dimensional comprehensive early warning index is greater than or equal to the highest stage transition threshold, it is determined to be in the unstable connection stage, at which point the water diversion channel is basically formed.
10. A system for constructing phase division of a flood disaster based on the Transformer architecture, executing the method described in claim 1, characterized in that, include: The data acquisition module is used to construct a numerical model of the evolution of water inrush in the foundation with structural features, and to acquire a multi-physics time series dataset of the entire mining process; The feature selection module, connected to the data acquisition module, is used to perform feature selection on multiphysics time series datasets to determine key feature parameters that are strongly correlated with the evolution of water inrush. The stage number determination module, connected to the feature filtering module, is used to perform cluster analysis based on key feature parameters to determine the optimal number of water inrush stages. The stage identification module, connected to the feature filtering module and the stage number determination module, is used to construct a time series segmentation and stage identification model based on Transformer self-supervised representation based on key feature parameters and the optimal number of water inrush stages, and output the stage segmentation results. The characterization and threshold determination module, connected to the stage identification module and the feature selection module, is used to construct a staged characterization model and determine the stage transition threshold based on the stage division results and key feature parameters, and output the stage division results of the water inrush disaster.