Gas stealing and leaking anomaly detection method based on user gas usage habit and related components

CN118821006BActive Publication Date: 2026-09-22CHENGDU QIANJIA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410801519.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2026-09-22
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

[0004]基于上述技术背景所提出的问题,本发明的目的在于提供基于用户用气习惯的偷气漏气异常检测方法及相关组件,通过用气稳定系数对异常检测结果进行修正与分析,可以得到偷气漏气的异常检测结果,从而解决了但目前偷气、漏气等异常用气仅从用气负荷去检测用气异常,并未考虑其他影响用气的数据也并未考虑用户用气习惯对于用气的影响,造成异常检测存在较大的误差的问题

Benefits of technology

[0048]1、根据影响该用户燃气使用因素从燃气特征模型中选取影响影响程度较大的特征所构建用户用气特征模型,可以考虑多个影响用气负荷的因素,可以提升偷气漏气异常检测的准确性;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118821006B_ABST
    Figure CN118821006B_ABST
Patent Text Reader

Abstract

The application discloses a gas stealing and leaking anomaly detection method based on user gas use habits and related components, and through correction and analysis of an anomaly detection result by a gas use stability coefficient, an anomaly detection result of gas stealing and leaking can be obtained, so that the problem that current gas stealing, gas leaking and other anomalies are only detected from gas use load to detect gas use anomalies, other data affecting gas use are not considered, and user gas use habits have no influence on gas use, and great errors exist in anomaly detection are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gas theft and leakage anomaly detection technology, specifically to a gas theft and leakage anomaly detection method and related components based on users' gas usage habits. Background Technology

[0002] Currently, traditional methods used by natural gas companies to detect abnormal gas usage by users heavily rely on manpower and the experience of sales personnel, such as conducting door-to-door inspections of gas-using equipment. These methods are extremely costly in terms of manpower and resources, yet the efficiency and results are not ideal. There is an urgent need for a method and system that uses an IoT data collection platform to collect user gas usage data and upload it to a gas volume analysis system. This system would then utilize big data analytics to analyze user gas usage habits, proactively detect abnormal gas usage such as theft and leaks, and issue alerts.

[0003] However, currently, abnormal gas usage such as gas theft and leakage is detected only by gas load, without considering other data affecting gas usage or the impact of users' gas usage habits, resulting in significant errors in abnormality detection. Summary of the Invention

[0004] Based on the problems raised in the above technical background, the purpose of this invention is to provide a method and related components for detecting gas theft and leakage based on users' gas usage habits. By correcting and analyzing the anomaly detection results through the gas usage stability coefficient, the anomaly detection results for gas theft and leakage can be obtained. This solves the problem that current methods for detecting gas theft and leakage only consider the gas load and do not take into account other data affecting gas usage or the influence of users' gas usage habits, resulting in large errors in anomaly detection.

[0005] This invention is achieved through the following technical solution:

[0006] The first aspect of this invention provides a method for detecting gas theft and leakage based on users' gas usage habits, comprising the following steps:

[0007] Step S1: Obtain multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model using the multi-source gas data after feature quantization processing.

[0008] Step S2: Obtain historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results;

[0009] Step S3: Obtain the current user's gas consumption data, input the current user's gas consumption data into the user's gas consumption feature model for anomaly detection, and obtain the user's gas consumption deviation.

[0010] Step S4: Combine the user's gas usage deviation with the gas usage stability coefficient to obtain the anomaly detection result.

[0011] In the above technical solution, the multi-source data includes gas-related data such as user gas consumption data, user attribute data, weather data and other gas-related data, which have an impact on user gas consumption. In this invention, after quantifying its characteristics, a gas characteristic model is constructed. This gas characteristic model is a model that considers multiple factors affecting gas use, providing a basis for subsequent detection of gas theft and leakage anomalies.

