A method and system for completing missing data of smart water meter

By identifying missing data segments in smart water meter data, analyzing and clustering water consumption data, and combining Bezier curve fitting and regression analysis methods to complete data, the problems of incomplete and inaccurate smart water meter data are solved, and the overall quality and reliability of the data are improved.

CN119322916BActive Publication Date: 2025-04-15SHANDONG QIXIN INTELLIGENT CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411864417.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-15
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Smart water meters are prone to missing or errors during data collection and transmission, resulting in data incompleteness and accuracy issues, affecting the water resource management and user services of water supply companies.

Method used

By obtaining the user's daily water consumption data curve, identifying missing data segments, analyzing the slope changes and the stability of the data curve, determining segmentation points, performing cluster analysis to construct standard water consumption data curves, and combining the Bezier curve fitting method and regression analysis method for data completion.

Benefits of technology

Significantly improve the integrity and accuracy of smart water meter data, ensuring that the complete data is consistent with overall trends and smooth transitions, providing reliable data support for water resource management and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322916B_ABST
    Figure CN119322916B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data statistics technology, and specifically to a method and system for completing missing data of a smart water meter. The present invention determines the initial segmentation points of the water consumption data curve by analyzing the slope change of the water consumption data curve, and further analyzes the variation index of the initial segmentation points to determine the segmentation points of the water consumption data curve; cluster analysis is performed on all segmentation points in the user's water consumption data curve for all days, and based on the clustering results, the user's standard water consumption data curve is constructed; and the missing data segments are completed by using a Bezier curve fitting method and a regression analysis method, respectively, combined with the change trend of the standard water consumption data curve. Through the method and system of the present invention, it is possible to obtain completed data that is both in line with the overall trend and smoothly transitions, significantly improve the integrity and accuracy of the data, and provide a more reliable data basis for subsequent water resources management and decision support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data anomaly detection, and in particular to a method and system for completing missing data of a smart water meter. Background Art

[0002] In the water resource management of residential areas, smart water meters are key water metering tools, and their data accuracy and integrity are crucial to the water supply company's billing, water resource allocation and user services. Smart water meters can record users' water consumption data in real time, and wirelessly transmit the data to the data center through the Internet of Things technology for subsequent processing and analysis. However, in actual applications, due to wireless signal interference, equipment failure, data transmission interruption or human error, the water consumption data collected by smart water meters is often missing or erroneous, which not only affects the integrity of the data, but also brings challenges to the water resource management and user services of the water supply company. Therefore, how to effectively complete the missing data of smart water meters and improve the accuracy and integrity of the data has become an urgent problem to be solved in the current water resource management.

[0003] As a common mathematical method, interpolation algorithms are widely used to complete the missing data of smart water meters. However, in practical applications, interpolation algorithms also face some technical problems. First, since smart water meter data usually has time series characteristics and is affected by a variety of external factors (such as weather, holidays, user water usage habits, etc.), traditional interpolation methods (such as linear interpolation, polynomial interpolation, etc.) may not be able to accurately capture the dynamic changes of data, resulting in a large deviation between the completed data and the actual data. Secondly, when there are a lot of missing data or they are missing continuously, the interpolation algorithm may not be able to find enough data points for interpolation, which affects the accuracy of the completed data. Summary of the invention

[0004] In order to solve the above technical problems, the object of the present invention is to provide a method and system for completing missing data of a smart water meter.

[0005] According to a first aspect of an embodiment of the present invention, a method for completing missing data of a smart water meter is provided, and the technical solution adopted is specifically as follows:

[0006] Obtain the user's daily water consumption data curve;

[0007] identifying missing data segments in the water consumption data curve;

[0008] Analyze the change of the slope of the water consumption data curve to determine the initial segmentation point of the water consumption data curve;

[0009] Analyze the differences between the data curve segments on both sides of the initial segmentation point, and analyze the stability of the data curve segments on both sides of the initial segmentation point, obtain the variation index of the initial segmentation point, and determine the segmentation point of the water consumption data curve;

[0010] Performing cluster analysis on all the segmentation points in the water consumption data curve of the user on all days, and constructing a standard water consumption data curve of the user based on the clustering results;

[0011] The Bezier curve fitting method and the regression analysis method are used respectively, and the water consumption data corresponding to the missing data segment in the standard water consumption data curve are combined to obtain the supplementary data of the missing data segment.

