A method for tracing the cause of coal mine disaster warning by fusing spatiotemporal diagram and self-attention mechanism

By constructing a spatiotemporal graph and a self-attention mechanism for tracing the causes of coal mine disaster alarms, this method addresses the shortcomings of traditional methods in tracing the causes of multiple coupled disasters. It reveals the temporal and spatial coupling evolution of disasters from a global perspective, outputs structured causal links, and improves the level of intelligence in coal mine safety management.

CN122365087APending Publication Date: 2026-07-10CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA COAL TECH & ENG GRP CHONGQING RES INST CO LTD
Filing Date
2026-04-20
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing methods for analyzing the causes of coal mine disaster warnings rely on disaster mechanisms, lack the ability to trace the causes of multiple coupled disasters, fail to make comprehensive use of the advantages of various technologies, and ignore the overall spatial correlation of the mine, resulting in inaccurate and incomplete analysis results.

Method used

A spatiotemporal causal attention model for disaster alarms is constructed by fusing spatiotemporal graphs with a self-attention mechanism. By building a topology map of roadway measuring points and a disaster spatiotemporal fusion training sample dataset, spatial dependencies are learned using the ST-Transformer architecture. Combined with temporal causal constraints and spatial distance bias, the causes of disaster alarms are traced.

Benefits of technology

It enables the revelation of the temporal and spatial coupling evolution of disasters from a global perspective, outputs structured causal links, provides reliable decision-making basis, and improves the intelligence level of coal mine safety management and the accuracy of causal location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365087A_ABST
    Figure CN122365087A_ABST
Patent Text Reader

Abstract

This invention relates to a method for tracing the root causes of coal mine disaster alarms by fusing spatiotemporal graphs and a self-attention mechanism, belonging to the fields of coal mine safety monitoring and artificial intelligence. This method aims to solve the problems of traditional methods relying on human experience, difficulty in handling multiple disaster couplings, and neglecting the spatial correlation within the mine. The technical solution is as follows: First, a roadway measurement point topology map and spatiotemporal fusion training samples are constructed using mine maps and historical data; then, an ST-Transformer model integrating a spatiotemporal graph structure and a self-attention mechanism is trained to learn the spatiotemporal evolution patterns of disasters; finally, the trained model is used to infer the current alarm, and a structured causal propagation link is constructed by analyzing attention weights. The technical effect of this invention is that it can automatically locate the alarm source, reveal the spatiotemporal coupling evolution patterns of disasters, and output the results in the form of a visualized link, providing intelligent and global decision support for coal mine disaster prevention and control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of coal mine safety monitoring and artificial intelligence, and relates to a method for tracing the causes of coal mine disaster alarms by fusing spatiotemporal graphs and self-attention mechanisms. Background Technology

[0002] The underground environment of coal mines is extremely complex, with various types of disasters such as gas, fire, rock bursts, and water hazards coupling together and exhibiting significant spatiotemporal evolution characteristics. In actual production processes, disaster alarms often do not occur independently but are frequently triggered by other disaster factors. Therefore, accurately identifying the true source of alarms is of great significance for improving the accuracy and efficiency of coal mine disaster prevention and control.

[0003] Currently, mainstream methods for analyzing the causes of coal mine disaster alarms primarily focus on disaster mechanisms, typically relying on manual experience or post-event review, or based on fixed disaster indicator thresholds and event rule trees. However, these traditional methods have the following limitations in practical applications: First, the analysis process is highly dependent on and limited by the currently understood disaster mechanisms. Second, existing source tracing technologies are mostly focused on single disasters, failing to fully consider the interrelationships between different disasters and lacking the ability to trace the causes of multiple coupled disasters. Furthermore, traditional methods often employ single technical systems, such as coal mine characteristic maps, disaster indicator rule systems, or disaster event trees, failing to comprehensively utilize the advantages of various technologies. Finally, existing analysis methods are often limited to time-series monitoring data from local locations, ignoring the significant impact of the overall spatial correlation within the mine on disaster evolution.