[0012] The user gas consumption characteristic model is a gas consumption model constructed by selecting the most influential features from the gas characteristic model based on the factors affecting the user's gas consumption. It can be used to analyze the user's gas consumption data in the future. Since some users' gas consumption may be irregular in months, weeks, and days, the stability of the user's gas consumption habits can be analyzed. This stability can be used to correct the results of subsequent gas consumption data analysis and can, to some extent, distinguish between gas theft and gas leakage.

[0013] By inputting the current user's gas consumption data into the user's gas consumption characteristic model for anomaly detection, and then correcting and analyzing the anomaly detection results through the gas consumption stability coefficient, the anomaly detection results of gas theft and leakage can be obtained.

[0014] In one optional embodiment, the feature quantization processing of the multi-source gas data includes:

[0015] Step S11: Sort the multi-source gas data in chronological order, and clean the sorted multi-source gas data to obtain the data to be quantified.

[0016] Step S12: Cluster the data to be quantified to generate a set of multiple gas feature types;

[0017] Step S13: Assign values ​​to the multiple gas feature sets to obtain the quantized values ​​of the multiple gas feature sets, and normalize the quantized values ​​of each gas feature set.

[0018] In one optional embodiment, constructing a gas feature model from multi-source gas data after feature quantization includes:

[0019] Step S14: Obtain the status value of multi-source gas data, and calculate the weight of each type of gas feature set after normalization based on the status value to obtain the weight value of each type of gas feature set.

[0020] Step S15: Concatenate the weight values ​​of each gas feature set in pairs to generate a gas feature model.

[0021] In one optional embodiment, feature analysis of the historical user gas consumption data includes:

[0022] Step S21: Sort the historical user gas consumption data by collection time, construct the proportion coefficient, and initialize the proportion coefficient to 1;

[0023] Step S22: Take the first data from the sorted historical user gas consumption data as the data to be analyzed for features;

[0024] Step S23: Obtain the gas state of the data to be analyzed, and calculate the abnormal correlation between the gas features and the gas state in the data to be analyzed in sequence;

[0025] Step S24: Determine multiple abnormal correlation features in the data to be analyzed based on the abnormal correlation degree, and multiply the abnormal correlation degree corresponding to the abnormal correlation feature by the proportion coefficient to obtain the abnormal correlation feature value;

[0026] Step S25: Increase the percentage coefficient by 0.1 and use it as the new percentage coefficient. Repeat steps S22 to S24 until the historical user gas consumption data has been traversed to obtain the feature association dataset. Determine the user gas consumption characteristics based on the feature association dataset.

[0027] In one optional embodiment, determining the user's gas consumption characteristics based on the feature association dataset includes:

[0028] Step S251: Calculate the association value of the feature association dataset. The formula for calculating the association value is as follows:

[0029]

[0030] In the above formula, This represents the association value of the association feature of the j-th type of anomaly. Let represent the i-th abnormal association feature value of the j-th abnormal association feature, m represent the existence of m types of abnormal association features, and n represent the existence of n abnormal association feature values ​​of this type of abnormal association feature;

[0031] Step S252: Calculate the average value of the correlation values, and take the abnormal correlation features that are greater than or equal to the average value as the user's gas consumption features.

[0032] In one optional embodiment, analyzing the gas usage habits of the historical user gas usage data includes:

[0033] Step S26: Divide the historical user gas consumption data into first cycle gas consumption data with daily intervals, divide the historical user gas consumption data into second cycle gas consumption data with weekly intervals, and divide the historical user gas consumption data into second cycle gas consumption data with monthly intervals.

[0034] Step S27: Calculate the first gas consumption curve of the first cycle gas consumption data, the second gas consumption curve of the second cycle gas consumption data, and the third gas consumption curve of the third cycle gas consumption data respectively;

[0035] Step S28: Calculate the matching degree between the first gas consumption curve, the second gas consumption curve and the third gas consumption curve based on the sliding time window algorithm;

[0036] Step S29: Determine the user's gas usage habits through pairwise matching.

[0037] In an optional embodiment, combining the feature analysis results with the gas feature model to construct a user gas consumption feature model includes:

