A method for predicting CO concentration in goaf for predicting coal spontaneous combustion risk

By constructing a coal spontaneous combustion CO prediction model based on RNN, LSTM and GRU neural networks, the problem of lack of dynamic models in the existing technology is solved, and high-precision dynamic trend prediction of CO concentration in goaf is achieved, which improves the intelligence level of coal mine safety production.

CN118191233BActive Publication Date: 2025-08-26XIAN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410301941.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-17
Publication Date
2025-08-26
Estimated Expiration
2044-03-17

AI Technical Summary

Technical Problem

The prior art lacks the prediction of coal spontaneous combustion risk based on dynamic models using goaf CO concentration prediction method, and cannot effectively obtain the changes in temperature and gas concentration over time, which affects the accurate judgment of coal spontaneous combustion state.

Method used

Using a method based on RNN, LSTM and GRU neural network, combined with data preprocessing and model optimization, a coal spontaneous combustion CO prediction model is constructed, and the volume fraction data of CO, O2, CO2, CH4 and C2H6 are used for dynamic trend prediction. The data distribution is processed through kernel density estimation and logarithmic transformation, and a fully connected layer and dropout class are constructed to avoid overfitting.

Benefits of technology

The continuous dynamic trend prediction of CO volume fraction is achieved, with high prediction accuracy and errors below 1%, which improves the intelligent management and control level of coal mine safety production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118191233B_ABST
    Figure CN118191233B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for predicting CO concentration in goafs for predicting the risk of coal spontaneous combustion. The method comprises the following steps: 1. acquiring goaf gas volume fraction data at different distances from a fully-mechanized caving working face and dividing the data into training, validation, and test sets; 2. preprocessing the training, validation, and test set data by performing a data distribution check and data normalization; 3. constructing a coal spontaneous combustion CO prediction model based on an RNN neural network; 4. constructing a coal spontaneous combustion CO prediction model based on an LSTM long short-term memory network; 5. constructing a coal spontaneous combustion CO prediction model based on a GRU gated recurrent unit; 6. evaluating three coal spontaneous combustion CO prediction models and comparing their prediction accuracy; 7. collecting goaf CO gas volume fraction data in real time and selecting one or more of the three coal spontaneous combustion CO prediction models to predict the goaf CO concentration. The present invention achieves continuous dynamic trend prediction of CO volume fraction, achieving higher prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of coal spontaneous combustion hazard prediction, and in particular relates to a method for predicting CO concentration in a goaf for predicting coal spontaneous combustion hazard. Background Art

[0002] Spontaneous combustion of coal is a potential hazard during coal mining and storage, and is accompanied by complex exothermic reactions. Numerous researchers are currently working to understand the mechanisms of spontaneous combustion and the changes in temperature and concentration of released gaseous products during coal spontaneous combustion through various experimental methods, as a key approach to rationally explain and early detect spontaneous combustion.

[0003] Among them, coal spontaneous combustion index gases have been widely used as indicators of mine fires, primarily by analyzing temperature changes, gas concentrations, ratios, and other characteristics during the coal spontaneous combustion process for early detection of coal spontaneous combustion. For example, in the 2008 paper "Study on the Correspondence between Coal Spontaneous Combustion Index Gases and Characteristic Temperatures" published in Coal Science and Technology, Xiao Yang et al. used a large-scale coal spontaneous combustion test bench to determine the correspondence between index gases and characteristic temperatures, and obtained the characteristics of gas changes at each stage. In the 2018 paper "Experimental Research on Coal Spontaneous Combustion Index System" published in the Journal of Safety and Environment, Deng Jun et al. used a self-made programmed temperature test bench to analyze the gas components and volume fractions of coal samples at low temperatures and establish an index system to accurately predict the state of coal spontaneous combustion at different stages. In the paper "Experimental study on the spatial and temporal variations of temperature and indicator gases during coal spontaneous combustion" published in Energy Exploration and Exploitation in 2021, Chen Junchao et al. analyzed the three processes of coal spontaneous combustion (slow oxidation, accelerated oxidation and combustion stages) through a coal spontaneous combustion adiabatic oxidation experiment system, and obtained CO, CO 2 The generation rate can be used as a prediction index for coal spontaneous combustion. 2 and CO are the main products of coal spontaneous combustion at low temperature stage, but due to the adsorption of coal and the influence of diesel exhaust and coalbed methane, CO in the air 2 Concentration values ​​and actual CO generated by coal spontaneous combustion 2Concentration values ​​contain certain errors, which can affect the assessment of coal spontaneous combustion status. The absolute CO concentration provides little information about the spontaneous combustion state, while the CO production trend generally indicates the continued development of coal spontaneous combustion. Therefore, understanding the CO production trend over time is crucial for predicting and assessing coal spontaneous combustion status.

[0004] In recent years, researchers have combined coal spontaneous combustion indicator gases with machine learning (ML) methods to conduct data mining, integrating coal spontaneous combustion characteristics with indicator gases to predict the risk of coal spontaneous combustion. In their 2011 paper, "Research on a Multi-Source Information Fusion Early Warning Method for Mine Fires," published in the Journal of Mining and Safety Engineering, Deng Jun et al. expanded data sources based on experimental research, field observations, and expert experience. Using artificial neural networks (ANN) and gray correlation analysis, they established a coal spontaneous combustion early warning indicator system, enabling prediction of the extent of coal spontaneous combustion. In the paper "Prediction of temperature and CO concentration fields based on BPNN in low-temperature coal oxidation" published by Zhao Jianqiao et al. in "Thermochimica Acta" in 2021, a backpropagation neural networks (BPNN) model was established based on 72 groups of samples. The coal spontaneous combustion temperature and CO concentration were predicted using the kinetic parameters and external factors of coal, and the model was verified using 40 groups of data randomly generated by BPNN after training. However, the randomly generated data does not necessarily reflect the actual coal spontaneous combustion reaction process. In their 2008 paper, "SVM based prediction of spontaneous combustion in coal seam," published at the International Symposium on Computational Intelligence and Design. IEEE, Meng Qian et al. used 180 sets of data, support vector machines (SVM) and radial basis function neural networks (RBF-NN) to establish a relationship between gas concentrations during coal spontaneous combustion and coal properties.In the paper "A method for predicting coal temperature using CO with GA-SVR model for early warning of the spontaneous combustion of coal" published by Guo Qing et al. in Combustion Science and Technology in 2022, the support vector regression model (SVR) based on genetic algorithm used low-temperature oxidation experimental data to establish the relationship between coal temperature and CO concentration, and compared its performance with SVR and BPNN.

[0005] In summary, many researchers have applied machine learning methods to establish the relationship between coal spontaneous combustion temperature and gas concentration. However, these models are static and fail to capture changes in temperature and gas concentration over time. Furthermore, these models largely focus on the relationship between influencing factors, coal temperature, and target gas concentration, ignoring the temporal behavior of the variables. Furthermore, research has shown that dynamic models consistently achieve higher prediction accuracy than static models when training and predicting time series data. However, existing methods for predicting CO concentration in goafs based on dynamic models are lacking for predicting coal spontaneous combustion hazards. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to address the deficiencies in the above-mentioned existing technologies and provide a method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion. The method realizes continuous dynamic trend prediction of the CO volume fraction with higher prediction accuracy, which is crucial for improving the level of intelligent management and control of coal mine safety production.

[0007] To solve the above technical problems, the present invention adopts a technical solution: a method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion, the method comprising the following steps:

[0008] Step 1: Obtain the volume fraction data of CO, O2, CO2, CH4, and C2H6 gases in the goaf at different distances from the fully-mechanized caving working face, and divide the multiple sets of data into training set data, validation set data, and test set data;

[0009] Step 2: Perform data distribution test and data normalization preprocessing on the training set data, validation set data and test set data;

[0010] Step 3: Construct a coal spontaneous combustion CO prediction model based on an RNN neural network. The volume fractions of O2, CO2, CH4, and C2H6, as well as L, are selected as input variables. The CO volume fraction is used as the model output target. The preprocessed training set data, validation set data, and test set data are used to train the coal spontaneous combustion CO prediction model based on the RNN neural network to obtain a trained coal spontaneous combustion CO prediction model based on the RNN neural network. Wherein, L is the distance between the measurement point and the working face.

[0011] Step 4: Construct a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Select the volume fractions of O2, CO2, CH4, and C2H6, as well as L, as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network to obtain a trained coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network.

[0012] Step 5: Construct a coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit. Select the volume fractions of O2, CO2, CH4, and C2H6 and L as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit to obtain a trained coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit.

[0013] Step 6: Evaluate the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit, and compare the prediction accuracy of the three coal spontaneous combustion CO prediction models;

[0014] Step 7. Collect the CO gas volume fraction data of the goaf in real time, and select one or more prediction modules of the three coal spontaneous combustion CO prediction models: the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit to predict the CO concentration in the goaf.

[0015] In the above-mentioned method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion, the specific process of the data distribution test in step 2 is as follows:

[0016] Step 201: Use the kernel function as the Gaussian kernel function Kernel density estimate of :

[0017]

[0018] Get the distribution of characteristic variables of the data set; where f h (x) is the kernel density function value, x i is the i-th sample from the total sample x, n is the number of samples, i is a natural number from 1 to n, h is the bandwidth, Indicates that the variable of Gaussian kernel function K(x) is assigned

[0019] Step 202: Use the logarithmic transformation formula:

[0020]

[0021] Perform logarithmic transformation on the data set; where y is the logarithmic transformed variable, λ is the logarithmic transformation coefficient, and c is the maximum value of the logarithmic transformation feature.

[0022] In the above-mentioned method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion, the data normalization in step 2 adopts the maximum and minimum normalization formula:

[0023]

[0024] Normalize the characteristic variables of the data set; where y is the variable after data distribution test, y′ is the variable after data normalization, and y min is the minimum value of the variable after the data distribution test, y max It is the maximum value of the variable after the data distribution test.

[0025] In the above-mentioned method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion, the specific process of constructing the coal spontaneous combustion CO prediction model based on the RNN neural network in step 3 is as follows:

[0026] Step 301: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the RNN neural network;

[0027] Step 302: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, SimpleRNN, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the RNN neural network; Numpy is a basic package for Python scientific computing and is used to process data; Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data; Sklearn is a machine learning tool based on the Python language and is used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination; Keras is used to import Sequential, SimpleRNN, Dropout, and Dense classes; Matplotlib is used for drawing; the SimpleRNN class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer; the Dense layer is a fully connected layer and is used to define the number of output nodes of the model; the Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model;

[0028] Step 303: In each time step, the activation value of the model is expressed as:

[0029] h t =σ h (W h X t +U h h t-1 +b h ) (F4)

[0030] Among them, X t is the input vector of RNN, h t is the RNN hidden layer vector of the current time step, h t-1 is the RNN hidden layer vector of the previous time step, W h is the weight matrix from the input layer to the hidden layer of the RNN at the current time step, U h is the weight matrix from the hidden layer to the hidden layer of the RNN at the previous time step, b h is the RNN hidden layer activation value adjustment coefficient, σ h is the activation function of the RNN hidden layer;

[0031] Step 304: In each time step, the output value of the model is expressed as:

[0032] o t =σ o (W o ht +b o ) (F5)

[0033] Among them, t is the output vector, W o is the weight matrix from the RNN hidden layer to the output layer, b o is the RNN output layer output value adjustment coefficient, σ o is the activation function of the RNN output layer;

[0034] Step 305: Select the back propagation training model and express the derivative of the loss function and the weight matrix as:

[0035]

[0036] Among them, L is the loss function, V represents the weight matrix, which is the sum of the weight matrix in each time step; L t i is the total model loss accumulated over time, T is the number of time steps of the RNN model, and t refers to the partial derivative of W at each moment.

[0037] In the above-mentioned method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion, in step 3, when using the pre-processed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the RNN neural network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0038] A1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units for the model is selected, which minimizes the mean absolute error and root mean square error and has a coefficient of determination closest to 1.

[0039] A2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the activation function of the model. Select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model.

[0040] A3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model.

[0041] A4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model.

[0042] A5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model.

[0043] A6. Dropout ratio: The dropout ratio of the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The dropout ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the dropout ratio of the model.

[0044] In the above-mentioned method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion, the specific process of constructing the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network in step 4 is as follows:

[0045] Step 401: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network;

[0046] Step 402: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, LSTM, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Numpy is a basic Python package for scientific computing and is used to process data. Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data. Sklearn is a Python-based machine learning tool used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination. Keras is used to import Sequential, LSTM, Dropout, and Dense classes. Matplotlib is used for plotting. The LSTM class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer. The Dense layer is a fully connected layer and is used to define the number of output nodes of the model. The Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model.

[0047] Step 403: In each time step, the input gate vector of the model is expressed as:

[0048] i t =σ i (W i X t +U i h t-1 +bi ) (F7)

[0049] Among them, X t is the LSTM input vector, i t is the LSTM input gate vector of the current time step, h t-1 is the LSTM hidden layer vector of the previous time step, W i The weight matrix from the input gate to the hidden gate of the LSTM current time step, U i is the weight matrix from the output gate to the input gate of the LSTM in the previous time step, b i is the LSTM input gate vector adjustment coefficient, σ i The activation function of the LSTM input gate;

[0050] Step 404: In each time step, the forget gate vector of the model is expressed as:

[0051] f t =σ f (W f X t +U f h t-1 +b f ) (F8)

[0052] Among them, f t is the forget gate vector of the current time step of LSTM, W f The weight matrix from the input gate to the forget gate of the LSTM current time step, U f is the weight matrix from the forget gate to the forget gate of the LSTM in the previous time step, b f is the LSTM hidden layer vector adjustment coefficient, σ f is the activation function of the LSTM hidden layer;

[0053] Step 405: In each time step, the output value of the model is expressed as:

[0054] o t =σ o (W o X t +U o h t-1 +b o ) (F9)

[0055] Among them, t is the LSTM output vector, W o is the weight matrix from the input gate to the output gate of the LSTM current time step, U o is the weight matrix from the forget gate to the output gate of LSTM at the previous moment, b o is the LSTM output gate adjustment coefficient, σ ois the activation function of the LSTM output gate;

[0056] Step 406: Update the LSTM cell state and obtain the LSTM hidden layer vector of the current time step after the LSTM cell state. The specific process is as follows:

[0057] Step 4061: Select the information discarded in the cell state in the forget gate, and read h t-1 and X t , output the value between [0, 1] and feed it back to the old state C t-1 ;

[0058] Step 4062: Determine the new information stored in the cell state

[0059]

[0060] Among them, W c is the input weight matrix for LSTM cell state update, σ c is the activation function for updating the LSTM cell state, U c is the cyclic weight matrix updated for the LSTM cell state, b c Update the value adjustment coefficient for the LSTM cell state;

[0061] Step 4063: C t-1 With f t Multiply and add To obtain the updated cell state value C t :

[0062]

[0063] Among them, f t is the forget gate result of the current time step, i t is the input gate result of the current time step;

[0064] Step 4064: Determine the output value h of the current hidden layer based on the cell state value. t :

[0065] h t =o t *σ c (C t ) (F13)

[0066] Among them, t Output gate result at the current time step.

[0067] In the above-mentioned method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion, in step 4, when using the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0068] B1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected.

[0069] B2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model;

[0070] B3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model.

[0071] B4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model.

[0072] B5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model.

[0073] B6. Discard ratio: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the discard ratio of the model; select the discard ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the discard ratio of the model.

[0074] In the above-mentioned method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion, the specific process of constructing the coal spontaneous combustion CO prediction model based on the GRU gated cycle unit in step 5 is as follows:

[0075] Step 501: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit;

[0076] Step 502: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, GRU, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit. Numpy is a basic Python package for scientific computing and is used to process data. Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data. Sklearn is a machine learning tool based on the Python language and is used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination. Keras is used to import Sequential, GRU, Dropout, and Dense classes. Matplotlib is used for drawing. The GRU class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer. The Dense layer is a fully connected layer and is used to define the number of output nodes of the model. The Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model.

[0077] Step 503: In each time step t, the update gate vector of the model is expressed as:

[0078] z t =σ z (W z X t +U z h t-1 +b z ) (F14)

[0079] Among them, X t is the GRU input vector, h t-1 is the GRU hidden layer vector of the previous time step, W z is the weight matrix of the GRU input vector, U z is the weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is updated, b z Update the gate vector adjustment coefficient for GRU, σ z Activation function for GRU to update the gate vector;

[0080] Step 504: In each time step, the reset gate vector of the model is expressed as:

[0081] r t =σ r (W r X t +U r h t-1+b r ) (F15)

[0082] Among them, r t Reset the gate vector for the GRU at the current time step, W r Reset the input weight matrix of the gate vector for GRU, U r The weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is calculated is reset, b r Reset the gate vector adjustment coefficient for GRU, σ r Reset the activation function of the gate for GRU;

[0083] Step 505: At each time step, the candidate hidden state of the model is:

[0084]

[0085] in, is the candidate hidden state of GRU, W h is the weight matrix of the GRU input vector at the current time step, U h is the weight matrix of the reset gate hidden in the previous moment of GRU, b h is the candidate hidden state adjustment coefficient of GRU, σ h is the activation function of the candidate hidden state of GRU;

[0086] Step 506: In each time step, the hidden layer vector of the model is expressed as:

[0087]

[0088] Among them, h t is the GRU hidden layer vector of the current time step;

[0089] Step 507: In each time step, the output layer vector of the model is expressed as:

[0090] y t =h t (F18)

[0091] Among them, y t is the GRU output layer vector of the current time step.

[0092] In the above-mentioned method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion, in step 5, when using the pre-processed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0093] C1. Number of hidden layer units: The number of hidden layer units in the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected.

[0094] C2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model;