[0004] With the widespread application of big data analytics, the intelligent construction of coal mine safety urgently needs a novel method that can integrate the spatial topology of the mine with the evolution of production time. This method should be able to automatically learn from massive amounts of historical data, overcome the shortcomings of traditional mechanism-based tracing methods, realize the causal chain reasoning of disaster alarms and locate key causes, thereby providing more scientific decision support for coal mine disaster prevention and control. Against this backdrop, utilizing deep learning architectures such as Spatio-Temporal Transformers (ST-Transformers) to process spatio-temporal characteristic data has become an important research direction in the field of coal mine disaster analysis. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method for tracing the causes of coal mine disaster alarms by fusing spatiotemporal graphs and self-attention mechanisms.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for tracing the causes of coal mine disaster alarms by fusing spatiotemporal graphs and self-attention mechanisms includes the following steps: Step 1: Construct a spatiotemporal map sample set of disaster characteristics; using the mine map and historical safety monitoring data of the coal mine, construct a topological map of roadway monitoring points and a training sample dataset for spatiotemporal fusion of disasters; Step 2: Train the spatiotemporal causal attention model for disaster alarms; Construct a spatiotemporal causal attention model for disaster alarms based on the ST-Transformer architecture, and train the model using the disaster spatiotemporal fusion training sample dataset to learn the spatial dependency attention relationship between alleyway locations; Step 3: Use the model results to trace the cause of disaster alarms; construct the sample data to be traced for the current alarm and input it into the trained disaster alarm spatiotemporal causal attention model for inference and prediction, obtain the attention weights in the prediction results and construct the cause link as the result output.

[0007] Furthermore, the specific process of constructing the tunnel measurement point topology map in step 1 includes: Based on the ventilation diagram of the coal mine roadway and the measuring point information of the coal mine safety monitoring system, a topology diagram of the roadway measuring points is constructed. ; in, It is a set of vertices, including roadway vertices and measuring point vertices. The roadway vertices represent actual underground roadways, and the measuring point vertices represent coal mine safety monitoring measuring points on the roadways. It is a set of directed edges. When the two vertices connected are both lanes, the direction of the edge is the ventilation flow direction between the lanes; otherwise, it is a bidirectional edge. It is an adjacency matrix used to store the directed edge connections between vertices.

[0008] Furthermore, the specific process of constructing the disaster spatiotemporal fusion training sample dataset in step 1 includes: The coal mine safety monitoring data is processed by deduplication, completion, outlier removal, time alignment, and location alignment. The mean was calculated and normalized in minutes. The processed data is converted into node data. ;in, Encoding spatial features, Encoding time features, This is an array of parameters for coal mine disaster monitoring. This is an array of geological characteristic parameters for coal mines. This is an array of characteristic parameters for coal mining processes. This is an array of environmental alarm features.

[0009] Furthermore, the disaster alarm spatiotemporal causal attention model in step 2 includes an input embedding layer, a Transformer Encoder layer, and an output header layer; The input embedding layer processes the sample data into vector data within the model, and its input tensor representation is as follows:

[0010] in, For batch size, For the number of nodes, For time, For feature dimensions; The spatiotemporal transformer ST-Transformer architecture calculates attention scores. Based on this, time causality constraints are introduced. Spatial distance offset Corrected score Represented as:

[0011] in, Used to apply a negative infinity mask to a future location. Used to set learnable biases based on the directed topological shortest path rank matrix.

[0012] Furthermore, in step 2, when training the model, a binary cross-entropy loss function with class imbalance weights is used for supervised optimization, and the parameters are updated using either the Adaptive Moment Estimation (Adam) optimization algorithm or the Adaptive Moment Estimation with Weight Decay (AdamW) optimization algorithm.

[0013] Furthermore, the specific process of step 3 includes: Step 31: Extract security monitoring data from the 30 minutes prior to the current alarm to construct a sample to be traced; Step 32: Input the sample to be traced into the disaster alarm spatiotemporal causal attention model, obtain the contribution score of each node to the current alarm node at the end of the window, and form a candidate node set; Step 33: Perform a permutation test on the candidate node set to remove pseudo-correlation terms that have no significant impact on the output, and obtain the link node set; Step 34: Based on the tunnel measurement point topology map, under the constraints of time backtracking and topology reachability, connect the link node set according to the edge weight rules to form a graph, and output the causal link.

[0014] Furthermore, the specific method of the permutation test in step 33 is as follows: after setting the input corresponding to the node to be tested to zero, the model prediction is performed again. If the predicted change exceeds the set threshold, it is considered to have passed the test.