[0012] In some embodiments of the present invention, after identifying missing data segments in the water consumption data curve, the method further includes: analyzing the severity of the missing data segments and selecting a data completion method according to the severity.

[0013] In some embodiments of the present invention, analyzing the severity of the missing data segment and selecting a data completion method according to the severity includes:

[0014] Analyze the difference in water consumption data at both ends of the missing data segment and the time length of the missing data segment to obtain the severity of the missing data segment;

[0015] Set severity thresholds;

[0016] Comparing the magnitude relationship between the severity level and the severity threshold;

[0017] If the severity is less than the severity threshold, a linear interpolation algorithm is used to complete the missing data segment;

[0018] If the severity is greater than or equal to the severity threshold, the missing data segment is completed using a Bezier curve fitting method and a regression analysis method.

[0019] In some embodiments of the present invention, analyzing the slope change of the water consumption data curve to determine the initial segmentation point of the water consumption data curve includes:

[0020] Obtaining a slope sequence composed of the slopes of straight lines formed by all adjacent data points in the water consumption data curve;

[0021] The slope sequence is traversed to identify data points corresponding to changes in the positive and negative signs of the slopes, and all data points corresponding to changes in the positive and negative signs of the slopes are used as initial segmentation points of the water consumption data curve.

[0022] In some embodiments of the present invention, analyzing the difference between the data curve segments on both sides of the initial segmentation point, and analyzing the stability of the data curve segments on both sides of the initial segmentation point, obtaining the variation index of the initial segmentation point, and determining the segmentation point of the water consumption data curve, includes:

[0023] Analyze the first difference between the slopes of the data curve segments on both sides of the initial segmentation point, and analyze the second difference between the water consumption data in the data curve segments on both sides of the initial segmentation point to obtain the difference between the data curve segments on both sides of the initial segmentation point;

[0024] Respectively analyzing the discrete conditions of the water consumption data in the data curve segments on both sides of the initial segmentation point to obtain the stability of the data curve segments on both sides of the initial segmentation point;

[0025] According to the difference and the stability, a variation index of the initial segmentation point is obtained;

[0026] Set the variation index threshold;

[0027] If the variation index is greater than the variation index threshold, the initial segmentation point corresponding to the variation index is removed;

[0028] If the variation index is less than or equal to the variation index threshold, the initial segmentation point corresponding to the variation index is retained to obtain the segmentation point of the water consumption data curve.

[0029] In some embodiments of the present invention, cluster analysis is performed on all the segmentation points in the water consumption data curve of the user on all days, and based on the clustering results, a standard water consumption data curve of the user is constructed, including:

[0030] Performing cluster analysis on all the segmentation points in the water consumption data curve of the user on all days to obtain a plurality of clusters;

[0031] The center point of each cluster is selected as the user's water consumption characteristic segmentation point, and the water consumption data curve segment between two adjacent water consumption characteristic segmentation points is the water consumption characteristic segment;

[0032] Filtering the water consumption data curves in which all the segmentation points in the water consumption data curves are respectively present in the clusters as reference water consumption data curves;

[0033] The average water consumption of all the reference water consumption data curves is calculated to obtain the user's standard water consumption data curve.

[0034] In some embodiments of the present invention, the Bezier curve fitting method and the regression analysis method are used respectively, and the water consumption data corresponding to the missing data segment in the standard water consumption data curve are combined to obtain the supplementary data of the missing data segment, including:

[0035] Obtaining non-missing data points in the water use characteristic segment to which the missing data segment belongs;

[0036] In the process of fitting using the Bezier curve fitting method, the error between the non-missing data point and the corresponding data point in the standard water consumption data curve is analyzed; the variation trend of the error is analyzed to determine the error of the missing data segment, and the first predicted value of the missing data segment is obtained by combining the water consumption data corresponding to the missing data segment in the standard water consumption data curve;

[0037] Analyze the relative error between the non-missing data point and the corresponding data point in the standard water consumption data curve; based on the relative error, use a regression analysis method to obtain the relative error of all data points in the missing data segment, and combine the water consumption data corresponding to the missing data segment in the standard water consumption data curve to obtain a second predicted value for the missing data segment;