[0095] C3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the optimizer of the model; select the optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the optimizer of the model;

[0096] C4, learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the learning rate of the model; select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model;

[0097] C5. Time step: The time step of the model is determined by using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the time step of the model.

[0098] C6, discard ratio: Use the mean absolute error, root mean square error, and determination coefficient of the training set and validation set to determine the discard ratio of the model; select the discard ratio with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 as the discard ratio of the model.

[0099] The above-mentioned method for predicting the CO concentration in the goaf for predicting the risk of coal spontaneous combustion is described in step 6. The coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit are evaluated respectively. The specific method for comparing the prediction accuracy of the three coal spontaneous combustion CO prediction models is: using the mean absolute error MAE, the root mean square error RMSE and the determination coefficient R 2 Three indicators are used to quantitatively judge the prediction performance of RNN model, LSTM model and GRU model;

[0100] Among them, the formula of mean absolute error MAE is defined as:

[0101]

[0102] in, is the predicted value, is the actual value, n is the number of samples, and j is a natural number from 1 to n;

[0103] The value range of the mean absolute error (MAE) is [0, +∞). The smaller the error between the predicted value and the actual value, the smaller the MAE value, which means the higher the accuracy of the prediction model.

[0104] The formula for the root mean square error RMSE is defined as:

[0105]

[0106] The root mean square error (RMSE) indicates the degree of sample dispersion. The smaller the error between the predicted value and the actual value, the smaller the RMSE value, which means that the nonlinear fitting is better and the accuracy of the prediction model is higher.

[0107] Coefficient of determination R 2 The formula is defined as:

[0108]

[0109] in, is the average of the actual values;

[0110] Coefficient of determination R 2 The value range of R is [0, 1]. 2 The closer it is to 1, the better the model's fitting and generalization capabilities are.

[0111] Compared with the prior art, the present invention has the following advantages:

[0112] 1. The present invention uses kernel density estimation to test the distribution of feature variables and performs logarithmic transformation on non-normal distributions, thereby improving the generalization ability of the model. Secondly, the normalization of feature variables accelerates the convergence of the model and shortens the training time.

[0113] 2. This paper proposes a CO2 prediction model based on RNN, LSTM, and GRU algorithms. During the model construction process, fully connected layers and dropout classes are added to prevent overfitting of the model. The experimental CO2 values ​​are highly consistent with the predicted values, with a prediction error of less than 1%. This achieves continuous dynamic trend prediction of the CO2 volume fraction, indicating that compared with traditional static models, dynamic time series prediction of CO2 using sequence models is feasible and has higher prediction accuracy.

[0114] 3. The present invention uses MAE, RMSE and R of training set and validation set to 2 The optimal parameters of the three models were obtained and the prediction accuracy of the three models under the same sequence data was compared using model performance evaluation indicators. Among them, the LSTM model had the highest prediction accuracy, followed by the RNN model and the GRU model.

[0115] 4. This invention uses the theory and methods of deep learning to strengthen the research on coal spontaneous combustion hazard prediction technology, which is crucial for improving the level of intelligent management and control of coal mine safety production.

[0116] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] Figure 1 A flowchart of the method of the present invention;

[0118] Figure 2 This is a diagram of the ventilation mode of the working surface 40105 in an embodiment of the present invention;

[0119] Figure 3 This is a diagram showing changes in the volume fraction of gases at different measuring points in the goaf over time according to an embodiment of the present invention;

[0120] Figure 4a This is a graph showing the distribution of characteristic variables of carbon dioxide in the present invention;

[0121] Figure 4b This is a diagram showing the distribution of methane characteristic variables in the present invention;

[0122] Figure 4c This is a distribution diagram of distance characteristic variables after logarithmic transformation of the present invention;

[0123] Figure 4d This is a diagram showing the distribution of time characteristic variables after logarithmic transformation of the present invention;

[0124] Figure 4e This is a diagram showing the distribution of oxygen characteristic variables of the present invention;

[0125] Figure 4f This is a distribution diagram of carbon monoxide characteristic variables of the present invention;

[0126] Figure 4g This is a diagram showing the distribution of characteristic variables of ethane according to the present invention;

[0127] Figure 5 This is a schematic diagram of the structure of the RNN-based coal spontaneous combustion CO prediction model of the present invention;

[0128] Figure 6a Schematic diagram of the number of hidden layer units in the RNN model of the present invention Figure 1 ;

[0129] Figure 6b Schematic diagram of the number of hidden layer units in the RNN model of the present invention Figure 2 ;

[0130] Figure 6cSchematic diagram of the number of iterations of the RNN model of the present invention;

[0131] Figure 6d Schematic diagram of the activation function of the RNN model of the present invention;

[0132] Figure 6e Schematic diagram of the RNN model optimizer of the present invention;

[0133] Figure 6f Schematic diagram of the learning rate of the RNN model of the present invention;

[0134] Figure 6g Schematic diagram of the time step of the RNN model of the present invention;

[0135] Figure 6h Schematic diagram of the discard ratio of the RNN model of the present invention;

[0136] Figure 7 This is a schematic diagram of the structure of the coal spontaneous combustion CO prediction model based on LSTM of the present invention;

[0137] Figure 8a The number of hidden layer units of the LSTM model of the present invention is shown as follows: Figure 1 ;

[0138] Figure 8b The number of hidden layer units of the LSTM model of the present invention is shown as follows: Figure 2 ;

[0139] Figure 8c This is a schematic diagram of the number of iterations of the LSTM model of the present invention;

[0140] Figure 8d This is a schematic diagram of the activation function of the LSTM model of the present invention;

[0141] Figure 8e Schematic diagram of the LSTM model optimizer of the present invention;

[0142] Figure 8f This is a schematic diagram of the learning rate of the LSTM model of the present invention;

[0143] Figure 8g This is a schematic diagram of the time step of the LSTM model of the present invention;

[0144] Figure 8h This is a schematic diagram of the discard ratio of the LSTM model of the present invention;

[0145] Figure 9 Schematic diagram of the structure of the coal spontaneous combustion CO prediction model based on GRU of the present invention;

[0146] Figure 10a Schematic diagram of the number of hidden layer units of the GRU model of the present invention Figure 1 ;

[0147] Figure 10b Schematic diagram of the number of hidden layer units of the GRU model of the present invention Figure 2 ;

[0148] Figure 10c Schematic diagram of the number of iterations of the GRU model of the present invention;

[0149] Figure 10d Schematic diagram of the activation function of the GRU model of the present invention;

[0150] Figure 10e Schematic diagram of the GRU model optimizer of the present invention;

[0151] Figure 10f Schematic diagram of the learning rate of the GRU model of the present invention;

[0152] Figure 10g This is a schematic diagram of the time step of the GRU model of the present invention;

[0153] Figure 10h Schematic diagram of the discard ratio of the GRU model of the present invention;

[0154] Figure 11a This is the prediction result diagram of the RNN model of the present invention;

[0155] Figure 11b This is the prediction result diagram of the LSTM model of the present invention;

[0156] Figure 11c This is the prediction result diagram of the GRU model of the present invention. DETAILED DESCRIPTION

[0157] like Figure 1 As shown, the method for predicting the CO concentration in goaf for predicting the risk of coal spontaneous combustion of the present invention comprises the following steps:

[0158] Step 1: Obtain the volume fraction data of CO, O2, CO2, CH4, and C2H6 gases in the goaf at different distances from the fully-mechanized caving working face, and divide the multiple sets of data into training set data, validation set data, and test set data;

[0159] In this example, the Changfosi Coal Mine in Binchang, Shaanxi Province was selected as the experimental base. The O2, CO, CO2, CH4 and C2H6 in the goaf at different distances from the 40105 fully mechanized caving working face were observed, and the volume fractions of each gas component were obtained. The 40105 working face has a strike length of 1855m, a dip of 200m and an area of ​​37100m. 2 The coal seam floor elevation is 580.8-620.6m, the burial depth is 324.6-460.9m, and the ventilation method of the 40105 working face is as follows: Figure 2 shown.

[0160] The bundle pipe monitoring system was used to obtain volume fractions of CO, O₂, CO₂, CH₄, and C₂H₂ at various measurement points within the 40105 fully mechanized caving face. The face sampler was configured with four sampling points along the bundle pipe protection tubes behind the supports. As the face was mined, one set was buried every 60 meters, and sampling and analysis were performed during each shift. However, as the face was mined and advanced, some measurement points were damaged by coal and rock collapse from the roof. Some support measurement points experienced a loss of gas pressure. Therefore, in this study, data from 105 supports were selected for modeling. 285 sets of continuous gas volume fraction measurements were obtained over 285 days of monitoring.