[0015] Furthermore, in step 34, if the edge connection result is split into multiple connected subgraphs, each subgraph is regarded as a potential cause link and sorted according to the aggregation index of the node weights within the subgraph.

[0016] A coal mine disaster alarm cause tracing system based on the aforementioned tracing method includes: The data preparation module is used to construct the topology map of tunnel measuring points and the disaster spatiotemporal fusion training sample dataset; The model training module is used to build and train a disaster alarm spatiotemporal causal attention model based on the ST-Transformer architecture. The cause tracing module is used to input the sample to be traced into the trained model, and construct and output the cause chain of disaster alarm based on the extracted attention weights.

[0017] The beneficial effects of this invention are as follows: (1) This method combines the complex spatial topology of the mine with real-time evolution time monitoring data, and simultaneously superimposes temporal causal constraints and spatial graph bias under the same multi-head attention computing framework. This improvement breaks through the limitation of traditional source tracing methods that can only perform single-dimensional sequential analysis, and can reveal the coupled evolution law of disasters in time and space from a global perspective.

[0018] (2) This invention can directly output a structured disaster causation chain, which can clearly show the complete physical path of disaster occurrence, transmission and induction. This visual and structured expression is more intuitive and convenient than the traditional mechanism review, and provides a reliable decision-making basis for coal mine managers to carry out precise prevention and rapid disposal of disasters.

[0019] (3) Through an attention-weight-based screening mechanism, coupled with the dual constraints of time backtracking and topological reachability, this technology can effectively locate candidate causal nodes. In particular, the introduction of permutation testing technology can eliminate spurious correlation interference terms in the data, ensuring that the final constructed causal propagation path has extremely high credibility. It has strong adaptability and flexibility. This method can flexibly adjust the analysis scope of source tracing according to the actual disaster type data monitored in coal mines. Whether it is gas, fire, or water hazard, this invention can meet the source tracing requirements of coal mines under different disaster conditions and has wide industry applicability.

[0020] (4) This invention utilizes massive amounts of historical monitoring data to automatically learn the correlation patterns between disaster alarms, thus eliminating the over-reliance on known disaster mechanisms and expert experience in traditional methods. This new source tracing method based on big data pattern matching greatly improves the level of intelligence in coal mine safety management.

[0021] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description

[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating the overall process architecture of the method of the present invention. Figure 2 This is a detailed process structure diagram of the present invention; Figure 3 Diagram of the spatiotemporal causal attention model architecture for disaster warning; Figure 4 This is a topological example diagram of the measuring points in the roadway of the 21221 fully mechanized mining face. Figure 5 This is an example of the causal chain diagram output by the present invention. Detailed Implementation

[0023] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0024] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0025] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.

[0026] Example 1 Figure 1 It is a process structure diagram. Figure 2 It is a detailed process structure diagram. For example... Figure 1 As shown, it includes: 1. Prepare spatiotemporal training data on disaster characteristics Using mine maps and historical safety monitoring data, a topology map of roadway monitoring points and a disaster spatiotemporal fusion training sample dataset are constructed for subsequent model training.

[0027] 1.1 Constructing the topology map of tunnel measuring points Using roadway information from coal mine ventilation maps and monitoring point information from coal mine safety monitoring systems, a roadway monitoring point topology map is constructed. ,in: (1) It is the set of all vertices in the graph. Vertices represent locations within the mine and come in two types. The first type is roadway vertices, representing an actual underground roadway in the coal mine, uniquely coded using sequential numbers. The second type is monitoring point vertices, representing a specific coal mine safety monitoring point within a roadway. Their unique coding rule is: using the roadway code as a prefix, and for monitoring points within the same roadway, a unique thermal code as a suffix along the ventilation direction.

[0028] (2) It is the set of directed edges in the graph. When the two vertices connected are alleyways, the direction of the edge is the ventilation flow direction between the alleyways; otherwise, it is a bidirectional edge.

[0029] (3) It is an adjacency matrix that stores the connection relationships between vertices. This matrix is ​​an asymmetric adjacency matrix that stores the directed edge connections between vertices. 1 indicates that there is a connection between vertices, and 0 indicates that there is no connection between vertices.