[0038] An average value of the first prediction value and the second prediction value is calculated as the completion data for the missing data segment.

[0039] In some embodiments of the present invention, the process of obtaining the complementary data of the missing data segment further includes:

[0040] The completed water consumption data is fully verified by comparing adjacent data points, analyzing the continuity and rationality of the time series, and cross-validating with other relevant data sources.

[0041] According to a second aspect of an embodiment of the present invention, a system for completing missing data of a smart water meter is provided, comprising: a memory and a processor, wherein:

[0042] The memory is used to store program codes;

[0043] The processor is used to read the program code stored in the memory and execute the method described in the first aspect of the embodiment of the present invention.

[0044] In some embodiments of the present invention, the processor comprises:

[0045] Water consumption data collection module, used to obtain the user's daily water consumption data curve;

[0046] A missing data segment identification module, used to identify missing data segments in the water consumption data curve;

[0047] The standard water consumption data curve construction module is first used to analyze the slope change of the water consumption data curve to determine the initial segmentation point of the water consumption data curve; then used to analyze the difference between the data curve segments on both sides of the initial segmentation point, and analyze the stability of the data curve segments on both sides of the initial segmentation point to obtain the variation index of the initial segmentation point and determine the segmentation point of the water consumption data curve; finally used to perform cluster analysis on all the segmentation points in the water consumption data curve of the user on all days, and based on the clustering results, construct the user's standard water consumption data curve;

[0048] The data completion analysis module is used to use the Bezier curve fitting method and the regression analysis method respectively, and to combine the water consumption data corresponding to the missing data segment in the standard water consumption data curve to obtain the completion data of the missing data segment.

[0049] Compared with the prior art, the present invention provides a method and system for completing missing data of a smart water meter. By accurately and comprehensively identifying the missing data segments in the water consumption data curve and evaluating the severity of these missing data segments, the missing data in different situations can be completed efficiently and reasonably. According to the change in the slope of the water consumption data curve, the segmentation points are preliminarily determined. These initial segmentation points reflect the turning points of the data change trend, which helps to better understand the change trend of the data. In order to further optimize the segmentation points, by calculating the variation index of each initial segmentation point, those initial segmentation points with large variation index, i.e., those showing a local reverse trend, are removed, thereby improving the stability and reliability of the data. Cluster analysis is performed on all the retained segmentation points to determine the data curve representing the standard water consumption behavior, thereby obtaining a more accurate and representative standard water consumption curve. Finally, the Bezier curve fitting method and regression analysis method are used, combined with the change trend of the standard water consumption data curve, to complete the missing data segments, thereby obtaining the completed data that is both in line with the overall trend and smoothly transitioned. Through the method and system of the present invention, the integrity and accuracy of the data can be significantly improved, providing a more reliable data basis for subsequent water resources management and decision support. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0051] Figure 1 A basic flow chart of a method for completing missing data of a smart water meter provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of the basic composition of a smart water meter missing data completion system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method and system for completing missing data of a smart water meter proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. Terms such as "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such article or device. In the absence of further restrictions, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the article or device including the element.

[0055] The specific scheme of the method for completing missing data of a smart water meter provided by the present invention is described in detail below with reference to the accompanying drawings.

[0056] See also Figure 1 , which shows the basic process of a method for completing missing data of a smart water meter provided by an embodiment of the present invention.

[0057] like Figure 1 As shown, an embodiment of the present invention provides a method for completing missing data of a smart water meter, which specifically includes:

[0058] S100: Obtain a user's daily water consumption data curve.

[0059] Taking any user in a residential community as a specific object, we first obtain the water consumption data of the user's smart water meter, and then wirelessly transmit the data to the data center through the Internet of Things technology. In addition, the user's daily water consumption data is used as a curve, that is, the user's daily water consumption data curve is obtained. This can clearly show the user's daily water consumption changes, and it is also convenient to summarize the user's daily water use patterns.

[0060] S200: Identify missing data segments in a water consumption data curve.

[0061] In the process of obtaining users' water consumption data and transmitting data, smart water meters will be affected by many factors such as signal interference, network failure, low voltage of water meter batteries, etc., resulting in the loss of final water consumption data, making the water consumption data obtained by water companies incomplete, which causes great trouble for water companies in data monitoring and analysis.

