Method and system for providing data to methane sensor-based applications

The supplementary fault sensor data through standardized data format and interpolation algorithms is solved, and the data inconsistency and noise problems in methane leakage detection in natural gas pipelines are improved, the accuracy and response speed of leakage detection are improved, safety risks are reduced, and more efficient Natural gas pipeline monitoring.

CN118863551BActive Publication Date: 2025-01-07ANSHAN TIANHUI SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411338142.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-01-07
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

In natural gas pipelines, in methane leakage detection, data inconsistency caused by signal interference, delay, packet loss and other problems, affecting the accuracy of leakage detection, and changes in external environment and hardware failures lead to data noise and missing, thereby increasing security risks.

Method used

By standardizing data formats, preprocessing and synchronizing timestamps, monitoring and identifying fault sensors, using interpolation algorithms to supplement the missing values ​​of fault sensors, forming a unified data structure, and inputting the trained model for leak prediction and early warning mechanism triggering.

Benefits of technology

It improves data consistency and accuracy, enhances the accuracy and response speed of leakage detection, reduces safety risks, and achieves more efficient and reliable natural gas pipeline monitoring and management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863551B_ABST
    Figure CN118863551B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of signal transmission technology, and discloses a method and system for providing data to an application based on a methane sensor, wherein the method comprises the following steps: standardizing the real-time data of wired and wireless sensors on a natural gas pipeline, and unifying the standardized data format; the real-time data includes methane concentration, timestamp, sensor ID and status information; preprocessing the standardized data, obtaining cleaned data, and synchronizing the timestamp. The present invention ensures the consistency, integrity and accuracy of the data by standardizing the data format, preprocessing and cleaning the data, intelligent fault detection and data interpolation, and unified data structure output, thereby improving the accuracy and response speed of leak detection, enhancing the stability and decision support capabilities of the system, and ultimately achieving more efficient and reliable natural gas pipeline monitoring and management, and reducing safety risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal transmission technology, and more particularly, to a method and system for providing data to an application based on a methane sensor. Background Art

[0002] Currently, natural gas pipelines use a hybrid sensor network for methane leak detection, including wired and wireless sensors. Wireless sensors are suitable for remote areas and special terrain, while wired sensors are used in environments with better conditions.

[0003] During the data transmission process, wired and wireless transmission methods may cause data inconsistency due to signal interference, delay, packet loss and other issues. Unsynchronized acquisition time may cause time differences in data analysis, which in turn affects the accuracy of leak detection. External environment (such as climate change, terrain obstacles) may further affect the stability of wireless signals and increase data noise. Some sensors may stop working due to hardware failure or low battery, resulting in missing data.

[0004] Due to data transmission deviations, the methane concentration is misestimated, which may lead to the mistaken belief that there are leaks in certain areas. Inaccurate data may cause potential leaks to be missed or misjudged, and corresponding safety measures may not be taken in time. Data inconsistencies and outliers increase, resulting in a lack of reliability in data analysis results, affecting the decision support of the overall monitoring system. When misjudgment occurs, field staff may spend time in the wrong area, resulting in delayed response to real leaks, thereby increasing safety risks. Summary of the invention

[0005] The present invention provides a method and system for providing data to an application based on a methane sensor, and solves the technical problems in the related art.

[0006] The present invention provides a method for providing data to an application based on a methane sensor, comprising the following steps:

[0007] S100: Standardize the real-time data from wired and wireless sensors on natural gas pipelines and unify the standardized data formats;

[0008] Real-time data includes methane concentration, timestamp, sensor ID and status information;

[0009] S200: preprocessing the standardized data, obtaining cleaned data, and synchronizing timestamps;

[0010] S300: monitor the state of each sensor through a fault detection algorithm, identify sensors with a state of "fault" and their locations, and output a list of identified faulty sensors and their locations;

[0011] S400: according to the location of the faulty sensor and the data of the adjacent sensors and the historical data of the faulty sensor, the adjacent sensors of the faulty sensor are determined by analyzing the adjacent sensor data, and the methane concentration variation pattern of the adjacent sensors under the same conditions is evaluated in combination with the historical data analysis, and the real-time data of the location of the faulty sensor is estimated by using an interpolation algorithm. According to the information obtained from the adjacent sensors and the historical data, the missing value of the faulty sensor is interpolated, and the interpolated real-time data is output to replace the missing value of the faulty sensor;

