A method for monitoring abnormal gas consumption of residents based on city gas platform

By using DTW, K-means clustering, EMD, and APCA algorithms to analyze gas pressure time-series data on the city gas platform, residents with abnormal gas usage are accurately screened out. This solves the accuracy problem of gas leak and abnormal gas usage detection in existing technologies and achieves efficient monitoring of abnormal gas usage.

CN118568652BActive Publication Date: 2024-11-12TENENG NATURAL GAS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411061504.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-12
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Existing methods for monitoring abnormal gas usage in residential areas are affected by the quality of monitoring equipment and environmental factors, resulting in low data accuracy and low reliability of abnormal detection results, making it difficult to accurately distinguish between gas leaks and abnormal gas usage.

Method used

A method for monitoring abnormal gas usage in residential areas based on a city gas platform was adopted. By acquiring gas pressure time-series data, the DTW algorithm and K-means clustering algorithm were used to screen out residents with abnormal gas usage. Combined with EMD and APCA decomposition techniques, fluctuation stability and local extrema were analyzed to distinguish between suspected leaks and abnormal gas usage and to obtain the probability of leaks.

Benefits of technology

It improves the accuracy and efficiency of abnormal gas usage detection, ensures accurate differentiation between gas leaks and abnormal gas usage, and safeguards the safety and continuous gas supply for residents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568652B_ABST
    Figure CN118568652B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and specifically to a method for monitoring abnormal gas consumption of residents based on a city gas platform, comprising: in an embodiment of the present invention, obtaining a gas pressure time series data sequence of each household in a preset time period and each preset cycle, obtaining the current initial gas consumption abnormality of each household, thereby screening out several households with abnormal gas consumption, decomposing the gas pressure time series data sequence of each household with abnormal gas consumption, obtaining the fluctuation stability of each component segment, thereby screening out suspected leakage component segments, and obtaining the leakage possibility of each reference component corresponding to the target household residents, and obtaining the current abnormal gas consumption detection result of the target household residents. The present invention improves the efficiency of abnormal gas consumption monitoring of residents by comparing and analyzing the gas consumption habits of each household with historical gas consumption data, and distinguishing leakage from abnormal gas consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method for monitoring abnormal gas consumption of residents based on a city gas platform. Background Art

[0002] Abnormal monitoring of gas consumption by residents based on the city gas platform plays an important role. It can timely detect possible leaks, abnormal pressure or other safety hazards through real-time monitoring of the gas pipeline network and user-side facilities. Timely alarms are issued when abnormal conditions are detected, which helps to take necessary preventive measures before accidents occur, reduce the incidence of gas accidents, and quickly repair problems after they are discovered, which can reduce the outage time caused by failures or damage and ensure continuous gas supply to residents.

[0003] Existing problems: Gas leakage and abnormal gas use by residents will cause abnormalities in residents' gas monitoring data. Among them, gas leakage is more dangerous. When collecting monitoring data on residents' gas use, it will be affected by the quality of the monitoring equipment and the environmental conditions. Factors such as temperature and humidity changes and electromagnetic interference may affect the data accuracy of the monitoring equipment, which may cause inaccurate detection of abnormalities in residents' gas data and lead to low credibility of the detection results of the causes of the abnormalities, thereby reducing the effect of abnormal monitoring of residents' gas use. Summary of the invention

[0004] The present invention provides a method for monitoring abnormal gas consumption of residents based on a city gas platform to solve the existing problems.

[0005] The present invention provides a method for monitoring abnormal gas consumption of residents based on a city gas platform, which adopts the following technical scheme:

[0006] An embodiment of the present invention provides a method for monitoring abnormal gas consumption of residents based on a city gas platform, the method comprising the following steps:

[0007] In an urban residential area, obtain the gas pressure time series data sequence of each household in a preset time period, the gas pressure time series data sequence of each household in each preset period in the preset time period, and the house area and permanent population of each household;

[0008] According to the gas pressure time series data sequence of each household in the preset time period, the gas pressure time series data sequence of each household in the last preset period in the preset time period, and the house area and permanent population of each household, the current initial gas consumption abnormality degree of each household is obtained;

[0009] According to the gas pressure time series data sequence of each household in each preset period within the preset time period and the current abnormal degree of initial gas consumption of each household, several households with abnormal current gas consumption are screened out;

[0010] Any household with abnormal gas consumption is recorded as a target household; the gas pressure time series data sequence of the target household in the last preset period within the preset time period is decomposed to obtain several IMF components; the first preset number threshold IMF components are recorded as reference components; each IMF component is divided into several component segments, and the fluctuation stability of each component segment of each reference component corresponding to the target household is obtained according to the local extreme value in each component segment;

[0011] According to the fluctuation stability of each component segment of each reference component corresponding to the target household residents, the suspected leakage component segments are screened out; according to the distribution of the suspected leakage component segments in the reference components, the local extreme values ​​in the suspected leakage component segments and the fluctuation stability of the suspected leakage component segments, the leakage possibility of each reference component corresponding to the target household residents is obtained; according to the leakage possibility of each reference component corresponding to the target household residents, the current gas consumption anomaly detection results of the target household residents are obtained.

[0012] Furthermore, the current abnormal degree of initial gas consumption of each household includes the following specific steps:

[0013] All households with the same house area and the same permanent population are recorded as one type of households;