[0161] like Figure 3 The figure shows the volume fractions (%) of O2, CO, CO2, CH4 and C2H6 in the goaf at different measuring points in 9 cycles, where L represents the distance (m) between the measuring point and the working face. As can be seen from the figure, in one cycle, as L gradually increases, the volume fractions of CO, CO2, CH4 and C2H6 show the same trend of change, and the volume fractions gradually increase to reach a peak value. The volume fraction of O2 shows the opposite trend, and the volume fraction gradually decreases to reach the minimum value of this cycle. This result is mainly due to the fact that with the mining of the working face of the goaf, the degree of oxidation of the coal body increases, and O2 is gradually consumed to produce a large amount of CO, CO2, CH4 and C2H6. In addition, from Figure 2 As can be seen from the data, CO exhibits a complex nonlinear relationship with other gas products and the distance from the working face of the goaf over time. Changes in CO may be affected by other gas products, causing deviations in the measured values. Therefore, in this study, the volume fractions of O₂, CO₂, CH₄, and C₂H₆, as well as L, were selected as input variables during the modeling process, with the CO volume fraction as the target output.

[0162] The sample size, mean, standard deviation, minimum, first quartile, second quartile, third quartile, and maximum values ​​of O2, CO, CO2, CH4, and C2H6 are shown in Table 1. Descriptive statistics of the field experimental data. In addition, the 285 groups of samples were divided into 171 groups (60%) of samples, 57 groups (20%) of samples, and 57 groups (20%) of samples as training sets, validation sets, and test sets, respectively, to train the model's fitting ability and generalization ability.

[0163] Table 1 Descriptive statistical analysis of field data

[0164]

[0165]

[0166] Step 2: Perform data distribution test and data normalization preprocessing on the training set data, validation set data and test set data;

[0167] In this embodiment, the specific process of the data distribution test in step 2 is:

[0168] Step 201: Use the kernel function as the Gaussian kernel function Kernel density estimate of :

[0169]

[0170] Get the distribution of characteristic variables of the data set; where f h (x) is the kernel density function value, x i is the i-th sample from the total sample x, n is the number of samples, i is a natural number from 1 to n, h is the bandwidth, Indicates that the variable of Gaussian kernel function K(x) is assigned

[0171] Through kernel density estimation, the fitting and generalization capabilities of the prediction model can be improved;

[0172] In this embodiment, the bandwidth h is set to 20, and the characteristic variable distribution of the data set obtained by kernel density estimation is as follows: Figures 4a to 4g As shown;

[0173] Step 202: Use the logarithmic transformation formula:

[0174]

[0175] Perform logarithmic transformation on the data set to make the non-normally distributed data tend to be normally distributed to stabilize the variance, thereby improving the model training speed and prediction accuracy; where y is the logarithmic transformed variable, λ is the logarithmic transformation coefficient, and c is the maximum value of the logarithmic transformation feature;

[0176] In specific implementation, the value of λ is usually set to 1;

[0177] In this embodiment, the data normalization in step 2 adopts the maximum and minimum normalization formula:

[0178]

[0179] Normalize the characteristic variables of the data set; where y is the variable after data distribution test, y′ is the variable after data normalization, and y min is the minimum value of the variable after the data distribution test, y max It is the maximum value of the variable after the data distribution test.

[0180] This method normalizes the feature variables within the range of [-1, 1] without changing the distribution of the variables.

[0181] Step 3: Construct a coal spontaneous combustion CO prediction model based on an RNN neural network. The volume fractions of O2, CO2, CH4, and C2H6, as well as L, are selected as input variables. The CO volume fraction is used as the model output target. The preprocessed training set data, validation set data, and test set data are used to train the coal spontaneous combustion CO prediction model based on the RNN neural network to obtain a trained coal spontaneous combustion CO prediction model based on the RNN neural network. Wherein, L is the distance between the measurement point and the working face.

[0182] RNN is a neural network structure used to process sequence data. Compared with the "layer" in traditional neural networks, the "layer" of RNN refers to the recurrent unit of a single time step. In a given sequence data, X=(X1,X2,X3...X τ ), the expansion length of RNN is τ, the sequence to be processed is usually a time series, the evolution direction of the sequence is called the time step (time-step), and in order to efficiently map the sequence data, RNN feeds the output of the recurrent layer back to itself as the input for the next time step calculation;

[0183] In this embodiment, the specific process of constructing the coal spontaneous combustion CO prediction model based on the RNN neural network in step 3 is as follows:

[0184] Step 301: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the RNN neural network to achieve dynamic prediction of CO concentration;

[0185] Step 302: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, SimpleRNN, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the RNN neural network; Numpy is the basic package for Python scientific computing and is used to process data; Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational databases SQL and is used to process data; Sklearn is a machine learning tool based on the Python language and is a commonly used third-party module in machine learning, which is used to import data normalization methods and model testing indicators. The mean absolute error, root mean square error, and coefficient of determination are marked; Keras is used to import Sequential, SimpleRNN, Dropout, and Dense classes; Matplotlib is used for drawing; the Sequential class is added to ensure the correct order of the added classes, the SimpleRNN class is the main layer of the model, the Dropout class is used to delete some random samples from the dataset to feed back to the next layer, and the number of data points randomly discarded from the original training set after each training to avoid overfitting; the Dense layer is a fully connected layer, all units in the previous layer are connected to all units in the current layer, and is used to define the number of output nodes of the model; the Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model;

[0186] In this embodiment, the structure diagram of the coal spontaneous combustion CO prediction model based on the RNN neural network is as follows: Figure 5 As shown, Figure 5 In the RNN, the loop is unfolded in time series, and the network state at the previous moment will affect the network state at the next moment, where X t is the input vector of the RNN at the current time step, h t is the RNN hidden layer vector of the current time step, σ is the activation function of the RNN of the current time step;

[0187] Step 303: In each time step, the activation value of the model is expressed as:

[0188] h t =σ h (W h X t +U h h t-1 +b h ) (F4)

[0189] Among them, X t is the input vector of RNN, ht is the RNN hidden layer vector of the current time step, h t-1 is the RNN hidden layer vector of the previous time step, W h is the weight matrix from the input layer to the hidden layer of the RNN at the current time step, U h is the weight matrix from the hidden layer to the hidden layer of the RNN in the previous time step, that is, the cyclic weight matrix, b h is the RNN hidden layer activation value adjustment coefficient, σ h is the activation function of the RNN hidden layer;

[0190] Step 304: In each time step, the output value of the model is expressed as:

[0191] o t =σ o (W o h t +b o ) (F5)

[0192] Among them, t is the output vector, W o is the weight matrix from the RNN hidden layer to the output layer, b o is the RNN output layer output value adjustment coefficient, σ o is the activation function of the RNN output layer;

[0193] Step 305: Select the back propagation training model and express the derivative of the loss function and the weight matrix as:

[0194]

[0195] Among them, L is the loss function, V represents the weight matrix, which is the sum of the weight matrix in each time step; L t i is the total model loss accumulated over time, T is the number of time steps of the RNN model, and t refers to the partial derivative of W at each moment.

[0196] During the model training process, its parameters need to be optimized to obtain the optimal parameters of the CO sequence model so that its prediction results can reach the best. Since the input feature dimension of the CO sequence model is low, the hidden layer of the RNN model is a single-layer network. Secondly, the mean square error (MSE) is used to determine the number of iterations of the RNN model. The relationship between the number of iterations of the RNN model and the MSE is as follows: Figure 6c shown; from Figure 6c It can be seen that the MSE of the number of iterations of the RNN model decreases rapidly in the early stage, and the error changes slowly in the later stage. The number of iterations of the model is determined to be 50.

[0197] In this embodiment, in step 3, when using the pre-processed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the RNN neural network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0198] A1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units for the model is selected, which minimizes the mean absolute error and root mean square error and has a coefficient of determination closest to 1.

[0199] The value range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is, and the higher the accuracy of the prediction model; the value range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different numbers of hidden layer units, the number of hidden layer units with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimal value of the number of hidden layer units of the model.

[0200] During model training, the number of hidden layer units greatly affects whether the model will be underfitting or overfitting. Figure 6a and Figure 6b It can be seen that the mean absolute error, root mean square error and determination coefficient of the model tend to be stable when the number of hidden layer units is 120, and the determination coefficient is greater than 0.99, the mean absolute error and root mean square error are less than 0.0005, and the model fitting ability is strong. The number of hidden layer units of the RNN model is determined to be 120;

[0201] A2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the activation function of the model. Select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model.

[0202] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing different activation functions, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the activation function with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the activation function of the model.

[0203] An activation function is a complex pattern added to a model to help the network learn data. Common activation functions include Sigmoid, Tanh, ReLU, and Softmax. Figure 6d As shown in the figure, when the activation function is Sigmoid, the mean absolute error, root mean square error and coefficient of determination of the model are the best compared with the stable model, so the activation function is selected as the Sigmoid activation function;

[0204] A3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model.

[0205] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different optimizers, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the optimizer with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimizer of the model.