[0030] 1.2 Constructing a disaster spatiotemporal fusion training sample dataset Using historical monitoring data from the coal mine safety monitoring system, a spatiotemporal fusion dataset is generated, which involves three steps: (1) Data preprocessing Real-time data from coal mine safety monitoring is preprocessed, including deduplication, data completion, and error removal. Time alignment and location alignment with the roadway monitoring point topology map are also performed. Enumerated data is encoded using one-hot encoding.

[0031] (2) Calculation of data average The monitoring data for each type is processed in minutes: first, the mean is calculated, and then normalization is performed.

[0032] (3) Process the average data into node data. All node data constitutes a disaster spatiotemporal fusion training sample dataset.

[0033] in, It is a spatial feature encoding in the data, which aligns the measuring points in the monitoring data with the topology map of the roadway measuring points, and uses the vertex feature encoding in the topology map as a unique spatial feature encoding.

[0034] It is a time feature encoding of the data, using the timestamp of the monitored data as the unique time feature encoding.

[0035] , , All are one-dimensional arrays, with each array element storing the value of the corresponding parameter. Array elements are sorted and stored according to the importance of the parameters, and when a parameter has no value, it is set to a mask. The number of parameters depends on the actual situation in the coal mine.

[0036] The array stores the average values ​​of coal mine disaster monitoring parameters, and contains monitoring parameters for all monitoring points. Common monitoring parameters are shown in Table 1.

[0037] Table 1 Coal Mine Disaster Monitoring Items

[0038] Store the geological characteristic parameter values ​​of the coal mines. Each coal mine takes a fixed value. Common characteristic parameters are shown in Table 2.

[0039] Table 2 Geological characteristic parameters of coal mines

[0040] The values ​​of characteristic parameters of coal mining technology are stored, and fixed values ​​are used for each coal mine. Common characteristic parameters are shown in Table 3.

[0041] Table 3 Characteristic parameters of coal mining technology

[0042] It is the environmental alarm characteristic value of the data, and its structure is similar to... Similarly, each array element stores the same... The corresponding coal mine disaster monitoring parameter indicates whether an alarm is triggered; 1 indicates an alarm, and 0 indicates normal.

[0043] (4) Divide the model training data The disaster spatiotemporal fusion training sample dataset is sliced ​​into time segments with a data window length of 30 minutes and a data window step of 1 minute, and then split into training dataset and test dataset in an 8:2 ratio.

[0044] 2. Training a spatiotemporal causal attention model for disaster warnings The Transformer architecture is used to learn the spatial dependency attention relationships between locations in the alleyway. After training on all the slice data, a spatiotemporal causal attention model for disaster alerts is obtained. The generated model file contains the training parameter settings and the model's learnable parameters; during the inference phase, the attention weight matrix can be calculated and exported based on this model.

[0045] 2.1 Construction of a Unified Spatiotemporal Causal Attention Model like Figure 3 As shown, the disaster warning spatiotemporal causal attention model is based on the basic architecture of the spatio-temporal Transformer, and introduces temporal causal constraints and graph distance bias at the attention score level to form a unified spatiotemporal causal attention model.

[0046] The model consists of an input embedding layer, a Transformer Encoder layer, and an output header layer.

[0047] (1) The input embedding layer processes the training sample data into vector data inside the model.

[0048] The input tensor in the input embedding layer is denoted as:

[0049] Where B is the batch size, N is the number of nodes, T is the time, and D is the feature dimension. The input is flattened to a length... After obtaining the spatiotemporal token sequence, node embedding and temporal embedding are superimposed to obtain the internal vector representation.

[0050] The Transformer Encoder layer is implemented within the same attention computation framework, simultaneously encoding temporal unidirectionality and spatial topological priors.

[0051] First, the basic attention score S is calculated.

[0052] Then, add two types of mechanisms to the scoring: ① Time-based causal constraints : Used to allow queries to focus only on the current and historical times. It applies a negative infinity mask to the future time position, making its weight 0 after Softmax.

[0053] ② Spatial distance offset Based on the directed topological shortest path ranking matrix, a learnable bias is set for each distance ranking, and then added to the attention score after looking up the table according to the node index corresponding to the token.

[0054] The corrected score for S is:

[0055] The weights are then obtained through Softmax, and the weighted sum is calculated with the V-value vector in the Transformer to obtain the output representation of this layer.