[0014] Use the DTW algorithm to obtain the DTW distance between the gas pressure time series data of any two households within a preset time period;

[0015] In any type of household, the DTW distance of the gas pressure time series data sequence between any two households in a preset time period is taken as the cluster distance between any two households. The K-means clustering algorithm is used to cluster all households to obtain several clusters and the clustering silhouette coefficient of each cluster.

[0016] Use the DTW algorithm to obtain the DTW distance of the gas pressure time series data sequence between any two households in the last preset cycle within the preset time period, and record it as the current distance between any two households;

[0017] According to the current distance and cluster distance between any two households in each cluster and the cluster silhouette coefficient of each cluster, the current initial gas consumption abnormality degree of each household in each cluster is obtained.

[0018] Furthermore, the method of obtaining the current initial gas consumption abnormality degree of each household in each cluster according to the current distance and cluster distance between any two households in each cluster and the cluster silhouette coefficient of each cluster includes the following specific steps:

[0019] In the In the clusters, calculate the The ratio of the current distance between each household and each other household to the cluster distance is used to calculate the The average of the ratios of the current distance between the residents of the household and all other residents to the cluster distance is recorded as The first The difference in gas usage between residents of this household and other households;

[0020] The first The clustering silhouette coefficient of the clusters is The first The product of the difference in gas consumption between the household residents and other households is recorded as The first The abnormal degree of initial gas consumption of the current residents.

[0021] Furthermore, the specific steps of screening out several households with abnormal current gas usage include the following:

[0022] In a preset time period, the DTW algorithm is used to obtain the DTW distance of the gas pressure time series data sequence of each household in any two preset periods;

[0023] Recording other preset periods except the last preset period in the preset time period as historical preset periods;

[0024] Calculate the sum of the DTW distances of the gas pressure time series data sequences of each household in the last preset period and all the historical preset periods, then calculate the variance of the DTW distances of the gas pressure time series data sequences of each household in all two arbitrary preset periods, and record the normalized value of the product of the inverse proportional normalized value of the ratio of the sum to the variance and the current initial gas consumption abnormality of each household as the current corrected gas consumption abnormality of each household;

[0025] When the current corrected gas usage abnormality of any household is greater than a preset judgment threshold, it is determined that the current gas usage of the any household is abnormal.

[0026] Furthermore, the step of dividing each IMF component into a plurality of component segments and obtaining the fluctuation stability of each component segment of each reference component corresponding to the target household residents according to the local extreme value in each component segment includes the following specific steps:

[0027] Among all IMF components, the DTW algorithm is used to obtain the DTW distance between the gas pressure time series data sequence of the target household residents in the last preset cycle within the preset time period and each IMF component, and the IMF component corresponding to the largest DTW distance is recorded as the trend component;

[0028] The APCA segmentation algorithm is used to divide the trend component into several trend component segments; each IMF component is divided into several component segments according to the start time and end time of each trend component segment;

[0029] In any component segment of any reference component, the first-order derivative method is used to perform derivation to obtain a number of local extreme values; wherein the local extreme values ​​include local maximum values;

[0030] According to the difference of adjacent local extreme values ​​in each component segment of each reference component corresponding to the target household residents and the time interval of adjacent local maximum values, the fluctuation stability of each component segment of each reference component corresponding to the target household residents is obtained.

[0031] Furthermore, the fluctuation stability of each component segment of each reference component corresponding to the target household residents is obtained according to the difference of adjacent local extreme values ​​in each component segment of each reference component corresponding to the target household residents and the time interval of adjacent local maximum values, including the following specific steps:

[0032] In the target households corresponding to the The reference component In the component segments, the product of the variance of the absolute values ​​of the differences between all adjacent local extreme values ​​and the variance of the time intervals between all adjacent local maximum values ​​is calculated, and the inverse proportional normalized value of the product is recorded as the first component segment corresponding to the target household. The reference component The fluctuation stability of each component segment.

[0033] Furthermore, the screening out of the suspected leakage component segments includes the following specific steps:

[0034] In each reference component corresponding to the target household residents, the component segment whose fluctuation stability is greater than the preset stability threshold is recorded as a suspected leakage component segment.

[0035] Furthermore, the method of obtaining the leakage possibility of each reference component corresponding to the target household residents according to the distribution of the suspected leakage component segment in the reference component, the local extreme value in the suspected leakage component segment, and the fluctuation stability of the suspected leakage component segment includes the following specific steps:

[0036] Use the APCA segmentation algorithm to obtain the APCA approximation of each trend component segment;

[0037] Arrange the trend component segments from small to large according to the APCA approximation value to obtain a trend component segment sequence;

[0038] According to the one-to-one correspondence between the trend component segments in the trend component and the component segments in each IMF component, the component segment sequence of each IMF component corresponding to the trend component segment sequence is obtained;

[0039] In the target households corresponding to the From the component segment sequences of the reference components, the suspected leakage component segments are extracted in sequence to obtain a suspected leakage component segment sequence;

[0040] In the suspected leakage component segment sequence, the ratio of the number of local extreme values ​​in each suspected leakage component segment to the number of data in each suspected leakage component segment is calculated to form a ratio sequence;

[0041] According to the corresponding The distribution of the suspected leakage component segments in the reference components, the fluctuation stability of the suspected leakage component segments, and the ratio sequence are obtained to obtain the first The possibility of leakage of a reference component.

