Production-sales difference rate abnormality detection method and system, electronic device, and readable storage medium

By integrating water volume data and using Gaussian hybrid model and Gaussian cloud transformation model, the accuracy and explanatory problems of traditional methods when monitoring the production and sales difference in DMA cells are solved, and more efficient and accurate abnormality detection is achieved.

CN119294918BActive Publication Date: 2025-04-01HEBEI JIANTOU WATER INVESTMENT CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411806187.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-01
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

When monitoring the production and sales difference between DMA communities, traditional methods are difficult to fully consider the differences in management level, pipeline characteristics and instrument accuracy, and lack reasonable explanation of abnormal detection results.

Method used

By integrating the data of the water quantity assessment table and the water quantity user table, using the data frequency distribution chart and the Gaussian mixed model, the digital characteristics of the Gaussian cloud transformation model were calculated, and the fitted curve chart of the two concepts was obtained, and the abnormal threshold of the production and sales difference was determined for detection.

Benefits of technology

The accuracy of production and sales difference calculation and data processing accuracy are improved, the detection results are given stronger interpretability, and the specific situation of each cell is more accurately reflected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119294918B_ABST
    Figure CN119294918B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and system for detecting anomalies in the production-sales difference rate, an electronic device, and a readable storage medium, and belongs to the field of water data processing technology. The method includes: obtaining target production-sales difference rate data for each community based on the water quantity assessment table data and water quantity user table data of each community within the first time; obtaining a data frequency distribution diagram based on the target production-sales difference rate data, and obtaining two Gaussian distributions based on the data frequency distribution diagram and a Gaussian mixture model; calculating the digital features of the Gaussian cloud transformation model based on the overlapping results between the two Gaussian distributions, and obtaining fitting curve diagrams of two concepts based on the digital features of the Gaussian cloud transformation model; determining the intersection of the fitting curve diagrams of the two concepts as the anomaly threshold of the target production-sales difference rate data, and performing anomaly detection on the target production-sales difference rate data based on the anomaly threshold. The present disclosure can not only improve the calculation accuracy of the production-sales difference rate, but also has stronger interpretability for the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the technical field of water data processing, and more specifically, to a method and system for detecting anomalies in production-sales difference rate, an electronic device, and a readable storage medium. Background Art

[0002] In water management, monitoring the difference between production and sales in DMA (District Metering and Management Area) is an important indicator for measuring the operating efficiency of the water supply system and detecting leakage. However, the normal range of the difference between production and sales in DMA in traditional methods usually relies on fixed standard values ​​or empirical values, which makes it difficult to fully consider the differences in management level, pipe network characteristics, instrument accuracy, etc. of each community, and lacks reasonable explanation for abnormal detection results. Summary of the invention

[0003] The purpose of the present disclosure is to provide a method and system for detecting anomalies in the production-sales difference rate, an electronic device, and a readable storage medium, so as to improve the calculation accuracy of the production-sales difference rate and give the detection results stronger interpretability.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for detecting anomaly in a production-sales difference ratio is provided, comprising:

[0005] According to the water quantity assessment table data and water quantity user table data of each district in the first time, the target production and sales difference rate data of each district is obtained;

[0006] A data frequency distribution graph is obtained based on the target production-sales difference rate data, and two Gaussian distributions are obtained based on the data frequency distribution graph and a Gaussian mixture model;

[0007] Calculating digital features of a Gaussian cloud transformation model based on the overlapping results between the two Gaussian distributions, and obtaining fitting curve graphs of two concepts based on the digital features of the Gaussian cloud transformation model;

[0008] The intersection point of the fitting curve graphs of the two concepts is determined as the abnormal threshold of the target production-sales difference rate data, and the target production-sales difference rate data is subjected to abnormality detection based on the abnormal threshold.

[0009] According to a second aspect of the embodiments of the present disclosure, a production-sales difference rate anomaly detection system is provided, comprising:

[0010] A data acquisition module, used to obtain target production-sales difference rate data of each community according to the water quantity assessment table data and water quantity user table data of each community within the first time;

[0011] A first processing module, configured to obtain a data frequency distribution diagram based on the target production-sales difference rate data, and obtain two Gaussian distributions based on the data frequency distribution diagram and a Gaussian mixture model;

[0012] a second processing module, configured to calculate digital features of a Gaussian cloud transformation model based on an overlap result between the two Gaussian distributions, and obtain fitting curve graphs of two concepts based on the digital features of the Gaussian cloud transformation model, wherein the Gaussian cloud transformation model is a model corresponding to the Gaussian mixture model;

[0013] The anomaly detection module is used to determine the intersection of the fitting curve graphs of the two concepts as the anomaly threshold of the target production-sales difference rate data, and perform anomaly detection on the target production-sales difference rate data based on the anomaly threshold.

[0014] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned method for detecting abnormal production and sales difference rate when executing the computer program.