[0038] Based on the user gas consumption characteristics obtained in step S25, a gas feature set corresponding to the user gas consumption characteristics is selected from the gas feature model, and the weight value of the corresponding gas feature set is used as the anomaly detection value of the user gas consumption characteristics.

[0039] The abnormal detection values ​​of each type of user gas consumption feature are concatenated in pairs to generate a user gas consumption feature model.

[0040] A second aspect of the present invention provides a gas theft and leakage anomaly detection system based on user gas usage habits, comprising:

[0041] A multi-source gas data processing module is used to acquire multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model based on the feature-quantized multi-source gas data.

[0042] The historical user gas consumption data analysis module is used to acquire historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results.

[0043] The current user gas consumption data analysis module is used to acquire current user gas consumption data, input the current user gas consumption data into the user gas consumption feature model for anomaly detection, and obtain the user gas consumption deviation.

[0044] An anomaly detection module is used to comprehensively calculate the user's gas usage deviation and the gas usage stability coefficient to obtain an anomaly detection result.

[0045] A third aspect of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements a method for detecting gas theft and leakage based on a user's gas usage habits.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method.

[0047] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0048] 1. The user's gas consumption characteristic model is constructed by selecting features with a significant impact from the gas characteristic model based on the factors affecting the user's gas usage. This model can consider multiple factors affecting gas load and improve the accuracy of detecting gas theft and leakage.

[0049] 2. Since some users' gas usage may be irregular in a month, week, or day, analyzing the stability of users' gas usage habits can be used to correct subsequent gas volume data analysis results and can, to some extent, distinguish between gas theft and gas leakage. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0051] Figure 1 This is a flowchart illustrating the gas theft and leakage anomaly detection method based on user gas usage habits provided in Embodiment 1 of the present invention.

[0052] Figure 2 This is a schematic diagram of the gas theft and leakage anomaly detection system based on user gas usage habits provided in Embodiment 2 of the present invention;

[0053] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0055] Example 1

[0056] Figure 1 This is a flowchart illustrating the gas theft and leakage anomaly detection method based on user gas usage habits provided in Embodiment 1 of the present invention. Figure 1 As shown, the method for detecting gas theft and leakage based on users' gas usage habits includes the following steps:

[0057] Step S1: Obtain multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model using the multi-source gas data after feature quantization processing.

[0058] Step S2: Obtain historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results;

[0059] Step S3: Obtain the current user's gas consumption data, input the current user's gas consumption data into the user's gas consumption feature model for anomaly detection, and obtain the user's gas consumption deviation.

[0060] Step S4: Combine the user's gas usage deviation with the gas usage stability coefficient to obtain the anomaly detection result.

[0061] It should be noted that multi-source data includes gas-related data such as user gas consumption data, user attribute data, weather data, and other gas-related data, which have an impact on user gas consumption. In this invention, after quantifying its characteristics, a gas characteristic model is constructed. This gas characteristic model is a model that considers multiple factors affecting gas use, providing a basis for subsequent detection of gas theft and leakage anomalies.

[0062] The user gas consumption characteristic model is a gas consumption model constructed by selecting the most influential features from the gas characteristic model based on the factors affecting the user's gas consumption. It can be used to analyze the user's gas consumption data in the future. Since some users' gas consumption may be irregular in months, weeks, and days, the stability of the user's gas consumption habits can be analyzed. This stability can be used to correct the results of subsequent gas consumption data analysis and can, to some extent, distinguish between gas theft and gas leakage.

[0063] By inputting the current user's gas consumption data into the user's gas consumption characteristic model for anomaly detection, and then correcting and analyzing the anomaly detection results through the gas consumption stability coefficient, the anomaly detection results of gas theft and leakage can be obtained.

[0064] In one optional embodiment, the feature quantization processing of the multi-source gas data includes:

[0065] Step S11: Sort the multi-source gas data in chronological order, and clean the sorted multi-source gas data to obtain the data to be quantified.

[0066] Step S12: Cluster the data to be quantified to generate a set of multiple gas feature types;