[0042] Furthermore, the first The distribution of the suspected leakage component segments in the reference components, the fluctuation stability of the suspected leakage component segments, and the ratio sequence are obtained to obtain the first The leakage possibility of a reference component includes the following specific steps:

[0043] In the target households corresponding to the In the reference components, the ratio of the number of suspected leakage component segments to the number of all component segments starting from the first suspected leakage component segment is recorded as the first ratio; The ratio of the number of non-negative numbers in the first-order difference sequence of the ratio sequence corresponding to the reference component to the number of data in the first-order difference sequence is recorded as the second ratio; the normalized value of the product of the mean of the fluctuation stability of all suspected leakage component segments, the first ratio and the second ratio is recorded as the first ratio corresponding to the target household resident. The possibility of leakage of a reference component.

[0044] Furthermore, the method of obtaining the current abnormal gas usage detection result of the target household residents according to the leakage possibility of each reference component corresponding to the target household residents includes the following specific steps:

[0045] The maximum value of the leakage possibilities of all reference components corresponding to the residents of the target household is recorded as the final leakage possibility of the residents of the target household;

[0046] Among all households with abnormal gas usage, the current abnormal gas usage of each household whose final leakage possibility is greater than the preset leakage threshold will be recorded as gas leakage; the current abnormal gas usage of each household whose final leakage possibility is less than or equal to the preset leakage threshold will be recorded as abnormal gas usage by residents.

[0047] The beneficial effects of the technical solution of the present invention are:

[0048] In the embodiment of the present invention, the gas pressure time series data sequence of each household in the preset time period and each preset cycle is obtained to obtain the current initial gas usage abnormality of each household, thereby screening out several households with abnormal gas usage at present. By comparing and analyzing the gas usage habits of all households with the current and historical gas usage data of each household, several households with abnormal gas usage are accurately screened out, thereby ensuring the accuracy of subsequent current abnormal gas usage detection results. The gas pressure time series data sequence of each household with abnormal gas usage in the last preset cycle within the preset time period is decomposed to obtain the fluctuation stability of each component segment of each reference component corresponding to each household with abnormal gas usage at present, thereby screening out suspected leakage component segments. By decomposing the data fluctuation of leakage and abnormal gas usage, and screening out suspected leakage component segments according to the stability of data fluctuation caused by leakage, the accuracy of subsequent distinction between leakage and abnormal gas usage is ensured. The leakage possibility of each reference component corresponding to the target household is obtained to obtain the current abnormal gas usage detection result of the target household. The accuracy of distinction between leakage and abnormal gas usage is further ensured through the persistence characteristics of leakage. At this point, the present invention detects abnormal gas usage through the gas usage habits and historical gas usage data of each household, thereby ensuring the accuracy of abnormal gas usage detection, and further distinguishes between leakage and abnormal gas usage based on the difference in data fluctuations caused by gas leakage and abnormal gas usage, thereby taking different measures to deal with them, thereby ensuring the safety of residents' gas use and continuous gas supply, thereby improving the efficiency of abnormal gas usage monitoring for residents. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0050] Figure 1 This is a flow chart of the steps of a method for monitoring abnormal gas consumption of residents based on a city gas platform according to the present invention;

[0051] Figure 2 This is a flow chart for obtaining the current abnormal gas usage detection result of each household in this embodiment. DETAILED DESCRIPTION

[0052] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a method for monitoring abnormal gas consumption of residents based on a city gas platform proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0053] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0054] The following is a detailed description of a specific scheme of a method for monitoring abnormal gas consumption of residents based on a city gas platform provided by the present invention in conjunction with the accompanying drawings.

[0055] See also Figure 1 , which shows a flowchart of a method for monitoring abnormal gas consumption of residents based on a city gas platform provided by an embodiment of the present invention, the method comprising the following steps:

[0056] Step S001: In an urban residential area, obtain the gas pressure time series data sequence of each household in a preset time period, the gas pressure time series data sequence of each household in each preset period in the preset time period, and the house area and permanent population of each household.

[0057] In a preset time period, a pressure sensor is used to collect the inlet gas pressure data of each household in an urban residential area in real time, and the gas pressure time series data sequence of each household in the preset time period and the gas pressure time series data sequence of each household in each preset period in the preset time period are obtained. Then the house area and permanent population of each household are collected.

[0058] It should be noted that: due to the cold weather in winter, people will use heating facilities and gas appliances more frequently, which may increase the risk of gas accidents. Therefore, this embodiment selects any month in winter as the preset time period, and the duration of each preset cycle in the preset time period is one day, and this example is used for description. It is known that the gas consumption of urban residents on weekdays and weekends is quite different. This embodiment uses the gas consumption data on weekdays as an example for analysis, that is, each preset cycle is a working day, and the current day is a working day. When analyzing the gas consumption data on weekends, it is necessary to increase the duration of the preset time period to ensure the credibility of the data analysis. During holidays or special events (such as cold weather), gas safety needs to be managed emphatically, so a lower pressure threshold is set. Once the pressure data exceeds the pressure threshold, it must be strictly checked regardless of whether the abnormality is serious.

[0059] It should be further explained that the gas pressure data in the residential gas consumption data is relatively stable, which is convenient for identifying abnormal data. Therefore, this embodiment uses a pressure sensor to collect household gas pressure data. Among them, the house area of ​​each household and the permanent population of the month are obtained through a questionnaire survey in this embodiment.

