A method and device for predicting coal mine gas concentration based on multi-granularity gas data
By constructing a sparse adjacency matrix and a multi-head attention mechanism, and combining it with an LSTM network to process gas data at multiple time granularities, the problem of ignoring multiple time granularity features in existing gas prediction methods is solved, achieving higher accuracy and more stable gas concentration prediction.
Patent Information
- Application Number
- CN202310095933.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2043-02-10
AI Technical Summary
Existing gas prediction methods are mainly performed at the single-granularity level, ignoring the heterogeneity of multi-time-granularity data, resulting in low prediction accuracy and an inability to effectively utilize the diverse features in historical data.
A sparse adjacency matrix is constructed to fuse sensor data features. Multi-temporal granular features are extracted through a two-layer LSTM network and a multi-head attention mechanism. Duplicate information is removed, and a CNN network is used to divide the temporal granularity. Finally, the multi-granularity prediction values are fused through a prediction module.
It improves the accuracy and stability of gas concentration prediction, the prediction results fit the actual changes better, and the prediction output is more stable.
Smart Images

Figure CN116341709B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer / coal mine safety, and in particular relates to a method and a device for predicting coal mine gas concentration based on multi-granularity gas data. Background Art
[0002] Today's coal industry has begun to adopt intelligent layout and use scientific and technological means to reduce mine gas disasters. The gas time series data monitored by the existing safety monitoring system is used to predict the gas concentration in the mine, thereby fully ensuring mine safety.
[0003] In the process of informatization construction of coal mine production, a large amount of gas monitoring data has been accumulated, but the current methods for gas prediction are mainly divided into two categories. One is based on statistical methods, which mainly discover the laws in the data from a statistical perspective, such as the ARIMA model, but this type of method has high data requirements and poor versatility and accuracy. The other is a prediction model based on machine learning, which uses the powerful fitting ability of the network to capture data features, such as the LSTM model and the GRU model. However, the current gas prediction work is generally carried out at a single granularity level, and the input granularity is consistent with the target granularity, ignoring the heterogeneity of multi-time granularity data and its role, resulting in low gas prediction accuracy.
[0004] Gas data is dynamic and has multiple change modes, such as mining in one working face, mining in one hour, mining in one day, etc. The core of gas prediction research is how to effectively use historical data information to capture various data features, that is, short-term changes and long-term time series characteristics in gas data. Existing research work ignores the exploration of gas multi-time granularity characteristics and cannot directly consider gas multi-time granularity data at the same time, and the prediction results are not accurate enough. Therefore, a model is needed to capture and integrate gas multi-time granularity characteristics for gas prediction. Summary of the invention
[0005] In order to solve the above existing problems, the present invention proposes a method and device for predicting coal mine gas concentration based on multi-granularity gas data, and the method specifically comprises the following steps:
[0006] Based on the positions of various gas concentration sensors distributed in the coal mine, a sparse adjacency matrix is constructed. The spatial position characteristics of the current sensor are obtained by weighted fusion of spatial information in the sparse adjacency matrix and splicing of data features of multiple sensors.
[0007] Set M time granularities, divide the spatial location features of the current sensor into time segments based on the set time granularity, aggregate the data in each time segment, and obtain the input data in each time granularity;
[0008] The input data at each time granularity is encoded through a two-layer LSTM network to obtain the features of the input data at each time granularity;
[0009] The multi-head attention mechanism is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity, and to delete the repeated information in the spatiotemporal information;
[0010] The acquired spatiotemporal information is input into the prediction module to obtain the concentration prediction value of the current sensor at each time granularity, and the prediction values at each time granularity are fused as the final prediction value of the current sensor.
[0011] Furthermore, the process of acquiring the spatial position feature of the current sensor includes the following steps:
[0012] According to the wind direction of the coal mine tunnel and the distribution distance between the gas sensors, a directed sparse adjacency weight matrix A is constructed, A∈R 1×K , K represents the number of sensors;
[0013] The matrix weights are normalized as the initial values of the network neurons. The data features collected by the current sensor to be predicted and other sensors are calculated through linear operations. The linear combination features of each sensor are obtained through linear combination. The process is expressed as:
[0014] X′=ωX+b
[0015] During the training process, according to the error of the coal mine gas concentration prediction results, the weight ω in A is updated through the back propagation mechanism of the neural network, and the linear combination characteristics of the multi-sensor are dynamically adjusted;
[0016] For the sensor to be predicted, the data collected by the current sensor and its corresponding correlation features are fused by splicing. The process is expressed as:
[0017] X 1 =Concat(X cur ; X′)
[0018] Among them, X′ is the linear combination feature of each sensor, X is the time series feature of each sensor, ω is the weight of the directed sparse adjacency matrix A, and the sigmoid function is used as the activation function; X cur is the historical characteristics of the gas sensor to be predicted, X 1 The data features of the gas sensor to be predicted are spliced with the time series features of other sensors.
[0019] Furthermore, the acquisition of input data at each time granularity includes the following steps:
[0020] Construct a CNN network and obtain data at different time granularities by setting the convolution kernel size of the convolution layer in the CNN network. The finer the time granularity, the smaller the convolution kernel. Data with M time granularities are obtained. The data with time granularity m is expressed as:
[0021] X m =σ(CONV2D(X 1 ));
[0022] Among them, σ(·) represents the ReLU activation function; CONV2D(·) represents the two-dimensional convolution function; X 1 It represents the data feature of the gas sensor to be predicted by splicing the time series features of other sensors, and it is the data feature with the finest time granularity; X m It indicates that the spatiotemporal data features of the current gas sensor with a time granularity of m are obtained through aggregate learning.
[0023] Furthermore, the input data at each time granularity is unified in feature dimension and then input into a double-layer LSTM network for encoding. The double-layer LSTM network is composed of two cascaded LSTM networks.
[0024] Furthermore, the spatiotemporal information corresponding to the features of the input data at each time granularity is obtained through the multi-head attention mechanism, including:
[0025]
[0026]
[0027] Among them, MHAtt(Q m ,K m ,V m ) indicates multi-head attention mechanism feature extraction; Q m represents the query matrix corresponding to the data with time granularity m, K m Represents the Key matrix corresponding to the data with time granularity m, V m Represents the Value matrix corresponding to the data with time granularity m; Q m , K m 、V m The corresponding weight matrix; is the output of the i-th attention mechanism under the data of time granularity m, and N is the number of heads of the multi-head attention mechanism.
[0028] Furthermore, the repeated information in the spatiotemporal information is deleted, that is, the cosine similarity of the spatiotemporal information of each information block at each time granularity and the finest time granularity is calculated. If the cosine similarity is less than the set threshold, the value of the corresponding information block at the time granularity is set to 0, and the remaining information blocks are linearly transformed as the features of the input prediction module. The process is expressed as:
[0029]
[0030] P m =Linear(O' m )
[0031] Among them, Matrix m Represents the feature similarity measurement matrix; Similarity( 1 ,O m ) indicates that 1 and O m Perform similarity calculation; a ij represents the similarity between the output of the i-th head in the multi-head attention mechanism corresponding to the finest time granularity and the output of the j-th head in the multi-head attention mechanism corresponding to the data with time granularity m; θ represents the threshold of cosine similarity; Represents the output value of the jth head in the data with time granularity m; O' m represents the output value of the jth head in the data with time granularity m after filtering; Linear(·) represents the linear transformation operation, P m Represents the features of the input prediction module.
[0032] Furthermore, the process of obtaining the final predicted value of the current sensor includes the following steps:
[0033]
[0034] Y=Y 1 +Y 2 ...+Y M ;
[0035] Among them, Y m represents the predicted value corresponding to the data at time granularity m, P m represents the characteristics of the input prediction module, DNN1(·), DNN2(·), and DNN3(·) are the first fully connected layer, the second fully connected layer, and the third fully connected layer in the prediction module composed of three cascaded fully connected layers; M is the total number of time granularities.
[0036] Further, the data collected by the gas concentration sensor is preprocessed, specifically including the following steps: 101, using the gas adjustment rule to delete the values collected by the gas concentration sensor that are higher than 1.5;
[0037] 102. For the position of deleted data, the linear interpolation method is used to fill in. If the data before the deleted data is x0 and the gas concentration is y0 at the time, and the data after the deleted data is x1 and the gas concentration is y1 at the time, then the calculation process of the filled data (x, y) is expressed as:
[0038]
[0039] 103. Unify the time frequency of the completed data;
[0040] 104. Normalize the data and map the gas value to between 0 and 1. The present invention also provides a coal mine gas concentration prediction device based on multi-granularity gas data, which is used to implement a coal mine gas concentration prediction method based on multi-granularity gas data. The device includes a spatial position feature acquisition module, a time granularity division module, a feature extraction module, a spatial information acquisition module and a prediction module; wherein:
[0041] The spatial position feature acquisition module is used to construct a directed sparse adjacency matrix based on the lane wind direction and distribution distance of other sensors relative to the current sensor to be predicted, and update the weights in the matrix through neural network learning, so as to integrate the data features of multiple related sensors and obtain the spatial position data of the current sensor;
[0042] The time granularity division module is used to divide the spatial position data of the current sensor into time granularities and obtain the data of the current sensor at each time granularity;
[0043] The feature extraction module is used to encode the data at each time granularity according to the double-layer LSTM network to obtain the features corresponding to the data at each time granularity;
[0044] The spatial information acquisition module is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity through a multi-head attention mechanism, and delete the repeated information in the spatiotemporal information;
[0045] The prediction module predicts the concentration prediction value of the current sensor at each time granularity based on the spatiotemporal information, and fuses the prediction values at each time granularity as the final prediction value of the current sensor.
[0046] The present invention changes the current situation that the existing technology center lacks in-depth research on gas data. With the help of multi-time granularity ideas, multi-time granularity features are constructed through the model, and LSTM combined with a multi-head attention mechanism is used to encode and extract features. A feature filtering algorithm is designed to ensure that the features of multiple time granularities do not affect the model too much and repeatedly, and the prediction results are output after fusing the predictions of multiple granularities. Finally, the entire model is trained for coal mine gas concentration prediction. Compared with the existing prediction methods, the model prediction output of the present invention has a better fit with the actual gas concentration change status, and the prediction output is more stable without large fluctuations. That is, the coal mine gas concentration prediction result of the present invention is more reliable and has more advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of the multi-time granularity gas concentration prediction method based on the multi-head attention mechanism of the present invention;
[0048] Figure 2 This is a structural diagram of a multi-time granularity gas concentration prediction model based on a multi-head attention mechanism of the present invention;
[0049] Figure 3 It is a schematic diagram of multi-time granularity data in the present invention;
[0050] Figure 4 This is a rendering of the multi-time granularity gas concentration prediction model implemented in the invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The present invention proposes a coal mine gas concentration prediction method based on multi-granularity gas data, which specifically includes the following steps:
[0053] Based on the positions of various gas concentration sensors distributed in the coal mine, a sparse adjacency matrix is constructed. The spatial position characteristics of the current sensor are obtained by weighted fusion of spatial information in the sparse adjacency matrix and splicing of data features of multiple sensors.
[0054] Set M time granularities, divide the spatial location features of the current sensor into time segments based on the set time granularity, aggregate the data in each time segment, and obtain the input data in each time granularity;
[0055] The input data at each time granularity is encoded through a two-layer LSTM network to obtain the features of the input data at each time granularity;
[0056] The multi-head attention mechanism is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity, and to delete the repeated information in the spatiotemporal information;
[0057] The acquired spatiotemporal information is input into the prediction module to obtain the concentration prediction value of the current sensor at each time granularity, and the prediction values at each time granularity are fused as the final prediction value of the current sensor.
[0058] The flowchart of the multi-time granularity gas concentration prediction method based on the multi-head attention mechanism in this embodiment is as follows: Figure 1 As shown, the specific steps include:
[0059] S101. Collect detection records of coal mine gas concentration sensors to obtain source gas data.
[0060] S102. Construct a multi-time granularity coal mine gas concentration prediction model based on multi-head attention mechanism.
[0061] S103. Construct an adjacency matrix according to the distribution positions of the gas sensors, and fuse and splice the gas features.
[0062] S104, define multiple time granularities and their numbers, set the convolution size of the CNN network, and thus obtain a multi-time granularity data set.
[0063] S105. Encode the multi-time granularity data using a double-layer LSTM structure to obtain encoded multi-time granularity features.
[0064] S106. Use the multi-head attention mechanism to capture multi-temporal and spatial information from a global perspective, and use the cosine similarity method in the similarity measurement to filter out the repeated information and obtain unique information in the multi-time granularity spatial features.
[0065] S107, the spatiotemporal information of multiple time granularities is passed through a multi-layer neural network to obtain the contribution of each granularity to the prediction result, and the multi-time granularity information is fused by adding.
[0066] S108. Use RMSE as the model indicator and back-propagate to update the model weights.
[0067] S109. Multi-step prediction of coal mine gas is carried out to provide early warning for coal mine safety.
[0068] The model diagram of the multi-time granularity gas concentration prediction method based on the multi-head attention mechanism in this embodiment is as follows: Figure 2As shown, the data of the finest granularity is directly input into the feature encoding network to extract features, and then input into the multi-head attention layer to extract features, and then input into the prediction network to obtain the prediction value corresponding to the current granularity. The data of other granularities need to be divided into granularities through a convolutional neural network to obtain the data at the corresponding granularity, and then pass through the feature encoding network, multi-head attention, and prediction network to obtain the predicted data. The data of other granularities need to be feature filtered between the multi-head attention and prediction networks to delete the features that are the same as the output features of the multi-head attention at the finest granularity, that is, each granularity saves feature information that is different from the output features of the multi-head attention at the finest granularity; specifically, the following steps are included:
[0069] S201, obtaining input data at each time granularity, the process includes:
[0070] According to the wind direction of the coal mine tunnel and the distribution distance between the gas sensors, a directed sparse adjacency weight matrix A is constructed, A∈R 1×K , K represents the number of sensors;
[0071] The matrix weights are normalized as the initial values of the network neurons. The data features collected by the current sensor to be predicted and other sensors are calculated through linear operations. The linear combination features of each sensor are obtained through linear combination. The process is expressed as:
[0072] X′=ωX+b;
[0073] Among them, X′ represents the linear combination characteristics of each sensor, and b represents the bias parameter in the linear combination process;
[0074] During the training process, according to the error of the coal mine gas concentration prediction results, the weight ω in A is updated through the back propagation mechanism of the neural network, and the linear combination characteristics of the multi-sensor are dynamically adjusted;
[0075] For the sensor to be predicted, the data collected by the current sensor and its corresponding correlation features are fused by splicing. The process is expressed as:
[0076] X 1 =Concat(X cur ; X′)
[0077] Among them, the sigmoid function is used as the activation function in the above linear combination process; X cur is the historical characteristics of the gas sensor to be predicted, X 1 The data features of the gas sensor to be predicted are spliced with the time series features of other sensors.
[0078] S202, construct multi-granularity data, and set the size of the CNN network convolution kernel, and construct data features of different time slices through the convolution kernel, as shown in the following formula:
[0079] X m =σ(CONV2D(X 1 ))
[0080] Among them, CONV2D(·) represents the two-dimensional convolution function; m is the current time granularity, X m Indicates the constructed data with a time granularity of m, X 1 is the source granularity data, the total number of granularities is 1 to M, X 1 It is also the data after the fusion of the sensor to be predicted cur, that is, the data after the fusion of the sensor to be predicted cur is taken as the original granularity data, and the data is divided into time granularity to obtain data segments with different granularities, m∈{2,3,…,M}, that is, in this embodiment, the original granularity data is the data after the data collected by each original sensor is fused, and the data of the mth time granularity is fused in time granularity to obtain data in a time segment, and a time segment includes data information of multiple sampling points. The larger the granularity value, the more sampling points the granularity contains; σ(·) is the ReLU function.
[0081] like Figure 3 As shown, different trends of multi-time granularity data and the different information contained therein are displayed. In this embodiment, different granularity features are learned to learn local transformations from finer granularity and to learn the overall change of data from coarser granularity to remove trends. After fusing coarse-grained and fine-grained features, better predictions can be made and the reliability of predictions can be improved.
[0082] S203, the feature dimension of multi-time granularity data is encoded by using a double-layer LSTM to capture important features and context dependencies, and obtain multi-time granularity data features, as shown in the following formula:
[0083] F m =Enc(X m )
[0084] =LSTMs(X m )
[0085] Among them, F m For data features of m granularity, a two-layer LSTM is used as the Enc encoding network, and the output of the first layer is used as the input of the second layer.
[0086] S204: Learn diversified feature relationships from a global perspective, extract information in multiple spaces, and remove duplicate data between multiple time granularities, including:
[0087] Based on the multi-head self-attention mechanism, the spatiotemporal information of corresponding granularity at different time granularity is obtained. The formula is as follows:
[0088]
[0089] Among them, MHAtt(Q m ,K m ,V m ) indicates multi-head attention mechanism feature extraction; Q m represents the query matrix corresponding to the data with time granularity m, K m Represents the Key matrix corresponding to the data with time granularity m, V m Represents the Value matrix corresponding to the data with time granularity m; Q m , K m 、V m The corresponding weight matrix; is the output of the i-th attention mechanism under the data of time granularity m, and N is the number of heads of the multi-head attention mechanism.
[0090] Finally, the calculation results of multiple heads are merged to generate output. The merging method here is splicing, and N is the number of heads of the multi-head attention mechanism.
[0091] Considering the spatiotemporal information as an information block, the similarity of information of multiple granularities is calculated using the cosine similarity method to obtain the similarity measurement matrix Matrix between information blocks m , when the similarity between two information blocks is too high, the coarse-grained information block is considered to be a redundant information block and deleted to ensure the characteristics of each granularity. The formula is as follows:
[0092]
[0093] Among them, when a ij When the value is greater than the set threshold value θ, O j Set to 0, that is, clear the information of the jth information block in the coarse-grained m. The formula is as follows:
[0094]
[0095] Then, the remaining information blocks are linearly transformed to obtain the original dimension as the prediction input P m ;
[0096] P m =Linear(O' m )
[0097] In the formula, O' m is a coarse-grained information block O mAfter filtering, when m is 1, that is, the finest granularity, then P m =O 1 .
[0098] S205, using the spatial information of multi-time granularity data to perform fusion prediction, and obtain the final multi-step gas concentration prediction result, including:
[0099] The prediction results are obtained by using spatial information of different granularities, as shown in the formula:
[0100]
[0101] Among them, DNN1(·), DNN2(·), and DNN3(·) are the first fully connected layer, the second fully connected layer, and the third fully connected layer in the prediction module composed of three cascaded fully connected layers. The number of layers of DNN1(·), DNN2(·), and DNN3(·) are 256, 64, and 12, respectively. m This is the output result obtained using the m time granularity;
[0102] The multiple prediction results are combined to obtain the final multi-step gas concentration prediction result, as shown in the formula:
[0103] Y=Y 1 +Y 2 ...+Y M
[0104] Use addition as the fusion method, and Y is the final output result.
[0105] Before implementing any of the above-mentioned multi-time granularity coal mine gas prediction methods based on the multi-head attention mechanism, it is necessary to obtain historical coal mine gas concentration data, pre-process the obtained data, and obtain regular hidden danger time series data. The process includes:
[0106] S301, using the gas adjustment rule to delete the value higher than 1.5;
[0107] S302, the deleted data is supplemented by a linear interpolation method, as shown in the formula:
[0108]
[0109] Among them, x and y are the values to be filled, x0 and y0, x1 and y1 are the existing values;
[0110] S303, unify the time frequency of the data, for example, unify the time frequency of all data to 15s / data;
[0111] S304, normalize the data and map the gas value to between 0 and 1, as shown in the formula:
[0112]
[0113] Among them, norm(x i ) is x i min(X) is the minimum value in the data set, and max(X) is the maximum value in the data set.
[0114] This embodiment also provides a coal mine gas concentration prediction device based on multi-granularity gas data, which is used to implement a coal mine gas concentration prediction method based on multi-granularity gas data. The device includes a spatial position feature acquisition module, a time granularity division module, a feature extraction module, a spatial information acquisition module and a prediction module; wherein:
[0115] The spatial position feature acquisition module is used to construct a directed sparse adjacency matrix based on the lane wind direction and distribution distance of other sensors relative to the current sensor to be predicted, and update the weights in the matrix through neural network learning, so as to integrate the data features of multiple related sensors and obtain the spatial position data of the current sensor;
[0116] The time granularity division module is used to divide the spatial position data of the current sensor into time granularities and obtain the data of the current sensor at each time granularity;
[0117] The feature extraction module is used to encode the data at each time granularity according to the double-layer LSTM network to obtain the features corresponding to the data at each time granularity;
[0118] The spatial information acquisition module is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity through a multi-head attention mechanism, and delete the repeated information in the spatiotemporal information;
[0119] The prediction module predicts the concentration prediction value of the current sensor at each time granularity based on the spatiotemporal information, and fuses the prediction values at each time granularity as the final prediction value of the current sensor.
[0120] In one embodiment of the present invention, the present invention also includes a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned multi-time granularity coal mine gas concentration prediction methods based on the multi-head attention mechanism is implemented.
[0121] Figure 4 It is a comparison between the predicted value obtained by the solution of the present invention and the true value. In this figure, the change trend of the predicted value is consistent with the general direction of the true value.
[0122] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0123] A multi-time granularity coal mine gas concentration prediction device based on a multi-head attention mechanism includes a processor and a memory; the memory is used to store computer programs; the processor is connected to the memory and is used to execute the computer programs stored in the memory, so that the multi-time granularity coal mine gas concentration prediction method device based on a multi-head attention mechanism executes any of the above-mentioned multi-time granularity coal mine gas concentration prediction methods based on a multi-head attention mechanism.
[0124] Specifically, the memory includes: ROM, RAM, magnetic disk, USB flash drive, memory card or optical disk, etc., which can store program codes.
[0125] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0126] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A coal mine gas concentration prediction method based on multi-granularity gas data, It is characterized in that The specific steps include: Based on the locations of various gas concentration sensors distributed underground in the coal mine, a directed sparse adjacency matrix is constructed according to the wind direction and distribution distance of the tunnel. The weights in the matrix are updated through neural network learning, so that the data features of multiple related sensors are integrated to obtain the spatiotemporal information of the current sensor. M time granularities are set, the spatial position features of the current sensor are divided into time segments based on the set time granularities, and the data in each time segment is aggregated to obtain the input data in each time granularity; the process of obtaining the spatial position features of the current sensor includes the following steps: According to the wind direction of the coal mine tunnel and the distribution distance between the gas sensors, a directed sparse adjacency weight matrix A is constructed, A∈R 1×K , K represents the number of sensors; The matrix weights are normalized as the initial values of the network neurons. The data features collected by the current sensor to be predicted and other sensors are calculated through linear operations. The linear combination features of each sensor are obtained through linear combination. The process is expressed as: X′=ωX+b During the training process, according to the error of the coal mine gas concentration prediction results, the weight ω in A is updated through the back propagation mechanism of the neural network, and the linear combination characteristics of the multi-sensor are dynamically adjusted; For the sensor to be predicted, the data collected by the current sensor and its corresponding correlation features are fused by splicing. The process is expressed as: X 1 =Concat(X cur ;X′) Among them, X′ is the linear combination feature of each sensor, X is the time series feature of each sensor, ω is the weight of the directed sparse adjacency matrix A, and the sigmoid function is used as the activation function; b represents the bias parameter in the linear combination process; X cur is the historical characteristics of the gas sensor to be predicted, X 1 The data features of the gas sensor to be predicted are spliced with the time series features of other sensors; The acquisition of input data at each time granularity includes the following steps: Construct a CNN network and obtain data at different time granularities by setting the convolution kernel size of the convolution layer in the CNN network. The finer the time granularity, the smaller the convolution kernel. Data with M time granularities are obtained. The data with time granularity m is expressed as: X m =σ(CONV2D(X 1 )); Among them, σ() represents the ReLU activation function; CONV2D() represents the two-dimensional convolution function; X 1 It represents the data feature of the gas sensor to be predicted by splicing the time series features of other sensors, and it is the data feature with the finest time granularity; X m It means that the spatiotemporal data features of the current gas sensor with a time granularity of m are obtained through aggregate learning; The input data at each time granularity is encoded through a two-layer LSTM network to obtain the features of the input data at each time granularity; The multi-head attention mechanism is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity, and the repeated information in the spatiotemporal information is deleted; the process of obtaining spatiotemporal information includes: Among them, MHAtt(Q m ,K m ,V m ) indicates the multi-head attention mechanism feature extraction; Qm represents the Query matrix corresponding to the data with time granularity m, K m Represents the Key matrix corresponding to the data with time granularity m, V m Represents the Value matrix corresponding to the data with time granularity m; Q m , K m 、V m The corresponding weight matrix; is the output of the i-th attention mechanism under the data of time granularity m, and N is the number of multi-head attention mechanism heads; The acquired spatiotemporal information is input into the prediction module to obtain the concentration prediction value of the current sensor at each time granularity, and the prediction values at each time granularity are fused as the final prediction value of the current sensor.
2. A method for predicting coal mine gas concentration based on multi-granularity gas data according to claim 1, It is characterized in that The input data at each time granularity is unified in feature dimension and then input into a two-layer LSTM network for encoding. The two-layer LSTM network consists of two cascaded LSTM networks.
3. A method for predicting coal mine gas concentration based on multi-granularity gas data according to claim 1, It is characterized in that Delete the repeated information in the spatiotemporal information, that is, calculate the cosine similarity of the spatiotemporal information of each information block at each time granularity with the finest time granularity. If the cosine similarity is less than the set threshold, the value of the corresponding information block at the time granularity is set to 0, and the remaining information blocks are linearly transformed as the features of the input prediction module. The process is expressed as: P m =Linear(O' m ) Wherein, Matrixm represents the feature similarity measurement matrix; Similarity( 1 ,O m ) indicates the similarity calculation between O1 and Om; a ij represents the similarity between the output of the i-th head in the multi-head attention mechanism corresponding to the finest time granularity and the output of the j-th head in the multi-head attention mechanism corresponding to the data with time granularity m; θ represents the threshold of cosine similarity; Represents the output value of the jth head in the data with time granularity m; O' m represents the output value of the jth head in the data with time granularity m after filtering; Linear(·) represents the linear transformation operation, P m Represents the features of the input prediction module.
4. A method for predicting coal mine gas concentration based on multi-granularity gas data according to claim 1, It is characterized in that The process of obtaining the final predicted value of the current sensor includes the following steps: <h2 style=";text-align:left;direction:ltr">Ym=DNN<h2 style=";text-align:left;direction:ltr"> 3 <h2 style=";text-align:left;direction:ltr"> (DNN<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> (DNN<h2 style=";text-align:left;direction:ltr"> 1 <h2 style=";text-align:left;direction:ltr"> (Pm))); Y=Y 1 +Y 2 ...+And M ; Among them, Y m represents the predicted value corresponding to the data at time granularity m, P m Represents the features of the input prediction module, DNN 1 (·), DNN 2 (·), DNN 3 (·) denotes the first fully connected layer, the second fully connected layer, and the third fully connected layer in the prediction module composed of three cascaded fully connected layers; M denotes the total number of time granularities.
5. A method for predicting coal mine gas concentration based on multi-granularity gas data according to any one of claims 1 to 4, It is characterized in that The data collected by the gas concentration sensor is preprocessed, which specifically includes the following steps:
101. Use the gas adjustment rules to delete the values higher than 1.5 collected by the gas concentration sensor; 102. For the position where the data is deleted, use the linear interpolation method to fill it. If the data before the position where the data is deleted is x 0 The gas concentration at time y 0 , the data at the next position is x 1 The gas concentration at time y 1 , then the calculation process of the padded data (x, y) is expressed as:
103. Unify the time frequency of the completed data; 104. Normalize the data and map the gas value to between 0 and 1.
6. A coal mine gas concentration prediction device based on multi-granularity gas data, It is characterized in that The device is used to implement a coal mine gas concentration prediction method based on multi-granularity gas data as described in claim 1, and the device includes a spatial position feature acquisition module, a time granularity division module, a feature extraction module, a spatial information acquisition module and a prediction module; wherein: The spatial position feature acquisition module is used to construct a directed sparse adjacency matrix based on the lane wind direction and distribution distance of other sensors relative to the current sensor to be predicted, and update the weights in the matrix through neural network learning, so as to integrate the data features of multiple related sensors and obtain the spatial position data of the current sensor; The time granularity division module is used to divide the spatial position data of the current sensor into time granularities and obtain the data of the current sensor at each time granularity; The feature extraction module is used to encode the data at each time granularity according to the double-layer LSTM network to obtain the features corresponding to the data at each time granularity; The spatial information acquisition module is used to obtain the spatiotemporal information corresponding to the features of the input data at each time granularity through a multi-head attention mechanism, and delete the repeated information in the spatiotemporal information; The prediction module predicts the concentration prediction value of the current sensor at each time granularity based on the spatiotemporal information, and fuses the prediction values at each time granularity as the final prediction value of the current sensor.
Citation Information
Patent Citations
Multi-granularity coal mine gas risk prediction method based on cloud model
CN111680268A
Coal mine safety state monitoring method based on environment monitoring big data
CN112901275A
Pollutant concentration prediction method and device based on multi-granularity graph space-time neural network
CN114154702A
Coal mine safety risk early warning method based on incremental extreme learning machine
CN114648217A
Gas concentration prediction method and device
CN115169633A