[0067] Step S13: Assign values ​​to the multiple gas feature sets to obtain the quantized values ​​of the multiple gas feature sets, and normalize the quantized values ​​of each gas feature set.

[0068] It should be noted that since user gas consumption data in multi-source gas data is a time-series data, this invention first sorts the data chronologically and then cleans the sorted data to avoid inaccurate feature quantification due to data overlap, coupling, missing data, or other anomalies. Clustering is then performed on the data to be quantified, grouping similar multi-source gas data into a gas feature set and assigning values ​​to this set to achieve feature quantification. However, since multi-source gas data does not have a strict size relationship during quantification, using data to quantify features can lead to excessively large feature differences. Therefore, the quantified gas feature set needs to be normalized, adjusting its value range to [0,1].

[0069] This embodiment provides one implementation method for feature quantization processing of multi-source gas data, and the process is as follows:

[0070] The user's gas consumption data and its corresponding multi-source gas data, including but not limited to collection time, date, user type, user gas address, user gas point code, building type, temperature, wind force, and gas maintenance status, are compiled into a table to form a multi-source gas data table, where each type of gas data is a column.

[0071] The data in the multi-source gas data table are sorted according to the time of collection. Data with a missing rate of 20% or more in each data entry are deleted to form a new multi-source gas data table, which is the data to be quantified.

[0072] The correlation of gas data in each column, excluding the collection time, is calculated sequentially. Based on the correlation, the data to be quantified for the feature are aggregated, and data with high correlation are grouped into the same gas feature set.

[0073] Assigning values ​​to the gas feature set involves first assigning a value to each type of gas data in the set. For example, dates are assigned values ​​from 1 to 7 from Monday to Sunday, with the value increasing by 10 if the date falls on a public holiday; residential buildings are assigned a value of 1, public buildings 2, and industrial buildings 3. Then, the average of the quantized values ​​for the same type of gas data is taken as the quantized value for that type of gas data.

[0074] Finally, based on the quantization value of this type of gas data, the quantization value of the same type of gas data is normalized, thereby adjusting the quantization value of the same type of gas data to the range of [0,1].

[0075] In one optional embodiment, constructing a gas feature model from multi-source gas data after feature quantization includes:

[0076] Step S14: Obtain the status value of multi-source gas data, and calculate the weight of each type of gas feature set after normalization based on the status value to obtain the weight value of each type of gas feature set.

[0077] Step S15: Concatenate the weight values ​​of each gas feature set in pairs to generate a gas feature model.

[0078] It should be noted that the effect achieved by step S1 is to determine the impact value of each gas feature set on the user's gas consumption by assigning weights to the influence of each gas feature on the abnormal gas state, and use this as the weight value of each gas feature set.

[0079] Furthermore, each set of gas characteristics is paired up to avoid the limitations of individual gas characteristics in analyzing gas anomaly data, thereby obtaining more comprehensive feature information.

[0080] In one optional embodiment, feature analysis of the historical user gas consumption data includes:

[0081] Step S21: Sort the historical user gas consumption data by collection time, construct the proportion coefficient, and initialize the proportion coefficient to 1;

[0082] Step S22: Take the first data from the sorted historical user gas consumption data as the data to be analyzed for features;

[0083] Step S23: Obtain the gas state of the data to be analyzed, and calculate the abnormal correlation between the gas features and the gas state in the data to be analyzed in sequence;

[0084] Step S24: Determine multiple abnormal correlation features in the data to be analyzed based on the abnormal correlation degree, and multiply the abnormal correlation degree corresponding to the abnormal correlation feature by the proportion coefficient to obtain the abnormal correlation feature value;

[0085] Step S25: Increase the percentage coefficient by 0.1 and use it as the new percentage coefficient. Repeat steps S22 to S24 until the historical user gas consumption data has been traversed to obtain the feature association dataset. Determine the user gas consumption characteristics based on the feature association dataset.

[0086] In one optional embodiment, determining the user's gas consumption characteristics based on the feature association dataset includes:

[0087] Step S251: Calculate the association value of the feature association dataset. The formula for calculating the association value is as follows:

[0088]

[0089] In the above formula, This represents the association value of the association feature of the j-th type of anomaly. Let represent the i-th abnormal association feature value of the j-th abnormal association feature, m represent the existence of m types of abnormal association features, and n represent the existence of n abnormal association feature values ​​of this type of abnormal association feature;

[0090] Step S252: Calculate the average value of the correlation values, and take the abnormal correlation features that are greater than or equal to the average value as the user's gas consumption features.

[0091] It should be noted that historical user gas consumption data is time-related, and the closer the gas consumption data is to the current time, the more representative it is. Therefore, in this invention, a proportion coefficient is constructed and initialized to 1, and the proportion coefficient is increased accordingly as time increases.

[0092] In this system, each historical user gas consumption data entry contains gas data from multiple sources, including user gas consumption data, user attribute data, weather data, and other gas-related data. The impact of each source's gas data on the gas status is calculated as the anomaly correlation degree. Gas data with anomaly correlation degrees greater than or equal to a certain correlation threshold are considered as anomaly correlation features for that data entry. Determining user gas consumption features based on the feature correlation dataset involves calculating the correlation value obtained by multiplying the anomaly correlation degree corresponding to the anomaly correlation feature by a proportion coefficient. Anomaly correlation features with correlation values ​​greater than or equal to the average value are considered as user gas consumption features. These user gas consumption features are then combined with the gas feature model to construct the user gas consumption feature model.

[0093] In one optional embodiment, analyzing the gas usage habits of the historical user gas usage data includes:

[0094] Step S26: Divide the historical user gas consumption data into first cycle gas consumption data with daily intervals, divide the historical user gas consumption data into second cycle gas consumption data with weekly intervals, and divide the historical user gas consumption data into second cycle gas consumption data with monthly intervals.

[0095] Step S27: Calculate the first gas consumption curve of the first cycle gas consumption data, the second gas consumption curve of the second cycle gas consumption data, and the third gas consumption curve of the third cycle gas consumption data respectively;

[0096] Step S28: Calculate the matching degree between the first gas consumption curve, the second gas consumption curve and the third gas consumption curve based on the sliding time window algorithm;

[0097] Step S29: Determine the user's gas usage habits through pairwise matching.

[0098] It should be noted that by matching daily, weekly, and monthly gas consumption curves, it's possible to determine which days of the week and month a user consumes more and less gas. This allows for the detection of gas theft or leakage based on gas consumption patterns. For example, if a user habitually consumes little gas and suddenly increases their consumption, a leak may be suspected; similarly, if a user habitually consumes a lot of gas and suddenly decreases their consumption, gas theft may be suspected. This user's gas consumption habits can be combined with other gas consumption characteristics to obtain more accurate anomaly detection results.

[0099] In an optional embodiment, combining the feature analysis results with the gas feature model to construct a user gas consumption feature model includes:

[0100] Based on the user gas consumption characteristics obtained in step S25, a gas feature set corresponding to the user gas consumption characteristics is selected from the gas feature model, and the weight value of the corresponding gas feature set is used as the anomaly detection value of the user gas consumption characteristics.

[0101] The abnormal detection values ​​of each type of user gas consumption feature are concatenated in pairs to generate a user gas consumption feature model.

[0102] In one optional embodiment, determining the gas usage stability coefficient by analyzing the gas usage habits includes: summing the matching values ​​of each pair and taking the average value, and using the average value as the gas usage stability coefficient.

[0103] In this embodiment, step S3 obtains the current user's gas consumption data. After inputting the current user's gas consumption data into the user's gas consumption feature model, the user's gas consumption feature model will obtain feature data related to the user's gas consumption feature model from the current user's gas consumption data and calculate the anomaly detection value for it. Finally, the anomaly detection value of the current user's gas consumption data can be obtained, that is, the user's gas consumption deviation.