[0060] Step S002: Obtain the current initial gas usage abnormality of each household based on the gas pressure time series data sequence of each household in the preset time period, the gas pressure time series data sequence of each household in the last preset period in the preset time period, and the house area and permanent population of each household.

[0061] All households with the same housing area and permanent population are classified as one type of households.

[0062] It should be noted that when the house area is large and the permanent population of the month is large, the demand for gas may be large. Among the same type of households, due to the different gas usage habits of each household, that is, the number of cooking, heating and bathing, the time nodes and duration are different, which will lead to different fluctuations in gas usage data, and habits are a continuous behavior pattern. The number of gas leaks or abnormal gas usage in a household in an urban residential community is very small, or even non-existent, and it is often resolved in a short time after it occurs. Therefore, abnormal data accounts for a small proportion of the gas pressure time series data sequence for a month.

[0063] Preferably, in one embodiment of the present invention, the method for obtaining the current abnormal degree of initial gas consumption of each household includes:

[0064] The DTW algorithm is used to match the gas pressure time series data sequences of any two households within a preset time period to obtain the DTW distance of the gas pressure time series data sequences of any two households within the preset time period.

[0065] In any type of households, the DTW distance of the gas pressure time series data sequence between any two households within a preset time period is taken as the clustering distance, and each household is taken as a sample point. The K-means clustering algorithm is used to cluster all households to obtain several clusters, the clustering distance between any two households in each cluster, and the clustering silhouette coefficient of each cluster.

[0066] It should be noted that the DTW algorithm, the K-means clustering algorithm, and the calculation of the clustering silhouette coefficient are all well-known technologies. The smaller the DTW distance, the more similar the two gas pressure time series data sequences are. Therefore, the gas usage habits of each household in each cluster are relatively similar, and the closer the distance between any two households, the more similar the corresponding gas usage habits. The clustering silhouette coefficient is a general evaluation indicator that can help measure the quality and effect of clustering. The larger the value of the clustering silhouette coefficient, the better and more reliable the clustering effect is. Among them, the number of clusters in the K-means clustering algorithm is obtained using the elbow method, which is a well-known technology. Under normal circumstances, it is a low-probability event for gas leaks or abnormal gas usage behaviors to occur in multiple households in a city residential area in the same time period, that is, most residents' gas usage data are often relatively normal, that is, under normal circumstances, the gas pressure time series data sequences of each household with similar gas usage habits in the current day should be similar. The last preset period in the preset time period is the current day.

[0067] Use the DTW algorithm to match the gas pressure time series data sequences of any two households in the last preset period within the preset time period, and obtain the DTW distance of the gas pressure time series data sequences of any two households in the last preset period within the preset time period, which is recorded as the current distance between any two households.

[0068] In the In the clusters, calculate the The ratio of the current distance between each household and each other household to the cluster distance is used to calculate the The average of the ratios of the current distance between the residents of the household and all other residents to the cluster distance is recorded as The first The difference in gas consumption between the residents of this household and other households. The clustering silhouette coefficient of the clusters is The first The product of the difference in gas consumption between the household residents and other households is recorded as The first The abnormal degree of initial gas consumption of the current residents.

[0069] It should be noted that the calculation formula for the current abnormal degree of initial gas consumption of each household is:

[0070] ,

[0071] In the formula, For the The first The current abnormal degree of initial gas consumption of the residents, For the The clustering silhouette coefficient of the clusters, For the The number of households in each cluster, For the The first Household residents and The clustering distance between households, For the The first Household residents and The current distance between residents of each household. The larger the value is, the more dissimilar the gas pressure time series data of the two households in the current day are. The smaller the size, the more similar the gas usage habits of the two households are. The more credible, the more Indicates The first The difference in gas consumption between residents of this household and other households, The larger the value, the more reliable the clustering result. Adjust the gas usage difference to get The first The abnormal degree of initial gas consumption of the current residents.

[0072] According to the above method, the current initial gas consumption abnormality degree of each household is obtained.

[0073] Step S003: Filter out several households with abnormal gas usage according to the gas pressure time series data sequence of each household in each preset period within the preset time period and the current abnormal degree of initial gas usage of each household.

[0074] Since a household in any cluster may have a change in gas usage habits during the current day, such as taking sick leave to rest at home, cooking for relatives and friends, or suddenly not wanting to cook or take a shower, etc., this will affect the credibility of the initial abnormal gas usage, that is, it is easy to detect changes in residents' gas usage habits as abnormal gas usage. Under normal circumstances, the probability of most households' gas usage habits changing on the same day is small, and abnormal gas usage detection usually has a certain tolerance rate. Therefore, this embodiment does not consider the situation where most households' gas usage habits change on the same day.

[0075] Preferably, in one embodiment of the present invention, the method for obtaining the current corrected initial gas consumption abnormality level of each household includes:

[0076] In a preset time period, the DTW algorithm is used to match the gas pressure time series data sequence of each household in any two preset periods to obtain the DTW distance of the gas pressure time series data sequence of each household in any two preset periods.

[0077] The other preset periods except the last preset period within the preset time period are recorded as historical preset periods.

[0078] Calculate the sum of the DTW distances of the gas pressure time series data sequences of each household in the last preset period and all historical preset periods, then calculate the variance of the DTW distances of the gas pressure time series data sequences of each household in all two arbitrary preset periods, and record the normalized value of the inverse proportional normalized value of the ratio of the sum to the variance and the product of the current initial gas usage abnormality of each household as the current corrected gas usage abnormality of each household.