[0062] Missing data appears as null values ​​in the user's water consumption data curve, which means that the smart water meter failed to successfully record or transmit water consumption data at a certain point in time or within a period of time. On the other hand, the recorded water consumption data may not match the actual water consumption due to sensor failure. This type of data is manifested as a large difference between it and the previous adjacent water consumption data. When this type of false water consumption data appears, it is necessary to determine the authenticity of the subsequent water consumption data.

[0063] In addition to recording null values ​​as missing data, the threshold of the change value of water consumption data at adjacent monitoring moments is preset artificially, representing the maximum fluctuation range of water consumption data change at adjacent monitoring moments. When the water consumption data at two adjacent monitoring moments exceeds the threshold, the current data is also considered to be missing data. So far, the missing data segment of the user's water consumption data curve can be obtained, and the length of the missing data segment is uncertain.

[0064] S300: Analyze the severity of the missing data segment and select a data completion method according to the severity.

[0065] In the data processing process, the severity of the missing data segments in the entire data set is first evaluated. Specifically, when it is observed that the missing data segments are relatively short and the difference between the water consumption data values ​​at both ends of these missing data segments is also small, it is believed that the impact of these missing data on the overall data trend is limited. Based on this evaluation result, the linear interpolation algorithm is selected to fill in the missing data. The linear interpolation algorithm can reasonably infer and fill in the missing data points based on the linear relationship between known data points, thereby effectively reducing the analysis bias that may be caused by missing data while maintaining data continuity and trend consistency. However, when the missing data segments are relatively long and the difference between the water consumption data values ​​at both ends of these missing data segments is also large, it is believed that these missing data have a greater impact on the overall data trend. The traditional interpolation method may not be able to accurately capture the dynamic change characteristics of the data, resulting in a large deviation between the completed data and the actual data; secondly, when there are many missing data or continuous missing data, the interpolation algorithm may not be able to find enough data points for interpolation, which affects the accuracy of the completed data.

[0066] Based on the above analysis, in some embodiments of the present invention, the severity of the missing data segment is obtained by analyzing the difference in water consumption data at both ends of the missing data segment and the time length of the missing data segment. Specifically, the calculation formula for the severity of the missing data segment is:

[0067]

[0068] In the formula, Indicates the severity of the missing data segment; It represents the difference of water consumption data at both ends of the missing data segment; Indicates the length of time for the missing data segment; represents the linear normalization function.

[0069] The difference in water consumption data at both ends of the missing data segment If the missing data segment is larger, it means that the missing data segment may be in the transition section between two water use modes. Then the importance of the missing data segment relative to the entire data curve is greater, so the severity of the missing data segment is greater; the time length of the missing data segment If it is larger, it means that the time corresponding to the missing data segment is longer and the corresponding number of missing data is also larger. Then the importance of the missing data segment relative to the entire data curve is greater, so the severity of the missing data segment is greater.

[0070] Set the severity threshold of missing data segments, which can be 0.4. Compare the magnitude of the severity with the severity threshold; if the severity is less than the severity threshold, , then the impact of missing data on the overall data trend is limited, so the linear interpolation algorithm is used to complete the missing data segments, and the missing data segments are completed; if the severity is greater than or equal to the severity threshold, that is, , then the impact of missing data on the overall data trend is significant. In order to more accurately estimate and fill these missing data, Bezier curve fitting method and regression analysis method are used to complete the missing data segments.

[0071] By analyzing the severity of the missing data segments, the missing data segments with lower severity are supplemented by a linear interpolation algorithm, which can improve the efficiency of data supplementation while ensuring the accuracy of data supplementation. It should be noted that in some other embodiments, the severity of the missing data segments may not be judged, and the Bezier curve fitting method and regression analysis method may be directly used to supplement the missing data segments.

[0072] The missing data segments are completed using a Bezier curve fitting method and a regression analysis method. The specific method includes steps S400 to S700.

[0073] S400: Analyze the change in the slope of the water consumption data curve and determine the initial segmentation point of the water consumption data curve.

[0074] In order to more accurately estimate and fill in the missing data, it is necessary to conduct an in-depth analysis of the water consumption data curves for several days in the historical records. A detailed segmented evaluation is conducted on the user's water consumption behavior within a day. By dividing the time periods into different time periods, the water consumption characteristics within each specific time period are identified and determined. Based on these detailed water consumption characteristic regularity analyses, the approximate water consumption patterns of the time period where the missing data segments are located can be more reasonably quantified, thereby providing a more accurate basis for subsequent data completion.

