Data acquisition method for automatic operation and maintenance of water affair facilities

By acquiring water flow thresholds and similarity values, and using DTW and K-means algorithms to segment water data, the water flow data is extended and denoised, solving the problem of inaccurate denoising of water data and enabling timely detection of abnormal water use and equipment failures.

CN121786575AInactive Publication Date: 2026-04-03SHAANXI JIANYI CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing methods do not accurately denoise water data, which makes it difficult to detect abnormal water usage in a timely manner.

Method used

By obtaining water flow thresholds, historical water use intervals are determined. The similarity is divided using the DTW algorithm and K-means clustering algorithm. Reference historical water use intervals are selected, and water flow data of the water use interval to be measured is extended. Denoising is then performed by combining EMD and wavelet transform to obtain complete denoised water flow data to be measured.

Benefits of technology

Accurately and promptly detect abnormal water usage situations to ensure safe water use for users, and promptly detect equipment failures or pipeline leaks to avoid water supply service interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786575A_ABST
    Figure CN121786575A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a data acquisition method for automatic operation and maintenance of water affair facilities. The method comprises the following steps: acquiring water pressure data and water flow data at each moment; according to the size of the water flow data, obtaining a water flow threshold value, determining historical water use intervals in a preset historical time period, obtaining a similarity degree value between the historical water use intervals, dividing the historical water use intervals, obtaining categories, and determining the category of the water use interval to be detected; obtaining the similarity between the to-be-measured water consumption interval and the historical water consumption interval in the category, and obtaining complete to-be-measured water flow data of the to-be-measured water consumption interval; and de-noising the complete to-be-measured water flow data to obtain complete de-noised to-be-measured water flow data. According to the method, the water affair data in the to-be-measured water consumption interval are predicted through the water affair data in the historical water consumption interval, and meanwhile, the predicted complete to-be-measured water flow data are denoised, so that the abnormal condition of water consumption of a user is accurately and timely found.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and specifically to a data acquisition method for automated operation and maintenance of water facilities. Background Technology

[0002] The core of automated water management operation and maintenance is to collect real-time, continuous, and multi-dimensional data on key aspects such as water sources, water supply networks, pumping stations, and water quality through technologies such as sensors, the Internet of Things (IoT), and wireless communication. This allows for the timely detection of abnormal water usage and emergencies, such as abnormal water level rises or water leaks. Timely warnings are provided to ensure the safety and reliability of the water supply system. Simultaneously, by collecting water management data, the real-time operational status and performance of water facilities, such as pumping stations, pipelines, and water storage facilities, can be monitored. This helps in the timely detection of equipment failures, performance degradation, or pipeline leaks, enabling timely maintenance and repair to prevent equipment damage and water service interruptions. Furthermore, it provides a data foundation for the operational decision-making, scheduling optimization, and fault early warning of the smart water management platform.

[0003] However, the collected water data may contain noise. Existing methods obtain denoised water data through empirical mode decomposition. The process of decomposing the curves corresponding to the water data by empirical mode decomposition depends entirely on the characteristics of the water data itself. When the endpoints of the curves corresponding to the water data are uncertain, the intrinsic mode components decomposed by empirical mode decomposition will be inaccurate, resulting in inaccurate denoising results for the water data and failure to detect abnormal water usage problems in a timely manner. Summary of the Invention

[0004] To address the technical problem of inaccurate noise reduction in water data, which leads to the inability to promptly detect abnormal water usage by users, the present invention aims to provide a data acquisition method for automated operation and maintenance of water facilities. The specific technical solution adopted is as follows: This invention proposes a data acquisition method for automated operation and maintenance of water facilities, which includes the following steps: Acquire water pressure and water flow data at each moment; Based on the magnitude of water flow data within a preset historical time period, a water flow threshold is obtained, and the historical water usage interval within the preset historical time period is determined. Based on the distance between any two water flow data points matched between any two historical water usage intervals, as well as the differences in the quantity of water flow data and the differences in water pressure data, the similarity value between any two historical water usage intervals is obtained. Based on the similarity value, the historical water use intervals are divided into at least two categories; based on the distribution of water flow data in the water use intervals to be measured, the category of the water use intervals to be measured is determined. Obtain the similarity between the water flow data in the water use interval to be tested and a different preset number of water flow data in each historical water use interval in the same category, and filter out the reference historical water use intervals for the water use interval to be tested; based on the water flow data in the reference historical water use intervals and the similarity between the reference historical water use intervals and the water use interval to be tested, obtain the complete water flow data for the water use interval to be tested. The complete water flow rate data to be measured is denoised to obtain the complete denoised water flow rate data to be measured.

[0005] Furthermore, the method for obtaining a water flow threshold based on the magnitude of water flow data within a preset historical time period and determining the historical water consumption interval within that preset historical time period is as follows: Based on the magnitude of water flow data within a preset historical time period, the water flow threshold is obtained using the maximum inter-class variance method. Water flow data exceeding the water flow threshold within a preset historical time period will be considered as high flow data. The number of consecutive high-traffic data points is used as the first quantity. When the first quantity is greater than or equal to the preset first quantity threshold, the corresponding continuous high flow data will be constructed into a historical water consumption interval according to the time sequence of the corresponding time.