[0079] It should be noted that the calculation formula for the current corrected gas consumption abnormality of each household is:

[0080] ,

[0081] In the formula, For the The current abnormal degree of gas consumption of households is corrected. For the The current abnormal degree of initial gas consumption of the residents, For the The variance of the DTW distance of the gas pressure time series data sequence of all residents in any two preset periods within the preset time period, For the The last preset cycle of the household residents in the preset time period is The DTW distance of the gas pressure time series data sequence of the historical preset period, It is the number of historical preset cycles within the preset time period. is an exponential function with a natural constant as the base. To present the inverse proportional relationship and normalization processing, the implementer can set the inverse proportional function and normalization function according to the actual situation. is a linear normalization function used to normalize data values ​​to between 0 and 1. The smaller the The more stable the household's gas usage habits are, the more likely it is that The larger the value, the more likely it is that the gas usage habits will change on that day. The less credible. right Make adjustments to obtain the corrected abnormal degree of gas usage.

[0082] In this embodiment, the preset judgment threshold is 0.8, and this is taken as an example for description.

[0083] When the current corrected gas usage abnormality of any household is greater than a preset judgment threshold, it is determined that the current gas usage of the household is abnormal.

[0084] Step S004: any household with abnormal gas consumption at present is recorded as the target household; the gas pressure time series data sequence of the target household in the last preset period within the preset time period is decomposed to obtain a number of IMF components; the first preset number threshold of IMF components are recorded as reference components; each IMF component is divided into a number of component segments, and the fluctuation stability of each component segment of each reference component corresponding to the target household is obtained according to the local extreme value in each component segment.

[0085] Abnormal gas usage by residents, such as frequent opening and closing of gas valves, may indicate that residents are performing some unusual operations or that there is a problem with the equipment. Unreasonable use of gas equipment by residents, such as not turning off gas equipment for a long time, not maintaining or replacing aging equipment in a timely manner, etc., may increase users' energy costs and cause equipment to age faster or fail. Gas leaks may cause explosions or fires, which pose a high safety risk. Therefore, it is necessary to distinguish between abnormal gas usage and gas leaks and implement different measures.

[0086] For larger gas leaks, the data fluctuations caused are relatively large, and real-time judgments can be made directly based on the set thresholds. Therefore, this embodiment mainly detects small leaks, which usually require a long period of accumulation to cause significant harm and cause the gas pressure in the system to gradually decrease, resulting in smaller data fluctuations. Therefore, this embodiment performs an abnormal gas usage detection on each household in the entire community every hour. Under normal circumstances, the supply of residential gas systems is generally stable, so the pressure fluctuations in the system are usually small. The supply network will dynamically adjust the gas supply according to user needs to keep the pressure in the system stable. During peak gas usage in the morning and evening, such as breakfast preparation and dinner time, the residential gas system may increase pressure to meet user needs.

[0087] Usually, the rate of small leaks is relatively stable and continuous, and will not cause drastic pressure fluctuations instantly. Modern gas systems are usually equipped with pressure regulators and feedback mechanisms. Once the pressure is detected to drop to a certain level, the system will automatically adjust to maintain a stable gas supply pressure. That is, the pressure fluctuation caused by the leak is relatively stable and continuous, and changes with the pressure. However, the abnormal gas use of residents is random and occurs at random times, which will cause unstable data fluctuations, that is, disorder. Small leaks and abnormal gas use by residents may occur at the same time, so it is necessary to first decompose and filter out the data fluctuations caused by small leaks.

[0088] Preferably, in one embodiment of the present invention, the method for obtaining the final leakage possibility of each household with abnormal gas consumption at present includes:

[0089] Any household with abnormal gas consumption is recorded as the target household. The gas pressure time series data sequence of the target household in the last preset period within the preset time period is decomposed by EMD to obtain several IMF components.

[0090] It should be noted that: EMD decomposition is a well-known technology, and all IMF components are of the same length as the corresponding gas pressure time series data sequence.

[0091] Among all IMF components, the DTW algorithm is used to obtain the DTW distance between the gas pressure time series data sequence of the target household residents in the last preset cycle within the preset time period and each IMF component, and the IMF component corresponding to the largest DTW distance is recorded as the trend component.

[0092] The APCA segmentation algorithm is used to divide the trend component into several trend component segments, and the APCA approximate value of each trend component segment is obtained.

[0093] It should be noted that the APCA segmentation algorithm is a well-known technology, and the data values ​​in each divided trend component segment are similar in size, that is, they correspond to an APCA approximate value.

[0094] The trend component segments are arranged from small to large according to the APCA approximation values ​​to obtain a trend component segment sequence.

[0095] It should be noted that the trend component segment sequence corresponds to the gas pressure time series data sequence, which should be represented by a gradual increase in gas pressure.

[0096] Each IMF component is divided into several component segments according to the start time and end time of each trend component segment.

[0097] Therefore, according to the one-to-one correspondence between the trend component segments in the trend component and the component segments in each IMF component, the component segment sequence of each IMF component corresponding to the trend component segment sequence is obtained.