[0012] Neighboring sensors of the faulty sensor are determined based on geographical location and pipeline structure;

[0013] S500: input the completed data and real-time data, and output a unified data structure containing the latest data and status information of all sensors;

[0014] S600: Input the output unified data structure into the trained model and analysis, and output the prediction results of suspected leakage and the triggering status of the early warning mechanism.

[0015] Furthermore, the steps to unify the standardized data format are as follows:

[0016] S110: collecting raw data from each sensor, including methane concentration, timestamp, sensor ID, and status information;

[0017] The expression is as follows:

[0018] in, Indicates Data logging of sensors, is the methane concentration, is the timestamp, is the sensor ID, is status information;

[0019] S120: Verify data integrity, no important fields are missing, and the verification fields are complete;

[0020] S130: Convert the data of all sensors into a unified format, the expression is as follows:

[0021]

[0022] in, To convert the methane concentration to a uniform concentration unit, To convert the timestamp into a unified timestamp format, and Convert into unified sensor ID and status information respectively;

[0023] S140: Standardize the data for methane concentration , using the Z-score standardization method, the expression is as follows: ;

[0024] in, represents the standardized data, is the average value, is the standard deviation;

[0025] S150: Save the standardized data to a database, where the storage format is a table or database. Can be quickly retrieved.

[0026] Furthermore, the steps of preprocessing the standardized data and synchronizing the timestamp are as follows:

[0027] S210: Loading the standardized data in step S100 , the expression is as follows:

[0028]

[0029] in, Represents the standardized data set.

[0030] S220: Timestamps of all sensors Synchronize to the same time base, through time series analysis, Convert to a unified time base ;

[0031] in, Indicates the timestamp after synchronization;

[0032] Generate a cleaned dataset ;

[0033] in, , After standardization Data logging for each sensor.

[0034] Further, the output step of identifying a list of faulty sensors and their locations is as follows:

[0035] S310: Obtaining the data set preprocessed from step S200 , this dataset contains the cleaned data of all sensors ;

[0036] S320: Define the threshold of the sensor status. Any data point outside the normal operating range is considered a potential failure.

[0037] S330: For each data point exceeding the threshold, identify its corresponding sensor ID and timestamp;

[0038] S340: using the position information of the sensor and the pipeline structure to further verify whether the faulty sensor is actually in a faulty state;

[0039] For each faulty sensor , check neighboring sensors within a certain geographical range or on the pipeline structure data;

[0040] in, Indicates a faulty sensor The set of neighbor sensors;

[0041] S350: If the neighbor sensor The methane concentration If it is within the normal range, then confirm For faulty sensors;

[0042] Add confirmed faulty sensors to the final faulty sensor list ;

[0043] S360: Output the final confirmed fault sensor list , contains the ID of the faulty sensor and the corresponding timestamp.

[0044] Furthermore, step S300 also includes the following:

[0045] if Greater than upper threshold or less than the lower threshold , then the sensor is considered May be in a fault state, denoted as .

[0046] in, represents the upper threshold, represents the lower threshold;

[0047] if or , then Marked as faulty, the ID of the faulty sensor is , and record the timestamp at this time as ;

[0048] Record the information of all faulty sensors and form a faulty sensor list ;

[0049] in, ;

[0050] If for all , exist If yes, confirm Fault;

[0051] in, Indicates neighbor sensor The methane concentration, , Contains information about all sensors that have confirmed a fault.

[0052] Furthermore, the specific steps of step S400 are as follows:

[0053] S410: Obtaining a list of faulty sensors identified in step S300 , containing the ID of the faulty sensor and its location;

[0054] in, ,in Indicates the location of the faulty sensor;

[0055] S420: Identify each faulty sensor based on geographic location and pipeline structure The adjacent sensor set ;

[0056] in, ;

[0057] S430: From the cleaned data set of step S200 , extract adjacent sensors Historical data;