[0075] Therefore, several historical water consumption data curves of the current user are obtained, and the water consumption data curves for each day are segmented.

[0076] First, the slope change of the water consumption data curve is analyzed to determine the initial segmentation point of the water consumption data curve. Specifically, a slope sequence consisting of the slopes of the straight lines formed by all adjacent data points in the water consumption data curve is obtained; the slope sequence is traversed to identify the data points corresponding to the change in the positive and negative signs of the slope, that is, the data points where the slope changes from positive to negative or from negative to positive, and all the data points corresponding to the change in the positive and negative signs of the slope are used as the initial segmentation points of the water consumption data curve.

[0077] S500: Analyze the difference between the data curve segments on both sides of the initial segmentation point, and analyze the stability of the data curve segments on both sides of the initial segmentation point, obtain the variation index of the initial segmentation point, and determine the segmentation point of the water consumption data curve.

[0078] For all initial segmentation points, it is necessary to determine whether the data points on both sides are in a stable state, and the local high points or local low points in the water consumption data segment need to be excluded (the water consumption data on both sides of the initial segmentation point form a small but obvious reverse trend). For example, a short and small downward trend appears during a segment of increasing water consumption data. However, the data of this local downward trend should also be included in the segment of increasing water consumption data, rather than as a new segment of decreasing water consumption data. It is necessary to determine whether this reverse trend is significant. If it is significant, retain this initial segmentation point because it may represent a real change in water consumption behavior.

[0079] Based on the above analysis, this embodiment obtains the variation index of the initial segmentation point and determines the segmentation point of the water consumption data curve by analyzing the difference between the data curve segments on both sides of the initial segmentation point and analyzing the stability of the data curve segments on both sides of the initial segmentation point.

[0080] Furthermore, by analyzing the first difference between the slopes of the data curve segments on both sides of the initial segmentation point and the second difference between the water consumption data in the data curve segments on both sides of the initial segmentation point, the difference between the data curve segments on both sides of the initial segmentation point is obtained; the discrete conditions of the water consumption data in the data curve segments on both sides of the initial segmentation point are analyzed respectively to obtain the stability of the data curve segments on both sides of the initial segmentation point; according to the difference and stability, the variation index of the initial segmentation point is obtained; thus, the calculation formula for constructing the variation index of the initial segmentation point is:

[0081]

[0082] In the formula, represents the variation index of the initial segmentation point; Indicates the preset number of data points on both sides of the initial segmentation point. The value of can be 5; Indicates the first segment in the data segment selected to the left of the current initial segmentation point. Water consumption data for each data point; It represents the mean value of water consumption data of all data points in the data segment selected to the left of the current initial segmentation point; Indicates the first segment of the data segment selected to the right of the current initial segmentation point. Water consumption data for each data point; It represents the mean value of water consumption data of all data points in the data segment selected to the right of the current initial segmentation point; They respectively represent the mean values ​​of the slopes of the straight lines formed by all adjacent data points in the data segments selected on both sides of the current initial segmentation point; Respectively represent the standard deviation of all data points in the data segments selected on both sides of the current initial segmentation point.

[0083] It represents the sum of the differences between the water consumption data of the data points in the data segments selected on both sides of the current initial segmentation point and the average value, which represents the stability of the data points in the data segments selected on both sides of the current initial segmentation point. The smaller the value, the more stable it is, that is, the current initial segmentation point is more likely to be a segmentation point caused by a local reverse trend; when the segmentation point is caused by a local reverse trend, the standard deviation of the data points on one side of the corresponding initial segmentation point will become smaller due to the reverse trend, and the slope of the data segment selected on one side will become relatively smaller due to the offset of the reverse trend, then the difference in the standard deviation of the data points in the data segments selected on both sides of the current initial segmentation point and the difference in the slope will become larger, that is, The larger the value.