[0006] Furthermore, the method for obtaining the similarity value between any two historical water use intervals based on the distance between every two matched water flow data points, as well as the differences in the quantity of water flow data and the differences in water pressure data, is as follows: The DTW algorithm is used to obtain the dynamic time-normalized distance between any two historical water use intervals for matching water flow data, which is used as the first matching distance. The difference in the number of water flow data between any two historical water use intervals is taken as the first difference. The average water pressure data in each historical water usage interval is obtained as the overall water pressure data for each historical water usage interval. Obtain the difference in overall water pressure data between any two historical water usage intervals as a reference water pressure difference; Based on the first matching distance, reference water pressure difference, and first difference between any two historical water use intervals, obtain the similarity value between the two historical water use intervals.

[0007] Furthermore, the formula for calculating the similarity value is as follows: In the formula, This represents the similarity value between the a-th historical water use interval and the b-th historical water use interval. This represents the first difference between the a-th historical water use interval and the b-th historical water use interval; This represents the reference water pressure difference between the a-th historical water usage interval and the b-th historical water usage interval. The j-th first matching distance is between the a-th historical water use interval and the b-th historical water use interval. , is the preset weighted penalty coefficient; M is the total number of first matching distances between the a-th historical water use interval and the b-th historical water use interval; exp is an exponential function with the natural constant as the base.

[0008] Furthermore, the method for dividing historical water use intervals based on similarity values ​​to obtain at least two categories is as follows: Each historical water use interval is resampled to a uniform preset number of points N through linear interpolation to obtain a standardized historical water use interval. Based on the similarity value, the standardized historical water use interval is used as input to perform clustering through the K-means clustering algorithm to obtain at least two categories. The k value in the K-means clustering algorithm is obtained by the elbow method.

[0009] Furthermore, the method for obtaining the similarity between the water flow data in the water use interval to be tested and different preset numbers of water flow data in each historical water use interval of the same category is as follows: The number of water flow data points obtained in the water usage range to be measured is used as the third quantity; Use the third quantity of the preset multiple as the initial reference quantity; Set a preset step size, and increase the initial reference quantity sequentially according to the preset step size. The result of each increase is the updated reference quantity. Select any historical water use interval in the category of the water use interval to be measured as the target historical water use interval. When the number of updated references is equal to the number of water flow data in the target historical water use interval, stop updating the initial reference number. The initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval are used as the reference water flow dataset for the corresponding quantity. The acquisition of the initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval starts from the first water flow data in the target historical water use interval and continues until the corresponding quantity of water flow data is reached. The similarity between the water flow data in the water use interval to be tested and each reference water flow dataset is obtained as the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset quantities under the target historical water use interval.

[0010] Furthermore, the method for obtaining the reference historical water use interval is as follows: The maximum similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers in each historical water use interval in the same category is obtained as a reference similarity between the water use interval to be tested and the corresponding historical water use interval. When the reference similarity is greater than the preset similarity threshold, the corresponding historical water use interval is used as the reference historical water use interval for the water use interval to be tested.

[0011] Furthermore, the method for obtaining the complete water flow data to be measured is as follows: Remove the water flow data in the reference historical water use interval corresponding to each reference similarity, and obtain the remaining water flow data in each reference historical water use interval as the target water flow data interval for each reference historical water use interval. Based on the reference similarity corresponding to each historical water use interval and the water flow data in the target water flow data interval, obtain the extended water flow data in the water use interval to be measured. The historical water usage interval corresponding to the maximum reference similarity is used as the special water usage interval; When the number of extended water flow data is the same as the number of water flow data in the target water flow data range of the special water use range, stop acquiring extended water flow data and determine the complete water flow data to be measured in the water use range to be measured.

[0012] Furthermore, the method for obtaining the extended water flow data is as follows: The product of the reference similarity corresponding to each historical water use interval and the nth water flow data in the target water flow data interval is used as the nth feature participation value of the corresponding historical water use interval. The sum of all nth feature participation values ​​is obtained and divided by the sum of all reference similarities. The resulting value is used as the nth extended water flow data in the water use interval to be tested.

[0013] Furthermore, the method for denoising the complete water flow rate data to obtain complete denoised water flow rate data is as follows: The complete water flow data to be measured is marked in a two-dimensional coordinate system according to the time sequence of the corresponding time; where the horizontal axis of the two-dimensional coordinate system is time and the vertical axis is the complete water flow data to be measured. Connect the marked points in the two-dimensional coordinate system, and use the fitted curve as the complete water flow data curve to be measured. The complete water flow rate data curve is decomposed using the EMD algorithm to obtain the IMF component curve. The IMF component curves are denoised by wavelet transform, and the denoised IMF component curves are merged. Data from the original time period of the corresponding water use interval is extracted to obtain complete denoised water flow data.

