Methane concentration prediction method and system based on neural network hybrid model

By using the CNN-CBAM-LSTM hybrid model in methane concentration prediction and integrating a variety of environmental information, the problems of inaccurate prediction and low accuracy in the prior art are solved, and high-precision and stable methane concentration prediction are achieved.

CN119495376APending Publication Date: 2025-02-21SHANDONG NORMAL UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411646974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing methane concentration prediction methods fail to fully consider environmental factors, resulting in inaccurate predictions, and traditional models are difficult to capture the complexity of the indoor environment, resulting in low prediction accuracy.

Method used

Using the methane concentration prediction method based on the neural network hybrid model, the CNN-CBAM-LSTM hybrid prediction model is constructed by fusion of convolutional neural network (CNN), convolutional block attention module (CBAM) and long and short-term memory network (LSTM). Integrate information such as methane concentration, detection time, ambient temperature and humidity to make high-precision predictions.

Benefits of technology

It significantly improves the accuracy and stability of methane concentration prediction, can effectively capture the complex spatial characteristics and long-term time dependence in the data, and provides strong support for environmental protection and disaster prevention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119495376A_ABST
    Figure CN119495376A_ABST
Patent Text Reader

Abstract

The invention provides a methane concentration prediction method and system based on a neural network hybrid model, and belongs to the technical field of methane gas concentration prediction.The method comprises the steps that the methane concentration in the environment is obtained; the concentration of methane in the environment is treated, and a ring-down time factor is obtained; calculating a first methane concentration based on the ring-down time factor; integrating the first methane concentration with detection time, environment temperature and humidity to construct a first data set; constructing a neural network hybrid model for predicting the long-term methane concentration; and analyzing the first data set based on the hybrid prediction model, and predicting the long-term methane concentration. Complex spatial features and long-range time dependence in data are effectively mined through deep fusion of three network models, and the methane concentration prediction method with high precision and high reliability is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of methane gas concentration prediction, and in particular relates to a methane concentration prediction method and system based on a neural network hybrid model. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development of the economy, people's living standards are constantly improving. Among them, the emission of industrial waste gas and automobile exhaust is constantly increasing, and greenhouse gases are also increasing, leading to global warming, which is constantly threatening our lives.

[0004] As an important greenhouse gas, the increase in methane emissions poses a serious threat to global warming, air quality, public health and ecological security. Accurately predicting the changing trend of methane concentration is of vital importance for fire prevention and environmental protection. Existing methods for predicting methane concentration usually use methane concentration as data alone, without fully considering the impact of environmental factors on methane concentration, resulting in inaccurate predictions. Increased temperature and humidity in the environment will increase methane concentration, and may also affect the changing trend of methane concentration, causing the overall trend of methane concentration to rise. At the same time, existing methods for detecting methane concentration in the environment usually use the collected methane concentration directly as a neural network data set, ignoring the impact of other factors on methane concentration, and have problems of low accuracy and poor stability. Long short-term memory networks are widely used in the prediction and analysis of time series data, but their application in indoor environments still faces many challenges, such as the difficulty of existing models in accurately capturing the complexity of indoor environments, resulting in low prediction accuracy. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention proposes a methane concentration prediction method and system based on a neural network hybrid model. By integrating the advantages of convolutional neural networks, convolutional block attention modules and long short-term memory networks, the complex spatial features and long-range temporal dependencies in the data are effectively mined, and a high-precision and reliable methane concentration prediction method is provided to improve the accuracy of methane concentration prediction and provide strong support for environmental protection and disaster prevention.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: In a first aspect, a method for predicting methane concentration based on a neural network hybrid model is disclosed, comprising: Obtain the methane concentration in the environment; Process the methane concentration in the environment to obtain the ring-down time factor; The first methane concentration is calculated based on the ring-down time factor; Integrate the first methane concentration with the detection time, ambient temperature, and humidity to construct a first data set; Construct a neural network hybrid model for predicting long-term methane concentration, deeply integrating convolutional neural network, convolutional block attention module and long short-term memory network to form a hybrid prediction model; The first data set is analyzed based on a hybrid prediction model to predict long-term methane concentrations.