[0015] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for detecting anomalies in the production-sales difference rate are implemented.

[0016] The beneficial effects of the production-sales difference rate anomaly detection method and system, electronic device, and readable storage medium provided by the embodiments of the present disclosure are:

[0017] On the one hand, the present disclosure can quickly calculate the target production-sales difference rate data of each community by integrating the data of the community water quantity assessment table and the water quantity user table. Furthermore, by using the data frequency distribution diagram and the Gaussian mixture model, two Gaussian distributions can be accurately fitted, thereby more accurately describing the distribution of the data. This processing method not only improves the accuracy of data processing, but also greatly improves the processing efficiency, making data analysis work more efficient.

[0018] On the other hand, the present disclosure uses Gaussian cloud transformation to conceptually characterize the production-sales difference rate, which can more accurately reflect the specific situation of each community. First, the production-sales difference rate data is used to generate a Gaussian distribution with two overlapping concepts, and then the normal range and abnormal threshold of the production-sales difference rate are obtained through the intersection of the Gaussian cloud. The present disclosure not only improves the calculation accuracy of the production-sales difference rate, but also gives the detection results stronger interpretability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flow chart of a method for detecting anomalies in the production-sales difference rate provided in one embodiment of the present disclosure;

[0021] Figure 2 A frequency distribution diagram of the production-sales difference rate data provided by an embodiment of the present disclosure;

[0022] Figure 3 A conceptual diagram of Gaussian distribution provided in an embodiment of the present disclosure;

[0023] Figure 4 A structural block diagram of a production-sales difference rate anomaly detection system provided by an embodiment of the present disclosure;

[0024] Figure 5 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0025] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0026] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0027] Please refer to Figure 1 , Figure 1 A flow chart of a method for detecting anomaly of the production-sales difference rate provided in an embodiment of the present disclosure is provided, and the method comprises:

[0028] S101: Obtain target production-sales difference rate data for each community based on the water volume assessment table data and water volume user table data for each community within the first time.

[0029] In this embodiment, the monitoring of the production-sales difference rate of the District Metered Area (DMA) is an important indicator for measuring the operating efficiency of the water supply system and detecting leakage. DMA district metering is to divide the existing water supply network into several relatively independent sub-areas according to certain principles to achieve separate measurement of water consumption in each area. The first time is a time period for data collection, such as 8 hours or 1 hour, depending on the frequency and accuracy requirements of the detection.

[0030] Water quantity assessment table data refers to the data used to assess the water supply of water supply systems or water supply enterprises. These data are usually provided by the upstream or management department of the water supply system, reflecting the total amount of water supplied by the water supply system to each community or user area within a specific time period (such as the first time).

[0031] Water user meter data refers to the actual water usage data of users, which is usually provided by water meters installed at the user end. These water meters record the actual water usage of users in a specific time period (such as the first time). By comparing the water assessment table data and the water user meter data, the production and sales gap rate of the water supply system can be evaluated.

[0032] The production and sales difference rate (also known as the production and sales difference or water supply leakage rate) is an important indicator in the management of water supply systems or water supply enterprises. It is used to measure the water loss caused by various reasons (such as leakage, evaporation, illegal water use, etc.) during the water supply process.

[0033] In this embodiment, because the data collection frequencies of different user tables and assessment tables are different, a time period can be set for data collection. For example, the water quantity assessment table data and water quantity user table data of each community within 30 minutes are collected, and the collected data are pre-processed to obtain the target production and sales difference rate data of each community.

[0034] S102: Obtain a data frequency distribution diagram based on the target production-sales difference rate data, and obtain two Gaussian distributions based on the data frequency distribution diagram and a Gaussian mixture model.

[0035] In this embodiment, the data frequency distribution diagram is a diagram used to show the distribution of a set of data values ​​within a specific range. In the data frequency distribution diagram, the data is divided into several groups (or "intervals"), and the frequency can be obtained by counting the number of data points in each interval. Through the data frequency distribution diagram, you can intuitively understand the centralization trend, dispersion degree, possible outliers and other information of the data.

[0036] Gaussian Mixture Model (GMM) is a commonly used probability model that represents the distribution of data through a weighted combination of multiple Gaussian distributions, that is, it can convert the entire frequency distribution function in the problem domain into a superposition of multiple Gaussian distributions.

[0037] Each Gaussian distribution has a mean and variance Parameterized, its probability density function p is:

[0038]

[0039] GMM expresses the probability density function of data by weighting multiple Gaussian distributions. Specifically, assuming that the data Depend on Gaussian distributions are mixed, and the weight of each distribution is , , then the probability density function of the mixed model is:

[0040]

[0041] According to the set estimation accuracy and number of iterations, the Expectation Maximization (EM) algorithm can be used to estimate the parameters of GMM, which provides a basis for converting the frequency distribution of data samples into the generation and division of multi-granularity concepts.