[0104] In this embodiment, step S4, which comprehensively calculates the user's gas usage deviation and the gas usage stability coefficient, can be achieved by adding the user's gas usage deviation and the gas usage stability coefficient at a certain ratio to obtain the abnormal state value.

[0105] Furthermore, by analyzing abnormal status values, such as when a user's gas consumption suddenly increases when the user is accustomed to low consumption, a gas leak can be considered; and when a user's gas consumption suddenly decreases when the user is accustomed to high consumption, gas theft can be considered. A comprehensive analysis can be conducted to obtain more accurate anomaly detection results.

[0106] Example 2

[0107] Figure 2 This is a schematic diagram of the gas theft and leakage anomaly detection system based on user gas usage habits provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the gas theft and leakage detection system based on users' gas usage habits includes:

[0108] A multi-source gas data processing module is used to acquire multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model based on the feature-quantized multi-source gas data.

[0109] The historical user gas consumption data analysis module is used to acquire historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results.

[0110] The current user gas consumption data analysis module is used to acquire current user gas consumption data, input the current user gas consumption data into the user gas consumption feature model for anomaly detection, and obtain the user gas consumption deviation.

[0111] An anomaly detection module is used to comprehensively calculate the user's gas usage deviation and the gas usage stability coefficient to obtain an anomaly detection result.

[0112] Example 3

[0113] Figure 3This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention, as shown below. Figure 3 As shown, the electronic device includes a processor 21, a memory 22, an input device 23, and an output device 24; the number of processors 21 in the computer device can be one or more. Figure 3 Taking a processor 21 as an example; the processor 21, memory 22, input device 23, and output device 24 in an electronic device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0114] The memory 22, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor 21 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 22, thereby implementing the gas theft and leakage anomaly detection method based on user gas usage habits in Embodiment 1.

[0115] The memory 22 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory 22 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory 22 may further include memory remotely located relative to the processor 21, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0116] Input device 23 can be used to receive user input such as ID and password. Output device 24 is used to output the network configuration page.

[0117] Example 4

[0118] Embodiment 4 of the present invention also provides a computer-readable storage medium, wherein the computer-executable instructions, when executed by a computer processor, are used to implement the gas theft and leakage anomaly detection method based on user gas usage habits provided in Embodiment 1.

[0119] The storage medium containing computer-executable instructions provided in the embodiments of the present invention is not limited to the method operation provided in Embodiment 1, but can also perform related operations in the gas theft and leakage anomaly detection method based on user gas usage habits provided in any embodiment of the present invention.

[0120] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting gas theft and leakage based on users' gas usage habits, characterized in that, Includes the following steps: Step S1: Obtain multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model using the multi-source gas data after feature quantization processing. Step S2: Obtain historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results; Step S3: Obtain the current user's gas consumption data, input the current user's gas consumption data into the user's gas consumption feature model for anomaly detection, and obtain the user's gas consumption deviation. Step S4: Calculate the user's gas usage deviation and the gas usage stability coefficient together to obtain the anomaly detection result; The feature quantization processing of the multi-source gas data includes: Step S11: Sort the multi-source gas data in chronological order, and clean the sorted multi-source gas data to obtain the data to be quantified. Step S12: Cluster the data to be quantified to generate a set of multiple gas feature types; Step S13: Assign values ​​to the multiple gas feature sets to obtain the quantized values ​​of the multiple gas feature sets, and normalize the quantized values ​​of each gas feature set. Constructing a gas feature model from multi-source gas data after feature quantization includes: Step S14: Obtain the status value of multi-source gas data, and calculate the weight of each type of gas feature set after normalization based on the status value to obtain the weight value of each type of gas feature set. Step S15: Concatenate the weight values ​​of each type of gas feature set in pairs to generate a gas feature model; Feature analysis of the historical user gas consumption data includes: Step S21: Sort the historical user gas consumption data by collection time, construct the proportion coefficient, and initialize the proportion coefficient to 1; Step S22: Take the first data from the sorted historical user gas consumption data as the data to be analyzed for features; Step S23: Obtain the gas state of the data to be analyzed, and calculate the abnormal correlation between the gas features and the gas state in the data to be analyzed in sequence; Step S24: Determine multiple abnormal correlation features in the data to be analyzed based on the abnormal correlation degree, and multiply the abnormal correlation degree corresponding to the abnormal correlation feature by the proportion coefficient to obtain the abnormal correlation feature value; Step S25: Increase the percentage coefficient by 0.1 and use it as the new percentage coefficient. Repeat steps S22 to S24 until the historical user gas consumption data has been traversed to obtain the feature association dataset. Determine the user gas consumption characteristics based on the feature association dataset. Determining user gas consumption characteristics based on the aforementioned feature association dataset includes: Step S251: Calculate the association value of the feature association dataset. The formula for calculating the association value is as follows: In the above formula, This represents the association value of the association feature of the j-th type of anomaly. Let represent the i-th abnormal association feature value of the j-th abnormal association feature, m represent the existence of m types of abnormal association features, and n represent the existence of n abnormal association feature values ​​of this type of abnormal association feature; Step S252: Calculate the average value of the correlation values, and take the abnormal correlation features that are greater than or equal to the average value as the user's gas consumption features.