[0206] During the model training process, the optimizer guides the parameters of the loss function to update to the appropriate and correct size, so that the updated loss function value tends to the global minimum; Figure 6e Several commonly used optimizers are shown in the following: Stochastic Gradient Descent (SGD) without momentum; Adaptive Learning Rate Optimization with Second-Order Momentum, including Adagrad, Rmsprop, Adam, and Adadelta; and Nadam, which is based on Newton Gradient Momentum Descent (NAG) and Adam. Figure 6e As can be seen in Figure 2, when the optimizer of the RNN model is the Nadam algorithm, the mean absolute error, root mean square error, and coefficient of determination of the model reach an ideal state;

[0207] A4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model.

[0208] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different learning rates, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are selected, and the learning rate with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the learning rate of the model.

[0209] The learning rate is an adjustable parameter on the loss function, which controls the magnitude of the network gradient update during training and affects the effective tolerance of the model. The mean absolute error, root mean square error and coefficient of determination obtained by training the model according to the commonly used learning rate are as follows: Figure 6f As can be seen from the figure, the five learning rate values ​​have different effects on the indicators. As the learning rate decreases, the mean absolute error, root mean square error, and coefficient of determination of the RNN model show a trend of first decreasing, then increasing, and then decreasing. Lowering the learning rate further leads to an increase in training error. Finally, the learning rate was determined to be 0.01 for model development.

[0210] A5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model.

[0211] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model at different time steps, the time step with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the time step of the model.

[0212] The time step is a parameter unique to the sequence model and refers to the length of the sequence. The performance of the model at different time steps is evaluated by obtaining the mean absolute error, root mean square error, and coefficient of determination. Figure 6g The figure shows the changes in the mean absolute error, root mean square error, and coefficient of determination of the model in the time step of 1-10. The results show that in the RNN model, the longer the prediction time step, the more stable the model error tends to be. When the time step is 6, the model performance gradually stabilizes.

[0213] A6. Dropout ratio: The dropout ratio of the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The dropout ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the dropout ratio of the model.

[0214] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different dropout ratios, the dropout ratio with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the dropout ratio of the model.

[0215] The drop ratio method refers to temporarily dropping hidden layer units from the model according to a certain probability during model training, thereby reducing the probability of overfitting of the model. Its value is generally set to [0, 0.5]. Figure 6h As shown, the mean absolute error and root mean square error of the RNN model are the lowest when the dropout ratio is 0.5, which is the value chosen for developing the model.

[0216] Step 4: Construct a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Select the volume fractions of O2, CO2, CH4, and C2H6, as well as L, as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network to obtain a trained coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network.

[0217] LSTM is a variant of RNN. RNN only has short-term memory due to the vanishing gradient. LSTM combines short-term memory with long-term memory through gate control, suppressing harmful gradient updates and achieving better long-term dependency learning. A typical LSTM unit consists of input, forget, and output gates. Unlike standard RNN, each LSTM layer receives not only the output of the previous sequence layer but also the previous unit state (C t-1 ). Among them, the input gate (i t) controls which parts of the cell's main layer output should be added to the long-term cell state (C t ); output gate (o t ) controls the reading of long-term cell status (C t ), and generates the current time step output; forget gate (f t ) controls the long-term cell state (C t ) should be deleted.

[0218] In this embodiment, the specific process of constructing the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network in step 4 is as follows:

[0219] Step 401: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network to achieve dynamic prediction of CO concentration;

[0220] Step 402: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, LSTM, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network; Numpy is the basic package for Python scientific computing and is used to process data; Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational databases SQL and is used to process data; Sklearn is a machine learning tool based on the Python language and is a commonly used third-party module in machine learning, which is used to import data normalization methods and Model test indicators include mean absolute error, root mean square error, and coefficient of determination; Keras is used to import Sequential, LSTM, Dropout, and Dense classes; Matplotlib is used for plotting; the Sequential class is added to ensure the correct order of added classes; the LSTM class is the main layer of the model; the Dropout class is used to remove some random samples from the dataset to feed back to the next layer, and the number of data points randomly discarded from the original training set after each training to avoid overfitting; the Dense layer is a fully connected layer, in which all units in the previous layer are connected to all units in the current layer, and is used to define the number of output nodes of the model; the Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model;

[0221] The data of the LSTM input gate is the current time step X t The input and the previous time step h t-1 The hidden state of X t It is processed by a fully connected stage and an activation function that calculates the input gate, forget gate, and output gate.

[0222] In this embodiment, the structure diagram of the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network is as follows: Figure 7 As shown, Figure 7 A typical LSTM unit consists of an input gate (i t ), forget gate (f t ) and output gate (o t ), and unlike the standard RNN, each LSTM layer receives not only the output of the previous sequence layer but also the previous unit state (C t-1 ); where σ is the activation function of LSTM, and the input gate controls which parts of the main layer output of the cell should be added to the long-term cell state (C t ); the data of the LSTM input gate is the current time step X t The input and the previous time step h t-1 The hidden state of X t It is processed by a fully connected stage and an activation function that calculates the input gate, forget gate, and output gate.

[0223] Step 403: In each time step, the input gate vector of the model is expressed as:

[0224] i t =σ i (W i X t +U i h t-1 +b i ) (F7)

[0225] Among them, X t is the LSTM input vector, i t is the LSTM input gate vector of the current time step, h t-1 is the LSTM hidden layer vector of the previous time step, W i The weight matrix from the input gate to the hidden gate of the LSTM current time step, U i is the weight matrix from the output gate to the input gate of the LSTM in the previous time step, b i is the LSTM input gate vector adjustment coefficient, σ i The activation function of the LSTM input gate;

[0226] Step 404: In each time step, the forget gate vector of the model is expressed as:

[0227] f t =σ f (W f X t +U f h t-1 +bf ) (F8)

[0228] Among them, f t is the forget gate vector of the current time step of LSTM, W f The weight matrix from the input gate to the forget gate of the LSTM current time step, that is, the input weight matrix; U f is the weight matrix from the forget gate to the forget gate of the LSTM in the previous time step, that is, the cyclic weight matrix; b f is the LSTM hidden layer vector adjustment coefficient, σ f is the activation function of the LSTM hidden layer;

[0229] Step 405: In each time step, the output value of the model is expressed as:

[0230] o t =σ o (W o X t +U o h t-1 +b o ) (F9)

[0231] Among them, t is the LSTM output vector, W o is the weight matrix from the input gate to the output gate of the LSTM current time step, U o is the weight matrix from the forget gate to the output gate of LSTM at the previous moment, b o is the LSTM output gate adjustment coefficient, σ o is the activation function of the LSTM output gate;

[0232] Step 406: Update the LSTM cell state and obtain the LSTM hidden layer vector of the current time step after the LSTM cell state. The specific process is as follows:

[0233] Step 4061: Select the information discarded in the cell state in the forget gate, and read h t-1 and X t , output the value between [0, 1] and feed it back to the old state C t-1 ;

[0234] Step 4062: Determine the new information stored in the cell state

[0235]

[0236] Among them, W c is the input weight matrix for LSTM cell state update, σ c is the activation function for updating the LSTM cell state, U cis the cyclic weight matrix updated for the LSTM cell state, b c Update the value adjustment coefficient for the LSTM cell state;

[0237] Step 4063: C t-1 With f t Multiply and add To obtain the updated cell state value C t :

[0238]

[0239] Among them, f t is the forget gate result of the current time step, i t is the input gate result of the current time step;

[0240] Step 4064: Determine the output value h of the current hidden layer based on the cell state value. t :

[0241] h t =o t *σ c (C t ) (F13)

[0242] Among them, t Output gate result at the current time step.

[0243] Set the LSTM model to a single-layer network and use MSE to determine the number of iterations of the LSTM model to be 50. The relationship between the number of iterations of the model and MSE is as follows: Figure 8c As shown. Figure 8c It can be seen that during the LSTM model training process, as the number of iterations increases, the MSE decreases rapidly in the early stage. When the number of iterations approaches 50, the MSE tends to the minimum value and the rate of decrease is slow. Therefore, the number of iterations of the model is determined to be 50.

[0244] In this embodiment, in step 4, when the pre-processed training set data, validation set data, and test set data are used to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0245] B1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected.

[0246] The value range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is, and the higher the accuracy of the prediction model; the value range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different numbers of hidden layer units, the number of hidden layer units with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimal value of the number of hidden layer units of the model.

[0247] from Figure 8a and Figure 8b It can be seen that the mean absolute error and root mean square error of the model gradually decrease with the increase of the number of units, while the coefficient of determination gradually increases with the increase of the number of units. When the number of units is 30, the mean absolute error and root mean square error of the model tend to the lowest value, and the coefficient of determination tends to the maximum value. 30 hidden layer units are selected for LSTM model development;

[0248] B2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model;

[0249] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing different activation functions, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the activation function with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the activation function of the model.

[0250] During the LSTM model training process, the optimal activation function of the model is selected based on four activation functions; Figure 8d As shown in the figure, when the activation function is Sigmoid, the mean absolute error and root mean square error of the model tend to the minimum, the coefficient of determination tends to the maximum, and the performance of the LSTM model is the best;

[0251] B3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model.

[0252] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different optimizers, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the optimizer with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimizer of the model.