[0042] In this embodiment, the method for obtaining the data frequency distribution diagram based on the target production-sales difference rate data is as follows:

[0043] Determine the overall range of the data based on the maximum and minimum values ​​of the target production-sales difference rate data.

[0044] According to the overall scope and characteristics of the data, the data is divided into several groups (or intervals). The number of groups can be determined according to the distribution of the data and the analysis requirements.

[0045] Count the data points in each group to get the frequency of each group. Based on the frequency of each group, use Excel, Python (such as matplotlib library) or other data visualization tools to draw a bar chart, which is the frequency distribution chart of the target production-sales difference rate data.

[0046] Two Gaussian distributions can be obtained based on the data frequency distribution diagram and the Gaussian mixture model.

[0047] S103: Calculate digital features of the Gaussian cloud transformation model based on the overlapping results between the two Gaussian distributions, and obtain fitting curve graphs of the two concepts based on the digital features of the Gaussian cloud transformation model.

[0048] In this embodiment, the Gaussian cloud transformation model is a data processing and analysis method that combines the Gaussian mixture model and the Gaussian cloud model. The Gaussian cloud transformation model can transform data distribution into concepts of multiple granularities, thereby solving the generation, selection and optimization problems of the number, granularity and hierarchy of concepts in variable granularity computing.

[0049] Among them, the Gaussian cloud model is a mathematical model that combines quantitative data with qualitative concepts and is used to deal with complex problems with randomness and fuzziness. It describes the distribution and uncertainty of data through three parameters: expectation (Ex), entropy (En), and hyper-entropy (He). The Gaussian cloud model uses the forward Gaussian cloud algorithm and the reverse Gaussian cloud algorithm to realize the mutual conversion between the three parameters of a qualitative concept and a set of quantitative data samples.

[0050] The cloud droplet group set of Gaussian cloud is obtained by the forward Gaussian cloud algorithm. This set is an expectation of , the variance is The cloud droplet cluster based on Gaussian cloud uses the inverse Gaussian cloud algorithm to obtain the three parameters of the Gaussian cloud model (expectation, entropy and super entropy). The concept ambiguity is obtained based on entropy and super entropy.

[0051] The Gaussian distribution functions of the two concepts are constructed using the digital features (entropy, hyperentropy, and concept mixing degree) extracted from the Gaussian cloud transformation model. By plotting the curve graphs of these Gaussian distribution functions, the distribution and overlap of the two concepts in the data space can be intuitively displayed. Fitting curve graphs are often used to compare and display the similarities and differences between different data distributions, as well as their trends with variable changes.

[0052] S104: Determine the intersection of the fitting curve graphs of the two concepts as the abnormal threshold of the target production-sales difference rate data, and perform abnormality detection on the target production-sales difference rate data based on the abnormal threshold.

[0053] In this embodiment, the intersection of the two fitting curves is determined based on the fitting curve graphs of the two concepts, and the intersection is used as a threshold for judging whether the target production-sales difference rate data is abnormal. With the abnormal threshold, the target production-sales difference rate data can be compared one by one to determine which data points are beyond the normal range. If the production-sales difference rate of a data point is higher or lower than the abnormal threshold, it will be regarded as an abnormal data point.

[0054] From the above, it can be concluded that, on the one hand, the present disclosure can quickly calculate the target production-sales difference rate data of each community by integrating the data of the community water quantity assessment table and the water quantity user table. Furthermore, by using the data frequency distribution diagram and the Gaussian mixture model, two Gaussian distributions can be accurately fitted, thereby more accurately describing the distribution of the data. This processing method not only improves the accuracy of data processing, but also greatly improves the processing efficiency, making data analysis work more efficient.

[0055] On the other hand, the present disclosure uses Gaussian cloud transformation to conceptually characterize the production-sales difference rate, which can more accurately reflect the specific situation of each community. First, the production-sales difference rate data is used to generate a Gaussian distribution with two overlapping concepts, and then the normal range and abnormal threshold of the production-sales difference rate are obtained through the intersection of the Gaussian cloud. The present disclosure not only improves the calculation accuracy of the production-sales difference rate, but also gives the detection results stronger interpretability.

[0056] In one embodiment of the present disclosure, the water volume user table data includes first user water volume user table data and second user water volume user table data, and the collection frequency of the first user water volume user table data is greater than that of the second user water volume user table data;

[0057] According to the water quantity assessment table data and water quantity user table data of each community in the first time, the target production and sales difference rate data of each community is obtained, including:

[0058] The initial data of the production-sales difference rate of each district is obtained according to the water quantity assessment table data and water quantity user table data of each district in the first time, and the initial data of the production-sales difference rate is preprocessed to obtain the target initial data of the production-sales difference rate.

[0059] The initial data of the production-sales difference rate is calculated according to the first formula, which is:

[0060]