[0007] In a second aspect, a methane concentration prediction system based on a neural network hybrid model is disclosed, comprising: A methane concentration detection module is configured to: obtain the methane concentration in the environment; process the methane concentration in the environment to obtain a ring-down time factor; and calculate a first methane concentration based on the ring-down time factor; A data integration module is configured to: integrate the first methane concentration with the detection time, the ambient temperature, and the humidity to construct a first data set; A prediction model building module, which is configured to: build a neural network hybrid model for predicting long-term methane concentration, deeply fuse the convolutional neural network, the convolutional block attention module and the long short-term memory network to form a hybrid prediction model; The methane concentration prediction module is configured to: analyze the first data set based on the hybrid prediction model to predict the long-term methane concentration.

[0008] In a third aspect, an electronic device is disclosed, including a memory and a processor, and computer instructions stored in the memory and executed on the processor, wherein when the computer instructions are executed by the processor, the steps of the above-mentioned methane concentration prediction method based on the neural network hybrid model are completed.

[0009] In a fourth aspect, a computer-readable storage medium is disclosed for storing computer instructions, which, when executed by a processor, complete the steps of the above-mentioned methane concentration prediction method based on a neural network hybrid model.

[0010] Compared with the prior art, the present invention has the following beneficial effects: The CNN-CBAM-LSTM hybrid model proposed in the present invention fully integrates the spatial feature extraction capability of CNN, the attention enhancement mechanism of CBAM and the time series modeling capability of LSTM. It can effectively capture the complex spatial characteristics and long-range temporal dependencies in methane concentration data, and significantly improves the prediction accuracy.

[0011] The data collection process of the present invention uses high-precision greenhouse gas detectors and thermometers and hygrometers to ensure the accuracy and reliability of the data; at the same time, the strict data processing process further improves the data quality and lays a solid foundation for the accurate prediction of the model.

[0012] Through detailed experimental design and comparative analysis, the present invention verifies that the model of the present invention has obvious advantages over traditional models and other hybrid models in predicting methane concentration, and has significantly reduced multiple error indicators and improved accuracy, providing a more effective solution for environmental air quality monitoring and management, and also providing technical support for the safety risk assessment and early warning system of the natural gas industry.

[0013] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0015] Figure 1 This is a flow chart of the acquisition and processing of methane concentration detection data described in Example 1 of the present invention.

[0016] Figure 2 This is a flow chart of the methane concentration prediction method based on the neural network hybrid model described in Example 1 of the present invention.

[0017] Figure 3 This is a curve chart of the predicted value and the actual value of the methane concentration described in Example 1 of the present invention.

[0018] Figure 4 This is a comparison chart of the fitting results of the neural network hybrid model described in Example 1 of the present invention. DETAILED DESCRIPTION

[0019] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0020] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0021] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0022] Embodiment 1 In one or more embodiments, a method for predicting methane concentration based on a neural network hybrid model is disclosed, comprising the following steps: Step 1: Based on the cavity ring-down spectroscopy (CRDS) technology, high-precision original methane concentration detection is performed, and the original methane concentration is analyzed and processed using the ring-down time extraction algorithm to obtain the first methane concentration; Step 2: Integrate the obtained first methane concentration with the detection time, ambient temperature, and humidity to construct a first data set; Step 3: Build a neural network hybrid model, deeply integrate the Convolutional Neural Networks (CNN), Convolutional Block Attention Module (CBAM) and Long Short-Term Memory (LSTM) to form a CNN-CBAM-LSTM hybrid prediction model; Step 4: Analyze the first data set based on the CNN-CBAM-LSTM hybrid prediction model to predict the long-term methane concentration.

[0023] The methane detection technology based on CRDS in step 1 includes performing algorithm analysis on the original gas signal and processing it to obtain the first methane concentration. The specific steps are as follows: Step 1-1: The CRDS detector emits a specific wavelength to detect methane gas in the environment in real time; Step 1-1-1: Select a laboratory as the monitoring point, where the surrounding environment is relatively stable and personnel activities are regular; Step 1-1-2: Use a wavelength meter to select a specific absorption wavelength of methane gas; Step 1-1-3: Monitor methane in real time to obtain an initial light intensity decay signal.