[0058] in, ,in Indicates a faulty sensor Historical data of neighbor sensors, Indicates a faulty sensor Neighborhood Sensor Historical data records;

[0059] S440: For each adjacent sensor ID , analyzing the methane concentration of its adjacent sensors In time The changing pattern of trends;

[0060] S450: According to the fault sensor Choose an appropriate interpolation algorithm according to the specific situation;

[0061] S460: Use the selected interpolation algorithm To estimate the faulty sensor In time The methane concentration , for a given time point ,use From neighbor sensors Historical data Inference , the expression is as follows: ;

[0062] S470: Estimated methane concentration Replace a faulty sensor In time Missing values ​​of ; Update for ,in , and if and ,but .

[0063] S480: Output interpolated data set , contains the latest data and status information of all sensors, where the missing values ​​of faulty sensors are filled by interpolation algorithms;

[0064] in, is the final imputed dataset.

[0065] Furthermore, the steps to output a unified data structure are as follows:

[0066] S510: The data after interpolation in step S400 With real-time data Carry out a merger;

[0067] in, is the dataset after interpolation, For real-time data sets;

[0068] S520: Ensure timestamps for all data and To unify to the same base time, and Convert to a unified time base ;

[0069] in, is the unified timestamp;

[0070] S530: Create a unified data structure ,This structure contains the latest data and status information of all sensors;

[0071] in, ;

[0072] S540: For each sensor , check its status information Whether it is a “fault”;

[0073] if If it is "fault", the interpolated data is used ; If it is "normal", use real-time data directly ;

[0074] Among them, if ,but Use interpolated values; otherwise Use real-time values;

[0075] S550: Insert the latest data into For each sensor ,renew To include the latest , , , ;

[0076] in, Contains the latest data from all sensors;

[0077] S560: Output unified data structure ,This structure contains the latest data and status information of all sensors;

[0078] in, .

[0079] Furthermore, the specific steps of step S600 are as follows:

[0080] S610: Unify the data structure output in step S500 Input into the trained model;

[0081] S620: preprocessing the input data, so that the format of the input data meets the requirements of the model;

[0082] S630: Extracting useful features, including calculating the distance between sensors , the change rate of methane concentration ,in, Indicates sensor and The distance between Indicates sensor In time and Changes in methane concentration between

[0083] S640: Use the trained model M to predict the data. The expression is: ,in is the prediction result of the model;

[0084] in, It is a binary classification result;

[0085] S650: interpreting the output of the model to determine the sensor that has a leak;

[0086] For each sensor ,if Exceeding the set threshold , then the sensor is considered There may be a leak;

[0087] if , then mark For suspected leaks;

[0088] S660: Trigger the corresponding early warning mechanism according to the prediction result, if , an alarm is sent and the location and time of the suspected leak are recorded. The expression is ,in Indicates the warning list;

[0089] S670: Output information of all suspected leak sensors and early warning mechanism triggering situations, among which, ,in Contains information on all suspected leaking sensors.

[0090] Systems that provide data to methane sensor-based applications, including:

[0091] Data acquisition module: collects raw data from sensors ;

[0092] Data standardization module: standardize the original data and generate ;

[0093] Data preprocessing module: preprocess the standardized data to generate cleaned data ;

[0094] Fault detection module: monitors sensor status and outputs a list of faulty sensors ;

[0095] Data interpolation module: interpolates the data of the faulty sensor and its neighboring sensors to generate an interpolated data set ;

[0096] Data structuring module: Integrate interpolated data with real-time data to generate a unified data structure ;

[0097] Data analysis module: Input the unified data structure into the trained model to generate the prediction results of suspected leaks and the triggering of the early warning mechanism.

[0098] A storage medium stores non-transitory computer-readable instructions for executing one or more steps of the aforementioned method for providing data to an application based on a methane sensor.

[0099] The beneficial effects of the present invention are:

[0100] The present invention ensures the consistency, integrity and accuracy of data by standardizing data formats, preprocessing and cleaning data, intelligent fault detection and data interpolation, and unified data structure output, thereby improving the accuracy and response speed of leak detection, enhancing the stability and decision-making support capabilities of the system, and ultimately achieving more efficient and reliable natural gas pipeline monitoring and management, reducing safety risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] Figure 1 is a flow chart of a method for providing data to an application based on a methane sensor proposed by the present invention;