[0084] Set the variation index threshold of the initial segmentation point, which can be 0.7; if the variation index is greater than the variation index threshold, , it means that the initial segmentation point may be caused by the local reverse trend, so the initial segmentation point corresponding to the variation index is eliminated; if the variation index is less than or equal to the variation index threshold, that is , it means that the initial segmentation point corresponding to the variation index may represent a real change in water use behavior, so the initial segmentation point is retained to obtain the segmentation point of the water consumption data curve.

[0085] So far, all the segmentation points of a water consumption data curve are obtained. Similarly, several segmentation points of the water consumption data curve of each day in the historical record can be obtained. The data segment between each two adjacent segmentation points in the water consumption data curve may represent a specific water consumption feature in the current period.

[0086] S600: Perform cluster analysis on all segmentation points in the user's water consumption data curve for all days, and construct a standard water consumption data curve for the user based on the clustering result.

[0087] In the distribution of segmentation points of the user's water consumption data curve for all days, from a vertical perspective (comparison of data from different days), the more days with segmentation points at the same time, the greater the possibility of a change in water consumption pattern near that time, that is, there is a water consumption characteristic segmentation point near that time.

[0088] Therefore, this embodiment performs cluster analysis on all segmentation points in the user's water consumption data curve for all days, and constructs the user's standard water consumption data curve based on the clustering results.

[0089] Furthermore, cluster analysis is performed on all segment points in the user's water consumption data curve for all days. The specific operation method is to preset the minimum number of points to be the number of days of the selected historical records. , the neighborhood radius is 30 minutes, and the DBSCAN algorithm is used to perform clustering operations on all segmentation points of all water consumption data curves of the current user to obtain several clusters and isolated points; each cluster corresponds to a set of segmentation points in the current time period; for isolated points, they are considered as noise points in this embodiment and are not analyzed.

[0090] The center point in each cluster is selected as the water consumption characteristic segmentation point of the current user, thereby obtaining several water consumption characteristic segmentation points of the current user in a day. The interval between two adjacent water consumption characteristic segmentation points represents a water consumption behavior pattern, so the water consumption data curve segment between two adjacent water consumption characteristic segmentation points is the water consumption characteristic segment. All water consumption data curves of users on different days are divided into corresponding water consumption characteristic segments through water consumption characteristic segmentation points.

[0091] Based on the clustering results, a standard water consumption data curve for the user is constructed, which further includes: screening water consumption data curves whose all segmentation points in the water consumption data curve are respectively present in the cluster clusters, and the water consumption data curve that meets the conditions can represent the typical water consumption changes of the user in different water consumption characteristic segments, and uses it as a reference water consumption data curve; since one or more reference water consumption data curves may be obtained, if a reference water consumption data curve is obtained, then the reference water consumption data curve is used as the standard water consumption data curve; if multiple reference water consumption data curves are obtained, then the average water consumption of all reference water consumption data curves is calculated to obtain the standard water consumption data curve for the user.

[0092] S700: Using the Bezier curve fitting method and the regression analysis method respectively, combined with the water consumption data corresponding to the missing data segment in the standard water consumption data curve, to obtain the supplementary data of the missing data segment.

[0093] Since there may be large differences in water consumption between different water consumption characteristic segments, and the water consumption data within the same water consumption characteristic segment has certain regularity, in order to accurately predict the missing data segment, it is necessary to analyze the regular characteristics of water consumption in the water consumption characteristic segment to which the missing data segment belongs. Here, it is actually necessary to analyze the water consumption data characteristics of the non-missing data points in the water consumption characteristic segment to which the missing data segment belongs, and then predict the water consumption data of the missing data segment. Since the appearance of missing data segments is random, they may exist in one or more water consumption characteristic segments. Therefore, first identify the water consumption characteristic segment to which the missing data segment belongs, then obtain the non-missing data points in the water consumption characteristic segment to which the missing data segment belongs, and then obtain the data points corresponding to the non-missing data points in the standard water consumption data curve.

[0094] In the process of fitting using the Bezier curve fitting method, all extreme points in the water consumption data curve are selected as control points, and the errors between the non-missing data points and the corresponding data points in the standard water consumption data curve are analyzed; the error trend is analyzed to determine the error of the missing data segment, and the first predicted value of the missing data segment is obtained by combining the water consumption data corresponding to the missing data segment in the standard water consumption data curve.