[0024] Step 1-2: For the initial light intensity ring-down signal obtained, a least squares fitting extraction algorithm is used for deep processing to obtain the ring-down time factor; Step 1-2-1: For the initial light intensity ring-down signal, use the wavelet transform method to perform noise reduction processing; Step 1-2-2: Fit the noise-reduced signal using the least square method, extract the fitted horizontal coordinate, and obtain the ring-down time factor; Step 1-2-3: average the ring-down time factors in the time period in blocks to obtain the average ring-down time; At the set acquisition frequency, multiple decay time factors are obtained. After the multiple decay time factors are averaged in blocks, the decay time is obtained. This ensures the accuracy of the decay time and reduces randomness. Compared with directly obtaining the decay time, the derived methane concentration is more accurate; the processed methane concentration data set has better quality, which is more helpful for the accuracy of the prediction model.

[0025] Step 1-3: Based on the ring-down time, use mathematical models to perform in-depth calculations and analysis to derive the first methane concentration in the environment; Step 1-3-1: Based on the concentration calculation formula, as shown in formula (1), substitute the decay time, absorption cross section, and Avogadro constant; (1) in, is the first methane concentration; c is the speed of light, and its value is 2.99792458×10 10 cm / s; σ(λ) is the absorption cross section of methane gas, which is 3.5×10 -21 cm 2 / mol; τ(λ) is the decay time in the presence of methane; τ 0 (λ) is the cavity ring-down time; N A is Avogadro's constant, with a value of 6.02214076×10 23 ; Step 1-3-2: Obtain the real-time first methane concentration in the environment through real-time calculation.

[0026] Step 2: Systematically integrate the calculated first methane concentration, organically associate it with relevant information such as detection time, ambient temperature, humidity, etc., and construct the first data set.

[0027] Step 2-1: Save the detection time and the first methane concentration in a file; Step 2-2: Export the data in the thermometer and hygrometer into an Excel file; Step 2-3: Integrate the detection time, temperature, humidity and first methane concentration into the first data set with each detection time as a row and each characteristic value as a column. The feature of each row of the first data set is [detection time; temperature; humidity; first methane concentration] and save it in an Excel file.

[0028] Step 3: Process the first data set and build a neural network hybrid model; Step 3-1: Perform data cleaning, missing fill-in and smoothing on the first data set to obtain a second data set; Step 3-1-1: Clean the first data set and identify missing values ​​and outliers; Step 3-1-2: Use Lagrange interpolation method to complete the data set for missing value data; Step 3-1-3: Replace the outlier data with the average value before and after; Step 3-1-4: Apply the sliding window averaging method to smooth the data to obtain the second data set.

[0029] Step 3-2: Construct a neural network hybrid model, deeply integrate the convolutional neural network (CNN), convolutional block attention module (CBAM) and long short-term memory network (LSTM) to form a CNN-CBAM-LSTM hybrid prediction model; this model uses CNN to extract the spatial information of multiple methane concentration features, weights the feature values ​​through the CBAM module, and assigns weights to determine the importance of the feature values. Finally, LSTM is used to perform time series modeling to achieve long-term methane concentration prediction; Step 3-2-1: Construct a convolutional neural network architecture with two one-dimensional convolutional layers, where the first convolutional layer is set with 64 convolutional kernels and the second convolutional layer is set with 128 convolutional kernels. The convolutional kernel size is 3 and the convolutional kernel slides on the data to calculate the weighted sum. Step 3-2-2: Use the nonlinear activation function LeakyReLU to enhance the model's expressiveness, so that the model can learn the complex features in the data; Step 3-2-3: Add a forgetting layer and set the forgetting rate to 0.05 to prevent the model from overfitting and improve the generalization ability of the model; Step 3-2-4: Introduce the convolutional block attention module (CBAM module) after the convolutional neural network layer, set the number of channels of the input feature map to 16, and use the channel attention module to capture the interdependence between channels using global average pooling and global maximum pooling techniques; since the data set contains multiple types of feature values, the CBAM module can be used to weight the feature values ​​and assign weights to determine the importance of the feature values; Step 3-2-5: Use the fully connected layer to learn the weight distribution of each channel. In the spatial dimension, a precise spatial weight map is generated by performing a global pooling operation along the channel direction and combining the convolution layer; Step 3-2-6: Introduce the long short-term memory network after the convolution block attention module mechanism, and build a two-layer long short-term memory network (LSTM). The number of convolution kernels of the first layer LSTM is set to 64, and the number of convolution kernels of the second layer LSTM is set to 128; Step 3-2-7: The activation function uses the Tanh function to ensure that the gradient will not explode when processing long sequence data; Step 3-2-8: Insert two forgetting layers in the LSTM network layer. The resulting LSTM network is a sequentially connected LSTM network layer, forgetting layer, LSTM network layer, forgetting layer, and activation layer. The forgetting layer further prevents overfitting, and the forgetting rate is 0.05, which enhances the stability and generalization ability of the model.