[0102] Figure 2 It is a structural block diagram of a system for providing data to an application based on a methane sensor proposed by the present invention.

[0103] In the figure: 101, data acquisition module; 102, data standardization module; 103, data preprocessing module; 104, fault detection module; 105, data interpolation module; 106, data structuring module; 107, data analysis module. DETAILED DESCRIPTION

[0104] The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present specification. Various examples may omit, replace, or add various processes or components as needed. In addition, the features described in some examples may also be combined in other examples.

[0105] At least one embodiment of the present invention discloses a method for providing data to a methane sensor-based application, such as Figure 1-Figure 2 As shown, the following steps are included:

[0106] S100: Standardize the real-time data from wired and wireless sensors on natural gas pipelines and unify the standardized data formats;

[0107] Real-time data includes but is not limited to methane concentration, timestamp, sensor ID, and status information;

[0108] In one embodiment of the present invention, the specific steps of step S100 are as follows:

[0109] S110: Collect raw data from each sensor, including but not limited to methane concentration, timestamp, sensor ID, status information, etc.

[0110] expression:

[0111] in, Indicates Data logging of sensors, is the methane concentration, is the timestamp, is the sensor ID, It is status information (such as normal, fault, etc.).

[0112] S120: Verify data integrity, ensure that no important fields are missing, and verify that the fields are complete, e.g. exists and is in the correct format, Is it effective, etc.

[0113] S130: converting data from all sensors into a unified format;

[0114]

[0115] in, To convert the methane concentration to a uniform concentration unit (such as ppm), To convert a timestamp to a unified timestamp format (such as Unix timestamp), and They are converted into unified sensor ID and status information respectively.

[0116] S140: Standardize data to make data from different sources comparable.

[0117] For methane concentration ,Z-score normalization method can be used to ensure that data from different sensors are compared on the same scale;

[0118] The formula is ,in is the average value, is the standard deviation;

[0119] S150: Save the standardized data to a database or other storage system, where the storage format may be a table or database, ensuring that each Can be quickly retrieved.

[0120] S200: preprocessing the standardized data, obtaining cleaned data, and synchronizing timestamps;

[0121] In one embodiment of the present invention, the specific steps of step S200 are as follows:

[0122] S210: Loading the standardized data in step S100 , the expression is as follows:

[0123]

[0124] in, Represents the standardized data set.

[0125] S220: Ensure timestamps for all sensors Synchronize to the same time base to facilitate time series analysis, Convert to a unified time base , for example UTC time.

[0126] in, Indicates the timestamp after synchronization.

[0127] Generate a cleaned dataset .

[0128] in, .

[0129] After the above steps, a cleaned data set can be obtained. ,This dataset contains the latest data from all sensors and has synchronized timestamps, providing a reliable basis for subsequent ,fault detection and data interpolation.

[0130] S300: design a fault detection algorithm, monitor the state of each sensor, identify the sensors with a state of "fault" and their locations, and output a list of identified faulty sensors and their locations;

[0131] In one embodiment of the present invention, the specific steps of step S300 are as follows:

[0132] S310: Obtaining the data set preprocessed from step S200 ,This dataset contains the cleaned data of all sensors.

[0133] in, ;

[0134] S320: Defines the thresholds for sensor status, and any data point outside the normal operating range is considered a potential failure.

[0135] if Greater than upper threshold or less than the lower threshold , then the sensor is considered May be in a fault state, denoted as .

[0136] in, represents the upper threshold, Indicates the lower threshold.

[0137] S330: For each data point exceeding the threshold, identify its corresponding sensor ID and timestamp; if or , then Marked as faulty, the faulty sensor is , and record the timestamp at this time as ; Record the information of all faulty sensors and form a list of faulty sensors ;

[0138] in, ;

[0139] S340: using the position information of the sensor and the pipeline structure to further verify whether the faulty sensor is actually in a faulty state;

[0140] For each faulty sensor , check neighboring sensors within a certain geographical range or on the pipeline structure data;