[0014] The present invention has the following beneficial effects: Based on the magnitude of water flow data within a preset historical time period, a water flow threshold is obtained to facilitate the determination of historical water usage intervals within that period. Then, based on the distance between any two historical water usage intervals, the differences in the quantity of water flow data, and the differences in water pressure data, a similarity value is obtained between any two historical water usage intervals. This ensures accurate segmentation of historical water usage intervals and identifies the category corresponding to each water usage behavior. Based on the water flow data in the interval to be tested, the category of the interval is determined. The similarity between the water flow data in the interval to be tested and different preset quantities of water flow data within each historical water usage interval of the same category is obtained. Reference historical water usage intervals are then selected for the interval to be tested, accurately predicting the water flow data within that interval. Finally, complete water flow data for the interval to be tested is determined. This complete, denoised water flow data is then processed to obtain complete, denoised water flow data, enabling accurate and timely detection of abnormal user water usage, facilitating timely intervention by staff, and ensuring safe water use for users. Attached Figure Description

[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a flowchart illustrating a data acquisition method for automated operation and maintenance of water facilities, provided as an embodiment of the present invention. Detailed Implementation

[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a data acquisition method for automated operation and maintenance of water facilities proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

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

[0019] The following description, in conjunction with the accompanying drawings, details a specific scheme for a data acquisition method for automated operation and maintenance of water facilities provided by the present invention.

[0020] Please see Figure 1 The diagram illustrates a data acquisition method for automated operation and maintenance of water facilities according to an embodiment of the present invention. The method includes the following steps: Step S1: Obtain water pressure and water flow data at each time point.

[0021] Specifically, water usage data for each household at each moment is acquired using pressure sensors and water flow sensors. This water usage data includes water pressure and water flow data. In this embodiment of the invention, the time interval between any two adjacent moments is set to 3 seconds; however, the implementer can set this value according to actual circumstances, and it is not limited here. Based on prior knowledge, it is known that each household has its own water usage habits, and under normal circumstances, each household's daily water usage is similar. Therefore, the collected water usage data is analyzed to determine each household's specific water usage behavior.

[0022] The scenario of this embodiment is as follows: Taking a single user as an example, water usage data is collected by sensors to determine the user's water usage range. The current water usage range to be measured may be incomplete. Using Empirical Mode Decomposition (EMD) to decompose the curve corresponding to the water flow data in the measured water usage range can lead to inaccurate Intrinsic Mode Components (IMFs). Therefore, water flow data from historical water usage ranges with the same water usage behavior as the measured range can be used to extend the water flow data in the measured water usage range, obtaining complete water flow data for the measured range. The complete water flow data curve is then determined, and noise is removed from the complete, denoised water flow data. This allows for timely detection of abnormal water usage by the user and provides a basis for water supply management and resource scheduling. The Empirical Mode Decomposition (EMD) method is an existing algorithm and will not be described in detail here.

[0023] Step S2: Based on the magnitude of water flow data within a preset historical time period, obtain the water flow threshold and determine the historical water usage interval within the preset historical time period; based on the distance between any two matched water flow data between any two historical water usage intervals, as well as the difference in the quantity of water flow data and the difference in water pressure data, obtain the similarity value between any two historical water usage intervals.

[0024] Specifically, in order to better determine the water usage behavior of the water usage interval to be tested, this embodiment of the invention needs to analyze historical water data, determine each historical water usage interval based on the historical water data, and obtain the user's water usage behavior based on the similarity value between the historical water usage intervals.

[0025] Preferably, the method for obtaining historical water use intervals is as follows: based on the magnitude of water flow data within a preset historical time period, a water flow threshold is obtained using the maximum inter-class variance method; water flow data exceeding the water flow threshold within the preset historical time period are designated as high flow data; the number of consecutive high flow data is obtained as a first quantity; when the first quantity is greater than or equal to a preset first quantity threshold, the corresponding consecutive high flow data are constructed into a historical water use interval according to the chronological order of the corresponding time points. The maximum inter-class variance method is existing technology and will not be described in detail here.

[0026] As an example, this embodiment of the invention sets the preset historical time period to one month. The implementer can set the duration of the preset historical time period according to actual conditions; this is not limited here. The selection of one month should be randomized from the six historical months preceding the current month. Water pressure and water flow data are obtained for each moment within the month. It is known that when a user uses water, the water flow data at the corresponding moment increases, resulting in a continuous period of high water flow data. When the user does not use water, the water flow data at the corresponding moment remains unchanged at 0. Therefore, based on the magnitude of the water flow data within a month, a water flow threshold is obtained using the maximum inter-class variance method. Water flow data exceeding the water flow threshold within a month are considered high flow data. The number of consecutive high flow data is the first quantity. This embodiment of the invention sets the first quantity threshold to 3. The implementer can set the size of the first quantity threshold according to actual conditions; this is not limited here. When the first quantity is greater than or equal to the preset first quantity threshold, the corresponding consecutive high flow data are constructed into historical water usage intervals according to the chronological order of the corresponding moments. For example, three consecutive high flow data constitute one historical water usage interval. Thus, all historical water usage intervals within a month are obtained.

[0027] Water flow data within historical water usage intervals for the same water usage behavior should be similar. However, in reality, the impact of different water pressures on water flow must be considered. For the same water usage behavior, when water pressure increases, the water flow at the corresponding moment increases, and the time to use the same amount of water is shortened; conversely, when water pressure decreases, the water flow at the corresponding moment decreases, and the time to use the same amount of water is increased. Therefore, for the same water usage behavior, different water pressures can lead to significant differences in water flow data within historical water usage intervals. When obtaining the similarity value between two historical water usage intervals, the difference in water pressure data between the two intervals must be taken into account.

[0028] Preferably, the method for obtaining the similarity value is as follows: using the Dynamic Time Warping (DTW) algorithm, the dynamic time warping distance between any two matching water flow data points between any two historical water use intervals is obtained as the first matching distance; the difference in the quantity of water flow data between any two historical water use intervals is obtained as the first difference; the average value of water pressure data in each historical water use interval is obtained as the overall water pressure data for each historical water use interval; the difference in overall water pressure data between any two historical water use intervals is obtained as the reference water pressure difference; and the similarity value between the two historical water use intervals is obtained based on the first matching distance, the reference water pressure difference, and the first difference. The Dynamic Time Warping (DTW) algorithm is an existing algorithm and will not be described in detail here.

[0029] As an example, taking the a-th historical water usage interval and the b-th historical water usage interval as an example, the Dynamic Time Warping (DTW) algorithm is used to obtain the dynamic time warping distance between every two matched water flow data points between the a-th and b-th historical water usage intervals, which is the first matching distance. The difference in the number of water flow data points between the a-th and b-th historical water usage intervals is the first difference. The average water pressure data in the a-th historical water usage interval is obtained as the overall water pressure data for the a-th historical water usage interval, and the average water pressure data in the b-th historical water usage interval is obtained as the overall water pressure data for the b-th historical water usage interval. The difference between the overall water pressure data of the a-th and b-th historical water usage intervals is the reference water pressure difference. If the a-th historical water usage interval and the b-th historical water usage interval represent the same water usage behavior, then when the water pressure at each moment between the a-th and b-th historical water usage intervals is the same, the first difference between the a-th and b-th historical water usage intervals approaches 0. When the water pressure at each moment between the a-th and b-th historical water usage intervals is different, the first difference can be controlled by the reference water pressure difference between the a-th and b-th historical water usage intervals. The larger the reference water pressure difference, the larger the allowed first difference; the smaller the reference water pressure difference, the smaller the first difference must be. Based on the first matching distance, reference water pressure difference, and first difference between the a-th and b-th historical water usage intervals, the formula for calculating the similarity value between the a-th and b-th historical water usage intervals is as follows: In the formula, This represents the similarity value between the a-th historical water use interval and the b-th historical water use interval. This represents the first difference between the a-th historical water use interval and the b-th historical water use interval; This represents the reference water pressure difference between the a-th historical water usage interval and the b-th historical water usage interval. The j-th first matching distance is between the a-th historical water use interval and the b-th historical water use interval. , In a preferred embodiment of the present invention, the preset weighted penalty coefficient is used. The value range is 0.1-0.5, and the optimal value is 0.2; The value range is 1.0-5.0, with the optimal value being 2.5; M is the total number of first matching distances between the a-th historical water use interval and the b-th historical water use interval; exp is an exponential function with the natural constant as the base.

[0030] It should be noted that the first difference The larger the value, the greater the difference in the amount of water flow data between the a-th historical water use interval and the b-th historical water use interval, indirectly indicating a greater difference between the a-th historical water use interval and the b-th historical water use interval. The smaller the value; refer to the difference in water pressure. The larger, The smaller the value, the greater the water pressure difference between the a-th and b-th historical water usage intervals, and the greater the tolerance for differences in the quantity of water flow data between the a-th and b-th historical water usage intervals. This allows for better control of the first difference by referencing water pressure differences. The larger; The larger the value, the greater the difference between the matched water flow data of the a-th historical water use interval and the b-th historical water use interval, indirectly indicating a greater difference between the a-th historical water use interval and the b-th historical water use interval. The larger, The smaller; therefore, The smaller the value, the greater the difference between the a-th historical water use interval and the b-th historical water use interval, and the less likely the a-th historical water use interval and the b-th historical water use interval are to represent the same water use behavior.

[0031] Based on the method for obtaining the similarity value between the a-th historical water use interval and the b-th historical water use interval, obtain the similarity value between any two historical water use intervals.

[0032] Step S3: Divide the historical water use intervals according to the similarity value to obtain at least two categories; determine the category of the water use interval to be tested based on the distribution of water flow data in the interval to be tested.

[0033] Specifically, due to the varying time spans of historical water usage intervals (e.g., some intervals contain 50 data points, while others contain 200), direct clustering would lead to dimensionality mismatch. This step uses linear interpolation to resample all extracted historical water usage intervals to a uniform length N (e.g., N=100). The resampled, standardized vectors are then input into the K-means algorithm, ensuring the mathematical validity of the clustering calculation. Based on the similarity values, the K-means clustering algorithm clusters the historical water usage intervals, obtaining at least two categories, each representing a user's water usage behavior. The k-value in the K-means clustering algorithm is obtained using the elbow method. Both the K-means clustering algorithm and the elbow method are existing technologies and will not be elaborated upon here.

[0034] The similarity between water flow data in the test water usage interval and water flow data in the central historical water usage interval of each category is obtained using the Dynamic Time Warping (DTW) algorithm. This similarity is used as the target similarity, and the category corresponding to the maximum target similarity is taken as the category of the test water usage interval. This determines the water usage behavior of the test water usage interval. However, if the water flow data in the test water usage interval is insufficient, such that the maximum target similarity corresponds to at least two categories, the category of the test water usage interval cannot be determined. In this case, water flow data in the test water usage interval is collected again. Each time water flow data is collected, the target similarity between the water flow data in the test water usage interval and the water flow data in the central historical water usage interval of each category is obtained, until the maximum target similarity corresponds to only one category, thus determining the category of the test water usage interval.

[0035] Step S4: Obtain the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers under each historical water use interval in the same category, and filter out the reference historical water use intervals for the water use interval to be tested; based on the water flow data in the reference historical water use intervals and the similarity between the reference historical water use intervals and the water use interval to be tested, obtain the complete water flow data of the water use interval to be tested.

[0036] Specifically, based on the historical water usage intervals within the category of the water usage interval to be measured, the water flow data in the water usage interval to be measured is extended to predict the complete changes in the water flow data in the water usage interval to be measured, and to promptly detect abnormal water usage in the subsequent water usage of the water usage interval to be measured. The number of water flow data in each historical water usage interval within the category of the water usage interval to be measured is obtained as a second quantity. When the number of water flow data in the water usage interval to be measured is greater than or equal to the maximum second quantity, it indicates that the water usage interval to be measured is a complete water usage interval, and no further extended water flow data needs to be added; noise reduction processing can be directly performed on the water flow data in the water usage interval to be measured. When the number of water flow data in the water usage interval to be measured is less than the maximum second quantity, it indicates that the water usage interval to be measured is incomplete, and extended water flow data needs to be added to the water usage interval to be measured. This embodiment of the invention addresses the case of an incomplete water usage interval to be measured. The method for obtaining complete water flow data in the water usage interval to be measured is as follows: (1) Obtain similarity.

[0037] Preferably, the method for obtaining similarity is as follows: The number of water flow data in the water use interval to be tested is obtained as the third quantity; a third quantity of a preset multiple is used as the initial reference quantity; a preset step size is set, and the initial reference quantity is increased sequentially according to the preset step size, with each increase resulting in an updated reference quantity; any historical water use interval in the category of the water use interval to be tested is selected as the target historical water use interval; when the updated reference quantity is equal to the number of water flow data in the target historical water use interval, the update of the initial reference quantity is stopped; the initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval are used as the reference water flow dataset for the corresponding quantity; wherein, the acquisition of the initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval starts from the first water flow data in the target historical water use interval until the corresponding quantity of water flow data is reached; the similarity between the water flow data in the water use interval to be tested and each reference water flow dataset is obtained as the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset quantities under the target historical water use interval.

[0038] As an example, the number of water flow data points obtained in the water usage range to be measured is the third quantity x. In this embodiment of the invention, the preset multiplier is set to... The implementer can set the preset multiplier according to the actual situation, but it will not be set here. Therefore, the initial reference quantity is... , among which, if If it is not an integer, then... The initial reference quantity is rounded down. In this embodiment, the preset step size is set to 1. Implementers can set the preset step size according to actual conditions; this is not limited here. The initial reference quantity is increased sequentially according to the preset step size, with each increase resulting in an updated reference quantity. For example, if the initial reference quantity is 4, the first updated reference quantity is 4+1=5, the second updated reference quantity is 5+1=6, and so on. The l-th historical water use interval in the category of the water use interval to be tested is taken as the target historical water use interval. To more accurately obtain the similarity between the water flow data in the water use interval to be tested and the water flow data in the l-th historical water use interval, this embodiment uses the Dynamic Time Warping (DTW) algorithm to obtain the similarity between the water flow data in the water use interval to be tested and the water flow data of the initial reference quantity in the l-th historical water use interval. The water flow data of the initial reference quantity in the l-th historical water use interval is the first initial reference quantity of water flow data in the l-th historical water use interval. For example, when the initial reference quantity is 4, the water flow data of the initial reference quantity in the l-th historical water use interval is the first 4 water flow data in the l-th historical water use interval. Simultaneously, the similarity between the water flow data in the water use interval to be tested and the water flow data of each updated reference quantity in the l-th historical water use interval is obtained through the Dynamic Time Warping (DTW) algorithm. The method for obtaining the water flow data of each updated reference quantity in the l-th historical water use interval is the same as the method for obtaining the water flow data of the initial reference quantity in the l-th historical water use interval. The update of the initial reference quantity is stopped when the number of updated reference quantities equals the number of water flow data in the l-th historical water use interval. The initial reference quantity and the water flow data of each updated reference quantity in the l-th historical water use interval are used as the reference water flow dataset for the corresponding quantity. The similarity between the water flow data in the water use interval to be tested and each reference water flow dataset in the l-th historical water use interval is obtained as the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset quantities in the l-th historical water use interval, i.e., the similarity between the water use interval to be tested and the l-th historical water use interval.

[0039] Based on the method of obtaining the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers under the l-th historical water use interval, the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers under each historical water use interval in the category is obtained.

[0040] (2) Obtain the reference historical water use interval.

[0041] In order to accurately estimate the subsequent water flow data, i.e. the extended water flow data, of the water use interval to be measured, it is necessary to select a reference historical water use interval with similar water flow data to the water use interval to be measured, and obtain the extended water flow data of the water use interval to be measured based on the water flow data of the reference historical water use interval.

[0042] Preferably, the method for obtaining the reference historical water use interval is as follows: obtain the maximum similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers under each historical water use interval in the category, and use it as the reference similarity between the water use interval to be tested and the corresponding historical water use interval; when the reference similarity is greater than the preset similarity threshold, the corresponding historical water use interval is used as the reference historical water use interval of the water use interval to be tested.

[0043] As an example, the maximum similarity between the water flow data in the water use interval to be tested and different preset numbers of water flow data in the l-th historical water use interval of the same category is taken as the reference similarity between the water use interval to be tested and the l-th historical water use interval. In this embodiment of the invention, the preset similarity threshold is set to 0.56. Implementers can set the preset similarity threshold according to actual conditions, and this is not limited here. When the reference similarity is greater than the preset similarity threshold, the l-th historical water use interval is considered a reference historical water use interval; when the reference similarity is less than or equal to the preset similarity threshold, the l-th historical water use interval is not a reference historical water use interval and is not included in the calculation of the extended water flow data in the water use interval to be tested.

[0044] Based on the method used to determine whether the l-th historical water use interval is a reference historical water use interval, determine whether each historical water use interval in the category to which the water use interval to be measured is a reference historical water use interval. Thus, the reference historical water use interval for the water use interval to be measured is determined.

[0045] (3) Obtain complete water flow data to be measured.

[0046] Based on the water flow data in the reference historical water flow intervals of the water flow interval to be measured, and the reference similarity between the water flow interval to be measured and each reference historical water flow interval, the extended water flow data in the water flow interval to be measured is obtained, and the complete water flow data to be measured in the water flow interval to be measured is determined.

[0047] Preferably, the method for obtaining extended water flow data is as follows: remove the water flow data in the reference historical water use interval corresponding to each reference similarity, and obtain the remaining water flow data in each reference historical water use interval as the target water flow data interval for each reference historical water use interval; multiply the reference similarity corresponding to each reference historical water use interval by the nth water flow data in the target water flow data interval as the nth feature participation value of the corresponding reference historical water use interval; obtain the mean of all nth feature participation values ​​as the nth extended water flow data in the water use interval to be tested.

[0048] As an example, if the water flow data in the i-th reference historical water use interval corresponding to the i-th reference similarity is the first 6 water flow data in the i-th reference historical water use interval, then the first 6 water flow data in the i-th reference historical water use interval are removed, and the remaining water flow data in the i-th reference historical water use interval is used as the target water flow data interval for the i-th reference historical water use interval. Based on the method for obtaining the target water flow data interval of the i-th reference historical water use interval, the target water flow data interval for each reference historical water use interval is obtained.

[0049] Obtain the nth extended water flow data, denoted as The specific mathematical formula for calculation is as follows: In the formula, This represents the nth extended water flow rate data within the water usage interval to be measured. Let be the reference similarity corresponding to the i-th reference historical water use interval; Y represents the nth water flow data within the target water flow data interval of the i-th historical water use interval; Y represents the total number of historical water use intervals. These are the feature participation values.

[0050] It should be noted that, The larger the value, the more similar the i-th reference historical water use interval is to the water use interval to be measured. This means a larger proportion of the water flow data from the i-th reference historical water use interval is used to acquire extended water flow data, resulting in a larger feature participation value. The larger.

[0051] Based on the method for obtaining the nth extended water flow data in the water use interval to be measured, obtain the extended water flow data for each extended water flow interval to be measured.

[0052] The number of water flow data points in the target water flow data interval varies for each reference historical water use interval. To determine the termination condition for adding extended water flow data to the water use interval to be measured and to obtain complete water flow data to be measured, this embodiment of the invention uses the reference historical water use interval corresponding to the maximum reference similarity as the special water use interval. If there are at least two reference historical water use intervals corresponding to the maximum reference similarity, one reference historical water use interval is randomly selected as the special water use interval. When the number of extended water flow data points is the same as the number of water flow data points in the target water flow data interval of the special water use interval, the acquisition of extended water flow data is stopped. When acquiring extended water flow data, there may be cases where water flow data points in the target water flow data intervals of some reference historical water use intervals are missing. In this case, the water flow data point is defaulted to 0. For example, when acquiring the k-th extended water flow data in the water use interval to be measured, if the number of water flow data in the target water flow data interval of the i-th reference historical water use interval is less than k, that is, the k-th water flow data does not exist in the target water flow data interval of the i-th reference historical water use interval, then when calculating the k-th feature parameter value of the i-th reference historical water use interval, the k-th water flow data in the target water flow data interval of the i-th reference historical water use interval is defaulted to 0, that is, the k-th feature parameter value of the i-th reference historical water use interval is 0. Thus, each extended water flow data in the water use interval to be measured is acquired. The water flow data in the water use interval to be measured and the extended water flow data are combined to form the complete water flow data for the water use interval to be measured.

[0053] Step S5: Denoise the complete water flow rate data to obtain the complete denoised water flow rate data.

[0054] Specifically, the complete water flow data to be measured is marked in a two-dimensional coordinate system according to the time sequence at corresponding moments, where the horizontal axis of the two-dimensional coordinate system represents time and the vertical axis represents the complete water flow data to be measured. The marked points in the two-dimensional coordinate system are connected, and the fitted curve is taken as the complete water flow data curve to be measured. The complete water flow data curve to be measured is decomposed by the empirical mode decomposition (EMD) method to obtain the intrinsic mode component (IMF) curve. The db4 (Daubechies 4) wavelet basis function is used, and a soft thresholding rule is set for denoising. The signal after soft thresholding is smoother and can better preserve the signal's abrupt change characteristics.

[0055] Specifically, after wavelet denoising and signal reconstruction, the system automatically truncates the extended data portion added in step S4, retaining only the denoised data for the original time period corresponding to the "water usage interval to be measured". Through this "extend first, decompose then truncate" processing method, the data at the current moment is no longer at the end of the decomposed sequence, effectively suppressing the endpoint divergence of EMD. At this point, if the obtained denoised data differs significantly from the original acquired data, or if the denoised waveform shows a discontinuity in derivative with the historical normal pattern (extended portion), it can be determined that abnormal water usage (such as a sudden leak or pipe burst) has occurred at the current moment. Each intrinsic modal component curve is denoised using wavelet transform, and the denoised intrinsic modal component curves are then merged to obtain complete denoised water flow data. Wavelet transform is an existing technique and will not be elaborated upon here.

[0056] Complete, denoised water flow data represents the predicted complete water usage range for the measured range. Therefore, based on this data, abnormal water usage can be detected promptly, ensuring safe water use for every household. Simultaneously, it provides a basis for water supply management and resource allocation, ensuring timely water supply to users. Furthermore, it helps in the early detection of equipment malfunctions, performance degradation, or pipeline leaks, enabling timely maintenance and upkeep of water supply equipment and preventing water outages.

[0057] This invention is now complete.

[0058] In summary, this invention acquires water pressure and flow data at each moment; based on the magnitude of the flow data, it obtains a flow threshold, determines historical water usage intervals within a preset historical time period, acquires similarity values ​​between historical water usage intervals, divides these intervals into categories, and determines the category of the water usage interval to be measured; it acquires the similarity between the water usage interval to be measured and historical water usage intervals within its category, and acquires complete water flow data for the water usage interval to be measured; it then denoises the complete water flow data to obtain complete denoised water flow data. This invention predicts water usage data for the water usage interval to be measured using water data from historical water usage intervals, and simultaneously denoises the predicted complete water flow data to be measured, accurately and promptly detecting abnormal user water usage.

[0059] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0060] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A data acquisition method for automated operation and maintenance of water facilities, characterized in that, The method includes the following steps: Acquire water pressure and water flow data at each moment; Based on the magnitude of water flow data within a preset historical time period, a water flow threshold is obtained to determine the historical water usage interval within the preset historical time period; based on the distance between any two matched water flow data points between any two historical water usage intervals, as well as the differences in the quantity of water flow data and the differences in water pressure data, a similarity value between any two historical water usage intervals is obtained. Based on the similarity value, the historical water use intervals are divided into at least two categories; based on the distribution of water flow data in the water use intervals to be measured, the category of the water use intervals to be measured is determined. Obtain the similarity between the water flow data in the water use interval to be tested and a different preset number of water flow data in each historical water use interval in the same category, and filter out the reference historical water use intervals for the water use interval to be tested; based on the water flow data in the reference historical water use intervals and the similarity between the reference historical water use intervals and the water use interval to be tested, obtain the complete water flow data for the water use interval to be tested. The complete water flow rate data to be measured is denoised to obtain the complete denoised water flow rate data to be measured.

2. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for obtaining a water flow threshold based on the magnitude of water flow data within a preset historical time period and determining the historical water consumption interval within that preset historical time period is as follows: Based on the magnitude of water flow data within a preset historical time period, the water flow threshold is obtained using the maximum inter-class variance method. Water flow data exceeding the water flow threshold within a preset historical time period will be considered as high flow data. The number of consecutive high-traffic data points is used as the first quantity. When the first quantity is greater than or equal to the preset first quantity threshold, the corresponding continuous high flow data will be constructed into a historical water consumption interval according to the time sequence of the corresponding time.

3. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for obtaining the similarity value between any two historical water use intervals based on the distance between every two matched water flow data points, as well as the differences in the quantity of water flow data and the differences in water pressure data, is as follows: The DTW algorithm is used to obtain the dynamic time-normalized distance between any two historical water use intervals for matching water flow data, which is used as the first matching distance. The difference in the number of water flow data between any two historical water use intervals is taken as the first difference. The average water pressure data in each historical water usage interval is obtained as the overall water pressure data for each historical water usage interval. Obtain the difference in overall water pressure data between any two historical water usage intervals as a reference water pressure difference; Based on the first matching distance, reference water pressure difference, and first difference between any two historical water use intervals, obtain the similarity value between the two historical water use intervals.

4. The data acquisition method for automated operation and maintenance of water facilities as described in claim 3, characterized in that, The formula for calculating the similarity value is: In the formula, This represents the similarity value between the a-th historical water use interval and the b-th historical water use interval. This represents the first difference between the a-th historical water use interval and the b-th historical water use interval; This represents the reference water pressure difference between the a-th historical water usage interval and the b-th historical water usage interval. The j-th first matching distance is between the a-th historical water use interval and the b-th historical water use interval. , is the preset weighted penalty coefficient; M is the total number of first matching distances between the a-th historical water use interval and the b-th historical water use interval; exp is an exponential function with the natural constant as the base.

5. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for dividing historical water use intervals based on similarity values ​​to obtain at least two categories is as follows: Each historical water use interval is resampled to a uniform preset number of points N through linear interpolation to obtain a standardized historical water use interval. Based on the similarity value, the standardized historical water use interval is used as input to perform clustering through the K-means clustering algorithm to obtain at least two categories. The k value in the K-means clustering algorithm is obtained by the elbow method.

6. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for obtaining the similarity between the water flow data in the water use interval to be tested and different preset numbers of water flow data in each historical water use interval of the same category is as follows: The number of water flow data points obtained in the water usage range to be measured is used as the third quantity; Use the third quantity of the preset multiple as the initial reference quantity; Set a preset step size, and increase the initial reference quantity sequentially according to the preset step size. The result of each increase is the updated reference quantity. Select any historical water use interval in the category of the water use interval to be measured as the target historical water use interval. When the number of updated references is equal to the number of water flow data in the target historical water use interval, stop updating the initial reference number. The initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval are used as the reference water flow dataset for the corresponding quantity. The acquisition of the initial reference quantity and the water flow data of each updated reference quantity under the target historical water use interval starts from the first water flow data in the target historical water use interval and continues until the corresponding quantity of water flow data is reached. The similarity between the water flow data in the water use interval to be tested and each reference water flow dataset is obtained as the similarity between the water flow data in the water use interval to be tested and the water flow data of different preset quantities under the target historical water use interval.

7. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for obtaining the reference historical water use interval is as follows: The maximum similarity between the water flow data in the water use interval to be tested and the water flow data of different preset numbers in each historical water use interval in the same category is obtained as a reference similarity between the water use interval to be tested and the corresponding historical water use interval. When the reference similarity is greater than the preset similarity threshold, the corresponding historical water use interval is used as the reference historical water use interval for the water use interval to be tested.

8. The data acquisition method for automated operation and maintenance of water facilities as described in claim 7, characterized in that, The method for obtaining the complete water flow data to be measured is as follows: Remove the water flow data in the reference historical water use interval corresponding to each reference similarity, and obtain the remaining water flow data in each reference historical water use interval as the target water flow data interval for each reference historical water use interval. Based on the reference similarity corresponding to each historical water use interval and the water flow data in the target water flow data interval, obtain the extended water flow data in the water use interval to be measured. The historical water usage interval corresponding to the maximum reference similarity is used as the special water usage interval; When the number of extended water flow data is the same as the number of water flow data in the target water flow data range of the special water use range, stop acquiring extended water flow data and determine the complete water flow data to be measured in the water use range to be measured.

9. The data acquisition method for automated operation and maintenance of water facilities as described in claim 8, characterized in that, The method for obtaining the extended water flow data is as follows: The product of the reference similarity corresponding to each historical water use interval and the nth water flow data in the target water flow data interval is used as the nth feature participation value of the corresponding historical water use interval. The sum of all nth feature values ​​is obtained and divided by the sum of all reference similarities. The resulting value is used as the nth extended water flow data in the water use interval to be measured.

10. The data acquisition method for automated operation and maintenance of water facilities as described in claim 1, characterized in that, The method for denoising the complete water flow rate data to obtain the complete denoised water flow rate data is as follows: The complete water flow data to be measured is marked in a two-dimensional coordinate system according to the time sequence of the corresponding time; where the horizontal axis of the two-dimensional coordinate system is time and the vertical axis is the complete water flow data to be measured. Connect the marked points in the two-dimensional coordinate system, and use the fitted curve as the complete water flow data curve to be measured. The complete water flow rate data curve is decomposed using the EMD algorithm to obtain the IMF component curve. The IMF component curves are denoised by wavelet transform, and the denoised IMF component curves are merged. Data from the original time period of the corresponding water use interval is extracted to obtain complete denoised water flow data.