[0030] Step 3-3: Based on the preprocessed second data set, scientifically divide it into a training set and a test set, and adjust various parameters; Step 3-3-1: Split the data set into a training set and a test set according to time. Step 3-3-2: The learning rate is set to 0.001, the number of iterations is set to 20, and the batch size is 32; Step 3-3-3: Monitor the loss function in real time and draw the loss curve.

[0031] Step 4: Based on the CNN-CBAM-LSTM hybrid prediction model, the methane concentration time series prediction is carried out to accurately grasp the changing trend of methane concentration, and a comprehensive comparative analysis is carried out with various existing prediction models; Step 4-1: Input the preprocessed test set data into the trained CNN-CBAM-LSTM hybrid prediction model; Step 4-2: Get the predicted value of methane concentration corresponding to the test set data; Step 4-3: Draw a graph of the predicted methane concentration and the actual value, such as Figure 3 As shown, the hybrid model proposed in this embodiment does not have the phenomenon of data drift and has a better prediction effect.

[0032] like Figure 4 As shown in the figure, by performing a straight line fitting on the long-term methane concentration predicted by the hybrid model, it can be found that the hybrid model has higher fitting accuracy, the data are concentrated on the fitting straight line, and are closer to the true value.

[0033] As shown in Table 1, the CNN-CBAM-LSTM hybrid model proposed in this embodiment is subjected to detailed experimental design and comparative analysis with RNN, LSTM, GRU, CNN-LSTM, and CNN-GRU, which verifies that the CNN-CBAM-LSTM hybrid model has obvious advantages over traditional models and other hybrid models in predicting methane concentration, and has significantly reduced multiple error indicators and improved accuracy.

[0034] Table 1 Comparison of prediction performance of the hybrid model described in this example with other models

[0035] The CRDS detector used in this embodiment adopts a 1653.7nm DFB laser, with no interference from other gases nearby and an output power of 20mW. A collimation device is used to ensure that the photodetector behind receives the signal. The resonant cavity uses a 486mm stable cavity, which consists of a pair of dielectric film concave mirrors with a diameter of 25.4mm and a stainless steel cavity with an inlet and an exhaust port. The cavity mirror reflectivity is 99.9963%. The cavity mirror is installed on an adjustable three-dimensional mirror frame. The mechanical parallelism of the optical cavity can be adjusted by fine-tuning the inclination of the cavity mirror, so that the laser mode can be matched with the cavity mode. The transmission signal is received by the photodetector, the decay time is obtained, and the first methane concentration is calculated in real time through parameters.

[0036] The CNN-CBAM-LSTM hybrid prediction model described in this embodiment is written in Python and runs on PyCharm, deeply integrating three cutting-edge technology modules: convolutional neural network (CNN), convolutional block attention module (CBAM) and long short-term memory network (LSTM). The original data integration process is carried out on Matlab, and data cleaning and preprocessing are carried out on PyCharm.

[0037] Embodiment 2 In one or more embodiments, a methane concentration prediction system based on a neural network hybrid model is disclosed, specifically comprising: A methane concentration detection module is configured to: obtain the methane concentration in the environment; process the methane concentration in the environment to obtain a ring-down time factor; and calculate a first methane concentration based on the ring-down time factor; A data integration module is configured to: integrate the first methane concentration with the detection time, the ambient temperature, and the humidity to construct a first data set; A prediction model building module, which is configured to: build a neural network hybrid model for predicting long-term methane concentration, deeply fuse the convolutional neural network, the convolutional block attention module and the long short-term memory network to form a hybrid prediction model; The methane concentration prediction module is configured to: analyze the first data set based on the hybrid prediction model to predict the long-term methane concentration.