[0098] Pressure fluctuations caused by small leaks in gas pipelines usually tend to appear as high-frequency fluctuations. This is because small leaks can cause small but rapid changes in the flow velocity and flow rate of the gas inside the system. With small changes in the pressure inside the pipeline, the outflow of the leaked gas will also adjust quickly, and this change will be reflected in the data recorded by the pressure sensor at a high frequency. In EMD decomposition, the high-frequency part will be decomposed first, so the first few IMF components can be used as reference components.

[0099] In this embodiment, the preset quantity threshold is 3, which is used as an example for description.

[0100] The first preset number threshold IMF components are recorded as reference components.

[0101] In any component segment of any reference component, the first-order derivative method is used to perform derivation to obtain a number of local extreme values, wherein the local extreme values ​​include local maximum values ​​and local minimum values.

[0102] In the target households corresponding to the The reference component In each component segment, calculate the product of the variance of the absolute value of the difference between all adjacent local extreme values ​​and the variance of the time interval between all adjacent local maximum values, and record the inverse proportional normalized value of the product as the first component segment corresponding to the target household. The reference component The fluctuation stability of each component segment.

[0103] What needs to be explained is: The reference component The calculation formula for the fluctuation stability of a component segment is:

[0104] ,

[0105] In the formula, The first The reference component The fluctuation stability of the component segments, The first The reference component The variance of the absolute value of the difference between all adjacent local extreme values ​​in the component segment, The first The reference component The variance of the time intervals between all adjacent local maxima in a component segment. is a linear normalization function, which is used to normalize the data value to between 0 and 1. reflect The inverse proportional normalized value of . The more similar the differences between adjacent local extreme values ​​and the more similar the time intervals between adjacent local maximum values, the more stable the data fluctuation, that is, the smaller the variance and the greater the fluctuation stability, the more likely the data fluctuation is caused by leakage.

[0106] According to the above method, the fluctuation stability of each component segment of each reference component corresponding to the target household residents is obtained.

[0107] Step S005: According to the fluctuation stability of each component segment of each reference component corresponding to the target household residents, the suspected leakage component segments are screened out; according to the distribution of the suspected leakage component segments in the reference components, the local extreme values ​​in the suspected leakage component segments and the fluctuation stability of the suspected leakage component segments, the leakage possibility of each reference component corresponding to the target household residents is obtained; according to the leakage possibility of each reference component corresponding to the target household residents, the current gas consumption abnormality detection result of the target household residents is obtained.

[0108] In this embodiment, the preset stability threshold is 0.7, which is used as an example for description.

[0109] In each reference component corresponding to the target household residents, the component segment whose fluctuation stability is greater than the preset stability threshold is recorded as a suspected leakage component segment.

[0110] In the target households corresponding to the From the component segment sequences of the reference components, the suspected leakage component segments are extracted in sequence to obtain a suspected leakage component segment sequence.

[0111] It should be noted that the suspected leakage component segment sequence is manifested as a gradual increase in gas pressure in the gas pressure time series data sequence. A small leak means that a certain amount of gas is constantly lost in the pipeline system. When the pressure inside the pipeline system increases, the amount of gas flowing out of the leaking part will also increase accordingly. This increase will cause the frequency of pressure fluctuations to increase with the change in pressure, because the leak will respond to the change in pressure within a certain range.

[0112] In the suspected leakage component segment sequence, the ratio of the number of local extreme values ​​in each suspected leakage component segment to the number of data in each suspected leakage component segment is calculated to form a ratio sequence.

[0113] It should be noted that the ratio reflects the frequency of data fluctuations in the suspected leakage component segment. If it is a gas leakage, the ratio sequence should be an increasing sequence.

[0114] In the target households corresponding to the In the reference components, the ratio of the number of suspected leakage component segments to the number of all component segments starting from the first suspected leakage component segment is recorded as the first ratio. The ratio of the number of non-negative numbers in the first-order difference sequence of the ratio sequence corresponding to the reference component to the number of data in the first-order difference sequence is recorded as the second ratio. The normalized value of the product of the mean of the fluctuation stability of all suspected leakage component segments, the first ratio and the second ratio is recorded as the first ratio corresponding to the target household residents. The possibility of leakage of a reference component.

[0115] What needs to be explained is: The calculation formula for the leakage probability of a reference component is:

[0116] ,

[0117] In the formula, The first The leakage probability of a reference component, The first The mean value of the fluctuation stability of all suspected leakage component segments of the reference component, The first The number of data in the first-order difference sequence of the ratio sequence corresponding to the reference component, The first The number of non-negative numbers in the first-order difference sequence of the ratio sequence corresponding to the reference component, The first The number of suspected leaked component segments of the reference component, The first The number of all component segments starting from the first suspected leakage component segment in the reference component (including the first suspected leakage component segment). is the first ratio, The closer it is to 1, the more consistent it is with the continuity of the leakage, that is, the component segments after the first suspected leakage component segment in the reference component should all be suspected leakage component segments. is the second ratio, The closer it is to 1, the more it fits the phenomenon that the frequency of data fluctuation increases with the increase of gas pressure. The normalized value of The possibility of leakage of a reference component. It is a linear normalization function used to normalize data values ​​to between 0 and 1.

[0118] According to the above method, the leakage possibility of each reference component corresponding to the target household residents is obtained, and the maximum leakage possibility is taken as the final leakage possibility of the target household residents.

[0119] In this embodiment, the preset leakage threshold is 0.8, which is used as an example for description.