[0056] The output header uses the node representations at the end of the window to predict alarms, and outputs node-level logits and probabilities.

[0057] (4) The spatiotemporal attention weights output by the model are used for subsequent source tracing analysis.

[0058] 2.2 Model Training and Optimization During the model training phase, a binary classification loss function is used for supervised optimization of node-level alarm prediction. The loss function is a cross-entropy loss, which can be weighted by class imbalance weights. Parameter updates employ a gradient-based first-order optimization method.

[0059] To improve training stability and generalization performance, learning rate scheduling and early stopping strategies can be configured. The optimization method can be Adam or AdamW; the learning rate scheduling strategy can be cosine annealing, and it can be combined with a warm-up mechanism.

[0060] Model selection can be based on validation set metrics to determine the optimal parameters.

[0061] 3. Use model results for disaster early warning and cause tracing. The model is used to perform inference operations on the source data, then the prediction results are analyzed for causes, and finally the causal chain formed by the location with the highest score is output.

[0062] (1) Constructing the sample data to be traced Using coal mine safety monitoring data from the 30 minutes prior to the current alarm, construct the source sample for the current alarm according to the method of constructing a disaster spatiotemporal fusion training sample dataset.

[0063] (2) Call the model to obtain the candidate node list. The trained disaster alarm spatiotemporal causal attention model is invoked, and the source sample is used for prediction to obtain the alarm prediction result of the current alarm node at the end of the window. Then, the attention weight of the prediction is obtained, and the contribution scores of other nodes to the current alarm node are obtained to form a candidate node set.

[0064] (3) Permutation test of candidate nodes The candidate node set is first sorted in reverse chronological order, then in reverse chronological order by score. A fixed percentage or a fixed number of nodes are selected to form subset 1. The candidate node set is then first sorted in ascending order by topological distance from the current alarm node, then in reverse chronological order by score. A fixed percentage or a fixed number of nodes are selected to form subset 2. Subsets 1 and 2 are merged, duplicate nodes are removed, and the nodes are rearranged in reverse chronological order to form the set of nodes to be inspected.

[0065] A permutation test (shuffle test) is performed on each candidate position in the test set, which involves setting the input corresponding to the node to zero and then re-predicting. If the change in prediction exceeds a set threshold, it is considered to pass the test, thus eliminating pseudo-correlation terms that have no significant impact on the output, and finally obtaining the set of link nodes used for path construction.

[0066] (4) Identify the final cause chain Based on the tunnel measurement point topology map, using the link node set, and under the constraints of time backtracking and topological reachability, edges are connected to form a graph according to edge weight rules. If the result is connected, the graph is output as the causal link; if it is split into multiple connected subgraphs (a single point is also considered a subgraph), each subgraph corresponds to a potential causal link, and they are sorted from high to low according to the aggregation index (such as the mean) of the node weights within the subgraph.

[0067] Example 2 Taking a gas outburst coal mine in northern China as an example, the process of using this method to trace the cause of gas alarms is as follows: 1. Prepare spatiotemporal training data on disaster characteristics (1) Construct a topology map of the roadway measuring points using the 21221 fully mechanized mining face. The topology map is shown below. Figure 4 The spatial coding of the measurement points is shown in Table 4, and the adjacency matrix of the measurement points is shown in Table 5.

[0068] Table 4. Roadway Measurement Point Codes

[0069] Table 5 Spatial Adjacency Matrix of Measurement Points

[0070] (2) Based on the comprehensive monitoring parameters of all measuring points and the characteristics of coal mines, which are mainly focused on the prevention and control of gas disasters, 10 coal mine disaster monitoring parameters are determined, which are arranged in the following order: [methane concentration, carbon monoxide concentration, wind speed, temperature, respirable dust concentration, carbon dioxide concentration, oxygen concentration, wind speed, wind pressure, hydrogen sulfide concentration].

[0071] Fourteen geological characteristic parameters for coal mines were determined, arranged in order as follows: [coal quality, porosity, coal seam thickness, coal seam dip angle, coal seam depth, moisture content, gas content, gas pressure, water inflow, ground temperature, coal seam spontaneous combustion tendency, coal dust explosion index, horizontal stress, vertical stress]. Their original values ​​are: [32.0, 0.12, 2.8, 12, 350, 5.2, 10.5, 0.65, 3.2, 32, 35, 34.0, 8.5, 12.0]. After normalization, they are: [0.629, 0.458, 0.418, 0.267, 0.400, 0.347, 0.525, 0.325, 0.160, 0.440, 0.350, 0.486]. 0.283, 0.240].