2. The method for detecting gas theft and leakage based on user gas usage habits according to claim 1, characterized in that, The analysis of gas usage habits based on the historical user gas usage data includes: Step S26: Divide the historical user gas consumption data into a first cycle of gas consumption data with daily intervals, divide the historical user gas consumption data into a second cycle of gas consumption data with weekly intervals, and divide the historical user gas consumption data into a third cycle of gas consumption data with monthly intervals. Step S27: Calculate the first gas consumption curve of the first cycle gas consumption data, the second gas consumption curve of the second cycle gas consumption data, and the third gas consumption curve of the third cycle gas consumption data respectively; Step S28: Calculate the matching degree between each pair of the first gas consumption curve, the second gas consumption curve, and the third gas consumption curve based on the sliding time window algorithm; Step S29: Determine the user's gas usage habits through pairwise matching.

3. The method for detecting gas theft and leakage based on user gas usage habits according to claim 2, characterized in that, The process of constructing a user gas consumption characteristic model by combining the feature analysis results with the gas characteristic model includes: Based on the user gas consumption characteristics obtained in step S25, a gas feature set corresponding to the user gas consumption characteristics is selected from the gas feature model, and the weight value of the corresponding gas feature set is used as the anomaly detection value of the user gas consumption characteristics. The abnormal detection values ​​of each type of user gas consumption feature are concatenated in pairs to generate a user gas consumption feature model.

4. A gas theft and leakage anomaly detection system based on user gas usage habits, used to implement the gas theft and leakage anomaly detection method based on user gas usage habits as described in any one of claims 1 to 3, characterized in that, include: A multi-source gas data processing module is used to acquire multi-source gas data, perform feature quantization processing on the multi-source gas data, and construct a gas feature model based on the feature-quantized multi-source gas data. The historical user gas consumption data analysis module is used to acquire historical user gas consumption data, perform feature analysis and gas consumption habit analysis on the historical user gas consumption data, combine the feature analysis results with the gas characteristic model to construct a user gas consumption characteristic model, and determine the gas consumption stability coefficient through the gas consumption habit analysis results. The current user gas consumption data analysis module is used to acquire current user gas consumption data, input the current user gas consumption data into the user gas consumption feature model for anomaly detection, and obtain the user gas consumption deviation. An anomaly detection module is used to comprehensively calculate the user's gas usage deviation and the gas usage stability coefficient to obtain an anomaly detection result.

5. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the gas theft and leakage anomaly detection method based on user gas usage habits as described in any one of claims 1 to 3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the gas theft and leakage anomaly detection method based on user gas usage habits as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method and system of detection for discovering suspected gas leakage based on abnormal behavior of gas use

    CN105185051A

  • Gas anomaly detection method based on user portrait

    CN113516313A