[0253] Figure 8e The figure shows the model performance indicators of several commonly used optimizers in different gases. As can be seen from the figure, when the model optimizer is the Adagrad algorithm, the mean absolute error, root mean square error, and coefficient of determination of the LSTM model reach ideal values.

[0254] B4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model.

[0255] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different learning rates, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are selected, and the learning rate with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the learning rate of the model.

[0256] like Figure 8f As shown in the figure, the model performance is relatively stable, and the learning rate has little effect on the model error. Since the model is overfitting at a learning rate of 0.0001, and the model converges slowly at this learning rate, which increases the computational cost, 0.0001 is not selected. When the learning rate is 0.01 or 0.1, the model does not overfit, and the convergence speed at the learning rate of 0.01 is slightly higher than that of 0.1. Therefore, considering the convergence speed and model error, the LSTM learning rate is finally determined to be 0.01;

[0257] B5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model.

[0258] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model at different time steps, the time step with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the time step of the model.

[0259] Figure 8g The figure shows the changes in the mean absolute error, root mean square error, and coefficient of determination of the model in time steps of 1-10. The results show that in the LSTM model, the performance is most stable when the time step is 8, and the mean absolute error and root mean square error of the model are the lowest.

[0260] B6. Dropout ratio: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the dropout ratio of the model. The dropout ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the dropout ratio of the model.

[0261] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different dropout ratios, the dropout ratio with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the dropout ratio of the model.

[0262] like Figure 8h As shown in the figure, in the LSTM model, the dropout ratio has little effect on the model performance and the error fluctuation is small. When the dropout ratio is 0.3, the model error is the lowest.

[0263] Step 5: Construct a coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit. Select the volume fractions of O2, CO2, CH4, and C2H6 and L as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit to obtain a trained coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit.

[0264] GRU is also a variant of RNN. Unlike LSTM, GRU has two gates. Reset gate (r t ) determines how to combine the new input information with the previous memory, and the update gate (z t ) defines the amount of memory stored in the previous time step; the two state vectors are merged into one vector, which is passed to the next time step and the output layer; the basic idea of ​​GRU using the gating mechanism to learn long-term dependencies is consistent with LSTM. The difference between LSTM and GRU models is that the latter only has r t and z t , there is no output gate, and the GRU model uses a single gate to simultaneously control the update of the information unit state, and the two state vectors are merged into one vector and passed to the next time step and the output layer.

[0265] In this embodiment, the specific process of constructing the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit in step 5 is as follows:

[0266] Step 501: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit to achieve dynamic prediction of CO concentration;

[0267] Step 502: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, GRU, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit. Numpy is a basic package for Python scientific computing and is used to process data. Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational databases SQL and is used to process data. Sklearn is a machine learning tool based on Python language and is a commonly used third-party module in machine learning. It is used to import data normalization methods and models. The model test indicators are mean absolute error, root mean square error, and coefficient of determination; Keras is used to import Sequential, GRU, Dropout, and Dense classes; Matplotlib is used for drawing; the Sequential class is added to ensure the correct order of the added classes. The GRU class is the main layer of the model. The Dropout class is used to delete some random samples from the dataset to feed back to the next layer. The number of data points is randomly discarded from the original training set after each training to avoid overfitting; the Dense layer is a fully connected layer. All units in the previous layer are connected to all units in the current layer. It is used to define the number of output nodes of the model; the Compile function uses Adam, SGD, or RMSprop optimization algorithms to train the model;

[0268] In this embodiment, the structure diagram of the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit is as follows: Figure 9 As shown, Figure 9 In the GRU reset gate (r t ) determines how to combine the new input information with the previous memory, and the update gate of GRU (z t ) defines the amount of memory saved to the current time step; the two state vectors are merged into one vector, which is passed to the next time step and the output layer, σ is the activation function of GRU, h t-1 is the GRU hidden layer vector of the previous time step, h t is the GRU hidden layer vector of the current time step, y t is the GRU output layer vector of the current time step, The GRU candidate hidden state is a new hidden state calculated under the action of the update gate and the reset gate.

[0269] Step 503: In each time step t, the update gate vector of the model is expressed as:

[0270] z t =σ z (W z X t +U z h t-1 +b z ) (F14)

[0271] Among them, X t is the GRU input vector, h t-1 is the GRU hidden layer vector of the previous time step, W z is the weight matrix of the GRU input vector, U z is the weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is updated, b z Update the gate vector adjustment coefficient for GRU, σ z Activation function for GRU to update the gate vector;

[0272] Step 504: In each time step, the reset gate vector of the model is expressed as:

[0273] r t =σ r (W r X t +U r h t-1 +b r ) (F15)

[0274] Among them, r t Reset the gate vector for the GRU at the current time step, Wr Reset the input weight matrix of the gate vector for GRU, U r The weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is calculated is reset, b r Reset the gate vector adjustment coefficient for GRU, σ r Reset the activation function of the gate for GRU;

[0275] Step 505: At each time step, the candidate hidden state of the model is:

[0276]

[0277] in, is the candidate hidden state of GRU, W h is the weight matrix of the GRU input vector at the current time step, U h is the weight matrix of the reset gate hidden in the previous moment of GRU, b h is the candidate hidden state adjustment coefficient of GRU, σ h is the activation function of the candidate hidden state of GRU;

[0278] Step 506: In each time step, the hidden layer vector of the model is expressed as:

[0279]

[0280] Among them, h t is the GRU hidden layer vector of the current time step;

[0281] Step 507: In each time step, the output layer vector of the model is expressed as:

[0282] y t =h t (F18)

[0283] Among them, y t is the GRU output layer vector of the current time step.

[0284] During the GRU model construction process, the model parameters are optimized. The model hidden layer is set to a single-layer network, and the number of model iterations is determined to be 10 using MSE. The relationship between the number of model iterations and MSE is as follows: Figure 10c As shown. Figure 10c It can be seen that during the GRU model training process, as the number of iterations increases, the MSE decreases rapidly. When the number of iterations approaches 10, the MSE tends to the minimum value and the rate of decrease is slow. Therefore, the number of iterations of the GRU model is determined to be 10.

[0285] In this embodiment, when the pre-processed training set data, validation set data, and test set data are used to train the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit in step 5, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimized, specifically including:

[0286] C1. Number of hidden layer units: The number of hidden layer units in the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected.

[0287] The value range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is, and the higher the accuracy of the prediction model; the value range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different numbers of hidden layer units, the number of hidden layer units with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimal value of the number of hidden layer units of the model.

[0288] Figure 10a and Figure 10b The figure shows how the mean absolute error, root mean square error, and coefficient of determination of the GRU model change as the number of units increases. The mean absolute error and root mean square error of the model gradually increase with the increase in the number of units, while the coefficient of determination gradually decreases with the increase in the number of units. This result shows that the performance of the GRU model decreases with the increase in the number of units, so 10 units are selected for model development.

[0289] C2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model;

[0290] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing different activation functions, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the activation function with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the activation function of the model.

[0291] The study compared the effects of four activation functions on the mean absolute error, root mean square error and coefficient of determination of the GRU model; Figure 10d It can be seen that when the activation function is Tanh, the mean absolute error and root mean square error of the model tend to the minimum, the determination coefficient tends to the maximum, and the performance of the model is the best.

[0292] C3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the optimizer of the model; select the optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the optimizer of the model;

[0293] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different optimizers, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are used, and the optimizer with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the optimizer of the model.

[0294] Figure 10e The figure shows the model performance indicators of several commonly used optimizers in the GRU model. It can be seen from the figure that when the optimizer is the SGD algorithm, the mean absolute error and root mean square error of the GRU model are the smallest, and the coefficient of determination is the largest.

[0295] C4, learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the learning rate of the model; select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model;

[0296] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model; the root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model; the range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model; therefore, when comparing different learning rates, the mean absolute error, root mean square error and determination coefficient of the model training set and validation set are selected, and the learning rate with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the learning rate of the model.

[0297] like Figure 10fAs shown in the figure, different learning rates have different effects on model performance. The GRU model performance is relatively stable, and the learning rate has little effect on the model error. When the learning rate is 0.0001, the mean absolute error and root mean square error of the GRU model are the lowest, and the coefficient of determination is the largest.

[0298] C5. Time step: The time step of the model is determined by using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the time step of the model.

[0299] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model at different time steps, the time step with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the time step of the model.

[0300] Figure 10g The figure shows the changes in the mean absolute error, root mean square error, and coefficient of determination of the model in steps of 1-10. The results show that as the time step increases, the mean absolute error and root mean square error of the GRU model change less, and the model error is lowest when the value is 2.

[0301] C6, Dropout ratio: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the dropout ratio of the model; select the dropout ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the dropout ratio of the model;

[0302] The range of mean absolute error is [0, +∞). The smaller the error between the predicted value and the experimental value, the smaller the value, the higher the accuracy of the prediction model. The root mean square error indicates the degree of dispersion of the sample. The smaller the value, the better the nonlinear fitting is and the higher the accuracy of the prediction model. The range of determination coefficient is [0,1]. The closer it is to 1, the better the fitting and generalization ability of the model. Therefore, when comparing the mean absolute error, root mean square error and determination coefficient of the training set and validation set of the model with different dropout ratios, the dropout ratio with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 is selected as the dropout ratio of the model.