[0072] There are two characteristic parameters for coal mining technology, which are arranged in order as: [tunneling technology, tunneling stage], and after encoding, they are: [0,3].

[0073] (5) Using six months of historical coal mine safety monitoring data, after data preprocessing and averaging calculation, a disaster spatiotemporal fusion training sample dataset was generated. Data samples are shown in Table 6.

[0074] Table 6. Example of a 3-minute disaster spatiotemporal fusion training dataset (return airway gas T2 measuring point)

[0075] (6) The generated dataset is sliced ​​into training dataset and test dataset in a ratio of 8:2.

[0076] 2. Training a spatiotemporal causal attention model for disaster warnings Model training is performed by the program; this section only provides necessary explanations on how each layer of the Transformer architecture is used in this method.

[0077] The main parameter settings for model training are as follows: # 1. Model Structure d_model = 128 n_layers = 3 n_heads = 4 d_ff = 512 dropout = 0.1 activation = 'gelu' # 2. Data and Training seq_len = 30 batch_size = 16 epochs = 100 learning_rate = 3e-4 weight_decay = 1e-2 clip_norm = 1.0 patience = 8 # 3. Loss Function (Alarm Task) loss_function = BCEWithLogitsLoss(reduction='none') # 4. Optimizer optimizer = AdamW(model.parameters(), lr=3e-4, weight_decay=1e-2) # 5. Learning Rate Scheduling lr_scheduler=ReduceLROnPlateau(optimizer,mode='min',factor=0.5,patience=3,min_lr=1e-6) The training dataset is organized and input in the format of "batch, time step, number of locations, number of features". In this example, it is "43920,30,16,3", which means there are 43920 sets of data, each set is viewed over the past 30 minutes, there are 16 locations, and each location has 3 features.

[0078] Since the training data is organized by time step and location and can be combined with spatial topology information, the Transformer embedding layer will vectorize the input data according to the temporal and spatial order and data features. The subsequent TransformerEncoder layer performs multi-head self-attention training and finally outputs the prediction of the last alarm for each location and the corresponding attention matrix.

[0079] By setting the BCEWithLogitsLoss loss function and combining it with class imbalance weighting to solve alarm imbalance, using the AdamW optimizer, and combining learning rate scheduling and early stopping mechanism to suppress overfitting, a spatiotemporal causal attention model for disaster alarms that can accurately predict and learn location relationships was finally trained through multiple rounds of iterative training and validation with test data.

[0080] The generated model file contains training parameter settings and learnable parameters of the model; during the inference phase, the attention weight matrix can be calculated and exported based on the model.

[0081] 3. Use model results for disaster early warning and cause tracing. (1) Prepare model call data Consistent with the time window length of the training dataset, the alarm data that needs to be traced and the historical monitoring data within the previous 30 minutes are preprocessed, averaged, and organized into a new sample dataset in the same way as the training sample dataset.

[0082] Data examples are shown in Tables 7 and 8, where the record with t index 29 is the data to be traced, and the methane monitoring is an alarm.

[0083] Table 7. Examples of disaster monitoring parameter segments for samples to be traced (T2 gas monitoring point in the return airway).

[0084] Table 8 Examples of alarm label fragments for samples to be traced

[0085] Using the new sample data, the model is invoked to obtain the attention weights of the model's prediction results, resulting in 4 node data.

[0086] The top 80% of candidate nodes were extracted and, after transformation and verification, three link nodes were finally obtained, as shown in Table 9. Detailed link data is shown in Table 10. Connecting the nodes in Table 9 according to the tunnel measurement point topology diagram yields the causal link diagram, as follows: Figure 5 As shown.

[0087] Table 9 Ultimate Cause Link Nodes