[0095] Although the Bessel curve fitting method shows good approximation performance in the fitting process, its predicted value may still have certain deviations in some cases, especially when the missing data segment is long or the data distribution is complex. Therefore, in order to ensure that the missing data segment can approximate the actual water consumption data curve, the Bessel curve fitting method is used to obtain the first predicted value. At the same time, the regression analysis method is used to predict the water consumption data of the missing data segment. The specific method of using the regression analysis method to predict the water consumption data of the missing data segment is as follows:

[0096] By analyzing the relative error between the non-missing data points and their corresponding data points in the standard water consumption data curve. The relative error calculation formula is:

[0097]

[0098] In the formula, Indicates The relative error between a non-missing data point and its corresponding data point in the standard water consumption data curve; Indicates Water consumption data for 10 ... Indicates The water consumption data of the data points corresponding to the non-missing data points in the standard water consumption data curve; Represents the square root of the mean square error of the water consumption data for all non-missing data points.

[0099] The error between the non-missing data points and the standard water consumption data is evaluated by calculating the relative error between the non-missing data points and their corresponding data points in the standard water consumption data curve. Greater weight is given to larger errors, so they are more sensitive to extreme error values.

[0100] Similarly, the relative error distribution of all non-missing data points in the water consumption characteristic segment to which the missing data segment belongs is obtained. Based on the relative error, the regression analysis method is used to obtain the relative error of all data points in the missing data segment. Combined with the water consumption data corresponding to the missing data segment in the standard water consumption data curve, the second predicted value of the missing data segment is obtained. After considering the influence of the relative error, the second predicted value is usually closer to the actual water consumption data.

[0101] Finally, the average of the first predicted value and the second predicted value is calculated as the supplementary data for the missing data segment. This method can not only fully utilize the fitting advantages of the Bezier curve, but also obtain a predicted value closer to the actual water use scenario through regression analysis, so as to ensure that the final predicted value is more accurate and reliable.

[0102] S800: Comprehensively verify the completed water consumption data.

[0103] The completed water consumption data is fully verified, including comparing adjacent data points, analyzing the continuity and rationality of the time series, and cross-validating with other relevant data sources. This ensures that the completed data is consistent with the overall trend and has no outliers, and ensures the accuracy and practicality of the completed data, providing strong data support for water resources management, water supply scheduling and decision support.

[0104] Based on the same inventive concept as the above method, this embodiment also provides a smart water meter missing data completion system.

[0105] See also Figure 2 , which shows the basic composition of a smart water meter missing data completion system provided by an embodiment of the present invention.

[0106] like Figure 2 As shown, a smart water meter missing data completion system includes: a memory 10 and a processor 20, wherein:

[0107] A memory 10, used for storing program codes;

[0108] The processor 20 is used to read the program code stored in the memory 10 and execute to obtain the user's daily water consumption data curve; identify the missing data segments in the water consumption data curve; analyze the change in the slope of the water consumption data curve to determine the initial segmentation point of the water consumption data curve; analyze the difference between the data curve segments on both sides of the initial segmentation point, and analyze the stability of the data curve segments on both sides of the initial segmentation point to obtain the variation index of the initial segmentation point and determine the segmentation point of the water consumption data curve; perform cluster analysis on all the segmentation points in the user's water consumption data curve for all days, and construct the user's standard water consumption data curve based on the clustering results; use the Bezier curve fitting method and the regression analysis method respectively, combined with the water consumption data corresponding to the missing data segment in the standard water consumption data curve, to obtain the missing data segment The complete data.

[0109] Furthermore, the processor 20 includes a water consumption data collection module 21, a missing data segment identification module 22, a standard water consumption data curve construction module 23, a complete data analysis module 24 and a verification module 25. Among them:

[0110] The water consumption data collection module 21 is used to obtain the user's daily water consumption data curve;

[0111] A missing data segment identification module 22, used to identify missing data segments in a water consumption data curve;

[0112] The standard water consumption data curve construction module 23 is first used to analyze the slope change of the water consumption data curve to determine the initial segmentation point of the water consumption data curve; then used to analyze the difference between the data curve segments on both sides of the initial segmentation point, and analyze the stability of the data curve segments on both sides of the initial segmentation point to obtain the variation index of the initial segmentation point and determine the segmentation point of the water consumption data curve; finally used to perform cluster analysis on all the segmentation points in the user's water consumption data curve for all days, and based on the clustering results, construct the user's standard water consumption data curve;