[0141] in, Indicates a faulty sensor The set of neighbor sensors;

[0142] S350: If the neighbor sensor The methane concentration If it is within the normal range, then confirm For faulty sensors;

[0143] If for all , exist If yes, confirm Fault;

[0144] Add confirmed faulty sensors to the final faulty sensor list ;

[0145] in, .

[0146] S360: Output the final confirmed fault sensor list , contains the ID of the faulty sensor and the corresponding timestamp.

[0147] in, Contains information about all sensors that have confirmed a fault.

[0148] Through the above steps, we can effectively monitor and confirm which sensors may be in a faulty state, and output a detailed list of faulty sensors, providing a basis for the next step of data interpolation and leakage detection.

[0149] S400: according to the location of the faulty sensor and the data of the adjacent sensors and the historical data of the faulty sensor, the adjacent sensors of the faulty sensor are determined by analyzing the adjacent sensor data, and the methane concentration variation pattern of the adjacent sensors under the same conditions is evaluated in combination with the historical data analysis, and the real-time data of the location of the faulty sensor is estimated by using a suitable interpolation algorithm. According to the information obtained from the adjacent sensors and the historical data, the missing value of the faulty sensor is interpolated, and the interpolated real-time data is output to replace the missing value of the faulty sensor;

[0150] Interpolation algorithms include but are not limited to linear interpolation, K nearest neighbor, model-based regression, etc.;

[0151] Neighboring sensors of the faulty sensor are determined based on geographical location and pipeline structure;

[0152] In one embodiment of the present invention, the specific steps of step S400 are as follows:

[0153] S410: Obtaining a list of faulty sensors identified in step S300 , containing the ID of the faulty sensor and its location.

[0154] in, ,in Indicates the location of the faulty sensor.

[0155] S420: Identify each faulty sensor based on geographic location and pipeline structure The adjacent sensor set .

[0156] in, .

[0157] S430: From the cleaned data set of step S200 , extract adjacent sensors Historical data.

[0158] in, ,in Indicates a faulty sensor Historical data of neighbor sensors, Indicates a faulty sensor Neighborhood Sensor Historical data records.

[0159] S440: For each adjacent sensor , analyze its methane concentration In time The law of change on.

[0160] Use time series analysis techniques, such as moving averages, to assess The trend is expressed as follows:

[0161]

[0162] In the moving average method, express The moving average concentration in the time window, where is the time window size of the moving average, For neighbor sensors The timestamp of the

[0163] S450: According to the fault sensor Select an appropriate interpolation algorithm for the specific situation.

[0164] The choice of interpolation algorithm can be determined according to the distribution characteristics of historical data, such as linear interpolation, K-nearest neighbor interpolation, or model-based regression interpolation.

[0165] in, Indicates the selected interpolation algorithm.

[0166] S460: Use the selected interpolation algorithm To estimate the faulty sensor In time The methane concentration .

[0167] For a given time point ,use From neighbor sensors Historical data Inference .

[0168] in, .

[0169] S470: Estimated methane concentration Replace a faulty sensor In time The missing values ​​of .

[0170] Among them, update for ,in , and if and ,but .

[0171] S480: Output interpolated data set , which contains the latest data and status information of all sensors, where the missing values ​​of faulty sensors have been filled by the interpolation algorithm.

[0172] in, is the final imputed dataset.

[0173] S500: Input the completed data and real-time data, and output a unified data structure containing the latest data and status information of all sensors.

[0174] In one embodiment of the present invention, the specific steps of step S500 are as follows:

[0175] S510: The data after interpolation in step S400 With real-time data to merge.

[0176] in, is the dataset after interpolation, It is a real-time data set.

[0177] S520: Ensure timestamps for all data and To unify to the same base time, and Convert to a unified time base .

[0178] in, The unified timestamp.

[0179] S530: Create a unified data structure , which contains the latest data and status information of all sensors.

[0180] in, .

[0181] S540: For each sensor , check its status information Whether it is "fault".

[0182] if If it is "fault", the interpolated data is used ; If it is "normal", use real-time data directly .

[0183] Among them, if ,but Use interpolated values; otherwise Use live values.