[0061] Among them, diff represents the initial data of the production and sales difference rate of each community, MM represents the water volume assessment table data, UM1 represents the first user water volume user table data, and UM2 represents the second user water volume user table data.

[0062] In this embodiment, the first user is a large user, and the second user is a small user. The data collection frequency of the large user table can be a times / hour, and the data collection frequency of the small user table can be b times / hour. The data collection frequency of the assessment table can be c times / hour. All instrument data are summarized once every first time.

[0063] For example, a is 12, b is 2, and c is 60, which means that the data of the large user table is collected every 5 minutes, the data of the small user table is collected every 30 minutes, and the data of the assessment table is collected every minute.

[0064] The initial data of the production-sales difference rate of each community is calculated as follows: first calculate the data of the total user table as UM=UM1+UM2, then calculate the data of the assessment table as MM, then the initial data of the production-sales difference rate is .

[0065] Due to different instrument accuracy, equipment damage, equipment replacement and other issues, the initial data of the production and sales difference rate will have a small number of negative values, missing values ​​and abnormal values ​​greater than 10%. Negative values ​​and abnormal values ​​greater than 10% are directly discarded. The production and sales difference rate data between [0, 0.1] are normal data or non-equipment related abnormal data generated by leakage. In order to facilitate the generation of frequency distribution diagrams and perform Gaussian cloud transformation, the production and sales difference rate data of [0, 0.1] are divided with a granularity of 0.001 to generate 100 groups of frequency data. The initial data of the production and sales difference rate are preprocessed to obtain the target initial data of the production and sales difference rate.

[0066] It can be concluded from the above that this embodiment can more comprehensively reflect the water usage of the community and improve the accuracy of the production and sales difference rate calculation by integrating the first user water volume user table data and the second user water volume user table data (where the first user data is collected more frequently). At the same time, the initial data of the production and sales difference rate is preprocessed to further ensure the reliability of the target production and sales difference rate data, providing a solid foundation for subsequent abnormality detection.

[0067] In one embodiment of the present disclosure, the digital features of the Gaussian cloud transformation model are calculated based on the overlap result between two Gaussian distributions, including:

[0068] The entropy, super entropy and concept ambiguity of the Gaussian cloud transform model are calculated based on the overlap between two Gaussian distributions.

[0069] That is, if the weak peripheral elements of two Gaussian distributions do not overlap, the entropy of the Gaussian cloud transformation model is , super entropy is 0, and conceptual ambiguity is 0;

[0070] If the weak peripheral elements of two Gaussian distributions overlap, the entropy is , based on the first formula, we get the super entropy, and based on the second formula, we get the concept ambiguity; where k represents the kth Gaussian distribution.

[0071] The first formula includes:

[0072]

[0073] The second formula includes:

[0074]

[0075] in, represents super entropy, represents entropy, , It represents the proportion of weak peripheral elements that do not overlap between the kth Gaussian distribution and the adjacent Gaussian distribution on the left. It represents the proportion of weak peripheral elements that do not overlap between the k-th Gaussian distribution and the adjacent Gaussian distribution on the right; Indicates the ambiguity of the concept corresponding to the k-th Gaussian distribution.

[0076] In this embodiment, the concept ambiguity in the Gaussian cloud is , which can be extended to Gaussian transformation to measure the degree of overlap of concepts. In Gaussian transformation, the degree of consensus of concepts is closely related to their overlap. Less overlap means that the concept division is clearer, the extension is more concentrated, and it is easy to reach a consensus; while more overlap means that the extension of the concept is more dispersed, the division is chaotic, and it is difficult to reach a consensus.

[0077] For the kth Gaussian distribution, we need to calculate the degree of overlap between it and the two adjacent Gaussian distributions on the left and right. If the weak peripheral elements of the Gaussian distribution do not overlap with the weak peripheral elements of the adjacent distributions, it means that the concept division represented by the Gaussian distribution is very clear, and the entropy of the Gaussian cloud transformation model is , the super entropy is If the weak peripheral elements of the Gaussian distribution overlap with the weak peripheral elements of the adjacent distribution, it means that there is an unclear area between the concept represented by the Gaussian distribution and the adjacent concept. In this case, keep the expected value unchanged and calculate the proportion of weak peripheral elements that do not overlap with the adjacent concept on the left by scaling ,satisfy , and the proportion of weak peripheral elements that do not overlap with the adjacent concepts on the right ,satisfy At this time, the standard deviation of the kth Gaussian distribution varies within a range of ,in, .

[0078] According to the definition of Gaussian cloud, entropy is the expectation of standard deviation, super entropy is the standard deviation of standard deviation, and it conforms to 3 Therefore, we can calculate the Gaussian cloud parameters of the concept, , , , ,in For the The relationship between concept ambiguity and concept overlap is shown in Table 1.

[0079] Table 1 Relationship between concept ambiguity and concept overlap