[0038] Embodiment 3 This embodiment provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and running on the processor. When the computer instructions are run by the processor, the steps of the above-mentioned methane concentration prediction method based on the neural network hybrid model are completed.

[0039] Embodiment 4 This embodiment provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned methane concentration prediction method based on the neural network hybrid model are completed.

[0040] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0041] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0042] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0043] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0044] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A methane concentration prediction method based on a neural network hybrid model, characterized in that: include: Obtain the methane concentration in the environment; Process the methane concentration in the environment to obtain the ring-down time factor; The first methane concentration is calculated based on the ring-down time factor; Integrate the first methane concentration with the detection time, ambient temperature, and humidity to construct a first data set; Construct a neural network hybrid model for predicting long-term methane concentration, deeply integrating convolutional neural network, convolutional block attention module and long short-term memory network to form a hybrid prediction model; The first data set is analyzed based on a hybrid prediction model to predict long-term methane concentrations.

2. A method for predicting methane concentration based on a neural network hybrid model as claimed in claim 1, characterized in that: include: The CRDS detector is used to detect the methane gas in the environment in real time to obtain the initial light intensity ring-down signal; Preprocessing the initial light intensity ring-down signal to obtain the ring-down time factor; According to the extracted ring-down time factor and based on the concentration calculation formula, the first methane concentration is calculated.

3. The method for predicting methane concentration based on a neural network hybrid model according to claim 1, characterized in that: The first data set is subjected to data cleaning, missing data completion and smoothing processing to obtain a second data set.

4. A method for predicting methane concentration based on a neural network hybrid model as claimed in claim 3, characterized in that: Perform data cleaning on the first data set, including identifying missing values ​​and outliers; The Lagrange interpolation method is used to complete the data set for missing value data; The outlier data were replaced by the mean values ​​before and after; The sliding window averaging method was used to smooth the data.

5. The method for predicting methane concentration based on a neural network hybrid model according to claim 1, characterized in that: The neural network hybrid model for predicting long-term methane concentration is a convolutional neural network, a convolutional block attention module and a long short-term memory network connected in sequence.

6. A method for predicting methane concentration based on a neural network hybrid model as claimed in claim 5, characterized in that: The convolutional neural network architecture is composed of two one-dimensional convolutional layers, a nonlinear activation function LeakyReLU and a forgetting layer; The convolutional block attention module includes a channel attention module, a spatial attention module and a fully connected layer; The long short-term memory network is a two-layer long short-term memory network layer, which is connected to a Tanh activation function, and two forgetting layers are interspersed in the two-layer long short-term memory network layer.

7. The method for predicting methane concentration based on a neural network hybrid model according to claim 3, characterized in that: Based on the preprocessed second data set, it is divided into a training set and a test set, and various parameters are adjusted to train the neural network hybrid model.

8. A methane concentration prediction system based on a neural network hybrid model, characterized in that: include: A methane concentration detection module is configured to: obtain the methane concentration in the environment; process the methane concentration in the environment to obtain a ring-down time factor; The first methane concentration is calculated based on the ring-down time factor; A data integration module is configured to: integrate the first methane concentration with the detection time, the ambient temperature, and the humidity to construct a first data set; A prediction model building module, which is configured to: build a neural network hybrid model for predicting long-term methane concentration, deeply fuse the convolutional neural network, the convolutional block attention module and the long short-term memory network to form a hybrid prediction model; The methane concentration prediction module is configured to: analyze the first data set based on the hybrid prediction model to predict the long-term methane concentration.

9. An electronic device, characterized in that: It comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the methane concentration prediction method based on the neural network hybrid model as described in any one of claims 1 to 7 is completed.

10. A computer-readable storage medium, characterized in that: Used to store computer instructions, which, when executed by a processor, complete the methane concentration prediction method based on a neural network hybrid model as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Real-time online monitoring and early warning equipment, method and system for methane gas concentration and medium

    CN120510685A

  • Real-time online monitoring and early warning equipment, methods, systems and media for methane gas concentration

    CN120510685B

  • Atmospheric methane concentration prediction method based on multi-source data fusion

    CN120629471A

  • Atmospheric methane concentration prediction method based on multi-source data fusion

    CN120629471B