Identification monitoring system for gas leakage and biogas accumulation in valve pit
By calculating and analyzing the characteristic parameters of the methane concentration in the well, and the logical regression model is used, it accurately distinguishes the gas leakage and the accumulation of biogas, solving the problem of error and timely alarm in existing technologies, and improving safety and efficiency.
Patent Information
- Application Number
- CN202411442775.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-21
AI Technical Summary
Existing gas manhole safety monitoring technology is difficult to accurately distinguish between gas leakage and biogas accumulation, resulting in false alarms and untimely alarms, affecting safety and efficiency.
By obtaining the methane concentration value and data collection time of the gas well, calculate the increase rate, average value, standard deviation and change period of the methane concentration value, and return the weighted average processing and return to one. Finally The probability of predicting gas leakage or biogas accumulation.
It achieves rapid and accurate judgment on the source of methane in gas manholes, reduces false alarms, improves the timeliness and accuracy of alarms, and ensures the safety of gas equipment and personnel.
Smart Images

Figure CN119337334A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of gas safety monitoring, and in particular relates to an identification and monitoring system for gas leakage and methane accumulation in a valve well, an identification method, a device and a storage medium. Background Art
[0002] Urban gas pipelines are important infrastructure in cities. Once the gas (mainly methane) in the gas pipeline leaks, it will pose a great safety hazard and pose a major threat to the safety of people's lives and property. Gas manholes (also known as inspection wells) are important structures for the placement and maintenance of gas pipelines and their ancillary facilities, providing convenience for the safe operation, monitoring, maintenance and management of pipelines. Gas pipelines and gas manholes are closely related in the gas transmission and distribution system. At the same time, gas manholes provide an important place and means for the monitoring and management of gas pipeline systems. When a gas pipeline leaks, the leaked gas mainly diffuses through the soil pores or along the pipeline. Gas manholes and underground spaces adjacent to the pipeline are very likely to become places where gas leaks accumulate. Therefore, monitoring gas manholes has become an important means to ensure the safety of gas pipelines and their surrounding underground spaces.
[0003] The existing gas manhole safety monitoring technology generally implements early warning by monitoring the changes in the concentration of methane in the gas manhole. For example, the changes in methane concentration can be monitored by the installed methane sensor. Once the methane concentration reaches the preset threshold, the system will trigger an alarm to achieve leak monitoring. Then, manual work will be carried out on site for ventilation, leak location, and leak repair. However, since there is often stagnant water or silt in the gas manhole, it is easy to form an anaerobic environment, causing the accumulation of microorganisms to produce biogas, or because the biogas produced by the adjacent rainwater and sewage pipes, septic tanks and other areas that are prone to biogas is transmitted into the well along the underground space, and the biogas contains a large amount of methane. Therefore, by only monitoring the concentration of methane in the gas manhole, it is very easy to be affected by biogas, resulting in false alarms of gas leaks. Both natural gas and biogas contain methane (CH4), but there is no ethane in biogas. However, there is a certain amount of ethane in the natural gas in my country's gas pipelines. Therefore, a portable ethane analyzer can be used to measure whether the gas contains ethane to identify the source of CH4. However, portable ethane analyzers are not yet mature, the sensors are expensive, and after the alarm is triggered, at least 30 minutes of continuous observation and analysis are required to complete the analysis. The alarm processing time is long, untimely and unsafe. In addition, manual on-site detection of ethane is time-consuming, labor-intensive, costly and inefficient, resulting in a waste of human and material resources, making it difficult to obtain accurate gas leak information in a timely manner. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present invention provides a method for identifying gas leakage and biogas accumulation, the method comprising the following steps:
[0005] Step 1: Obtain sample data of gas manholes;
[0006] The sample data includes: methane concentration value and data collection time;
[0007] Step 2: Divide the data set according to the time of data collection, and organize the sample data into a data format of (C, t), where C represents the methane concentration value, and t represents the time corresponding to the measurement of the methane concentration value;
[0008] Step 3, respectively calculating the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration value change period in each time interval of the collected data;
[0009] The rising rate v of the methane concentration value is calculated by the following formula:
[0010]
[0011] In the above formula, v is the rate of increase of methane concentration; n is the number of data in the time interval; C is the methane concentration value; t is time;
[0012] The average methane concentration is Calculated by the following formula:
[0013]
[0014] In the above formula, is the mean value of methane concentration; n is the number of data in the time interval; x is the methane concentration value;
[0015] Among them, the standard deviation of methane concentration Calculated by the following formula:
[0016]
[0017] In the above formula, is the standard deviation of the methane concentration value in the time interval; n is the number of data in the time interval; x is the methane concentration value; is the mean value of methane concentration;
[0018] The standard deviation of the methane concentration change period is calculated by the following formula:
[0019]
[0020] In the above formula, is the standard deviation of the methane concentration change cycle; n is the number of periodic data; x is the methane concentration change cycle; is the periodic mean of methane concentration variation;
[0021] The peak value of methane concentration is Calculated by the following formula:
[0022]
[0023] The methane concentration change period T is calculated by the following formula:
[0024]
[0025] In the above formula, x is the methane concentration value; T is the methane concentration change period; is the time corresponding to the peak value of methane concentration;
[0026] Step 4: Calculate the weighted average M of the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration change period in each time interval of the collected data according to the following formula:
[0027]
[0028] In the above formula, M is the weighted mean; n is the number of calculated data sets; w is the weight; xi is one of the rising rate of methane concentration value, the mean value of methane concentration value, the standard deviation of methane concentration value, and the standard deviation of methane concentration change period;
[0029] The four parameters of the weighted average of the rising rate of the methane concentration values in each time interval obtained in the above steps, the weighted average of the mean of the methane concentration values, the weighted average of the standard deviation of the methane concentration values, and the weighted average of the standard deviation of the methane concentration change period are normalized according to the following formulas to obtain the four parameters after normalization:
[0030]
[0031] In the above formula, is the normalized value; is the original value; is the mean of the data set; is the standard deviation of the data set;
[0032] Step 5: Substitute the four normalized parameters obtained in step 4 into the logistic regression probability model to predict the probability of "gas leakage" or "biogas accumulation" occurring.
[0033] The present invention also provides a device for identifying gas leakage and methane accumulation, the device comprising a data acquisition module and a data processing module; the data acquisition module is used to obtain sample data of the gas manhole; the sample data comprises: methane concentration value, data acquisition time; the data processing module is used to perform steps 2 to 5 of the above-mentioned method for identifying gas leakage and methane accumulation according to the sample data of the gas manhole obtained by the data acquisition module, so as to identify the sample data as gas leakage or methane accumulation.
[0034] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the above-mentioned method for identifying gas leakage and biogas accumulation.
[0035] The present invention also provides an electronic device, which includes a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the above-mentioned method for identifying gas leakage and biogas accumulation.
[0036] The method for identifying gas leakage and biogas accumulation provided by the present invention can automatically and continuously monitor the methane concentration in the gas manhole, conveniently, quickly and accurately obtain the source of methane in the gas manhole, and judge whether it is a gas leakage or biogas accumulation. The gas leakage information can be judged without manually going to the gas manhole to detect ethane on site, and methane concentration alarm information can be accurately and timely issued to prevent serious safety accidents and ensure the safety of gas equipment and people's lives and property. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 This is the gas leakage change curve.
[0038] Figure 2 This is the three-day variation curve of gas leakage from No. 1 and No. 2 gas manholes.
[0039] Figure 3 A flow chart of a method for identifying gas leaks and methane accumulation. DETAILED DESCRIPTION
[0040] To make the technical solution, purpose and advantages of the present invention clearer, the present invention is further described in detail below through specific implementation examples. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0041] Gas leakage is a process with a very long time span and is also a continuous state. At every moment, new gas will leak from the pipeline to the outside of the pipeline, which results in the methane concentration value in the detection area outside the pipeline not being a constant value. The methane concentration value in the detection area outside the pipeline consists of two parts. One part is the gas that continues to leak, and the methane concentration value of this part will continue to rise; the other part is the gas that has diffused, and the methane content of this part will continue to decrease as the diffusion range increases. When the leakage rate is greater than the diffusion rate, the accumulated methane concentration value will continue to rise; when the leakage rate is less than the diffusion rate, the opposite is true. This also leads to the instability of the methane concentration value of the gas leak, the concentration value fluctuates greatly, and there may be extreme values.
[0042] When a gas pipeline leaks, the methane concentration in the gas manhole will continue to rise. Figure 1 As shown in the figure, from January 1 to January 8, the methane concentration value rose slowly, and then rose sharply to a maximum of 100%LEL (the sensor range is up to 100%LEL); then on January 11, after emergency repairs, leak detection and leak repair, the pipeline was restored to normal, and the methane concentration value in the manhole dropped to zero. This phenomenon is due to the continuous leakage of the pipeline. When the leakage amount is greater than the diffusion amount, the methane concentration value in the gas manhole will continue to rise. The rising rate of the methane concentration value in the gas manhole is affected by factors such as the leakage aperture, the pressure in the pipeline, the leakage location and the diffusion rate. Due to the differences in pipeline materials and the degree of corrosion, there are significant differences in the leakage aperture and the pressure in the pipe. The leakage location is usually uncertain, and the diffusion rate is affected by factors such as the environment, structure and size of the manhole cover. Different gas manholes may cause differences in diffusion rates. Therefore, this difference causes the gas leak to have strong suddenness, a large gradient of the leakage methane concentration value and a high methane volume fraction.
[0043] According to the relevant provisions of GB15322.1-2019, the minimum alarm threshold for combustible gas leakage is 5%LEL-25%LEL (%LEL is the percentage of the lower explosion limit). Taking into account the actual situation of the standard and the monitoring system, 20%LEL can be used as the alarm threshold, that is, 1%VOL of CH4 (that is, the volume percentage of CH4 in a specific space is 1%). In general, the methane sensor collects and uploads data according to the following set rules: (When the methane concentration is lower than 1%VOL, the sensor collects data every 2 hours and uploads data once every 24 hours; once the concentration threshold of 1%VOL is exceeded, the sensor collects and uploads data every 5 minutes.) When the methane concentration is greater than 1%VOL, it enters the early warning state. It is necessary to immediately determine whether the gas manhole where the current sensor is located is a gas leak or methane accumulation, and take corresponding measures to deal with it to ensure the real-time monitoring of the valve well.
[0044] Gas manhole pipeline leakage characteristics:
[0045] Figure 2 The figure shows the changes in methane concentration in the two gas manholes when a gas pipeline leaks. (a), (b), and (c) correspond to the changes in methane concentration in gas manhole No. 1 within three days, while (d), (e), and (f) correspond to the changes in methane concentration in gas manhole No. 2 within three days.
[0046] according to Figure 2 The 24-hour methane concentration changes of the two gas manholes are shown in Figure 1. It can be seen that the leakage of the same gas manhole shows certain similarities. However, due to the differences in the location of the two gas manholes, the diameter and pressure of the pipes in the gas manholes, etc., the methane leakage concentration trends of the two gas manholes are not the same. Figure 2 From (a), (b), and (c) of the No. 1 gas manhole, it can be seen that the leakage concentration value in the gas manhole reached the highest peak of the day at around 16:00. Analysis shows that the No. 1 gas manhole is close to residential areas. During the 12-1 period, the gas consumption of residents increased, and the pipeline was pressurized to meet the demand. The pipeline was still pressurized 1-2 hours after the peak gas consumption period ended. At this time, the peak of urban residents' gas consumption had passed, and the pressure in the pipeline was relatively high. Therefore, the methane leakage was large at this time, and the methane accumulated in the gas manhole slowly reached its peak. Figure 2 From the No. 2 gas manhole shown in (d), (e), and (f), it can be seen that the maximum leakage concentration is about 20%VOL, and the minimum leakage concentration is as high as about 11%VOL, which poses a risk of explosion. Analysis shows that compared with the No. 1 gas manhole, the No. 2 gas manhole has a larger diffusion range, a larger gas pipeline diameter, a larger leakage aperture, and a higher pressure inside the pipe, so its leakage rate will also be faster. Therefore, due to the different location structures, well environments, and pipeline parameters of gas manholes, the leakage characteristics in different gas manholes will also be different.
[0047] Based on the above findings, the inventors of the present invention obtained the methane concentration value in the gas manhole and the time of data collection, took the monitoring data of a certain period of time at the monitoring point in the gas manhole as a group of samples for analysis and calculation, and monitored the data in real time. When the CH4 concentration is lower than 1%VOL, the sensor collects and uploads data once every 2 hours. After exceeding the concentration threshold of 1%VOL, the sensor collects and uploads data once every 5 minutes, and analyzes and calculates the acquired concentration values.
[0048] In a preferred embodiment of the present invention, the data set is divided according to the 24-hour data set, 72-hour data set, and 7-day data set before the CH4 concentration alarm: the closer the time of collecting data before the alarm is, the greater the weight of its influence on the prediction result. Therefore, the data set is divided according to time for comprehensive analysis and prediction, and different weights are assigned in step 4 to calculate the weighted average.
[0049] There are obvious differences in the methane production rate when there is a gas leak and when there is biogas accumulation. Gas leak: usually manifested as a faster increase in CH4 concentration, the leakage rate may be high, resulting in a significant increase in concentration in a short period of time. Biogas accumulation: CH4 concentration may increase slowly, the concentration changes more smoothly, and there will be no sudden and large increase. The production rate is relatively low and evenly distributed because biogas is slowly released through the decomposition of organic matter. Therefore, the rising rate is calculated in step 3 below as one of the characteristic prediction events.
[0050] The peak values of methane concentration values are significantly different in the two events. Gas leakage: Due to the high methane concentration in the gas, the methane concentration in the well may quickly reach a high level peak value during leakage. Biogas accumulation: Usually the methane concentration is low and gradually accumulates. It takes a long time to accumulate to a higher concentration and its peak value is low. Therefore, step 3 calculates the mean methane concentration as one of the feature prediction events.
[0051] Volatility and stability. Gas leakage is a process with a very long time span and a continuous state. At every moment, new gas will leak from the pipeline to the outside of the pipeline, which leads to the fact that the methane concentration value in the detection area outside the pipeline will not be a constant value. The methane concentration value in the detection area outside the pipeline consists of two parts. One part is the gas that continues to leak, and the methane concentration value of this part will continue to rise; the other part is the gas that has diffused. The methane content of this part will continue to decrease as the diffusion range increases. When the leakage rate is greater than the diffusion rate, the accumulated methane concentration value will continue to rise; when the leakage rate is less than the diffusion rate, the opposite is true. This also leads to the instability of the methane concentration value of the gas leakage, the concentration value fluctuates greatly, and there may be extreme values. However, this trend does not appear in the methane gas formed by biogas accumulation, because biogas accumulation requires microbial fermentation, and temperature is one of the main factors affecting fermentation. As the temperature rises, the methane concentration in the biogas produced by fermentation will also increase, and there will be no sharp change in methane concentration. Therefore, in step 3, the standard deviation of its methane concentration is calculated as one of the feature prediction events. The standard deviation is used to indicate the degree of dispersion or volatility of data points and to describe the variability of data. If the standard deviation is small, it means that the data points are more concentrated; if the standard deviation is large, it means that the data points are more dispersed.
[0052] Periodicity, gas leaks: Gas leaks are usually sporadic events and lack significant periodicity. Although periodic leaks may occur in certain specific circumstances (such as when the equipment is running in a specific time period), the occurrence of leaks is generally not periodic. Biogas accumulation: The volatility of methane concentration is low, and the changes show a more stable trend. Periodic fluctuations (such as day and night changes) can be found through long-term data analysis, but the fluctuation amplitude is relatively small. Obvious periodicity: The biogas production process usually has the natural periodicity of biodegradation, which may be related to factors such as ambient temperature, humidity, and air pressure. For example, diurnal or seasonal changes in temperature can affect the rate of biogas generation, thereby forming periodic fluctuations in methane concentration data. The periodic fluctuations in biogas production are usually long-term and regular. Therefore, in step 3, the change period of its methane concentration value is calculated as one of the feature prediction events.
[0053] Normalization: Normalization is a data preprocessing method, which aims to convert data into a range of 0 to 1, or a specific interval. This conversion helps to eliminate the differences between data of different dimensions, scales or distributions, so that the data have the same scale, which is convenient for subsequent calculations, comparisons or visualizations. Z-score standardization is one of the normalization methods. The present invention adopts this method to not only scale the data into a range of 0 to 1, but also make the data obey the standard normal distribution. The formula is:
[0054]
[0055] in, is the normalized value; is the original value; is the mean of the data set; is the standard deviation of the data set.
[0056] Logistic regression probability model: The logistic regression probability model is a commonly known binary classification model that is widely used in prediction and classification tasks. It models the relationship between input features and categories as a linear function, and then maps the function to a probability value through the Sigmoid function. The Sigmoid function is usually used to limit the output value to a probability value between 0 and 1. Once the model is trained, new data points can be predicted. Given a new input feature x, the trained parameter model can be used to calculate P(y=1|x), which is the probability that the event belongs to category 1.
[0057] A first aspect of the present invention provides a method for identifying gas leakage and biogas accumulation.
[0058] A preferred embodiment of the first aspect of the present invention provides a method for identifying gas leakage and biogas accumulation, comprising the following steps:
[0059] Step 1: Obtain sample data of gas manholes;
[0060] The sample data includes: methane concentration value and data collection time.
[0061] The data collection time is at least three time intervals before the methane concentration sensor alarms; the alarm threshold of the methane concentration sensor may be when the methane concentration reaches 1%VOL, and a suitable alarm threshold may be set as needed in actual work.
[0062] Preferably, the time interval for collecting data is 24 hours, 72 hours, or 7 days before the methane concentration sensor alarm.
[0063] Step 2: Divide the data set according to the time of data collection, and organize the sample data into a data format of (C, t), where C represents the methane concentration value, and t represents the time corresponding to the measurement of the methane concentration value;
[0064] Preferably, when the data is collected 24 hours, 72 hours or 7 days before the alarm of the methane concentration sensor, a data set in the (C, t) format of 24 hours, 72 hours or 7 days before the alarm is obtained.
[0065] Step 3: Calculate the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration change period in each time interval of the collected data.
[0066] The rising rate v of the methane concentration value is calculated by the following formula:
[0067]
[0068] In the above formula, v is the rate of increase of methane concentration (%VOL / min); n is the number of data in the time interval; C is the methane concentration value (%VOL); and t is time (min).
[0069] The average methane concentration is Calculated by the following formula:
[0070]
[0071] In the above formula, is the mean methane concentration value (%VOL); n is the number of data in the time interval; x is the methane concentration value (%VOL).
[0072] Among them, the standard deviation of methane concentration Calculated by the following formula:
[0073]
[0074] In the above formula, is the standard deviation of methane concentration in the time interval; n is the number of data in the time interval; x is the methane concentration value (%VOL); is the mean methane concentration value (%VOL).
[0075] The standard deviation of the methane concentration change period is calculated by the following formula:
[0076]
[0077] In the above formula, is the standard deviation of the methane concentration change cycle; n is the number of periodic data; x is the methane concentration change cycle (min); is the mean value of the methane concentration change period (min);
[0078] The peak value of methane concentration is Calculated by the following formula:
[0079]
[0080] The methane concentration change period T is calculated by the following formula:
[0081]
[0082] In the above formula, x is the methane concentration value (%VOL); T is the methane concentration change period; is the time corresponding to the peak value of methane concentration (min).
[0083] Step 4: Calculate the weighted average M of the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration change period in each time interval of the collected data according to the following formula:
[0084]
[0085] In the above formula, M is the weighted mean; n is the number of calculated data sets; w is the weight; xi is one of the rising rate of methane concentration value, the mean value of methane concentration value, the standard deviation of methane concentration value, and the standard deviation of methane concentration change period.
[0086] In a preferred specific fact mode, the time intervals for collecting data are 24 hours, 72 hours, and 7 days before the alarm of the methane concentration sensor, and the weights w are [6, 3, 1] respectively.
[0087] The four parameters of the weighted average of the rising rate of the methane concentration values in each time interval obtained in the above steps, the weighted average of the mean of the methane concentration values, the weighted average of the standard deviation of the methane concentration values, and the weighted average of the standard deviation of the methane concentration change period are normalized according to the following formulas to obtain the four parameters after normalization:
[0088]
[0089] In the above formula, is the normalized value; is the original value; is the mean of the data set; is the standard deviation of the data set.
[0090] Step 5: Substitute the four normalized parameters obtained in step 4 into the logistic regression probability model to predict the probability of "gas leakage" or "biogas accumulation" occurring.
[0091] Specifically, the four parameters after the above normalization process can be used as four features (x1, x2, x3, x4), corresponding to the input feature vector x=[x1, x2, x3, x4], and the binary classification probability P(y=1|x) predicted as the target event can be calculated using the following formula:
[0092]
[0093] In the above formula, P(y=1|x) is the probability of predicting the target event; is the bias term (intercept) of the model; , , , are the regression coefficients (weights) of the model, corresponding to each feature x1, x2, x3, x4.
[0094] The "target event" is "gas leakage" or "methane accumulation". When the calculated probability of the target event is greater than 50%, the final prediction result is the corresponding target event (for example, the target event is "gas leakage"); when the calculated probability of the target event is less than 50%, the final prediction result is the relative event of the target event (for example, when the target event is "gas leakage", the relative event of the target event is "methane accumulation").
[0095] The logistic regression probability model can be trained using data of known events (i.e., events known to be "gas leakage" or "marsh gas accumulation"), and the bias term and regression coefficient that best fit the given target event can be obtained through continuous iteration.
[0096] Preferably, the data judged as "gas leakage" or "marsh gas accumulation" each time can be used as training data for the logistic regression probability model, and the logistic regression probability model can be further trained to update the bias term and regression coefficient of the given target event, thereby improving the accuracy of the judgment.
[0097] The method for identifying gas leakage and methane accumulation provided by the present invention optimizes the existing gas leakage monitoring technology. By monitoring the concentration of CH4 in the gas manhole and the data collection time, the source of CH4 in the gas manhole can be quickly and accurately determined. Compared with the existing gas manhole leakage monitoring technology, the method provided by the present invention further distinguishes the situation where both gas leakage and methane accumulation produce CH4.
[0098] A second aspect of the present invention provides a device for identifying gas leakage and biogas accumulation, the device comprising a data acquisition module and a data processing module.
[0099] The data acquisition module is used to obtain sample data of the gas manhole;
[0100] The sample data includes: methane concentration value and data collection time.
[0101] In a preferred embodiment, the data acquisition module may include a methane concentration sensor and a timer. The data acquisition module may drive the methane concentration sensor to automatically and continuously detect the methane concentration around the detection point according to a pre-set program, and perform simple classification processing on the data to ensure the validity of the detection data.
[0102] The data processing module is used to perform operations from step 2 to step 5 of the method for identifying gas leakage and methane accumulation provided in the first aspect of the present invention according to the sample data of the gas manhole acquired by the data acquisition module, so as to identify the sample data as gas leakage or methane accumulation.
[0103] After the data processing module receives the sample data of the gas manhole acquired by the data acquisition module, it first classifies the sample data, and classifies the methane concentration value and the data acquisition time. If the warning state has not been entered, the data is directly displayed visually on the display terminal to reduce the redundant data analysis steps. If the warning state has been entered, it is necessary to continue the analysis and clean the data, including processing abnormal values and missing values in the data, so that it meets the analysis requirements; then merge, segment and aggregate the data, and segment and aggregate the data when entering the warning state; then analyze and process the data according to the method of the first aspect of the present invention mentioned above, and determine whether it is a gas leak or methane accumulation.
[0104] In a preferred specific embodiment, the gas leakage and methane accumulation identification device further comprises a communication module. The communication module is used to send the sample data of the gas manhole acquired by the data acquisition module to the data processing module.
[0105] At present, most gas manholes use cast iron manhole covers. Since cast iron manhole covers have a strong shielding effect on communication signals, in order to efficiently meet communication needs, the communication module preferably uses narrowband Internet of Things technology equipment (NB-IoT) for communication. The communication module sends sample data to the data processing module through NB-IoT wireless transmission technology, so that data processing can achieve remote transmission and monitoring.
[0106] In a preferred embodiment, the gas leakage and methane accumulation identification device further comprises a data storage module. The data storage module can store sample data, various intermediate results and final results processed by the data processing module, etc. to realize the storable content of the gas leakage and methane accumulation identification method provided in the first aspect of the present invention.
[0107] The data storage module can use cloud storage service technology to store data on a remote server and access it through the Internet to reduce data storage costs, and users can access their stored data through the Internet anytime and anywhere.
[0108] A third aspect of the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method for identifying gas leakage and biogas accumulation provided in the first aspect of the present invention.
[0109] The fourth aspect of the present invention provides an electronic device, which includes a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method for identifying gas leakage and biogas accumulation provided in the first aspect of the present invention.
[0110] According to the electronic device provided by the fourth aspect of the present invention, the memory may be the computer-readable storage medium provided by the third aspect of the present invention.
[0111] The following is a specific implementation example to illustrate the method for identifying gas leakage and methane accumulation provided by the present invention. The various reagents, materials, etc. used therein, unless otherwise specified, are products that can be obtained from commercial channels; the various tests and detection methods used in the following embodiments, unless otherwise specified, are conventional tests and detection methods in the field, and can be obtained from textbooks, reference books or academic journals.
[0112] Example 1
[0113] refer to Figure 3 ,This embodiment is used to describe the training of the logistic regression probability model and the identification method of gas leakage and methane accumulation.
[0114] The training of the logistic regression probability model includes the training data processing of the target event being biogas accumulation and the training data processing of the target event being gas leakage, as follows.
[0115] Data training of logistic regression probability model with target event being biogas accumulation:
[0116] Step 1: Get sample data of gas manholes:
[0117] By installing a methane concentration sensor in the gas manhole, taking the alarm at 10:00 on April 21, 2024 as an example, the data within 7 days before the alarm was analyzed, and a total of 84 sets of data were obtained. The target event of this group of data is biogas accumulation. Each sample data in this group includes the methane concentration value and the time when the data was collected.
[0118] Step 1: pre-process the sample data in step 1 and organize them into a data format of (C, t), where C represents the methane concentration value and t represents the time corresponding to the measurement of the methane concentration value;
[0119] The sample data were divided based on the 24 hours, 72 hours, and 7 days before the alarm. Finally, 12 groups of data were obtained for the first 24 hours, 36 groups of data were obtained for the first 72 hours, and 84 groups of data were obtained for the first 7 days.
[0120] Step 1: Calculate the rising rates of methane concentration values in three time intervals respectively, and obtain the rising rates of methane concentration values in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm, which are approximately 0.00048%VOL / min, 0.00014%VOL / min, and 0.00005%VOL / min, respectively.
[0121] The average methane concentration values in the three time intervals were calculated, and the average methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 0.62%VOL / min, 0.68%VOL / min, and 0.65%VOL / min, respectively.
[0122] The standard deviation of methane concentration values in three time intervals was calculated, and the standard deviation of methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 0.23, 0.15, and 0.11, respectively.
[0123] The peak values of methane concentration in three time intervals are calculated and their variation cycles are calculated to obtain the variation cycles of methane concentration in three time intervals: 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm. The results are shown in Table 1.
[0124] Table 1 Variation cycle of methane concentration in biogas accumulation
[0125]
[0126] The standard deviation of the methane concentration variation period in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm was triggered was calculated, and the results were 0, 364.9, and 285.8, respectively.
[0127] Step 4: Calculate the weighted average M of the rising rate of methane concentration, the mean value of methane concentration, the standard deviation of methane concentration, and the standard deviation of the methane concentration change period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm. The results are 0.000338, 0.64, 0.195, and 138.07, respectively.
[0128] The above four parameters are normalized, and the four parameters after normalization are (-0.58201171, -0.57128, -0.578746, 1.7320377).
[0129] Logistic regression probability model data training for the target event gas leak:
[0130] Step 1: Get sample data of gas manholes:
[0131] By setting up a methane concentration sensor in a gas manhole, taking the alarm at 12:00 on April 23, 2024 as an example, the data within 7 days before the alarm was analyzed, and a total of 565 sets of data were obtained. The target event of this group of data is gas leakage. Each sample data in this group includes the methane concentration value and the time when the data was collected.
[0132] Step 2: pre-process the sample data in step 1 and organize them into a data format of (C, t), where C represents the methane concentration value and t represents the time corresponding to the measurement of the methane concentration value;
[0133] The sample data were divided based on the 24 hours, 72 hours, and 7 days before the alarm. Finally, 57 groups of data were obtained for the first 24 hours, 254 groups of data were obtained for the first 72 hours, and 565 groups of data were obtained for the first 7 days.
[0134] Step 3: Calculate the rising rates of the methane concentration values in the three time intervals respectively, and obtain the rising rates of the methane concentration values in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm, which are approximately 0.0217%VOL / min, 0.0156%VOL / min, and 0.0156%VOL / min, respectively.
[0135] The average methane concentration values in the three time intervals were calculated, and the average methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 18.48%VOL / min, 5.86%VOL / min, and 5.86%VOL / min, respectively.
[0136] The standard deviation of methane concentration values in three time intervals was calculated, and the standard deviation of methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 1.46, 7.11, and 7.11, respectively.
[0137] The peak values of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm are calculated, and their variation cycles are calculated to obtain the variation cycles of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm. The results are shown in Table 2.
[0138] Table 2 Change cycle of methane concentration value in gas leakage
[0139]
[0140] The standard deviation of the methane concentration variation period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm was triggered was calculated, and the results were 701.36, 1032.16, and 1032.16, respectively.
[0141] Step 4: Calculate the weighted average M of the rising rate of methane concentration, the mean value of methane concentration, the standard deviation of methane concentration, and the standard deviation of the methane concentration change period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm. The results are 0.019, 13.434, 3.723, and 833.68, respectively.
[0142] The above four parameters are normalized, and the four parameters after normalization are (-0.59321112, -0.55579599, -0.58288201, 1.73188913).
[0143] The four features of the above two groups of target events are used to train the logistic regression probability model. The logistic regression probability model is obtained through training. = 0, regression coefficient ( , , , )=[-5.59943662e-03,7.74163182e-03, -2.06790955e-03, -7.42856407e-05].
[0144] In the above logistic regression probability model, the event of biogas accumulation P(y=1|x)=0; the event of gas leakage P(y=1|x)=1.
[0145] Example 2
[0146] This embodiment is used to illustrate the application of the logistic regression probability model obtained by training in Embodiment 1 to determine whether a methane concentration alarm event is a "gas leak" or a "methane accumulation".
[0147] Step 1: According to an alarm that occurred at 12:00 on April 23, 2024, the data within 7 days before the alarm was analyzed, and a total of 527 sets of data were obtained.
[0148] Step 2: pre-process the data and organize them into the data format of (C, t). The sample data is divided into 72 groups of data in the first 24 hours, 216 groups of data in the first 72 hours, and 527 groups of data in the first 7 days before the alarm.
[0149] Step 3: Calculate the rising rates of the methane concentration values in the three time intervals respectively, and obtain the rising rates of the methane concentration values in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm, which are approximately 0.0015%VOL / min, 0.0011%VOL / min, and 0.00049%VOL / min, respectively.
[0150] The average methane concentration values in the three time intervals were calculated, and the average methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 9.67%VOL / min, 10.95%VOL / min, and 12.17%VOL / min, respectively.
[0151] The standard deviation of methane concentration values in three time intervals was calculated, and the standard deviation of methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 6.02, 7.59, and 6.93, respectively.
[0152] The peak values of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm are calculated, and their variation cycles are calculated to obtain the variation cycles of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm. The results are shown in Table 3.
[0153] Table 3. Change cycle of methane concentration value
[0154]
[0155] The standard deviation of the methane concentration variation period in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm was triggered was calculated, and the results were 351.32, 307.64, and 596.17, respectively.
[0156] Step 4: Calculate the weighted average M of the rising rate of methane concentration, the mean value of methane concentration, the standard deviation of methane concentration, and the standard deviation of the methane concentration change period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm. The results are 0.0012, 10.48, 6.58, and 362.7, respectively.
[0157] The above four parameters are normalized, and the four parameters after normalization are [-0.61394971, -0.54618495, -0.57140814, 1.73154281].
[0158] Step 5: Substitute the four normalized parameters into the logistic regression probability model trained in Example 1, and calculate P(y=1|x)=0.51, which can be judged as a gas leak.
[0159] After the staff went to the alarm site for manual verification, they found that the alarm event was indeed a gas leak, which shows that the method of the present invention can accurately determine whether it is a gas leak.
[0160] Example 3
[0161] This embodiment is used to illustrate the application of the logistic regression probability model obtained by training in Embodiment 1 to determine whether a methane concentration alarm event is a "gas leak" or a "methane accumulation".
[0162] Step 1: Based on an alarm that occurred at 23:00 on May 17, 2023, the data within 7 days before the alarm was analyzed, and a total of 115 sets of data were obtained.
[0163] Step 2: pre-process the data and organize them into the data format of (C, t). The sample data is divided into 31 groups of data in the first 24 hours, 55 groups of data in the first 72 hours, and 115 groups of data in the first 7 days based on the boundaries before the alarm.
[0164] Step 3: Calculate the rising rates of the methane concentration values in the three time intervals respectively, and obtain the rising rates of the methane concentration values in the three time intervals of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm, which are approximately 0.00018%VOL / min, 0.00006%VOL / min, and 0.000098%VOL / min, respectively.
[0165] The average methane concentration values in the three time intervals were calculated, and the average methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 1%VOL / min, 0.76%VOL / min, and 0.67%VOL / min, respectively.
[0166] The standard deviation of methane concentration values in three time intervals was calculated, and the standard deviation of methane concentration values in the three time intervals 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm were approximately 0.11, 0.32, and 0.29, respectively.
[0167] The peak values of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm are calculated, and their variation cycles are calculated to obtain the variation cycles of methane concentration in the three time intervals of 24 hours, 72 hours and 7 days before the alarm. The results are shown in Table 3.
[0168] Table 4. Change cycle of methane concentration value
[0169]
[0170] The standard deviation of the methane concentration variation period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm was triggered was calculated, and the results were 312.92, 436.14, and 360.44, respectively.
[0171] Step 4: Calculate the weighted average M of the rising rate of methane concentration, the mean value of methane concentration, the standard deviation of methane concentration, and the standard deviation of the methane concentration change period in the three time periods of 24 hours before the alarm, 72 hours before the alarm, and 7 days before the alarm. The results are 0.000062, 0.377, 0.067, and 354.64, respectively.
[0172] The above four parameters are normalized, and the four parameters after normalization are [-0.57831598, -0.57585788, -0.5778762, 1.73205006].
[0173] Step 5: Substitute the four normalized parameters into the logistic regression probability model trained in Example 1, and calculate P(y=1|x)=0.49, which can be judged as biogas accumulation.
[0174] After the staff went to the alarm site for manual inspection, they found that the alarm event was indeed methane accumulation, which shows that the method of the present invention can accurately determine whether it is methane accumulation.
[0175] In addition, the four characteristic data of the target event in Example 2 and the four characteristic data of the target event in Example 3 are used to iteratively train the logistic regression probability model to obtain the intercept of the iterative logistic regression probability model. =0.04227366, regression coefficient ( , , , )= [2.832161e-02, -9.73252e-03, 1.115907e-02, -1.69012e-02].
[0176] 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 method for identifying gas leakage and biogas accumulation, characterized in that: The method comprises the following steps: Step 1: Obtain sample data of gas manholes; The sample data includes: methane concentration value and data collection time; Step 2: Divide the data set according to the time of data collection, and organize the sample data into a data format of (C, t), where C represents the methane concentration value, and t represents the time corresponding to the measurement of the methane concentration value; Step 3, respectively calculating the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration value change period in each time interval of the collected data; The rising rate v of the methane concentration value is calculated by the following formula: ; In the above formula, v is the rate of increase of methane concentration; n is the number of data in the time interval; C is the methane concentration value; t is time; The average methane concentration is Calculated by the following formula: ; In the above formula, is the mean value of methane concentration; n is the number of data in the time interval; x is the methane concentration value; Among them, the standard deviation of methane concentration Calculated by the following formula: ; In the above formula, is the standard deviation of the methane concentration value in the time interval; n is the number of data in the time interval; x is the methane concentration value; is the mean value of methane concentration; The standard deviation of the methane concentration change period is calculated by the following formula: ; In the above formula, is the standard deviation of the methane concentration change cycle; n is the number of periodic data; x is the methane concentration change cycle; is the periodic mean of methane concentration variation; The peak value of methane concentration is Calculated by the following formula: ; The methane concentration change period T is calculated by the following formula: ; In the above formula, x is the methane concentration value; T is the methane concentration change period; is the time corresponding to the peak value of methane concentration; Step 4: Calculate the weighted average M of the rising rate of methane concentration values, the mean value of methane concentration values, the standard deviation of methane concentration values, and the standard deviation of the methane concentration change period in each time interval of the collected data according to the following formula: ; In the above formula, M is the weighted mean; n is the number of calculated data sets; w is the weight; xi is one of the rising rate of methane concentration value, the mean value of methane concentration value, the standard deviation of methane concentration value, and the standard deviation of methane concentration change period; The four parameters of the weighted average of the rising rate of the methane concentration values in each time interval obtained in the above steps, the weighted average of the mean of the methane concentration values, the weighted average of the standard deviation of the methane concentration values, and the weighted average of the standard deviation of the methane concentration change period are normalized according to the following formulas to obtain the four parameters after normalization: ; In the above formula, is the normalized value; is the original value; is the mean of the data set; is the standard deviation of the data set; Step 5: Substitute the four normalized parameters obtained in step 4 into the logistic regression probability model to predict the probability of "gas leakage" or "marsh gas accumulation".
2. The method according to claim 1, characterized in that: In step 1, the data is collected for at least three time intervals before the methane concentration sensor alarms.
3. The method according to claim 2, characterized in that: In step 1, the time intervals for collecting data are 24 hours, 72 hours, and 7 days before the methane concentration sensor alarm.
4. The method according to claim 3, characterized in that: In step 4, the time intervals for collecting data are 24 hours, 72 hours, and 7 days before the methane concentration sensor alarm, and the weights w are [6, 3, 1] respectively.
5. The method according to claim 4, characterized in that: In step 5, the four parameters after the normalization process are used as four features (x1, x2, x3, x4), corresponding to the input feature vector x=[x1, x2, x3, x4], and the binary classification probability P(y=1|x) predicted as the target event is calculated using the following formula: ; In the above formula, P(y=1|x) is the probability of predicting the target event; is the bias term (intercept) of the model; , , , are the regression coefficients (weights) of the model, corresponding to each feature x1, x2, x3, x4.
6. The method according to claim 5, characterized in that: The logistic regression probability model is trained using data of events known as "gas leakage" or "methane accumulation", and the bias term and regression coefficient that best fit the given target event are obtained through continuous iteration.
7. A device for identifying gas leakage and biogas accumulation, characterized in that: The device comprises a data acquisition module and a data processing module; The data acquisition module is used to obtain sample data of the gas manhole; the sample data includes: methane concentration value and data acquisition time; The data processing module is used to perform steps 2 to 5 of the method for identifying gas leakage and methane accumulation described in any one of claims 1 to 6 based on the sample data of the gas manhole acquired by the data acquisition module, so as to identify the sample data as gas leakage or methane accumulation.
8. The gas leakage and biogas accumulation identification device according to claim 7, characterized in that: The data acquisition module includes a methane concentration sensor and a timer; The gas leakage and biogas accumulation identification device further comprises a communication module and / or a data storage module.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method for identifying gas leakage and biogas accumulation according to any one of claims 1 to 6.
10. An electronic device, characterized in that: The electronic device includes a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method for identifying gas leakage and biogas accumulation as described in any one of claims 1-6.
Citation Information
Cited By
Method and system for identifying fuel gas and biogas in valve pit based on cloud-side collaboration
CN122045716A