[0120] Among all households with abnormal gas usage, the current abnormal gas usage of each household whose final leakage possibility is greater than the preset leakage threshold will be recorded as gas leakage, and the current abnormal gas usage of each household whose final leakage possibility is less than or equal to the preset leakage threshold will be recorded as abnormal gas usage by residents.

[0121] For all households whose current abnormal gas usage detection results indicate gas leakage, the gas supply will be cut off immediately, and a corresponding number of maintenance personnel will be arranged to conduct simultaneous inspections and repairs. For all households whose current abnormal gas usage detection results indicate abnormal gas usage, appropriate maintenance personnel will be arranged to notify residents door-to-door to use gas safely and detect whether there are any faults in the gas equipment. It does not need to cut off the gas supply immediately and consume a lot of manpower, thereby solving different problems through different measures. While ensuring the safety of gas use, it can ensure continuous gas supply to residents and reduce manpower consumption, thereby improving the efficiency of abnormal gas usage monitoring for residents and completing accurate monitoring of abnormal gas usage for urban residents. Among them, the flow chart for obtaining the current abnormal gas usage detection results for each household is as follows: Figure 2 shown.

[0122] It should be noted that: in this embodiment, when the denominator in the formula is 0, the denominator is set to 1 to ensure that the formula is valid, and this example is used for description.

[0123] So far, the present invention is completed.

[0124] In summary, in the embodiment of the present invention, the gas pressure time series data sequence of each household in the preset time period and each preset cycle is obtained to obtain the current initial gas usage abnormality of each household, thereby screening out several households with current abnormal gas usage, decomposing the gas pressure time series data sequence of each household with current abnormal gas usage in the last preset cycle within the preset time period, and obtaining the fluctuation stability of each component segment of each reference component corresponding to each household with current abnormal gas usage, thereby screening out the suspected leakage component segment, in order to obtain the leakage possibility of each reference component corresponding to the target household, and obtain the current abnormal gas usage detection result of the target household. The present invention detects gas usage abnormality through comparative analysis of the gas usage habits of each household and historical gas usage data, thereby ensuring the accuracy of gas usage abnormality detection, and further distinguishes leakage from abnormal gas usage according to the difference in data fluctuations caused by gas leakage and abnormal gas usage, thereby taking different measures to deal with it, ensuring the safety of residents' gas usage and continuous gas supply, thereby improving the efficiency of residents' gas usage abnormality monitoring.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for monitoring abnormal gas consumption of residents based on a city gas platform, characterized in that: The method comprises the following steps: In an urban residential area, obtain the gas pressure time series data sequence of each household in a preset time period, the gas pressure time series data sequence of each household in each preset period in the preset time period, and the house area and permanent population of each household; According to the gas pressure time series data sequence of each household in the preset time period, the gas pressure time series data sequence of each household in the last preset period in the preset time period, and the house area and permanent population of each household, the current initial gas consumption abnormality degree of each household is obtained; According to the gas pressure time series data sequence of each household in each preset period within the preset time period and the current abnormal degree of initial gas consumption of each household, several households with abnormal current gas consumption are screened out; Any household with abnormal gas consumption is recorded as a target household; the gas pressure time series data sequence of the target household in the last preset period within the preset time period is decomposed to obtain several IMF components; the first preset number threshold IMF components are recorded as reference components; each IMF component is divided into several component segments, and the fluctuation stability of each component segment of each reference component corresponding to the target household is obtained according to the local extreme value in each component segment; According to the fluctuation stability of each component segment of each reference component corresponding to the target household residents, the suspected leakage component segment is screened out; according to the distribution of the suspected leakage component segment in the reference component, the local extreme value in the suspected leakage component segment and the fluctuation stability of the suspected leakage component segment, the leakage possibility of each reference component corresponding to the target household residents is obtained; according to the leakage possibility of each reference component corresponding to the target household residents, the current gas consumption anomaly detection result of the target household residents is obtained; The specific steps of the current abnormal degree of initial gas consumption of each household are as follows: All households with the same house area and the same permanent population are recorded as one type of households; Use the DTW algorithm to obtain the DTW distance between the gas pressure time series data of any two households within a preset time period; In any type of household, the DTW distance of the gas pressure time series data sequence between any two households in a preset time period is taken as the cluster distance between any two households. The K-means clustering algorithm is used to cluster all households to obtain several clusters and the clustering silhouette coefficient of each cluster. Use the DTW algorithm to obtain the DTW distance of the gas pressure time series data sequence between any two households in the last preset cycle within the preset time period, and record it as the current distance between any two households; According to the current distance and cluster distance between any two households in each cluster and the cluster silhouette coefficient of each cluster, the current initial gas consumption abnormality degree of each household in each cluster is obtained; The method of obtaining the current initial gas consumption abnormality degree of each household in each cluster according to the current distance and cluster distance between any two households in each cluster and the cluster silhouette coefficient of each cluster includes the following specific steps: In the In the clusters, calculate the The ratio of the current distance between each household and each other household to the cluster distance is used to calculate the The average of the ratios of the current distance between the residents of the household and all other residents to the cluster distance is recorded as The first The difference in gas usage between residents of this household and other households; The first The clustering silhouette coefficient of the clusters is The first The product of the difference in gas consumption between the household residents and other households is recorded as The first The abnormal degree of initial gas consumption of the residents; The method of dividing each IMF component into several component segments and obtaining the fluctuation stability of each component segment of each reference component corresponding to the target household residents according to the local extreme value in each component segment includes the following specific steps: Among all IMF components, the DTW algorithm is used to obtain the DTW distance between the gas pressure time series data sequence of the target household residents in the last preset cycle within the preset time period and each IMF component, and the IMF component corresponding to the largest DTW distance is recorded as the trend component; The APCA segmentation algorithm is used to divide the trend component into several trend component segments; each IMF component is divided into several component segments according to the start time and end time of each trend component segment; In any component segment of any reference component, the first-order derivative method is used to perform derivation to obtain a number of local extreme values; wherein the local extreme values ​​include local maximum values; According to the difference of adjacent local extreme values ​​in each component segment of each reference component corresponding to the target household residents and the time interval of adjacent local maximum values, the fluctuation stability of each component segment of each reference component corresponding to the target household residents is obtained; The method of obtaining the leakage possibility of each reference component corresponding to the target household residents according to the distribution of the suspected leakage component segment in the reference component, the local extreme value in the suspected leakage component segment, and the fluctuation stability of the suspected leakage component segment includes the following specific steps: Use the APCA segmentation algorithm to obtain the APCA approximation of each trend component segment; Arrange the trend component segments from small to large according to the APCA approximation value to obtain a trend component segment sequence; According to the one-to-one correspondence between the trend component segments in the trend component and the component segments in each IMF component, the component segment sequence of each IMF component corresponding to the trend component segment sequence is obtained; In the target households corresponding to the From the component segment sequences of the reference components, the suspected leakage component segments are extracted in sequence to obtain a suspected leakage component segment sequence; In the suspected leakage component segment sequence, the ratio of the number of local extreme values ​​in each suspected leakage component segment to the number of data in each suspected leakage component segment is calculated to form a ratio sequence; According to the corresponding The distribution of the suspected leakage component segments in the reference components, the fluctuation stability of the suspected leakage component segments, and the ratio sequence are obtained to obtain the first The leakage possibility of a reference component; The first The distribution of the suspected leakage component segments in the reference components, the fluctuation stability of the suspected leakage component segments, and the ratio sequence are obtained to obtain the first The leakage possibility of a reference component includes the following specific steps: In the target households corresponding to the In the reference components, the ratio of the number of suspected leakage component segments to the number of all component segments starting from the first suspected leakage component segment is recorded as the first ratio; The ratio of the number of non-negative numbers in the first-order difference sequence of the ratio sequence corresponding to the reference component to the number of data in the first-order difference sequence is recorded as the second ratio; the normalized value of the product of the mean of the fluctuation stability of all suspected leakage component segments, the first ratio and the second ratio is recorded as the first ratio corresponding to the target household resident. The possibility of leakage of a reference component.