[0303] like Figure 10h As shown in Figure 3, in the GRU model, the dropout ratio has little effect on the model performance and the error fluctuation is small. When the dropout ratio is 0.4, the model error is the lowest.

[0304] Step 6: Evaluate the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit, and compare the prediction accuracy of the three coal spontaneous combustion CO prediction models;

[0305] In this embodiment, the coal spontaneous combustion CO prediction model based on RNN neural network, the coal spontaneous combustion CO prediction model based on LSTM long short-term memory network and the coal spontaneous combustion CO prediction model based on GRU gated recurrent unit are evaluated respectively in step 6. The specific method for comparing the prediction accuracy of the three coal spontaneous combustion CO prediction models is: using the mean absolute error MAE, root mean square error RMSE and determination coefficient R 2 Three indicators are used to quantitatively judge the prediction performance of RNN model, LSTM model and GRU model;

[0306] Among them, the formula of mean absolute error MAE is defined as:

[0307]

[0308] in, is the predicted value, is the actual value, n is the number of samples, and j is a natural number from 1 to n;

[0309] The value range of mean absolute error (MAE) is [0, +∞). The smaller the error between the predicted value and the actual value, the smaller the MAE value, which means the higher the accuracy of the prediction model.

[0310] The formula for the root mean square error RMSE is defined as:

[0311]

[0312] The root mean square error (RMSE) indicates the degree of sample dispersion. The smaller the error between the predicted value and the actual value, the smaller the RMSE value, which means that the nonlinear fitting is better and the prediction model has higher accuracy.

[0313] Determination coefficient R 2 The formula is defined as:

[0314]

[0315] in, is the average of the actual values;

[0316] Coefficient of determination R2 The value range of R is [0, 1]. 2 The closer it is to 1, the better the model's fitting and generalization capabilities are.

[0317] Step 7. Collect the CO gas volume fraction data of the goaf in real time, and select one or more prediction modules of the three coal spontaneous combustion CO prediction models: the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit to predict the CO concentration in the goaf.

[0318] Based on 285 sets of field data, RNN, LSTM and GRU models were established. In order to evaluate the performance of the models, MAE, RMSE and R 2 Quantitatively judge the prediction performance of the model. MAE, RMSE and R of the three models 2 The results are shown in Table 2. Performance indicators of the coal spontaneous combustion CO prediction model.

[0319] Table 2 Performance indicators of the prediction model for the CO volume fraction of spontaneous combustion of coal

[0320]

[0321] Comparative study of MAE, RMSE and R of RNN model, LSTM model and GRU model 2 All three models were found to successfully achieve dynamic prediction of CO volume fraction with an accuracy of up to 99%. The LSTM model achieved the best prediction performance, followed by the RNN and GRU models. This demonstrates the feasibility of using sequence models for time series prediction of CO volume fraction. The model construction and parameter optimization process can serve as a foundation for developing series prediction models for other indicator gases. This result may be related to the LSTM model structure. The LSTM model combines short-term and long-term memory through gate control, suppressing harmful gradient updates and enabling better learning of long-term dependencies. However, the LSTM model's structure and parameters are more complex than those of the RNN and GRU models.

[0322] In summary, the present invention established RNN (recurrent neural networks), LSTM (long short-term memory networks) and GRU (gated recurrent units) models based on 171 sets of field data, verified the performance of the models using 57 sets of data, and tested the generalization ability of the models based on 57 sets of samples. Figure 11a 、 Figure 11b and Figure 11cThe results of dynamic prediction of CO volume fraction using three models are shown. The figure shows that all three models successfully predict the evolution of CO volume fraction during coal spontaneous combustion over time. The experimental CO values ​​are highly consistent with the predicted values, with prediction errors less than 1%. The LSTM model achieves the highest prediction accuracy, followed by the RNN and GRU models. This result is due to two factors. First, all three models are dynamic. Research has shown that dynamic models have higher prediction accuracy than static models in sequential data, significantly improving the prediction accuracy. Second, the difference in prediction accuracy among the three models is primarily related to their structure. The LSTM model combines short-term and long-term memory through gate control, suppressing harmful gradient updates and enabling better learning of long-term dependencies. However, the structure and parameters of the LSTM model are more complex than those of the RNN and GRU models.

[0323] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any way. Any simple modification, change and equivalent structural change made to the above embodiment based on the technical essence of the present invention shall still fall within the scope of protection of the technical solution of the present invention.

Claims

1. A method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion, characterized in that: The method comprises the following steps: Step 1: Obtain the volume fraction data of CO, O2, CO2, CH4, and C2H6 gases in the goaf at different distances from the fully-mechanized caving working face, and divide the multiple sets of data into training set data, validation set data, and test set data; Step 2: Perform data distribution test and data normalization preprocessing on the training set data, validation set data and test set data; Step 3: Construct a coal spontaneous combustion CO prediction model based on an RNN neural network. The volume fractions of O2, CO2, CH4, and C2H6, as well as L, are selected as input variables. The CO volume fraction is used as the model output target. The preprocessed training set data, validation set data, and test set data are used to train the coal spontaneous combustion CO prediction model based on the RNN neural network to obtain a trained coal spontaneous combustion CO prediction model based on the RNN neural network. Wherein, L is the distance between the measurement point and the working face. Step 4: Construct a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Select the volume fractions of O2, CO2, CH4, and C2H6, as well as L, as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network to obtain a trained coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Step 5: Construct a coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit. Select the volume fractions of O2, CO2, CH4, and C2H6 and L as input variables, and the CO volume fraction as the model output target. Use the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit to obtain a trained coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit. Step 6: Evaluate the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit, and compare the prediction accuracy of the three coal spontaneous combustion CO prediction models; Step 7. Collect the CO gas volume fraction data of the goaf in real time, and select one or more prediction modules of the three coal spontaneous combustion CO prediction models: the coal spontaneous combustion CO prediction model based on the RNN neural network, the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, and the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit to predict the CO concentration in the goaf.

2. A method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: The specific process of the data distribution test in step 2 is: Step 201: Use the kernel function as the Gaussian kernel function Kernel density estimate of : Get the distribution of characteristic variables of the data set; where f h (x) is the kernel density function value, x i is the i-th sample from the total sample x, n is the number of samples, i is a natural number from 1 to n, h is the bandwidth, Indicates that the variable of Gaussian kernel function K(x) is assigned Step 202: Use the logarithmic transformation formula: Perform logarithmic transformation on the data set; where y is the logarithmic transformed variable, λ is the logarithmic transformation coefficient, and c is the maximum value of the logarithmic transformation feature.

3. A method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1 or 2, characterized in that: The data normalization in step 2 uses the maximum and minimum normalization formula: Normalize the characteristic variables of the data set; where y is the variable after data distribution test, y′ is the variable after data normalization, and y min is the minimum value of the variable after the data distribution test, y max It is the maximum value of the variable after the data distribution test.

4. The method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: The specific process of constructing the coal spontaneous combustion CO prediction model based on RNN neural network in step 3 is as follows: Step 301: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the RNN neural network; Step 302: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, SimpleRNN, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the RNN neural network; Numpy is a basic package for Python scientific computing and is used to process data; Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data; Sklearn is a machine learning tool based on the Python language and is used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination; Keras is used to import Sequential, SimpleRNN, Dropout, and Dense classes; Matplotlib is used for drawing; the SimpleRNN class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer; the Dense layer is a fully connected layer and is used to define the number of output nodes of the model; the Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model; Step 303: In each time step, the activation value of the model is expressed as: h t =σ h (W h X t +U h h t-1 +b h )(F4) Among them, X t is the input vector of RNN, h t is the RNN hidden layer vector of the current time step, h t-1 is the RNN hidden layer vector of the previous time step, W h is the weight matrix from the input layer to the hidden layer of the RNN at the current time step, U h is the weight matrix from the hidden layer to the hidden layer of the RNN at the previous time step, b h is the RNN hidden layer activation value adjustment coefficient, σ h is the activation function of the RNN hidden layer; Step 304: In each time step, the output value of the model is expressed as: o t =σ o (W o h t +b o )(F5) Among them, t is the output vector, W o is the weight matrix from the RNN hidden layer to the output layer, b o is the RNN output layer output value adjustment coefficient, σ o is the activation function of the RNN output layer; Step 305: Select the back propagation training model and express the derivative of the loss function and the weight matrix as: Among them, L is the loss function, V represents the weight matrix, which is the sum of the weight matrix in each time step; L t i is the total model loss accumulated over time, T is the number of time steps of the RNN model, and t refers to the partial derivative of W at each moment.