[0080]

[0081] Based on the advantages of the above-mentioned Gaussian cloud transformation, this embodiment proposes to use Heuristic Gaussian Cloud Transformation (H-GCT) to detect anomalies in the production and sales difference rate of DMA cells. H-GCT is an iterative cycle process that fits the data distribution by continuously adjusting and optimizing the parameters of the cloud model. H-GCT has higher flexibility and adaptability and can fit complex data distribution more accurately.

[0082] The H-GCT method first inputs the sample , set the number of concepts to K. Based on the number of concepts , using the GMM algorithm to transform the data sample set Convert to Gaussian distribution; for Gaussian distribution, calculate the scaling factor of its standard deviation , and the Gaussian cloud parameters , , , According to the ambiguity Gaussian distributions are sorted and output.

[0083] In this embodiment, K is 2, that is, two Gaussian distributions. First, the initial Gaussian cloud parameters are solved according to the local characteristics of the input target production-sales difference rate data. , , , Then, the difference between the actual data distribution and the expected curve of the cloud model is used as a new curve, and an iterative cycle is performed on this basis to continuously solve and optimize the parameters of the cloud model, and finally two fitting curves corresponding to the concepts of the two Gaussian distributions are obtained. The intersection of the two fitting curves is the abnormal threshold.

[0084] It can be concluded from the above that this embodiment uses heuristic Gaussian cloud transform to detect anomalies in the production and marketing difference rate of DMA communities, which significantly improves the accuracy and flexibility of detection. H-GCT iteratively optimizes cloud model parameters, accurately fits complex data distribution, and effectively distinguishes normal from abnormal production and marketing difference rates. This method not only reduces the false alarm rate, but also enhances the adaptability of the system, provides strong support for the production and marketing management of DMA communities, helps to timely discover and solve production and marketing difference problems, and improves the efficiency of water resource management.

[0085] In one embodiment of the present disclosure, anomaly detection is performed on target production-sales difference rate data based on an abnormality threshold, including:

[0086] If the target production-sales difference rate data is greater than the abnormal threshold, the target production-sales difference rate data is an abnormal value;

[0087] If the target production-sales difference rate data is less than or equal to the abnormal threshold, the target production-sales difference rate data is a normal value.

[0088] In this embodiment, the intersection of two relatively clear concepts of normal and abnormal is obtained through heuristic Gaussian cloud transformation, so as to obtain the boundary value of the normal range and abnormal range of the production and sales difference rate specific to the DMA community, that is, the abnormal threshold. The target production and sales difference rate data is compared with the abnormal threshold. If the target production and sales difference rate data is greater than the abnormal threshold, the data is determined to be an abnormal value. This means that the production and sales difference rate exceeds the normal fluctuation range of the DMA community, indicating that there may be a problem of abnormal leakage in the pipeline network. If the target production and sales difference rate data is less than or equal to the abnormal threshold, the data is determined to be a normal value. This means that the production and sales difference rate is within the normal fluctuation range of the DMA community and meets business expectations.

[0089] In this embodiment, after performing anomaly detection on the target production-sales difference rate data based on the anomaly threshold, the production-sales difference rate anomaly detection method further includes:

[0090] If the production-sales difference rate data of the target cell is an abnormal value, the target cell is marked as an abnormal cell, and the maintenance strategy of the water supply system is determined according to the magnitude of the production-sales difference rate data and a first threshold; the first threshold is greater than the abnormal threshold.

[0091] The maintenance strategy of the water supply system is determined according to the difference between the production and sales rate data and the first threshold, including:

[0092] If the production-sales difference rate data of the target community is greater than the first threshold, determining the maintenance strategy of the water supply system to be the first maintenance strategy;

[0093] If the production-sales difference rate data of the target community is less than or equal to the first threshold, the maintenance strategy of the water supply system is determined to be the second maintenance strategy; the first maintenance strategy includes maintenance of water meter measurement, and the second maintenance strategy includes maintenance of water supply pipelines.

[0094] Determining a maintenance strategy for the water supply system according to the difference between the production and sales rate data and the first threshold value also includes:

[0095] If the production-sales difference rate data of the target community is greater than the first threshold, the collection time interval of the water quantity assessment table data and the water quantity user table data is adjusted according to the environmental characteristics of the target community.

[0096] The basic collection time interval of the target cell is T0, and the collection time interval of the target cell is obtained by the third formula. The third formula is:

[0097] ,in

[0098] The simplified third formula is:

[0099]

[0100] Where T represents the current collection time interval of the target cell, Indicates the basic collection time interval of the target cell, m indicates the number of parameters negatively correlated with the collection time interval, n indicates the number of parameters positively correlated with the collection time interval, m and n are positive integers, represents the standard eigenvector corresponding to the i-th parameter that is positively correlated with the acquisition time interval, represents the standard eigenvector corresponding to the jth parameter that is negatively correlated with the acquisition time interval, represents the i-th target feature vector that is positively correlated with the acquisition time interval, represents the jth target feature vector that is negatively correlated with the acquisition time interval, Represents a non-zero number.