[0184] S550: Insert the latest data into For each sensor ,renew To include the latest , , , .

[0185] in, Contains the latest data from all sensors.

[0186] S560: Output unified data structure , which contains the latest data and status information of all sensors.

[0187] in, .

[0188] Through the above steps, a unified data structure containing the latest data and status information of all sensors can be created. This structure not only includes real-time data, but also takes into account the interpolation values ​​of faulty sensors, ensuring the continuity and reliability of the data, and providing high-quality data input for the next step of leakage prediction and early warning mechanism.

[0189] S600: Input the output unified data structure into the trained model and analysis, and output the prediction results of suspected leakage and the triggering status of the early warning mechanism.

[0190] In one embodiment of the present invention, the specific steps of step S600 are as follows:

[0191] S610: Unify the data structure output in step S500 Input to the trained model.

[0192] in, ;

[0193] S620: Perform necessary preprocessing on the input data to ensure that its format meets the requirements of the model.

[0194] If the model requires data in a specific format, Make sure each Meets the requirements.

[0195] S630: Extract useful features so that the model can better understand the data.

[0196] May include calculating the distance between sensors , the change rate of methane concentration , and other features that help with prediction.

[0197] in, Indicates sensor and The distance between Indicates sensor In time and The change in methane concentration between .

[0198] S640: Use the trained model M to predict the data.

[0199] ,in is the prediction result of the model.

[0200] in, It could be a binary classification result (leakage / non-leakage), or a leakage probability, etc.

[0201] S650: Interpret the output of the model to determine which sensors may have leaks.

[0202] For each sensor ,if Exceeding the set threshold , then the sensor is considered There may be a leak.

[0203] if , then mark Suspected leak.

[0204] S660: Trigger a corresponding early warning mechanism according to the prediction result.

[0205] Among them, if , an alarm is sent and the location and time of the suspected leak are recorded.

[0206] ,in Indicates the warning list.

[0207] S670: Output the final suspected leakage prediction result and the triggering status of the early warning mechanism.

[0208] in, ,in Contains information on all suspected leaking sensors.

[0209] Through the above steps, we can use the trained model to analyze the unified data structure, predict possible leaks, and trigger the corresponding early warning mechanism. This can timely discover potential problems in the natural gas pipeline and ensure the safe operation of the system.

[0210] According to the above method for providing data, a system for providing data to an application based on a methane sensor is also proposed, comprising:

[0211] Data collection module 101: collects data from wired and wireless sensors on the natural gas pipeline in real time.

[0212] Data standardization module 102: standardizes the collected raw data and unifies the data format.

[0213] Data preprocessing module 103: preprocesses the standardized data, including timestamp synchronization, missing value processing and outlier detection.

[0214] Fault detection module 104: monitors the status of each sensor, identifies sensors with a status of "fault" and their locations, and outputs a list of faulty sensors.

[0215] Data interpolation module 105: According to the location of the faulty sensor and the data of the adjacent sensors and the historical data of the faulty sensor, the adjacent sensors of the faulty sensor are determined through adjacent sensor data analysis, and the methane concentration variation pattern of the adjacent sensors under the same conditions is evaluated in combination with the historical data analysis. The real-time data of the location of the faulty sensor is estimated using a suitable interpolation algorithm, and the missing values ​​of the faulty sensor are interpolated.

[0216] Data structuring module 106: inputs the completed data and real-time data, and outputs a unified data structure including the latest data and status information of all sensors.

[0217] Data analysis module 107: inputs the output unified data structure into the trained model for analysis, and outputs the prediction results of suspected leakage and the triggering status of the early warning mechanism.

[0218] At least one embodiment of the present disclosure provides a storage medium storing non-transitory computer-readable instructions for executing one or more steps in the aforementioned method of providing data to an application based on a methane sensor.

[0219] The computer program may be stored / distributed on a suitable medium, such as an optical storage medium or a solid-state medium supplied together with or as part of other hardware, but may also be distributed in other forms, such as via the Internet or other wired or wireless telecommunication systems. Any reference signs in the claims should not be construed as limiting the scope.