[0113] The data completion analysis module 24 is used to obtain the completion data of the missing data segment by using the Bezier curve fitting method and the regression analysis method respectively, combining the water consumption data corresponding to the missing data segment in the standard water consumption data curve;

[0114] The verification module 25 is used to perform a comprehensive verification on the completed water consumption data.

[0115] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0116] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for completing missing data of a smart water meter, characterized in that: The method comprises: Obtain the user's daily water consumption data curve; identifying missing data segments in the water consumption data curve; Analyze the change of the slope of the water consumption data curve to determine the initial segmentation point of the water consumption data curve; wherein the method for obtaining the initial segmentation point is: obtaining a slope sequence composed of the slopes of the straight lines formed by all adjacent data points in the water consumption data curve; identifying the data points corresponding to the changes in the positive and negative signs of the slopes, and using all the data points corresponding to the changes in the positive and negative signs of the slopes as the initial segmentation points of the water consumption data curve; Analyze the first difference between the slopes of the data curve segments on both sides of the initial segmentation point, and analyze the second difference between the water consumption data in the data curve segments on both sides of the initial segmentation point to obtain the difference; respectively analyze the discrete conditions of the water consumption data in the data curve segments on both sides of the initial segmentation point to obtain the stability of the data curve segments on both sides of the initial segmentation point; obtain the variation index of the initial segmentation point according to the difference and stability; if the variation index is less than or equal to the variation index threshold, retain the initial segmentation point corresponding to the variation index as the segmentation point of the water consumption data curve; Performing cluster analysis on all the segmentation points in the water consumption data curve of the user for all days to obtain a number of clusters, selecting the center point of each cluster as the user's water consumption characteristic segmentation point, and the water consumption data curve segment between two adjacent water consumption characteristic segmentation points as the water consumption characteristic segment; screening the water consumption data curves in which all the segmentation points in the water consumption data curve are respectively present in the clusters as reference water consumption data curves; calculating the average water consumption of all the reference water consumption data curves to obtain the user's standard water consumption data curve; Obtain non-missing data points in the water consumption characteristic segment to which the missing data segment belongs, and analyze the errors between the non-missing data points and the corresponding data points in the standard water consumption data curve during the fitting process using the Bezier curve fitting method; analyze the changing trend of the error, determine the error of the missing data segment, and obtain the first predicted value of the missing data segment in combination with the water consumption data corresponding to the missing data segment in the standard water consumption data curve; analyze the relative error between the non-missing data points and the corresponding data points in the standard water consumption data curve; based on the relative error, use a regression analysis method to obtain the relative error of all data points in the missing data segment, and obtain the second predicted value of the missing data segment in combination with the water consumption data corresponding to the missing data segment in the standard water consumption data curve; calculate the average of the first predicted value and the second predicted value as the completion data of the missing data segment.

2. The method for completing missing data of a smart water meter according to claim 1, characterized in that: The method further includes identifying missing data segments in the water consumption data curve, and then analyzing the severity of the missing data segments and selecting a data completion method according to the severity.

3. The method for completing missing data of a smart water meter according to claim 2, characterized in that: Analyzing the severity of the missing data segment and selecting a data completion method according to the severity, including: Analyze the difference in water consumption data at both ends of the missing data segment and the time length of the missing data segment to obtain the severity of the missing data segment; Set severity thresholds; Comparing the magnitude relationship between the severity level and the severity threshold; If the severity is less than the severity threshold, a linear interpolation algorithm is used to complete the missing data segment; If the severity is greater than or equal to the severity threshold, the missing data segment is completed using a Bezier curve fitting method and a regression analysis method.

4. The method for completing missing data of a smart water meter according to claim 1, characterized in that: Obtaining the complementary data of the missing data segment, and then further comprising: The completed water consumption data is fully verified by comparing adjacent data points, analyzing the continuity and rationality of the time series, and cross-validating with other relevant data sources.

5. A smart water meter missing data completion system, characterized in that: The system comprises: a memory and a processor, wherein: The memory is used to store program code; The processor is configured to read the program code stored in the memory and execute the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Wheel-pair tread contour curve complementing method based on existing contours

    CN107246850A

  • User missing electric quantity data restoration method based on clustering compressed sensing

    CN110781167A