5. A method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1 or 4, characterized in that: In step 3, when using the pre-processed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the RNN neural network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimal, specifically including: A1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units for the model is selected, which minimizes the mean absolute error and root mean square error and has a coefficient of determination closest to 1. A2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the activation function of the model. Select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model. A3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model. A4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model. A5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model. A6. Dropout ratio: The dropout ratio of the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The dropout ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the dropout ratio of the model.

6. The method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: The specific process of constructing the coal spontaneous combustion CO prediction model based on LSTM long short-term memory network in step 4 is as follows: Step 401: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network; Step 402: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, LSTM, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network. Numpy is a basic Python package for scientific computing and is used to process data. Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data. Sklearn is a Python-based machine learning tool used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination. Keras is used to import Sequential, LSTM, Dropout, and Dense classes. Matplotlib is used for plotting. The LSTM class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer. The Dense layer is a fully connected layer and is used to define the number of output nodes of the model. The Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model. Step 403: In each time step, the input gate vector of the model is expressed as: i t =σ i (W i X t +U i h t-1 +b i )(F7) Among them, X t is the LSTM input vector, i t is the LSTM input gate vector of the current time step, h t-1 is the LSTM hidden layer vector of the previous time step, W i The weight matrix from the input gate to the hidden gate of the LSTM current time step, U i is the weight matrix from the output gate to the input gate of the LSTM in the previous time step, b i is the LSTM input gate vector adjustment coefficient, σ i The activation function of the LSTM input gate; Step 404: In each time step, the forget gate vector of the model is expressed as: f t =σ f (W f X t +U f h t-1 +b f )(F8) Among them, f t is the forget gate vector of the current time step of LSTM, W f The weight matrix from the input gate to the forget gate of the LSTM current time step, U f is the weight matrix from the forget gate to the forget gate of the LSTM in the previous time step, b f is the LSTM hidden layer vector adjustment coefficient, σ f is the activation function of the LSTM hidden layer; Step 405: In each time step, the output value of the model is expressed as: o t =σ o (W o X t +U o h t-1 +b o )(F9) Among them, t is the LSTM output vector, W o is the weight matrix from the input gate to the output gate of the LSTM current time step, U o is the weight matrix from the forget gate to the output gate of LSTM at the previous moment, b o is the LSTM output gate adjustment coefficient, σ o is the activation function of the LSTM output gate; Step 406: Update the LSTM cell state and obtain the LSTM hidden layer vector of the current time step after the LSTM cell state. The specific process is as follows: Step 4061: Select the information discarded in the cell state in the forget gate, and read h t-1 and X t , output the value between [0, 1] and feed it back to the old state C t-1 ; Step 4062: Determine the new information stored in the cell state Among them, W c is the input weight matrix for LSTM cell state update, σ c is the activation function for updating the LSTM cell state, U c is the cyclic weight matrix updated for the LSTM cell state, b c Update the value adjustment coefficient for the LSTM cell state; Step 4063: C t-1 With f t Multiply and add To obtain the updated cell state value C t : Among them, f t is the forget gate result of the current time step, i t is the input gate result of the current time step; Step 4064: Determine the output value h of the current hidden layer based on the cell state value. t : h t =one t *σ c (C t )(F13) Among them, t Output gate result at the current time step.

7. A method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1 or 6, characterized in that: In step 4, when using the preprocessed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the LSTM long short-term memory network, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimal, specifically including: B1. Number of hidden layer units: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the number of hidden layer units in the model. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected. B2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model; B3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the optimizer of the model. The optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the optimizer of the model. B4. Learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the learning rate of the model. Select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model. B5. Time step: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the time step of the model. Select the time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the time step of the model. B6. Discard ratio: Use the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets to determine the discard ratio of the model; select the discard ratio with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the discard ratio of the model.

8. The method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: The specific process of constructing the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit in step 5 is as follows: Step 501: Select CO concentration as the output feature and label of the coal spontaneous combustion CO prediction model based on the GRU gated cyclic unit; Step 502: In the Python toolbox, select Numpy, Pandas, Sklearn, Keras, Matplotlib libraries and Sequential, GRU, Dropout, Dense, and Compile classes to build a coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit. Numpy is a basic Python package for scientific computing and is used to process data. Pandas combines Numpy's high-performance array calculation function with the flexible data processing function of spreadsheets and relational database SQL and is used to process data. Sklearn is a machine learning tool based on the Python language and is used to import data normalization methods and model testing indicators such as mean absolute error, root mean square error, and coefficient of determination. Keras is used to import Sequential, GRU, Dropout, and Dense classes. Matplotlib is used for drawing. The GRU class is the main layer of the model, and the Dropout class is used to delete some random samples from the data set to feed back to the next layer. The Dense layer is a fully connected layer and is used to define the number of output nodes of the model. The Compile function uses the Adam, SGD, or RMSprop optimization algorithm to train the model. Step 503: In each time step t, the update gate vector of the model is expressed as: With t =σ z (IN z X t +U z h t-1 +b z )(F14) Among them, X t is the GRU input vector, h t-1 is the GRU hidden layer vector of the previous time step, W z is the weight matrix of the GRU input vector, U z is the weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is updated, b z Update the gate vector adjustment coefficient for GRU, σ z Activation function for GRU to update the gate vector; Step 504: In each time step, the reset gate vector of the model is expressed as: r t σ r (W r X t +U r h t-1 +b r )(F15) Among them, r t Reset the gate vector for the GRU at the current time step, W r The input weight matrix for GRU reset gate vector, U r The weight matrix from the GRU hidden layer to the hidden layer at the previous time step when the gate vector is calculated is reset, b r Reset the gate vector adjustment coefficient for GRU, σ r Reset the activation function of the gate for GRU; Step 505: At each time step, the candidate hidden state of the model is: in, is the candidate hidden state of GRU, W h is the weight matrix of the GRU input vector at the current time step, U h is the weight matrix of the reset gate hidden in the previous moment of GRU, b h is the candidate hidden state adjustment coefficient of GRU, σ h is the activation function of the candidate hidden state of GRU; Step 506: In each time step, the hidden layer vector of the model is expressed as: Among them, h t is the GRU hidden layer vector of the current time step; Step 507: In each time step, the output layer vector of the model is expressed as: y t =h t (F18) Among them, y t is the GRU output layer vector of the current time step.

9. The method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: In step 5, when using the pre-processed training set data, validation set data, and test set data to train the coal spontaneous combustion CO prediction model based on the GRU gated recurrent unit, the model parameters are optimized to obtain the optimal parameters of the model so that the model prediction results are optimal, specifically including: C1. Number of hidden layer units: The number of hidden layer units in the model is determined using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The optimal number of hidden layer units in the model with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected. C2. Activation function: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the activation function of the model; select the activation function with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the activation function of the model; C3. Optimizer: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the optimizer of the model; select the optimizer with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the optimizer of the model; C4, learning rate: Use the mean absolute error, root mean square error, and coefficient of determination of the training set and validation set to determine the learning rate of the model; select the learning rate with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 as the learning rate of the model; C5. Time step: The time step of the model is determined by using the mean absolute error, root mean square error, and coefficient of determination of the training and validation sets. The time step with the smallest mean absolute error and root mean square error and the coefficient of determination closest to 1 is selected as the time step of the model. C6, discard ratio: Use the mean absolute error, root mean square error, and determination coefficient of the training set and validation set to determine the discard ratio of the model; select the discard ratio with the smallest mean absolute error and root mean square error and the determination coefficient closest to 1 as the discard ratio of the model.

10. The method for predicting CO concentration in goaf for predicting the risk of coal spontaneous combustion according to claim 1, characterized in that: As described in step 6, the coal spontaneous combustion CO prediction model based on RNN neural network, the coal spontaneous combustion CO prediction model based on LSTM long short-term memory network and the coal spontaneous combustion CO prediction model based on GRU gated recurrent unit are evaluated respectively. The specific method for comparing the prediction accuracy of the three coal spontaneous combustion CO prediction models is: using the mean absolute error MAE, root mean square error RMSE and determination coefficient R 2 Three indicators are used to quantitatively judge the prediction performance of RNN model, LSTM model and GRU model; Among them, the formula of mean absolute error MAE is defined as: in, is the predicted value, is the actual value, n is the number of samples, and j is a natural number from 1 to n; The value range of the mean absolute error (MAE) is [0, +∞). The smaller the error between the predicted value and the actual value, the smaller the MAE value, which means the higher the accuracy of the prediction model. The formula for the root mean square error RMSE is defined as: The root mean square error (RMSE) indicates the degree of sample dispersion. The smaller the error between the predicted value and the actual value, the smaller the RMSE value, which means that the nonlinear fitting is better and the accuracy of the prediction model is higher. Coefficient of determination R 2 The formula is defined as: in, is the average of the actual values; Coefficient of determination R 2 The value range of R is [0, 1]. 2 The closer it is to 1, the better the model's fitting and generalization capabilities are.

Citation Information

Patent Citations

  • Early fire monitoring and early warning method and device

    CN113936413A

  • Coal spontaneous combustion tendency prediction method based on machine learning

    CN114565193A