[0220] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation mode. The above-mentioned specific implementation mode is merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make more forms of equivalent embodiments, all of which are within the protection of this embodiment.

Claims

1. A method for providing data to a methane sensor based application, characterized in that, The following steps are involved: S100: Standardize the real-time data of wired and wireless sensors on natural gas pipelines and unify the standardized data format. The standardized data is , the expression is as follows: ; in, represents the standardized data set, To convert the methane concentration to a uniform concentration unit, To convert the timestamp into a unified timestamp format, and Convert into unified sensor ID and status information respectively; Real-time data includes methane concentration, timestamp, sensor ID and status information; S200: preprocessing the standardized data, obtaining cleaned data, and synchronizing timestamps; S210: Load the standardized data in S100 ; S220: Timestamps of all sensors Synchronize to the same time base, through time series analysis, Convert to a unified time base ; in, Indicates the timestamp after synchronization; Generate a cleaned dataset ; in, , After standardization Data logging of sensors; S300: monitor the state of each sensor through a fault detection algorithm, identify sensors with a state of "fault" and their locations, and output a list of identified faulty sensors and their locations; The output steps for identifying a list of faulty sensors and their locations are as follows: S310: Obtaining the data set preprocessed from step S200 , this dataset contains the cleaned data of all sensors ; S320: Define the threshold of the sensor status. Any data point outside the normal operating range is considered a potential failure. S330: For each data point exceeding the threshold, identify its corresponding sensor ID and timestamp; S340: using the position information of the sensor and the pipeline structure to further verify whether the faulty sensor is actually in a faulty state; For each faulty sensor , check neighboring sensors within a certain geographical range or on the pipeline structure data; in, Indicates a faulty sensor The set of neighbor sensors; S350: If the neighbor sensor The methane concentration If it is within the normal range, then confirm For faulty sensors; Add confirmed faulty sensors to the final faulty sensor list ; S360: Output the final confirmed fault sensor list , contains the ID of the faulty sensor and the corresponding timestamp; Step S300 also includes the following: if Greater than upper threshold or less than the lower threshold , then the sensor is considered May be in a fault state, denoted as ; in, represents the upper threshold, represents the lower threshold; if or , then Marked as faulty, the ID of the faulty sensor is , and record the timestamp at this time as ; Record the information of all faulty sensors and form a faulty sensor list ; in, ; If for all , exist If yes, confirm Fault; in, Indicates neighbor sensor methane concentration; ; in Contains information about all sensors that have confirmed a fault; S400: according to the location of the faulty sensor and the data of the adjacent sensors and the historical data of the faulty sensor, the adjacent sensors of the faulty sensor are determined by analyzing the adjacent sensor data, and the methane concentration variation pattern of the adjacent sensors under the same conditions is evaluated in combination with the historical data analysis, and the real-time data of the location of the faulty sensor is estimated by using an interpolation algorithm. According to the information obtained from the adjacent sensors and the historical data, the missing value of the faulty sensor is interpolated, and the interpolated real-time data is output to replace the missing value of the faulty sensor; Neighboring sensors of the faulty sensor are determined based on geographical location and pipeline structure; S410: Obtaining a list of faulty sensors identified in step S300 , containing the ID of the faulty sensor and its location; in, ,in Indicates the location of the faulty sensor; S420: Identify each faulty sensor based on geographic location and pipeline structure The adjacent sensor set ; in, ; S430: From the cleaned data set of step S200 , extract adjacent sensors Historical data; in, ,in Indicates a faulty sensor Historical data of neighbor sensors, Indicates a faulty sensor Neighborhood Sensor Historical data records; in Indicates the status information of adjacent sensors; Represents the timestamp of the adjacent sensor; Indicates the methane concentration of the adjacent sensor; S440: For each adjacent sensor ID , analyzing the methane concentration of its adjacent sensors In time The changing pattern of trends; S450: According to the fault sensor Select the corresponding interpolation algorithm based on the distribution characteristics of historical data; S460: Use the selected interpolation algorithm To estimate the faulty sensor In time The methane concentration , for a given time point ,use From neighbor sensors Historical data Inference , the expression is as follows: ; S470: Estimated methane concentration Replace a faulty sensor In time Missing values ​​of ; Update for , ,if and ,but ; S480: Output interpolated data set , contains the latest data and status information of all sensors, where the missing values ​​of faulty sensors are filled by interpolation algorithms; in, is the final imputed dataset; S500: input the completed data and real-time data, and output a unified data structure containing the latest data and status information of all sensors; The steps to output a unified data structure are as follows: S510: The data after interpolation in step S400 With real-time data Carry out a merger; in, is the dataset after interpolation, For real-time data sets; S520: Ensure timestamps for all data and To unify to the same base time, and Convert to a unified time base ; in, is the unified timestamp; S530: Create a unified data structure ,This structure contains the latest data and status information of all sensors; in, ; S540: For each sensor , check its status information Whether it is "fault"; if If "fault", the interpolated data is used ; If it is "normal", use real-time data directly ; Among them, if ,but Use interpolated values; otherwise Use real-time values; in For unified real-time data, is the unified sensor status information, is the unified sensor ID; S550: Insert the latest data into For each sensor ,renew To include the latest , , , ; in, Contains the latest data from all sensors; S560: Output unified data structure ,This structure contains the latest data and status information of all sensors; in, ; S600: input the output unified data structure into the trained model and analysis, and output the prediction results of suspected leakage and the triggering status of the early warning mechanism; The specific steps of step S600 are as follows: S610: Unify the data structure output in step S500 Input into the trained model; S620: preprocessing the input data, so that the format thereof meets the requirements of the model; S630: Extracting useful features, including calculating the distance between sensors , the change rate of methane concentration ,in, Indicates sensor and The distance between Indicates sensor In time and Changes in methane concentration between S640: Use the trained model M to predict the data. The expression is: ,in is the prediction result of the model; in, It is a binary classification result; S650: interpreting the output of the model to determine the sensor that has a leak; For each sensor ,if Exceeding the set threshold , then the sensor is considered There may be a leak; if , then mark For suspected leaks; S660: Trigger the corresponding early warning mechanism according to the prediction result, if , an alarm is sent and the location and time of the suspected leak are recorded. The expression is ,in Indicates the warning list; S670: Output information of all suspected leak sensors and early warning mechanism triggering situations, among which, ,in Contains information on all suspected leaking sensors.