2. According to claim 1, a method for monitoring abnormal gas consumption of residents based on a city gas platform is characterized in that: The specific steps of screening out several households with abnormal current gas usage are as follows: In a preset time period, the DTW algorithm is used to obtain the DTW distance of the gas pressure time series data sequence of each household in any two preset periods; Recording other preset periods except the last preset period in the preset time period as historical preset periods; Calculate the sum of the DTW distances of the gas pressure time series data sequences of each household in the last preset period and all the historical preset periods, then calculate the variance of the DTW distances of the gas pressure time series data sequences of each household in all two arbitrary preset periods, and record the normalized value of the product of the inverse proportional normalized value of the ratio of the sum to the variance and the current initial gas consumption abnormality of each household as the current corrected gas consumption abnormality of each household; When the current corrected gas usage abnormality of any household is greater than a preset judgment threshold, it is determined that the current gas usage of the any household is abnormal.

3. According to claim 1, a method for monitoring abnormal gas consumption of residents based on a city gas platform is characterized in that: The step of obtaining the fluctuation stability of each component segment of each reference component corresponding to the target household residents according to the difference of adjacent local extreme values ​​in each component segment of each reference component corresponding to the target household residents and the time interval of adjacent local maximum values ​​comprises the following specific steps: In the target households corresponding to the The reference component In the component segments, the product of the variance of the absolute values ​​of the differences between all adjacent local extreme values ​​and the variance of the time intervals between all adjacent local maximum values ​​is calculated, and the inverse proportional normalized value of the product is recorded as the first component segment corresponding to the target household. The reference component The fluctuation stability of each component segment.

4. According to claim 1, a method for monitoring abnormal gas consumption of residents based on a city gas platform is characterized in that: The specific steps of screening out the suspected leaked component segments are as follows: In each reference component corresponding to the target household residents, the component segment whose fluctuation stability is greater than the preset stability threshold is recorded as a suspected leakage component segment.

5. According to claim 1, a method for monitoring abnormal gas consumption of residents based on a city gas platform is characterized in that: The specific steps of obtaining the current abnormal gas usage detection result of the target household residents according to the leakage possibility of each reference component corresponding to the target household residents are as follows: The maximum value of the leakage possibilities of all reference components corresponding to the residents of the target household is recorded as the final leakage possibility of the residents of the target household; Among all households with abnormal gas usage at present, the abnormal gas usage of each household with a final leakage possibility greater than the preset leakage threshold is recorded as a gas leakage; The current gas usage anomaly of each household whose final leakage possibility is less than or equal to the preset leakage threshold is recorded as abnormal gas usage of the residents.