[0101] In this embodiment, the parameter positively correlated with the collection time interval can be the laying pipeline of the target community, and the parameter negatively correlated with the collection time interval can be the residential community housing parameters corresponding to the target community, the third-party construction activity parameters in the target community, etc. The above-mentioned related parameters can be extracted by principal component analysis, independent component analysis, wavelet transform, convolutional neural network, etc. to obtain the target feature vector. The setting is related to the above-mentioned features, so this embodiment can make the current collection time interval of the target cell more accurate.

[0102] In this embodiment, when the production-sales difference rate data is greater than the first threshold, the first maintenance strategy is adopted; when the production-sales difference rate data is less than or equal to the first threshold, the second maintenance strategy is adopted. This hierarchical maintenance strategy setting is based on different degrees of production-sales difference rate abnormalities to formulate more targeted maintenance measures.

[0103] The first maintenance strategy focuses on the maintenance of water meter measurement, because when the production and sales difference rate is relatively high, the probability of inaccurate water meter measurement (such as water meter aging, damage or tampering) is higher. The second maintenance strategy is mainly to maintain the water supply pipeline, considering that when the production and sales difference rate is relatively higher and still in the abnormal range, physical leakage of the water supply pipeline (such as pipeline aging, damage, etc.) is the main cause.

[0104] In the case where the production-sales difference rate data is greater than the first threshold, it is also necessary to adjust the collection time interval of the water quantity assessment table data and the water quantity user table data according to the environmental characteristics of the target community. This is because environmental characteristics will affect the stability of the water supply system and the production-sales difference rate. As can be seen from the third formula, this embodiment comprehensively considers environmental factors such as the construction age of the residential community, the pipeline laying depth, and the third-party construction activity, and adjusts the basic collection time interval. When the residential community is built for a long time, the pipeline is laid shallowly, or the third-party construction activity is high, the collection time interval of the target community is shorter than the basic collection time interval, which means that data needs to be collected more frequently in order to promptly discover and solve the problems that lead to abnormally high production-sales difference rates.

[0105] It can be concluded from the above that for the production-sales difference rate points that exceed the abnormal threshold, the system automatically marks them as abnormal points, thereby improving the accuracy and reliability of the production-sales difference rate abnormality detection. The abnormality detection method provided in this embodiment effectively overcomes the problem that the traditional detection method based on standard values ​​or experience values ​​cannot reflect the personalized characteristics of DMA cells, and provides more explanatory abnormality detection results, which are suitable for different types of pipe network systems.

[0106] In one embodiment of the present disclosure, the water volume data of site A from August 1, 2021 to October 29, 2021 and from March 31, 2022 to November 9, 2022 are used for analysis. The corresponding initial data of the production-sales difference rate are calculated based on the data of the assessment table and user table of site A. The initial data of the production-sales difference rate is preprocessed and converted into a frequency distribution diagram, such as Figure 2 As shown. Figure 2 It can be seen that the original data has a lot of peaks and the data frequency curve is seriously jittery. After processing the production and sales difference rate data using the heuristic Gaussian cloud transform, two concepts can be obtained, such as Figure 3 As shown. Figure 3 It can be seen that the superposition of the two Gaussian clouds (equivalent to the concept of Gaussian distribution) corresponding to the initial concept obtained by the heuristic Gaussian cloud transformation basically reflects the distribution of the actual data. The production and sales difference rate at the intersection of the two Gaussian clouds is 39‰, which can be considered as the critical value between normal and abnormal production and sales difference rate, that is, the production and sales difference rate greater than 3.9‰ is an abnormal production and sales difference rate.

[0107] In this embodiment, Figure 2 , Figure 3 The horizontal axis represents the production-sales difference rate, the unit is ‰, and the vertical axis represents the probability (that is, the statistical result under a certain production-sales difference rate data), without unit.

[0108] The concept of normal production and sales margin is 21.535‰, is 8.958‰, The concept of abnormal production and sales difference rate is 1.217‰. is 61.663‰, is 13.625‰, The ambiguity of the two concepts is 1.852‰. It is 0.4077. , which shows that the qualitative descriptions of the two concepts are relatively mature and the conceptual divisions are relatively clear.

[0109] Corresponding to the production-sales difference rate abnormality detection method in the above embodiment, Figure 4 This is a structural block diagram of a production-sales difference rate anomaly detection system provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 4 The production-sales difference rate anomaly detection system 20 includes: a data acquisition module 21, a first processing module 22, a second processing module 23 and an anomaly detection module 24.

[0110] The data acquisition module 21 is used to obtain the target production-sales difference rate data of each community according to the water quantity assessment table data and water quantity user table data of each community within the first time.