2. The method of providing data to an application based on a methane sensor according to claim 1, characterized in that: The steps to unify the standardized data format are as follows: S110: collecting raw data from each sensor, including methane concentration, timestamp, sensor ID, and status information; The expression is as follows: ; in, Indicates Data logging of sensors, is the methane concentration, is the timestamp, is the sensor ID, is status information; S120: Verify data integrity, no important fields are missing, and the verification fields are complete; S130: converting data from all sensors into a unified format; S140: Standardize the data for methane concentration , using the Z-score standardization method, the expression is as follows: ; in, represents the standardized data, is the average value, is the standard deviation; S150: Save the standardized data to a database, where the storage format is a table or database. Can be quickly retrieved.

3. A system for providing data to a methane sensor-based application, characterized in that, The steps for performing the method of providing data to a methane sensor-based application as claimed in any one of claims 1 to 2 include: Data acquisition module (101): collects raw data from sensors ; Data standardization module (102): Standardizes the original data to generate ; Data preprocessing module (103): preprocesses the standardized data to generate cleaned data ; Fault detection module (104): monitors sensor status and outputs a list of faulty sensors ; Data interpolation module (105): interpolates the data of the faulty sensor and its neighboring sensors to generate an interpolated data set ; Data structuring module (106): Integrate the interpolated data with the real-time data to generate a unified data structure ; Data analysis module (107): inputs the unified data structure into the trained model to generate the prediction results of suspected leakage and the triggering status of the early warning mechanism.

4. A storage medium, characterized in that: Non-transitory computer-readable instructions are stored therein for executing one or more steps in the method for providing data to a methane sensor-based application as claimed in any one of claims 1-2.

Citation Information

Patent Citations

  • Intelligent sensor precision monitoring system based on Internet of Things

    CN116735804A

  • Wide-range long-period self-adaptive monitoring system and method for methane parameters in deep-sea methane leakage area

    CN117929645A