Coal spontaneous combustion early warning method based on deep learning and physical constraint
By combining deep learning with physical constraints, a coal spontaneous combustion early warning model is constructed by integrating the static and dynamic characteristics of coal. This solves the problem of inaccurate early warning results in existing technologies and achieves rapid and accurate coal spontaneous combustion early warning.
Patent Information
- Application Number
- CN202511161331.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-10-21
AI Technical Summary
In existing technologies, artificial intelligence-based early warning methods for coal spontaneous combustion rely on single data points, resulting in inaccurate early warning results and limited model generalization ability, making it impossible to quickly and accurately provide early warnings of coal spontaneous combustion events.
By combining deep learning with physical constraints, a coal spontaneous combustion early warning model is constructed by acquiring static coal data and time-series gas data, extracting features using a deep multilayer perceptron module and a Transformer encoder, and integrating static and dynamic features through a gating attention fusion module. Combined with temperature sequence constraints and mass conservation constraints, the model is used for prediction.
It improves the accuracy and robustness of the coal spontaneous combustion early warning model, enabling it to effectively predict the critical temperature and pyrolysis temperature of coal spontaneous combustion even under data noise or missing conditions. It enhances the model's ability to characterize complex environments and reduces the possibility of unreasonable predictions.
Smart Images

Figure CN120823700A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of coal mining safety early warning technology, and in particular to, but is not limited to, a coal spontaneous combustion early warning method based on deep learning and physical constraints. Background Art
[0002] Coal spontaneous combustion is one of the major disasters in mine safety production. It not only causes waste of coal resources and environmental pollution, but may also induce secondary disasters such as gas explosions and toxic gas leaks, seriously threatening the lives of miners and the ecological stability of mining areas.
[0003] In related technologies, artificial intelligence methods are used to establish static or dynamic models of coal spontaneous combustion, but the data relied on by the above technologies are relatively simple, and only static data or single dynamic data are used. The effectiveness of the model is highly dependent on the quality and representativeness of the data. If the sample data is insufficient or unrepresentative, it may lead to inaccurate early warning results, and the model's generalization ability in different mining areas is limited, which to a certain extent limits the universality of the model.
[0004] Therefore, how to quickly and accurately provide early warning of coal spontaneous combustion events has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, an embodiment of the present invention provides a coal spontaneous combustion warning method based on deep learning and physical constraints, which at least solves the problem that related technologies cannot quickly and accurately provide early warning of coal spontaneous combustion events.
[0006] According to a first aspect of an embodiment of the present invention, a coal spontaneous combustion early warning method based on deep learning and physical constraints includes:
[0007] Obtaining static data of the current coal through historical records, wherein the static data includes composition data, physical structure data and heating rate;
[0008] Using multiple sensors to monitor the current coal in real time to obtain time-series gas data of the current coal, the time-series gas data including multiple gas concentrations and the temperature of the current coal;
[0009] Inputting the processed static data into a deep multi-layer perceptron module of a coal spontaneous combustion early warning model to obtain a first static feature, and inputting the processed time series gas data into a Transformer encoder module with a learnable position scaling factor to obtain a first dynamic feature; the coal spontaneous combustion early warning model also includes the Transformer encoder module and a gated attention fusion module;
[0010] Inputting the first static feature and the first dynamic feature into a gated attention fusion module for fusion to obtain a fused feature;
[0011] Inputting the first static feature and the first dynamic feature into a gated attention fusion module for fusion to obtain fused features; and predicting the critical temperature and pyrolysis temperature corresponding to the current spontaneous combustion of coal based on the fused features; during the training phase of the coal spontaneous combustion early warning model, the total loss includes physical constraint loss and mean absolute error loss, and the physical constraint loss includes temperature sequence constraint loss and mass conservation constraint loss;
[0012] The temperature range, the warning level of the spontaneous combustion risk, and the chemical evolution stage of the current coal are obtained based on the critical temperature, the pyrolysis temperature, the current coal temperature, and a plurality of preset thresholds.
[0013] According to a second aspect of an embodiment of the present invention, there is provided an electronic device comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect.
[0014] According to a third aspect of an embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect is implemented.
[0015] According to the solution provided by an embodiment of the present invention, static data of the current coal is obtained through historical records, and the static data includes composition data, physical structure data and heating rate; the current coal is monitored in real time using multiple sensors to obtain time series gas data of the current coal, and the time series gas data includes multiple gas concentrations and the temperature of the current coal; the processed static data is input into the deep multi-layer perceptron module of the coal spontaneous combustion early warning model to obtain the first static feature, and the processed time series gas data is input into the Transformer encoder module with a learnable position scaling factor to obtain the first dynamic feature; the coal spontaneous combustion early warning model also includes the The model comprises a Transformer encoder module and a gated attention fusion module. The first static feature and the first dynamic feature are input into the gated attention fusion module for fusion, generating a fused feature. Based on the fused feature, the critical temperature and pyrolysis temperature corresponding to the occurrence of spontaneous combustion of the current coal are predicted. During the training phase, the total loss of the coal spontaneous combustion warning model includes physical constraint loss and mean absolute error loss, where the physical constraint loss includes temperature order constraint loss and mass conservation constraint loss. Based on the critical temperature, pyrolysis temperature, current coal temperature, and multiple preset thresholds, the current coal temperature range, spontaneous combustion risk warning level, and chemical evolution stage are obtained. In this process, static prior information such as coal composition and physical structure is extracted as the first static feature using a deep multi-layer perceptron. Simultaneously, an improved Transformer encoder with a learnable position scaling factor is used to process the time-series gas concentration and temperature data collected by the sensor, effectively capturing the dynamic evolution pattern and forming the first dynamic feature. The gated attention fusion module adaptively integrates static and dynamic features, enhancing the model's ability to characterize complex coal spontaneous combustion environments. During the training phase of the coal spontaneous combustion early warning model, the total loss includes mean absolute error loss, temperature sequence constraint loss, and mass conservation constraint loss. This not only makes the model prediction results consistent with the physical and chemical mechanism of coal spontaneous combustion, reduces the unreasonable predictions that may occur in pure data-driven models, but also significantly improves the robustness and credibility of the model in the presence of data noise or missing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0017] Figure 1 A schematic flow chart of a coal spontaneous combustion early warning method based on deep learning and physical constraints provided in an embodiment of the present invention;
[0018] Figure 2 A schematic diagram showing the effect of the correlation between static data and time-series gas data provided by an embodiment of the present invention;
[0019] Figure 3 The prediction results and error statistics of critical temperature and pyrolysis temperature provided by an embodiment of the present invention are shown in Figure (a) as a schematic diagram of the analysis effect of critical temperature prediction accuracy, Figure (b) as a schematic diagram of the analysis effect of pyrolysis temperature prediction accuracy, Figure (c) as a schematic diagram of the error statistics effect of critical temperature, and Figure (d) as a schematic diagram of the error statistics effect of pyrolysis temperature.
[0020] Figure 4 The figure is a schematic structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0022] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0023] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present invention described here can be implemented in an order other than that illustrated or described here.
[0024] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by those skilled in the art in the art to which the embodiments of the present invention pertain. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0025] Figure 1A flow chart of a coal spontaneous combustion early warning method based on deep learning and physical constraints provided in an embodiment of the present invention. An embodiment of the present invention provides a coal spontaneous combustion early warning method based on deep learning and physical constraints that can be executed by an electronic device, such as a computer, a server, etc.
[0026] like Figure 1 As shown in the figure, the coal spontaneous combustion early warning method based on deep learning and physical constraints includes:
[0027] S101. Obtain static data of current coal through historical records, where the static data includes composition data, physical structure data, and heating rate.
[0028] In the embodiment of the present invention, the composition data includes moisture (Mad), ash (Aad), volatile matter (Vad), and fixed carbon (Fcad), and the physical structure data includes average particle size, porosity, and bulk density. The value of this static data is fixed and can be obtained through historical records.
[0029] S102: Use multiple sensors to monitor the current coal in real time to obtain time-series gas data of the current coal, where the time-series gas data includes multiple gas concentrations and the current temperature of the coal.
[0030] In an embodiment of the present invention, the time series gas data includes multiple gas concentrations and the current coal temperature, namely, the concentrations of O2, N2, CO, CO2, CH4, C2H6, C2H4 and the current coal temperature, which can be obtained through multiple sensors. The time series gas data is dynamically changing data.
[0031] S103. Input the processed static data into the deep multi-layer perceptron module of the coal spontaneous combustion warning model to obtain the first static feature, and input the processed time series gas data into the Transformer encoder module with a learnable position scaling factor to obtain the first dynamic feature; the coal spontaneous combustion warning model also includes the Transformer encoder module and the gated attention fusion module.
[0032] In an embodiment of the present invention, the acquired static data and time-series gas data are preprocessed and feature-screened, respectively, to obtain processed static data and time-series gas data. The coal spontaneous combustion warning model includes a deep multilayer perceptron module, a Transformer encoder module with a learnable position scaling factor, and a gated attention fusion module. The processed static data is processed through the input layer, multiple hidden layers, and output layer of the deep multilayer perceptron module. Weights and biases are learned to capture complex patterns in the processed static data, generating high-order static features. Simultaneously, the processed time-series gas data is input into a Transformer encoder module with a learnable position scaling factor to obtain a first dynamic feature.
[0033] The processed time-series gas data is input into a Transformer encoder module with a learnable position scaling factor for processing. Specifically, the processed time-series gas data is first transformed to obtain an embedding vector. The embedding vector and position encoding are combined and input into the encoder for processing. The encoder includes a multi-head attention mechanism and a feedforward neural network. After each sub-layer (multi-head attention mechanism and feedforward neural network), the input is directly added to the output through a residual connection. After processing through N encoder layers, the final output is the first dynamic feature.
[0034] S104. Input the first static feature and the first dynamic feature into the gated attention fusion module for fusion to obtain the fused feature, and predict the critical temperature and pyrolysis temperature corresponding to the current coal spontaneous combustion based on the fused feature; during the training stage of the coal spontaneous combustion warning model, the total loss includes physical constraint loss and mean absolute error loss, and the physical constraint loss includes temperature sequence constraint loss and mass conservation constraint loss.
[0035] In this embodiment of the present invention, the first static feature represents the inherent physical and chemical properties of the current coal, which remain unchanged over time, while the first dynamic feature reflects the complex physical and chemical reaction processes within the coal pile. These two types of features differ fundamentally in their data structure, semantic meaning, and contribution to the final prediction. Therefore, a gated attention fusion mechanism (GAFM) is employed to fuse the first static and first dynamic features. The gated attention fusion module comprises a dynamic gating adjustment layer and a gated attention fusion layer. The dynamic gating adjustment layer receives the first static and first dynamic features after deep extraction as input and adaptively determines the relative importance of static background information and dynamic evolution information for different coal samples or oxidation stages. The gated attention fusion layer applies the calculated gating vector to the corresponding feature. The gated attention fusion layer then further fuses the features to produce a fused feature. Finally, based on this fused feature, the critical temperature and pyrolysis temperature corresponding to the spontaneous combustion of the current coal are predicted.
[0036] During the training phase of the coal spontaneous combustion early warning model, the total loss corresponding to the model includes not only the mean absolute error loss but also physical constraint losses. These physical constraint losses include temperature order constraint loss and mass conservation constraint loss. The model is then trained using this total loss until a trained model is obtained. The temperature order constraint loss and mass conservation constraint loss are used to incorporate known physical laws into the model's prediction process, ensuring that predictions are not only based on data patterns but also conform to fundamental physical principles. The temperature order constraint states that during coal pyrolysis, the critical temperature (Tc) typically occurs before the pyrolysis temperature (Tp). Therefore, from a physical perspective, Tc should be less than Tp. The mass conservation constraint states that during the current pyrolysis process, the mass of the initial coal sample is equal to the mass of the final residue (coke) plus the sum of the masses of all released gases and volatiles.
[0037] A composite loss function incorporating physical constraint losses was constructed to train the coal spontaneous combustion warning model end-to-end, enabling it to learn a temperature prediction mapping that conforms to physical laws. By introducing physical constraints during training, the model's parameters were optimized to implicitly adhere to the physical laws of temperature. After training, the model outputs critical and pyrolysis temperatures that conform to physical laws.
[0038] S105 , obtaining the current coal temperature range, the warning level of the spontaneous combustion risk, and the chemical evolution stage based on the critical temperature, the pyrolysis temperature, the current coal temperature, and multiple preset thresholds.
[0039] In an embodiment of the present invention, a plurality of preset thresholds can be obtained from stored historical data, which are data obtained from a programmed temperature experiment on a coal sample, including ΔT CO (the temperature at which CO concentration begins to rise rapidly), T C2H2 (temperature point of acetylene detection point) and T 常温 , obtain the critical temperature, pyrolysis temperature, current coal temperature and multiple thresholds (ΔT CO 、T C2H2 and T 常温 ), the current coal temperature is compared with the critical temperature, pyrolysis temperature, current coal temperature and multiple thresholds according to the following Table 1 to obtain the corresponding temperature range, warning level and chemical evolution stage.
[0040] For example, ΔTco=60°C, T 常温 =30℃, critical temperature Tc=80℃, pyrolysis temperature Tp=120℃, current coal temperature T=70℃ and T C2H2 =200℃, when the current coal temperature T=70℃, the temperature range is 60℃≤70℃<80℃, the current chemical evolution stage of the coal is the oxidation stage, and the spontaneous combustion risk has reached the fourth warning level.
[0041] Specifically, as shown in Table 1 below, Table 1 is the basis for the classification of the four-level early warning system for coal spontaneous combustion, as shown below:
[0042]
[0043]
[0044] It is understandable that in the embodiments of the present invention, static prior information such as the composition and physical structure of coal is extracted as the first static feature through a deep multi-layer perceptron. At the same time, an improved Transformer encoder with a learnable position scaling factor is used to process the time-series gas concentration and temperature data collected by the sensor, effectively capturing the dynamic evolution pattern and forming the first dynamic feature. The gated attention fusion module adaptively integrates static and dynamic features, enhancing the model's ability to characterize complex coal spontaneous combustion environments. During the training phase of the coal spontaneous combustion warning model, the total loss includes the mean absolute error loss, the temperature sequence constraint loss, and the mass conservation constraint loss. This not only makes the model's prediction results consistent with the physical and chemical mechanism of coal spontaneous combustion, reducing the unreasonable predictions that may occur in pure data-driven models, but also significantly improves the model's robustness and credibility in the presence of data noise or missing data.
[0045] In some embodiments of the present invention, S10 to S12 are also included before S103, which is explained through the following steps.
[0046] S10: Calculate the first correlation between the static data, and perform data screening in the static data according to the first correlation to obtain screened static data.
[0047] In some embodiments of the present invention, the formula for the correlation coefficient is:
[0048]
[0049] In the above formula, ρ represents the correlation coefficient, X1 and X2 are any two data in the static data, C ov represents covariance, D is variance, and E represents mathematical expectation / mean.
[0050] Furthermore, the first correlation coefficient between the static data is calculated according to the formula of the above correlation coefficient, and the absolute value of the first correlation coefficient is further obtained. Two thresholds are set, and the absolute value of the first correlation coefficient is compared with the two thresholds respectively. For example, if the two thresholds are 0.6 and 0.8, when the absolute value is greater than 0.8, it is necessary to delete one data between the two static data. When the absolute value is greater than 0.6 and not greater than 0.8, one of the data can be appropriately deleted according to the actual situation. When the absolute value is not greater than 0.6, both static data are retained. Among them, when it is necessary to delete a static data, if one of the situations exists: the two static data have highly repeated physical meanings or are essentially data expressing the same thing in different ways (i.e., completely collinear or close to collinear), then one of the data is deleted at will. For example, the porosity and bulk density are approximately equal to -1.00. They are the positive and negative sides of describing the density of the coal structure. The bulk density is deleted and the porosity is retained. If one of the two static data does not exist, the strong correlation or contribution of the two static data and the predicted critical temperature, pyrolysis temperature or warning level of spontaneous combustion risk is judged respectively, and the static data with weak correlation or low contribution is deleted, and the other one is retained.
[0051] S11. Calculate a second correlation coefficient between the time series gas data, and perform data screening in the time series gas data according to the second correlation coefficient to obtain screened time series gas data.
[0052] S12 , preprocessing the filtered static data and the filtered time series gas data respectively to obtain processed static data and processed time series gas data.
[0053] In some embodiments of the present invention, a second correlation coefficient between the time series gas data is calculated according to a correlation coefficient calculation formula, and data is filtered in the time series gas data according to the second correlation coefficient to obtain filtered time series gas data. When calculating the second correlation coefficient between the time series gas data, X1 and X2 in the correlation coefficient calculation formula are any two data in the time series gas data.
[0054] Furthermore, after obtaining the filtered static data and filtered time-series gas data, data normalization can effectively reduce the model's training error, increase the gradient descent convergence speed, and find the model's optimal solution. The present invention uses the maximum-minimum normalization method to normalize the filtered static data and filtered time-series gas data to obtain processed static data and processed time-series gas data.
[0055] like Figure 2 As shown, Figure 2 A schematic diagram of the effect of the correlation between static data and time-series gas data provided by an embodiment of the present invention. The horizontal axis and the left vertical axis are static data and time-series gas data, and the right vertical axis is color and the corresponding reference value. The size of the correlation between the data can be judged by the size of the correlation coefficient corresponding to the different block colors. Among them, the correlation coefficient can only measure the linear correlation between the data, that is, the higher the correlation coefficient, the higher the degree of linear correlation between the data. For two data with a small correlation coefficient, it can only mean that the linear correlation between the data is weak, but it cannot mean that there is no other correlation between the data. The scale on the right shows the color depth corresponding to different correlation coefficients.
[0056] In some embodiments of the present invention, S104 can be implemented through S1041, which is explained through the following steps.
[0057] S1041. Input the first static feature and the first dynamic feature into the dynamic gating adjustment layer to obtain their respective corresponding gating vectors, and input the first static feature, the first dynamic feature and the gating vector into the gated attention fusion layer for fusion to obtain the fused feature.
[0058] In some embodiments of the present invention, the first static feature and the first dynamic feature are input into the dynamic gating adjustment layer to obtain their respective gating vectors. The first static feature, the first dynamic feature, and the gating vector are then input into the gated attention fusion layer for fusion to obtain a fused feature. The gating vector is determined as follows:
[0059] g=σ(W g [h static ;h temporal ]+b g )
[0060] The feature fusion formula is as follows:
[0061] h fused =ge GELU(W s h static )+(1-g)e GELU(W t h temporal )
[0062] In the above formula, h static is the first static characteristic, h temporal is the first dynamic feature, b g ∈R 64 is the bias vector of the gating layer, g∈R 64 is the gate vector, also known as the dynamic gate weight, with a value range of [0,1], used for the first dynamic feature and the first static feature. σ(·) is the Sigmoid activation function, which compresses the input to the (0,1) interval. W g ∈R 64×64 is the weight matrix of the gating layer, h fused ∈R 64 is the fused feature, ⊙ is the Hadamard product, GELU(·) is the Gaussian error linear unit activation function, W s ∈R 64×32 is the first static feature transformation matrix, W t ∈R 64×32 is the first dynamic feature transformation matrix, and 1-g is the complement vector of the gate vector.
[0063] In some embodiments of the present invention, the coal spontaneous combustion warning model is obtained by training through S201 to S205, which is explained through the following steps.
[0064] S201. Conduct a coal-oxygen composite reaction experiment on a coal sample to obtain a data sample; the data sample includes training sample data, and the training data sample includes a static data sample, a time series gas data sample, and a measured critical temperature and a measured pyrolysis temperature during spontaneous combustion of the coal sample.
[0065] In some embodiments of the present invention, the coal-oxygen composite reaction experiment is an experiment to simulate and study the slow oxidation reaction of coal with oxygen during a gradual temperature increase. This experiment is mainly used to understand the process and conditions of coal spontaneous combustion, and to identify how coal reacts with oxygen at different temperatures and releases specific gases. Coal samples from different mining areas under different geological conditions are collected, crushed in a nitrogen atmosphere, and sieved using a sieve to form five particle sizes of 0-0.9mm, 0.9-3mm, 3-5mm, 5-7mm, and 7-10mm. 1000g of mixed coal samples with average particle sizes of 0.45, 1.95, 4, 4.18, 6, and 8.5mm, respectively, are loaded into coal sample cans for coal-oxygen composite reaction experiments, and a total of multiple groups of programmed temperature experimental results are obtained, with industrial analysis results and experimental physical parameters of 17 coal samples for each group of programmed temperature experiments. The industrial analysis results include moisture (Mad), ash (Aad), volatile matter (Vad), and fixed carbon (Fcad); the experimental physical parameters include average particle size, heating rate, porosity, and bulk density. Multiple sets of programmed temperature experiment results are used as sample data. The sample data includes 9 static data items (Mad, Aad, Vad, Fcad, average particle size, heating rate, porosity, bulk density, and coal weight) and 8 time-series gas data items (O2, N2, CO, CO2, CH4, C2H6, C2H4 concentrations and coal temperature), as well as the measured critical temperature and measured pyrolysis temperature during spontaneous combustion of the coal sample. The industrial analysis results and experimental physical parameters obtained above are used as data samples containing training sample data and test sample data.
[0066] S202. Noise is added to all training data samples to obtain noisy training data samples; and the data in the training data samples and the noisy data samples are respectively integrated one-to-one to obtain target training data samples; the target training data samples include target static data samples, target time series gas data samples, target measured critical temperature and target measured pyrolysis temperature.
[0067] Data enhancement is to generate new training samples by performing a series of random transformations on the original data to expand the data set, improve the generalization ability of the model and reduce overfitting. In some embodiments of the present invention, Gaussian noise is added to the sample data containing static data samples and time series gas data samples to achieve the purpose of data enhancement. The specific process is to generate an enhanced sample x'=x+ε given a static data sample or a time series gas data sample x, where ε is random noise sampled from a normal distribution with a mean of 0 and a standard deviation of σ, that is, ε~N(0,σ^2). For static data samples, a relatively large noise (σ=0.05) is set to simulate the measurement error of coal quality analysis. For time series gas data samples, a smaller noise (σ=0.01) is set to retain the dynamic trend of the oxidation process. At the same time, noise is also added to the measured critical temperature and the measured pyrolysis temperature. Finally, we obtain the static data samples with noise, the time series gas data samples with noise, the measured critical temperature with noise during spontaneous combustion of the coal sample, and the measured pyrolysis temperature with noise. The static data samples with noise and the original static data samples are integrated to obtain the target static data samples. The same is true for other data. Finally, we obtain the target static data samples, target time series gas data samples, target measured critical temperature, and target measured pyrolysis temperature.
[0068] Wherein, sample data includes training sample data and test sample data, in order to ensure that the original data sample and enhanced data sample of the same experiment do not appear in the training data sample and the test data sample at the same time, and avoid the model from indirectly learning the test data sample features through the enhanced data sample. Therefore, a stratified group sampling method is adopted in this application, the principle of which is to ensure that all samples (original samples and enhanced samples) of the same experimental group are completely assigned to the same data subset to ensure the integrity and data independence of the experimental group. The obtained training data samples and test samples can be: the training set contains 82 experimental groups (164 data samples, including 82 original data samples and 82 enhanced data samples), and the test set contains 20 experimental groups (40 data samples, including 20 original data samples and 20 enhanced data samples). The specific division situation can be determined according to the actual situation. Wherein, the enhanced sample is the sample after adding noise, and the data type in the test data sample is the same as that in the training data sample, and noise is also added at the same time.
[0069] As shown in Table 2 below, Table 2 shows the performance indicators corresponding to various data samples provided by the embodiment of the present invention. The total samples in the table are the sum of the original data samples and the enhanced data samples. 2 is the coefficient of determination, RMSE is the root mean square error, and MAE is the mean absolute error.
[0070] Table 2 shows the performance indicators corresponding to various data samples provided in the embodiment of the present invention.
[0071]
[0072]
[0073] In Table 2 above, good prediction performance is shown on multiple groups of original data samples and multiple groups of enhanced data samples. The effectiveness of the data enhancement strategy is proved. The samples are expanded by injecting Gaussian noise to improve the generalization ability of the model. The performance of the total sample is balanced to avoid the risk of overfitting of a single data type. As shown in Table 2, the coal spontaneous combustion warning model shows stable performance in different sample types and two key indicators, critical temperature and pyrolysis temperature, but there are certain fluctuations. During the training stage, the critical temperature and pyrolysis temperature have an overall R 2 The value of R is 0.95, which indicates that the coal spontaneous combustion warning model can explain 95% of the temperature variation. 2 However, the prediction performance of the original data samples and enhanced data samples for the test-order pyrolysis temperature (MAE = 2.76, RMSE = 3.51, R 2 =0.97) are higher than the critical temperature (MAE=3.35, RMSE=4.22, R 2 =0.87). This result may be related to the critical temperature and pyrolysis temperature identification criteria. The appearance of the pyrolysis temperature sign is accompanied by the detection of ethylene (C2H4). Moreover, the discrete threshold characteristics of C2H4 detection are highly consistent with the Transformer encoder module with a learnable position scaling factor, and the gas concentration mutation point is locked more accurately. Secondly, the temperature constraint in the high temperature zone is established, which significantly suppresses the physical unreasonable deviation of the predicted value. Furthermore, by dynamically adjusting the learning rate and Dropout ratio (discarding rate), the distribution deviation of the experimental data is effectively compensated. However, as a continuous gradual process of oxidation acceleration, the prediction of critical temperature depends on the CO concentration characteristics. In addition, the signal noise in the low temperature zone is large, which may lead to a decrease in the critical temperature prediction performance.
[0074] S203. Input the target static data sample into the deep multi-layer perceptron module to be trained to obtain the second static feature; and input the target time series gas data sample into the Transformer encoder module with a learnable position scaling factor to be trained to obtain the second dynamic feature.
[0075] In some embodiments of the present invention, the processes of S203 and S103 are similar and will not be described in detail here.
[0076] S204. Input the second dynamic feature and the second static feature into the gated attention fusion module to be trained to obtain a fused feature sample; and obtain the predicted critical temperature and the predicted pyrolysis temperature based on the fused feature sample.
[0077]
[0078] In the above formula, is the predicted critical temperature, is the predicted pyrolysis temperature, W o ∈R 2×128 is the weight matrix of the output layer, GELU(·) is the Gaussian error linear unit activation function, W c ∈R 64×64 is the weight matrix of the critical temperature branch, h fused ∈R 64 is the fused feature. is the vector concatenation operation, W p ∈R 64×64 is the weight matrix of the pyrolysis temperature branch.
[0079] In an embodiment of the present invention, Figure 3 As shown, Figure 3 The prediction results and error statistics of critical temperature and pyrolysis temperature provided by the embodiment of the present invention. Among them, Figure (a) is a schematic diagram of the analysis effect of critical temperature prediction accuracy, Figure (b) is a schematic diagram of the analysis effect of pyrolysis temperature prediction accuracy, Figure (c) is a schematic diagram of the error statistics effect of critical temperature, and Figure (d) is a schematic diagram of the error statistics effect of pyrolysis temperature. Figure 3 Figure (a) shows two types of samples: original data samples (i.e., the original samples in the figure) and enhanced data samples (i.e., the enhanced samples in the figure), along with a perfect prediction line and the relative error of the predicted critical temperature relative to the perfect prediction line. The relative error includes five values, and Figure (a) also includes an error range of plus or minus 3%. Figure 3 The same is true for (b). Figure (c) contains the test set and training set consisting of original data samples and enhanced data samples, as well as the average absolute error and average relative error of the critical temperature predicted by the coal spontaneous combustion warning model on the two types of data sets. Figure 3 The same is true for (d) in the figure. The average absolute error of critical temperature increased from 2.11℃ to 3.35℃ during training and testing, and the average relative error increased from 2.98% to 4.96%. This result shows that the prediction results of the test set are offset from those of the training set. Figure 3 As shown in (a) and (b), the prediction results in the 60-70°C range exhibit significant deviations, primarily due to significant environmental noise. However, the mean absolute error and mean relative error during the pyrolysis temperature test phase decreased from 3.06°C to 2.76°C and from 2.53% to 2.30%, respectively. This may be due to the sensitivity of the self-attention mechanism in the Transformer encoder module with a learnable position scaling factor to global outliers.
[0080] S205. Obtain a coal spontaneous combustion warning model based on the predicted critical temperature, the predicted pyrolysis temperature, and the time series gas data samples.
[0081] In some embodiments of the present invention, S203 to S204 are similar to S103 and S104 and are not described here. Finally, the temperature order constraint loss is obtained by predicting the critical temperature and the predicted pyrolysis temperature, and the mass conservation loss is calculated based on the time series gas data samples. Finally, the coal spontaneous combustion early warning model to be trained is trained based on the mass conservation loss and the temperature order constraint loss to obtain a trained coal spontaneous combustion early warning model.
[0082] In some embodiments of the present invention, S205 can be implemented through S2051 to S2054, which is explained through the following steps.
[0083] S2051. Obtain temperature sequence constraint loss based on the predicted critical temperature and the predicted pyrolysis temperature.
[0084] In some embodiments of the present invention, the temperature sequence constraint loss is calculated by predicting the critical temperature, the predicted pyrolysis temperature, and the following formula:
[0085]
[0086] In the above formula, L order is the temperature order constraint loss, λ is the constraint strength coefficient (λ=0.1), and max(0,·) ensures that when When the loss is 0, δ order is the minimum allowed interval.
[0087] S2052. Obtain the corresponding concentrations of oxygen, carbon monoxide, and carbon dioxide from the time series gas data sample; calculate the change in concentration within adjacent time periods; and obtain the mass conservation loss based on the change.
[0088] In some embodiments of the present invention, the concentrations of oxygen, carbon monoxide, and carbon dioxide are obtained from time-series gas data samples. The concentrations are the concentrations at different moments. The changes in the concentrations of oxygen, carbon monoxide, and carbon dioxide are calculated over adjacent time periods. Finally, the mass conservation loss is calculated using the calculated changes, as described below:
[0089]
[0090] In the above formula, L mass is the mass conservation constraint loss, ΔO 2,t , ΔCO t and ΔCO 2,t is the concentration change of O2, CO and CO2 at time t, λ CO and λ CO2 is the proportionality coefficient.
[0091] S2053. Obtain a mean absolute error loss based on the predicted critical temperature, the predicted pyrolysis temperature, the target measured critical temperature, and the target measured pyrolysis temperature.
[0092] In some embodiments of the present invention, the predicted critical temperature, the predicted pyrolysis temperature, the target measured critical temperature, and the target measured pyrolysis temperature are substituted into the following mean absolute error formula to obtain the mean absolute error loss. The mean absolute error formula is as follows:
[0093]
[0094] In the above formula, n is the sum of sample data, is the measured value, are predicted values, where the measured values are the target measured critical temperature and the target measured pyrolysis temperature, and the predicted values are the predicted critical temperature and the predicted pyrolysis temperature.
[0095] S2054. A total loss is obtained based on the average error loss, the temperature sequence constraint loss, and the mass conservation constraint loss, and the coal spontaneous combustion early warning model to be trained is trained using the total loss to obtain a coal spontaneous combustion early warning model.
[0096] In some embodiments of the present invention, different weights are assigned to the average error loss, temperature sequence constraint loss, and mass conservation constraint loss, and then the average error loss, temperature sequence constraint loss, and mass conservation constraint are multiplied with their respective weights, and the three product results are summed to obtain the final total loss. The total loss is used to train the coal spontaneous combustion early warning model to be trained to obtain the trained coal spontaneous combustion early warning model.
[0097] Among them, when training the coal spontaneous combustion early warning model to be trained, the parameters that need to be optimized are shown in Table 3 below:
[0098] Table 3 Parameters that need to be optimized for the coal spontaneous combustion warning model to be trained
[0099]
[0100] In Table 3, the optimization range is the preset candidate range, and the optimal parameter value is the optimal value determined within the candidate range. As shown in Table 3, the optimization range for the number of Transformer layers is [2, 4, 6]. At 4 layers, computational efficiency and feature extraction capabilities reach Pareto optimality. In the deep multilayer perceptron module, a 128-dimensional hidden layer exhibits optimal performance. The optimal fusion layer dimension is 64, which preserves key information about static and temporal features while avoiding dimensional redundancy. The optimal dropout ratios for the static and dynamic data processing branches are 0.3 and 0.2, respectively, effectively suppressing correlation between feature variables while preventing model overfitting. The initial learning rate is 3e-4, ensuring rapid convergence until the optimal value is determined at 1e-5. A batch size of 16 achieves a balance between computational efficiency and training stability.
[0101] Reference Figure 4 , shows a schematic structural diagram of an electronic device according to an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0102] like Figure 4 As shown, the electronic device may include: a processor (processor) 502, a communication interface (Communications Interface 504), a memory (memory) 506, and a communication bus 508.
[0103] in:
[0104] The processor 502 , the communication interface 504 , and the memory 506 communicate with each other via a communication bus 508 .
[0105] The communication interface 504 is used to communicate with other electronic devices or servers.
[0106] The processor 502 is configured to execute the program 510 , and specifically may execute the relevant steps in the above method embodiment.
[0107] Specifically, the program 510 may include program codes, which include computer operation instructions.
[0108] Processor 502 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in a smart device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.
[0109] The memory 506 is used to store the program 510. The memory 506 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0110] The program 510 may be specifically configured to enable the processor 502 to execute operations corresponding to the methods described in the above method embodiments.
[0111] The specific implementation of each step in program 510 can be found in the corresponding descriptions of the corresponding steps and units in the above-mentioned method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the above-mentioned devices and modules can refer to the corresponding process descriptions in the above-mentioned method embodiments, and will not be repeated here.
[0112] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present invention can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present invention.
[0113] The method according to the embodiment of the present invention described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or as computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded via a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown here.
[0114] Those skilled in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present invention.
[0115] The above implementation methods are only used to illustrate the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. Ordinary technicians in the relevant technical field may make various changes and modifications without departing from the spirit and scope of the embodiments of the present invention. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of the present invention, and the scope of patent protection of the embodiments of the present invention should be defined by the claims.
Claims
1. A coal spontaneous combustion early warning method based on deep learning and physical constraints, characterized by: include: Obtaining static data of the current coal through historical records, wherein the static data includes composition data, physical structure data and heating rate; Using multiple sensors to monitor the current coal in real time to obtain time-series gas data of the current coal, the time-series gas data including multiple gas concentrations and the temperature of the current coal; Inputting the processed static data into a deep multi-layer perceptron module of a coal spontaneous combustion early warning model to obtain a first static feature, and inputting the processed time series gas data into a Transformer encoder module with a learnable position scaling factor to obtain a first dynamic feature; the coal spontaneous combustion early warning model also includes the Transformer encoder module and a gated attention fusion module; Inputting the first static feature and the first dynamic feature into a gated attention fusion module for fusion to obtain a fused feature; Based on the fused features, the critical temperature and pyrolysis temperature corresponding to the current coal spontaneous combustion are predicted; during the training phase of the coal spontaneous combustion warning model, the total loss includes physical constraint loss and mean absolute error loss, and the physical constraint loss includes temperature sequence constraint loss and mass conservation constraint loss; The temperature range, the warning level of the spontaneous combustion risk, and the chemical evolution stage of the current coal are obtained based on the critical temperature, the pyrolysis temperature, the current coal temperature, and a plurality of preset thresholds.
2. The method according to claim 1, characterized in that Before inputting the processed static data into the deep multi-layer perceptron module of the coal spontaneous combustion early warning model to obtain the first static feature, the method further includes: Calculating a first correlation coefficient between the static data, and filtering the static data according to the first correlation coefficient to obtain filtered static data; calculating a second correlation coefficient between the time series gas data, and filtering the time series gas data according to the second correlation coefficient to obtain filtered time series gas data; The filtered static data and the filtered time series gas data are preprocessed respectively to obtain the processed static data and the processed time series gas data.
3. The method according to claim 1, characterized in that The gated attention fusion module consists of a dynamic gate adjustment layer and a gated attention fusion layer; The step of inputting the first static feature and the first dynamic feature into a gated attention fusion module for fusion to obtain fused features includes: The first static feature and the first dynamic feature are input into the dynamic gating adjustment layer to obtain the corresponding gating vectors, and the first static feature, the first dynamic feature and the gating vector are input into the gated attention fusion layer for fusion to obtain the fused feature.
4. The method according to claim 1, wherein The coal spontaneous combustion warning model to be trained includes a deep multi-layer perceptron module to be trained, a Transformer encoder module with a learnable position scaling factor to be trained, and a gated attention fusion module to be trained; the coal spontaneous combustion warning model is trained through the following steps: A coal-oxygen composite reaction experiment is performed on a coal sample to obtain a data sample; the data sample includes a training data sample, and the training data sample includes a static data sample, a time series gas data sample, and a measured critical temperature and a measured pyrolysis temperature during spontaneous combustion of the coal sample; Adding noise to the training data samples to obtain training data samples with noise; and integrating the data in the training data samples and the data samples carrying noise in a one-to-one correspondence to obtain target training data samples; the target training data samples include target static data samples, target time series gas data samples, target measured critical temperature and target measured pyrolysis temperature; Inputting the target static data sample into a deep multi-layer perceptron module to be trained to obtain a second static feature; and inputting the target time series gas data sample into a Transformer encoder module with a learnable position scaling factor to be trained to obtain a second dynamic feature; Inputting the second dynamic feature and the second static feature into a gated attention fusion module to be trained to obtain a fused feature sample; and obtaining a predicted critical temperature and a predicted pyrolysis temperature based on the fused feature sample; The coal spontaneous combustion early warning model is obtained based on the predicted critical temperature, the predicted pyrolysis temperature and the time series gas data samples.
5. The method according to claim 4, characterized in that The method of obtaining the coal spontaneous combustion early warning model based on the predicted critical temperature, the predicted pyrolysis temperature, and the time series gas data sample includes: Obtaining a temperature sequence constraint loss based on the predicted critical temperature and the predicted pyrolysis temperature; Obtaining the concentrations of oxygen, carbon monoxide, and carbon dioxide from time-series gas data samples; calculating changes in the concentrations over adjacent time periods; and obtaining mass conservation losses based on the changes; Obtaining a mean absolute error loss based on the predicted critical temperature, the predicted pyrolysis temperature, the target measured critical temperature, and the target measured pyrolysis temperature; A total loss is obtained based on the mean absolute error loss, the temperature sequence constraint loss and the mass conservation constraint loss, and the coal spontaneous combustion early warning model to be trained is trained using the total loss to obtain the coal spontaneous combustion early warning model.
Citation Information
Patent Citations
Method for monitoring combustible gas concentration of biomass stack to prevent spontaneous combustion
CN112557588A
Goaf linear temperature measurement inversion method based on GA-BP neural network
CN113887054A
Spontaneous combustion prevention treatment method and device for coal yard and computer readable storage medium
CN114949665A
Coal spontaneous combustion early warning method and system based on CNN time sequence model
CN115983339A
Coal pile safety monitoring and early warning method, system and equipment and storage medium
CN117152899A
Cited By
Intelligent coal preparation production process control method and system based on Internet of Things
CN121140394A
A coal oxidation prediction and functional group identification method and system based on graph attention
CN122474202A
A method and system for predicting coal oxidation and identifying functional groups based on graph attention.
CN122474202B