[0111] The first processing module 22 is used to obtain a data frequency distribution diagram based on the target production-sales difference rate data, and obtain two Gaussian distributions based on the data frequency distribution diagram and a Gaussian mixture model.

[0112] The second processing module 23 is used to calculate the digital features of the Gaussian cloud transformation model based on the overlapping results between the two Gaussian distributions, and obtain the fitting curve graphs of the two concepts based on the digital features of the Gaussian cloud transformation model. The Gaussian cloud transformation model is a model corresponding to the Gaussian mixture model.

[0113] The anomaly detection module 24 is used to determine the intersection of the fitting curve graphs of the two concepts as the anomaly threshold of the target production-sales difference rate data, and perform anomaly detection on the target production-sales difference rate data based on the anomaly threshold.

[0114] In one embodiment of the present disclosure, the data acquisition module 21 is specifically used for:

[0115] The initial data of the production-sales difference rate of each district is obtained based on the water quantity assessment table data and water quantity user table data of each district in the first time.

[0116] The initial data of the production-sales difference rate is preprocessed to obtain the target initial data of the production-sales difference rate.

[0117] In an embodiment of the present disclosure, the water user table data includes first user water user table data and second user water user table data, and the collection frequency of the first user water user table data is greater than that of the second user water user table data.

[0118] The data acquisition module 21 is specifically used for:

[0119] The initial data of the production-sales difference rate is calculated according to the first formula, which is:

[0120]

[0121] Among them, diff represents the initial data of the production and sales difference rate of each community, MM represents the water volume assessment table data, UM1 represents the first user water volume user table data, and UM2 represents the second user water volume user table data.

[0122] In one embodiment of the present disclosure, the second processing module 23 is specifically used for:

[0123] The entropy, super entropy and concept ambiguity of the Gaussian cloud transform model are calculated based on the overlap between two Gaussian distributions.

[0124] In one embodiment of the present disclosure, the second processing module 23 is specifically used for:

[0125] If the weak peripheral elements of the two Gaussian distributions do not overlap, the entropy of the Gaussian cloud transformation model is , super entropy is 0, and conceptual ambiguity is 0;

[0126] If the weak peripheral elements of two Gaussian distributions overlap, the entropy is , based on the first formula, we get the super entropy, and based on the second formula, we get the concept ambiguity; where k represents the kth Gaussian distribution.

[0127] In one embodiment of the present disclosure, the first formula includes:

[0128]

[0129] The second formula includes:

[0130]

[0131] in, represents super entropy, represents entropy, , It represents the proportion of weak peripheral elements that do not overlap between the kth Gaussian distribution and the adjacent Gaussian distribution on the left. It represents the proportion of weak peripheral elements that do not overlap between the k-th Gaussian distribution and the adjacent Gaussian distribution on the right; Indicates the ambiguity of the concept corresponding to the k-th Gaussian distribution.

[0132] In one embodiment of the present disclosure, the anomaly detection module 24 is specifically used to:

[0133] If the target production-sales difference rate data is greater than the abnormal threshold, the target production-sales difference rate data is an abnormal value;

[0134] If the target production-sales difference rate data is less than or equal to the abnormal threshold, the target production-sales difference rate data is a normal value.

[0135] See also Figure 5 , Figure 5 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 5 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned system embodiments, such as Figure 4 The functions of modules 21 to 24 are shown.

[0136] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0137] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0138] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0139] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure can execute the implementation methods described in the first and second embodiments of the production and sales difference rate anomaly detection method provided in the embodiments of the present disclosure, and can also execute the implementation methods of the electronic device described in the embodiments of the present disclosure, which will not be repeated here.

[0140] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0141] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0142] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0144] In the several embodiments provided in the present application, it should be understood that the disclosed electronic device and method can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0145] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0146] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0147] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for detecting abnormal production-sales difference rate, characterized in that: include: According to the water quantity assessment table data and water quantity user table data of each district in the first time, the target production and sales difference rate data of each district is obtained; The water quantity assessment table data refers to the data used to assess the water supply of the water supply system or water supply enterprise, and the water quantity user table data refers to the water quantity data actually used by the user; A data frequency distribution graph is obtained based on the target production-sales difference rate data, and two Gaussian distributions are obtained based on the data frequency distribution graph and a Gaussian mixture model; The digital features of the Gaussian cloud transformation model are calculated based on the overlapping results between the two Gaussian distributions, and the fitting curve graphs of two concepts are obtained based on the digital features of the Gaussian cloud transformation model; the two concepts are the normal production-sales difference rate concept and the abnormal production-sales difference rate concept; The step of calculating the digital features of the Gaussian cloud transformation model based on the overlap result between the two Gaussian distributions includes: The entropy, super entropy and concept ambiguity of the Gaussian cloud transformation model are calculated based on the overlap result between the two Gaussian distributions, including: If the weak peripheral elements of the two Gaussian distributions do not overlap, the entropy of the Gaussian cloud transformation model is , super entropy is 0, and conceptual ambiguity is 0; If the weak peripheral elements of the two Gaussian distributions overlap, the entropy is , based on the first formula, we get the super entropy, and based on the second formula, we get the concept ambiguity; where k represents the kth Gaussian distribution; The first formula includes: The second formula includes: in, represents super entropy, represents entropy, , It represents the proportion of weak peripheral elements that do not overlap between the kth Gaussian distribution and the adjacent Gaussian distribution on the left. It represents the proportion of weak peripheral elements that do not overlap between the k-th Gaussian distribution and the adjacent Gaussian distribution on the right; Indicates the ambiguity of the concept corresponding to the k-th Gaussian distribution; The intersection point of the fitting curve graphs of the two concepts is determined as the abnormal threshold of the target production-sales difference rate data, and the target production-sales difference rate data is subjected to abnormality detection based on the abnormal threshold.