[0088] Table 10 Ultimate Cause Attribution Path

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for tracing the root causes of coal mine disaster warnings by fusing spatiotemporal graphs and self-attention mechanisms, characterized in that: Includes the following steps: Step 1: Construct a spatiotemporal map sample set of disaster characteristics; using the mine map and historical safety monitoring data of the coal mine, construct a topological map of roadway monitoring points and a training sample dataset for spatiotemporal fusion of disasters; Step 2: Train the spatiotemporal causal attention model for disaster alarms; Construct a spatiotemporal causal attention model for disaster alarms based on the ST-Transformer architecture, and train the model using the disaster spatiotemporal fusion training sample dataset to learn the spatial dependency attention relationship between alleyway locations; Step 3: Use the model results to trace the cause of disaster alarms; construct the sample data to be traced for the current alarm and input it into the trained disaster alarm spatiotemporal causal attention model for inference and prediction, obtain the attention weights in the prediction results and construct the cause link as the result output.

2. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 1, characterized in that: The specific process of constructing the tunnel measurement point topology map in step 1 includes: Based on the ventilation diagram of the coal mine roadway and the measuring point information of the coal mine safety monitoring system, a topology diagram of the roadway measuring points is constructed. ; in, It is a set of vertices, including roadway vertices and measuring point vertices. The roadway vertices represent actual underground roadways, and the measuring point vertices represent coal mine safety monitoring measuring points on the roadways. It is a set of directed edges. When the two vertices connected are both lanes, the direction of the edge is the ventilation flow direction between the lanes; otherwise, it is a bidirectional edge. It is an adjacency matrix used to store the directed edge connections between vertices.

3. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 1, characterized in that: The specific process of constructing the disaster spatiotemporal fusion training sample dataset in step 1 includes: The coal mine safety monitoring data is processed by deduplication, completion, outlier removal, time alignment, and location alignment. The mean was calculated and normalized in minutes. The processed data is converted into node data. ;in, Encoding spatial features, Encoding time features, This is an array of parameters for coal mine disaster monitoring. This is an array of geological characteristic parameters for coal mines. This is an array of characteristic parameters for coal mining processes. This is an array of environmental alarm features.

4. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 1, characterized in that: The disaster alarm spatiotemporal causal attention model in step 2 includes an input embedding layer, a transformer coding layer, and an output header layer. The input embedding layer processes the sample data into vector data within the model, and its input tensor representation is as follows: in, For batch size, For the number of nodes, For time, For feature dimensions; The spatiotemporal transformer ST-Transformer architecture calculates attention scores. Based on this, time causality constraints are introduced. Spatial distance offset Corrected score Represented as: in, Used to apply a negative infinity mask to a future location. Used to set learnable biases based on the directed topological shortest path rank matrix.

5. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 4, characterized in that: In step 2, when training the model, a binary cross-entropy loss function with class imbalance weights is used for supervised optimization, and the Adam optimization algorithm or the AdamW optimization algorithm with weight decay is used for parameter updates.

6. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 1, characterized in that: The specific process of step 3 includes: Step 31: Extract security monitoring data from the 30 minutes prior to the current alarm to construct a sample to be traced; Step 32: Input the sample to be traced into the disaster alarm spatiotemporal causal attention model, obtain the contribution score of each node to the current alarm node at the end of the window, and form a candidate node set; Step 33: Perform a permutation test on the candidate node set to remove pseudo-correlation terms that have no significant impact on the output, and obtain the link node set; Step 34: Based on the tunnel measurement point topology map, under the constraints of time backtracking and topology reachability, connect the link node set according to the edge weight rules to form a graph, and output the causal link.

7. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 6, characterized in that: The specific method of the permutation test in step 33 is as follows: after setting the input corresponding to the node to be tested to zero, the model prediction is performed again. If the predicted change exceeds the set threshold, it is considered to have passed the test.

8. The coal mine disaster alarm cause tracing method based on the fusion of spatiotemporal graph and self-attention mechanism according to claim 6, characterized in that: In step 34, if the edge connection result is split into multiple connected subgraphs, each subgraph is regarded as a potential cause link and sorted according to the aggregation index of the node weights within the subgraph.

9. A coal mine disaster alarm cause tracing system based on the tracing method of any one of claims 1 to 8, characterized in that: include: The data preparation module is used to construct the topology map of tunnel measuring points and the disaster spatiotemporal fusion training sample dataset; The model training module is used to build and train a disaster alarm spatiotemporal causal attention model based on the ST-Transformer architecture. The cause tracing module is used to input the sample to be traced into the trained model, and construct and output the cause chain of disaster alarm based on the extracted attention weights.