2. The method for detecting abnormal production-sales difference rate according to claim 1, characterized in that: The target production-sales difference rate data of each community is obtained according to the water quantity assessment table data and water quantity user table data of each community within the first time, including: According to the water quantity assessment table data and water quantity user table data of each community in the first time, the initial data of the production and sales difference rate of each community is obtained; The initial data of the production-sales difference rate is preprocessed to obtain the target initial data of the production-sales difference rate.

3. The method for detecting abnormality of the production-sales difference rate according to claim 2, characterized in that: The water volume user table data includes first user water volume user table data and second user water volume user table data, and the collection frequency of the first user water volume user table data is greater than that of the second user water volume user table data; The initial data of the production-sales difference rate of each district is obtained according to the water quantity assessment table data and water quantity user table data of each district within the first time, including: The initial data of the production-sales difference rate is calculated according to the first formula, which is: Among them, diff represents the initial data of the production and sales difference rate of each community, MM represents the water volume assessment table data, UM1 represents the first user water volume user table data, and UM2 represents the second user water volume user table data.

4. The method for detecting abnormal production-sales difference rate according to claim 1, characterized in that: The performing anomaly detection on the target production-sales difference rate data based on the anomaly threshold comprises: If the target production-sales difference rate data is greater than the abnormal threshold, the target production-sales difference rate data is an abnormal value; If the target production-sales difference rate data is less than or equal to the abnormal threshold, the target production-sales difference rate data is a normal value.

5. A production-sales difference rate abnormality detection system, characterized in that: include: A data acquisition module is used to obtain the target production-sales difference rate data of each community according to the water quantity assessment table data and water quantity user table data of each community within the first time; the water quantity assessment table data refers to the data used to assess the water supply of the water supply system or water supply enterprise, and the water quantity user table data refers to the water quantity data actually used by the user; A first processing module, configured to obtain a data frequency distribution diagram based on the target production-sales difference rate data, and obtain two Gaussian distributions based on the data frequency distribution diagram and a Gaussian mixture model; A second processing module is used to calculate the digital features of the Gaussian cloud transformation model based on the overlapping results between the two Gaussian distributions, and obtain fitting curve graphs of two concepts based on the digital features of the Gaussian cloud transformation model, wherein the Gaussian cloud transformation model is a model corresponding to the Gaussian mixture model; and the two concepts are a normal production-sales difference rate concept and an abnormal production-sales difference rate concept; The step of calculating the digital features of the Gaussian cloud transformation model based on the overlap result between the two Gaussian distributions includes: The entropy, super entropy and concept ambiguity of the Gaussian cloud transformation model are calculated based on the overlap result between the two Gaussian distributions, including: If the weak peripheral elements of the two Gaussian distributions do not overlap, the entropy of the Gaussian cloud transformation model is , super entropy is 0, and conceptual ambiguity is 0; If the weak peripheral elements of the two Gaussian distributions overlap, the entropy is , based on the first formula, we get the super entropy, and based on the second formula, we get the concept ambiguity; where k represents the kth Gaussian distribution; The first formula includes: The second formula includes: in, represents super entropy, represents entropy, , It represents the proportion of weak peripheral elements that do not overlap between the kth Gaussian distribution and the adjacent Gaussian distribution on the left. It represents the proportion of weak peripheral elements that do not overlap between the k-th Gaussian distribution and the adjacent Gaussian distribution on the right; Represents the ambiguity of the concept corresponding to the k-th Gaussian distribution; an anomaly detection module, used to determine the intersection of the fitting curve graphs of the two concepts as the anomaly threshold of the target production-sales difference rate data, and perform anomaly detection on the target production-sales difference rate data based on the anomaly threshold.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Water flow leakage alarming method, system and device and storage medium

    CN109827077A

  • Water network leakage detection method and device

    CN114135794A