Tap water loss detection method and device based on Internet of Things
By performing multi-scale extraction and prediction network inference on the time series data of IoT tap water loss, combined with time-scale fusion processing, the problem of insufficient multi-scale analysis in the existing technology is solved, and more accurate and comprehensive tap water loss prediction is achieved.
Patent Information
- Application Number
- CN202510445853.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2045-04-10
AI Technical Summary
When processing the time series data of IoT tap water loss in the prior art, multi-scale analysis is not in-depth enough and fails to fully explore the pattern of tap water loss change under different time scales.
By performing multi-scale extraction of the IoT detection timing set of tap water loss, a subset of IoT detection timing of different time scales is obtained, and each subset is inferred by using the tap water loss estimate network, and finally, multiple inference subsets are fusion processed in time.
It achieves a more accurate and comprehensive prediction of tap water loss, can more accurately reflect tap water loss under different time scales, and improves the accuracy and effectiveness of detection.
Smart Images

Figure CN119939228A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and more specifically, to a method and device for detecting tap water loss based on the Internet of Things. Background Art
[0002] In urban water supply systems, accurate monitoring of tap water loss is crucial for rationally planning water resources, reducing operating costs, and ensuring stable water supply. With the development of IoT technology, it has become possible to obtain tap water loss data through IoT detection, but how to effectively process and analyze this data to accurately grasp the tap water loss situation still faces many challenges.
[0003] In the field of tap water loss detection, the existing technology does not conduct in-depth multi-scale analysis of IoT detection time series data when processing IoT detection time series data. Many methods only consider the data characteristics of a single time scale and fail to fully explore the changing patterns of tap water loss at different time scales. Summary of the invention
[0004] In view of this, the present application provides a tap water loss detection method and device based on the Internet of Things to improve the above-mentioned problem.
[0005] According to one aspect of an embodiment of the present application, a method for detecting tap water loss based on the Internet of Things is provided, the method comprising: performing multi-scale extraction processing on an Internet of Things detection time series set of tap water loss in a known detection cycle to obtain multiple Internet of Things detection time series subsets with different time scales; matching the time scale with the Internet of Things detection time series subset one by one, the Internet of Things detection time series set comprising multiple loss detection results of the tap water loss in the known detection cycle; using a tap water loss estimation network to infer each of the Internet of Things detection time series subsets respectively to obtain multiple inferred Internet of Things detection time series subsets of the tap water loss in the detection cycle to be tested; performing time scale fusion processing on multiple of the inferred Internet of Things detection time series subsets to obtain an inferred Internet of Things detection time series set containing a target time scale, the inferred Internet of Things detection time series set comprising the inferred loss detection result of the tap water loss in the detection cycle to be tested.
[0006] According to another aspect of an embodiment of the present application, a tap water loss detection device based on the Internet of Things is provided, and the device includes: a multi-scale extraction module, which is used to perform multi-scale extraction processing on an Internet of Things detection time series set of tap water loss in a known detection cycle, and obtain multiple Internet of Things detection time series subsets with different time scales; the time scale and the Internet of Things detection time series subset are matched one by one, and the Internet of Things detection time series set includes multiple loss detection results of the tap water loss in the known detection cycle; a subset reasoning module, which is used to use a tap water loss estimation network to reason on each of the Internet of Things detection time series subsets respectively, and obtain multiple reasoned Internet of Things detection time series subsets of the tap water loss in the detection cycle to be tested; a scale fusion module, which is used to perform time scale fusion processing on multiple of the reasoned Internet of Things detection time series subsets, and obtain a reasoned Internet of Things detection time series set containing a target time scale, and the reasoned Internet of Things detection time series set includes the reasoned loss detection result of the tap water loss in the detection cycle to be tested.
[0007] The beneficial effects of the present application include at least: the present application performs multi-scale extraction processing on the IoT detection time series set of tap water loss (including multiple loss detection results of tap water loss in a known detection cycle), obtains multiple IoT detection time series subsets with different time scales, the time scales and IoT detection time series subsets are matched one by one, and the tap water loss estimation network is used to infer each IoT detection time series subset respectively, to obtain multiple inference IoT detection time series subsets of tap water loss in the detection cycle to be tested, and the multiple inference IoT detection time series subsets are subjected to time scale fusion processing to obtain the inference IoT detection time series set containing the target time scale (including the inference loss detection results of tap water loss in the detection cycle to be tested). Based on the above operations, the time scale of the IoT detection time series set to be inferred is not limited, and the inference of IoT detection time series sets of multiple time scales can be performed, the same IoT detection time series set can be inferred at multiple time scales, and the inference results of different time scales can be fused to obtain the final inference of tap water loss, and the result is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 It is a schematic diagram of the architecture of an application environment provided by this application; Figure 2 It is a flow chart of a method for detecting tap water loss based on the Internet of Things provided by the present application; Figure 3 It is a structural schematic diagram of a tap water loss detection device based on the Internet of Things provided in an embodiment of the present application. DETAILED DESCRIPTION
[0009] In order to facilitate a clearer understanding of the present application, the application environment of the tap water loss detection method based on the Internet of Things for implementing the present application is first introduced. Figure 1 As shown, the application scenario of the present application includes a computer system 10 and a terminal cluster, and the terminal cluster may include one or more terminals, and the number of terminals is not limited here. Figure 1 As shown, the terminal cluster may specifically include terminal 1, terminal 2, ..., terminal n; it can be understood that terminal 1, terminal 2, terminal 3, ..., terminal n can all be connected to the computer system 10 through a network connection, so that each terminal can exchange data with the computer system 10 through the network connection.
[0010] It is understandable that the computer system 10 may refer to a device that executes the method for detecting water loss based on the Internet of Things provided in this application, wherein the computer system 10 may be an independent physical server, or a server cluster or distributed system composed of at least two physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal may specifically refer to a flow sensor, but is not limited thereto.
[0011] For further information, see Figure 2 , is a flow chart of a method for detecting water loss based on the Internet of Things provided in an embodiment of the present application. Figure 2 As shown, this method can be Figure 1 The method for detecting water loss based on the Internet of Things may include the following steps: Step S100: Perform multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales; the time scales and IoT detection time series subsets are matched one by one, and the IoT detection time series set includes multiple loss detection results of tap water loss in a known detection cycle.
[0012] The IoT detection time series set is a series of detection data sets about tap water loss arranged in chronological order. The known detection period is the historical detection period with known loss, that is, the time period in the past. Multi-scale extraction processing is a frequency decomposition operation, which aims to analyze the data characteristics in the IoT detection time series set from different time scales. Computer systems can use a variety of technical means to implement this operation. For example, wavelet transform technology can be used, which is a signal analysis method that realizes multi-scale analysis by decomposing the signal into sub-signals of different frequencies. The principle is to convolve the original signal with a series of wavelet functions of different scales to obtain coefficients at different scales. These coefficients represent the signal characteristics at different time scales. The specific formula is: ,in, are the wavelet transform coefficients, is the original signal (i.e. the data in the IoT detection time series set), is the wavelet function, a is the scale parameter, and b is the translation parameter. Different a values correspond to different time scales. By adjusting a and b, the signal can be analyzed at different time scales and positions.
[0013] Let's take a simple example to illustrate the process of multi-scale extraction and processing. Assume that the IoT detection time series set is the tap water consumption data collected every 15 minutes in a community in a day, with a total of 96 data points. Through wavelet transform, the computer system can decompose these data into different time scales. For example, by setting different scale parameters a, IoT detection time series subsets at different time scales such as hourly scale and half-day scale can be obtained. At the hourly scale, every 4 15-minute data may be merged into one data point to form a new IoT detection time series subset in hours; at the half-day scale, every 24 15-minute data may be merged into one data point to form a IoT detection time series subset in half-day units. In addition to wavelet transform, the computer system can also use the empirical mode decomposition (EMD) method for multi-scale extraction and processing. The EMD method is an adaptive signal decomposition method that decomposes a complex signal into multiple intrinsic mode functions (IMFs) and a residual function. Each IMF represents the characteristics of the signal at different time scales. The basic steps are to first determine all local maxima and minima of the signal, then obtain the upper and lower envelopes through cubic spline interpolation, calculate the average of the upper and lower envelopes, subtract the average from the original signal to obtain a new signal, and repeat this process until the new signal meets the IMF conditions. In this way, the computer system can decompose the IoT detection time series set into components of different time scales, and then obtain IoT detection time series subsets of different time scales. Through multi-scale extraction processing, the computer system can mine information from the IoT detection time series set at different time scales. The IoT detection time series subsets of different time scales contain different levels of tap water loss change characteristics. For example, the subsets of shorter time scales may reflect the fluctuations in daily water use, while the subsets of longer time scales may reflect seasonal or periodic water use patterns. These IoT detection time series subsets of different time scales provide a rich data basis for the subsequent use of the tap water loss estimation network for reasoning, which helps to improve the accuracy and comprehensiveness of the reasoning results.
[0014] When the computer system executes step S100, it performs multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle through appropriate technical means (such as wavelet transform, empirical mode decomposition, etc.), and obtains multiple IoT detection time series subsets with different time scales and one-to-one matching, which lays a solid foundation for the subsequent reasoning and analysis of the tap water loss in the detection cycle to be tested.
[0015] Step S200: using the tap water loss estimation network to infer each IoT detection time series subset respectively, and obtain multiple inferred IoT detection time series subsets of tap water loss in the detection cycle to be tested.
[0016] The tap water loss estimation network can be a complex model composed of multiple IoT detection time series subset reasoning networks. These IoT detection time series subset reasoning networks can be built based on a variety of technologies, such as artificial neural networks, recurrent neural networks (RNNs) and their variants such as long short-term memory networks (LSTMs), gated recurrent units (GRUs), etc. When the computer system uses the tap water loss estimation network for reasoning, it must perform corresponding operations for each IoT detection time series subset. Assume that in a medium-sized urban tap water monitoring project, after processing in step S100, IoT detection time series subsets with different time scales of hours, days, and weeks are obtained.
[0017] For the IoT detection time series subset with hourly time scale, the computer system will use the corresponding IoT detection time series subset reasoning network for reasoning. This reasoning process is based on the fact that the IoT detection time series subset reasoning network has been trained and can learn the characteristics and rules of the tap water loss data at this time scale. For example, the reasoning network may have learned the peak and trough patterns of water consumption in different time periods on weekdays and weekends, as well as the changing trends of hourly water consumption in different seasons. The computer system inputs this IoT detection time series subset with hourly scale into the corresponding IoT detection time series subset reasoning network. The network calculates according to its internal weights and algorithms, and outputs a temporary reasoning IoT detection time series subset. This temporary reasoning IoT detection time series subset contains the preliminary reasoning results of the reasoning network on the tap water loss in the test cycle to be tested with hourly scale. The test cycle to be tested is the time period for which the tap water loss prediction is required, that is, a time period in the future.
[0018] Similarly, for the IoT detection time series subset with a time scale of days, the computer system uses another IoT detection time series subset reasoning network specially trained for the day scale for reasoning. This network may capture the influence of certain special dates of each month (such as near the bill settlement date) and holidays on the daily tap water loss. After the IoT detection time series subset is input, it is calculated and processed within the network to output a temporary reasoning IoT detection time series subset with a time scale of days, which represents the reasoning of the reasoning network on the daily tap water loss in the test cycle to be tested.
[0019] The IoT detection time series subset with a weekly time scale will also go through a similar process. The corresponding IoT detection time series subset reasoning network will take into account the comprehensive water usage patterns of different working days and rest days in a week, as well as the impact of some periodic water usage events on the weekly tap water loss. After inputting the IoT detection time series subset, a temporary reasoning IoT detection time series subset with a weekly scale is obtained.
[0020] After obtaining these temporary reasoning IoT detection timing subsets, the computer system also needs to consider the reliability and importance of each temporary reasoning IoT detection timing subset, which involves obtaining the influence coefficient corresponding to each temporary reasoning IoT detection timing subset. For example, the neural network algorithm mentioned above can be used to predict the network influence coefficient of the IoT detection timing subset reasoning network. Taking the training of a classification fusion neural network as an example, it can determine which IoT detection timing subset reasoning network has the most reliable output under different circumstances by learning a large amount of historical data, thereby assigning the network influence coefficient of the network to 1, while the network influence coefficients of other IoT detection timing subset reasoning networks are 0. Another way is to train a regression fusion neural network and assign corresponding network influence coefficients to each IoT detection timing subset reasoning network according to its performance. Assume that the trained regression fusion neural network analysis finds that the IoT detection time series subset reasoning network based on hours is more accurate in predicting the recent tap water loss under certain specific circumstances, so it may be given a higher influence coefficient, such as 0.8; while the IoT detection time series subset reasoning network based on weeks has a slightly lower prediction accuracy under the same circumstances, so it may be given an influence coefficient of 0.3.
[0021] The computer system adjusts multiple temporary reasoning IoT detection time series subsets based on these acquired influence coefficients. For example, for temporary reasoning IoT detection time series subsets based on hours, multiply each data point by 0.8; for temporary reasoning IoT detection time series subsets based on weeks, multiply each data point by 0.3. Through this adjustment, the reliability and importance of the IoT detection time series subset reasoning network at different time scales are comprehensively considered, so that the adjusted results can more accurately reflect the actual situation. Finally, the computer system determines the adjusted results as the reasoning IoT detection time series subset of tap water loss in the test cycle to be tested.
[0022] Step S300: Perform time scale fusion processing on multiple inference IoT detection time series subsets to obtain an inference IoT detection time series set containing a target time scale, wherein the inference IoT detection time series set includes an inference loss detection result of tap water loss in a detection cycle to be tested.
[0023] After step S200, the computer system has obtained multiple inference IoT detection time series subsets of different time scales. For example, in a city's tap water monitoring system, there may be an inference IoT detection time series subset with an hourly time scale, which reflects the hourly tap water loss reasoning situation; there is also an inference IoT detection time series subset with a day as the time scale, which presents the daily loss reasoning data; and an inference IoT detection time series subset with a week as the time scale, which shows the weekly loss reasoning results. These subsets with different time scales reflect the changing patterns of tap water loss from different angles, but a single subset cannot fully and accurately present the overall situation.
[0024] Time scale fusion processing is the key operation of this step. Its purpose is to integrate the information of these different time scales to obtain a comprehensive result that better meets actual needs and includes the target time scale. Computer systems can use a variety of technical means to achieve this operation. For example, the weighted average method can be used for fusion. The principle of the weighted average method is to assign corresponding weights to different inference IoT detection time series subsets according to their importance or reliability, and then achieve fusion by calculating the weighted average. The specific formula is: , where F is the result of fusion, is the weight of the i-th inference IoT detection time series subset, is the data value of the i-th inference IoT detection timing subset, and n is the number of inference IoT detection timing subsets.
[0025] In order to determine the weight of each inference IoT detection time sequence subset, the computer system first obtains the subset influence coefficient corresponding to each inference IoT detection time sequence subset. This process can be implemented based on multiple methods.
[0026] For example, by analyzing and comparing historical data, we can evaluate the degree of fit of the inference IoT detection time series subset at each time scale to the actual water loss in the past. If the inference IoT detection time series subset with a daily time scale has accurately reflected the actual daily loss many times in the past, then its subset influence coefficient (weight) can be set relatively high; conversely, if a subset of a certain time scale deviates greatly from the actual situation, its weight will be reduced accordingly.
[0027] Assume that in the above-mentioned city tap water monitoring case, the computer system has analyzed and concluded that the subset influence coefficient of the time series subset of the reasoning IoT detection with a time scale of days is 0.5, the subset influence coefficient with a time scale of weeks is 0.3, and the subset influence coefficient with a time scale of hours is 0.2. When performing time scale fusion processing, for a specific time point (such as a day in the test cycle to be tested), the computer system will calculate according to the formula of the weighted average method. If the reasoning loss detection result of the day with an hourly scale is s1, the result with a day scale is s2, and the result with a week scale is s3, then the reasoning loss detection result of the day after fusion is F=(0.2×s1+0.5×s2+0.3×s3) / (0.2+0.5+0.3).
[0028] In addition to the weighted average method, the computer system can also adopt a model-based fusion method. For example, a fusion model is constructed, which can be a neural network model. Multiple inference IoT detection time series subsets are used as input, and after multiple layers of calculation and learning within the model, a set of inference IoT detection time series containing the target time scale is output. This fusion model needs to be trained with a large amount of historical data in advance so that it can automatically learn the relationship and weight distribution method between inference IoT detection time series subsets of different time scales, thereby achieving more accurate fusion.
[0029] In actual operation, the computer system first obtains the subset influence coefficient corresponding to each inference IoT detection time series subset. This step provides the basis and basis for subsequent fusion. Then, based on these coefficients, appropriate fusion technology means (such as weighted average method or model-based fusion method) are used to adjust and integrate multiple inference IoT detection time series subsets. Finally, a set of inference IoT detection time series containing the target time scale is obtained. The inference loss detection results in this set integrate information from multiple time scales, and more comprehensively and accurately reflect the situation of tap water loss in the test cycle to be tested.
[0030] As an implementation mode, step S100 performs multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales, including: Step S110: Perform null value diagnosis on the IoT detection time series set to obtain a diagnosis result; Step S120: if the diagnosis result indicates that the IoT detection time series set has a null value, the IoT detection time series set is filled with null values to obtain a target IoT detection time series set, and the target IoT detection time series set is subjected to multi-scale extraction processing to obtain multiple IoT detection time series subsets with different time scales; Step S130: If the diagnosis result indicates that the IoT detection time series set does not have a null value, a multi-scale extraction process is performed on the IoT detection time series set to obtain a plurality of IoT detection time series subsets with different time scales.
[0031] In step S110, the computer system performs null value diagnosis on the IoT detection time series set to obtain a diagnosis result. The IoT detection time series set is a series of tap water loss detection data sets arranged in chronological order, where each loss detection result contains information such as the corresponding acquisition node. The computer system can implement null value diagnosis by analyzing the time series characteristics of the data in the IoT detection time series set. For example, the autocorrelation function (ACF) and partial autocorrelation function (PACF) in time series analysis are used to observe the periodicity and correlation of the data. The autocorrelation function formula is: ,in, is the autocorrelation coefficient at lag k, is the autocovariance at lag k, is the variance. The partial autocorrelation function measures the direct correlation between two variables after eliminating the influence of the intermediate variable. By calculating these functions, the computer system can preliminarily determine whether there are abnormal time intervals or missing patterns in the data, and thus infer whether there are null values.
[0032] For example, suppose that the IoT detection time series set contains the tap water consumption data collected every 15 minutes in a certain area within a week. The computer system first applies the autocorrelation function and partial autocorrelation function to analyze these data. If the data shows a stable periodicity, for example, there is an obvious peak and trough period of water consumption every 24 hours, and the autocorrelation coefficient decays rapidly after a certain lag order, and the partial autocorrelation coefficient is truncated after a certain order, this indicates that the time series characteristics of the data are relatively normal. On the contrary, if the autocorrelation coefficient or partial autocorrelation coefficient is found to fluctuate abnormally, or the periodicity is not obvious, it may indicate the existence of null values.
[0033] In step S120, if the diagnosis result indicates that the IoT detection time series set has null values, the computer system will fill the set with null values to obtain the target IoT detection time series set, and then perform multi-scale extraction processing on the target IoT detection time series set to obtain multiple IoT detection time series subsets with different time scales. There are many methods for filling null values, and a feasible method is the mean filling method, which is to calculate the average value of the loss detection results already in the IoT detection time series set, and then fill the null value position with this average value. The formula is: ,in, is the average value, is the i-th non-empty loss detection result, and n is the number of non-empty data.
[0034] Continuing with the above case, suppose that after null value diagnosis, it is found that the data between 10 am and 10:30 am on Tuesday is missing. The computer system uses the mean filling method to calculate the average value of the tap water loss collected every 15 minutes in other time periods in the area during the week. Assuming that the average value is 5 cubic meters (this is just an example), 5 cubic meters of data are filled in the two missing data positions (10 o'clock and 10:15), thereby obtaining the target IoT detection time series set. Afterwards, the computer system performs multi-scale extraction processing on this target IoT detection time series set, such as using wavelet transform technology (its principles and formulas have been detailed in the previous article) to decompose the data into different time scales, and obtain IoT detection time series subsets with time scales such as hours and days.
[0035] In addition to the mean filling method, the computer system can also use linear interpolation to fill in the null value. Linear interpolation is based on the linear relationship between two adjacent known data points to estimate the null value. Assuming that The time corresponding to two adjacent data points is , the time corresponding to the empty value to be filled is t, then the calculation formula for the empty value x is: For example, if the data at 10 o'clock is 4 cubic meters, and the data at 10:30 is 6 cubic meters, to fill the empty value at 10:15, use linear interpolation to calculate. =5 cubic meters.
[0036] In step S130, if the diagnosis result indicates that the IoT detection time series set does not have a null value, the computer system directly performs multi-scale extraction processing on the IoT detection time series set to obtain multiple IoT detection time series subsets with different time scales. In this case, since the integrity of the data is guaranteed, the multi-scale extraction processing can more accurately reflect the characteristics of the data at different time scales.
[0037] For example, in the tap water monitoring of another smaller area, the IoT detection time series set contains the tap water loss data collected at the hour every day within a month. After the null value diagnosis, the computer system determines that there is no null value in the set. At this time, the computer system directly performs multi-scale extraction processing on the IoT detection time series set, and the empirical mode decomposition (EMD) method can be used. The EMD method decomposes the signal into multiple intrinsic mode functions (IMFs) and a residual function, and each IMF represents the characteristics of the signal at different time scales. The computer system decomposes the IoT detection time series set into components of different time scales through the EMD method, for example, obtaining IoT detection time series subsets with different time scales such as a few days as the scale and a week as the scale. These subsets can respectively reflect the characteristics of the tap water loss changes at different levels, such as short-term fluctuations and medium-term trends.
[0038] By properly using time series analysis methods, such as autocorrelation function and partial autocorrelation function, the computer system can more accurately determine whether there are null values in the IoT detection time series set. For cases where null values exist, using appropriate null value filling methods, such as mean filling method, linear interpolation method, etc., can effectively fill in the missing data, so that the subsequent multi-scale extraction processing can proceed smoothly. For cases where there are no null values, directly performing multi-scale extraction processing can make full use of complete data information and dig out the changing rules of tap water loss at different time scales.
[0039] As an implementation mode, each loss detection result included in the IoT detection time series set includes a corresponding acquisition node. Step S110, performing null value diagnosis on the IoT detection time series set to obtain a diagnosis result, includes: Step S111: periodically identifying the IoT detection time series set, obtaining a target time interval, and determining a reference time difference between two acquisition nodes of the loss detection results in the IoT detection time series set according to the target time interval; Step S112: for two random adjacent loss detection results in the IoT detection time series set, obtain the real time difference between the collection nodes of the two random adjacent loss detection results; Step S113: if the target real time difference is greater than the reference time difference, a diagnosis result indicating that the IoT detection timing set has a null value is obtained; Step S114: If there is no target real time difference greater than the reference time difference, a diagnosis result indicating that the IoT detection timing set does not have a null value is obtained.
[0040] In step S111, the computer system performs periodic identification on the IoT detection time series set, obtains the target time interval, and determines the reference time difference between the acquisition nodes of the two loss detection results in the IoT detection time series set based on the target time interval. Periodic identification is the process of analyzing whether there is a repetitive pattern with a fixed time interval in the time series data. The computer system can use a variety of technical means to achieve this operation, such as Fourier transform. The formula for Fourier transform is: ,in, is the frequency domain representation after Fourier transform, is the original time series (i.e., the data in the IoT detection time series set), n is the index of the time series, N is the total number of data points, k is the frequency index, e is a natural constant, and i is an imaginary unit. Through Fourier transform, the computer system can convert the IoT detection time series set in the time domain to the frequency domain, find the frequency corresponding to the peak in the frequency domain, and the reciprocal of the frequency is the possible period. For example, in the monitoring of tap water loss in a community, the IoT detection time series set records the loss data collected at regular intervals over a period of time. The computer system applies Fourier transform to process these data, and obtains the frequency domain results after calculation. It is found that there is an obvious peak at a specific frequency. Assuming that the frequency is f, then the period T=1 / f, and this T is the possible period preliminarily identified.
[0041] In addition to Fourier transforms, computer systems can also use autocorrelation analysis to determine periodicity. The autocorrelation function (ACF) is a measure of the correlation between a time series and itself at different time lags. Its formula is: ,in, is the autocorrelation coefficient at lag k, x t is the value of the time series at time t, is the mean of the time series, and n is the total number of data points. The computer system calculates the autocorrelation coefficient at different lag k values. When the autocorrelation coefficient shows obvious periodic fluctuations at certain specific k values, the time intervals corresponding to these k values may be the period. For example, after calculation, it is found that the autocorrelation coefficient has an obvious peak when k=24 (assuming that the data collection interval is 1 hour, which means 24 hours here), and shows a periodic pattern, then it can be inferred that the IoT detection time series set may have the characteristic of a 24-hour period.
[0042] After determining the target time interval, the computer system determines the reference time difference between the collection nodes of the two loss detection results in the IoT detection time series set based on the target time interval. For example, if the target time interval is determined to be 24 hours through the above method, and data collection is performed at a fixed interval, assuming that data is collected every 1 hour, then the reference time difference between the collection nodes of the two loss detection results is 1 hour.
[0043] In step S112, for two random adjacent loss detection results in the IoT detection time series set, the computer system obtains the real time difference between the collection nodes of the two adjacent loss detection results. In the actual data collection process, due to the influence of various factors, such as equipment failure, network delay, etc., the collection time of adjacent loss detection results may deviate. The computer system calculates the actual time interval between two adjacent collection nodes, that is, the real time difference, by reading the collection time information attached to each loss detection result. For example, there are two adjacent loss detection results in the IoT detection time series set, the collection time of the first result is 10 am, and the collection time of the second result is 11:05 am, then the real time difference between the collection nodes of the two adjacent loss detection results is 65 minutes.
[0044] In step S113, if there is a target real time difference greater than the reference time difference, the computer system obtains a diagnostic result indicating that the IoT detection timing set has a null value. This is because in a system with a fixed acquisition cycle, if the time difference between adjacent acquisition nodes is significantly greater than the normal reference time difference, it is likely to mean that there is data missing during this longer time interval. For example, the reference time difference was previously determined to be 1 hour, and when checking the adjacent loss detection results, it was found that the real time difference between two adjacent results was 2 hours, which indicates that there may be at least one missing data point between the two acquisition nodes, that is, the IoT detection timing set has a null value. The computer system compares the real time difference of all adjacent loss detection results with the reference time difference, and once it finds that there is a time difference greater than the reference time difference, it determines that the IoT detection timing set has a null value.
[0045] In step S114, if there is no target real time difference greater than the reference time difference, the computer system obtains a diagnostic result indicating that the IoT detection timing set does not have a null value. That is, after the computer system checks the real time differences between the acquisition nodes of all adjacent loss detection results in the IoT detection timing set, it is found that all the real time differences are within a reasonable range, that is, not greater than the reference time difference, then it can be considered that the IoT detection timing set does not have a null value. For example, after checking one by one, the real time differences between the acquisition nodes of all adjacent loss detection results are between 0.9-1.1 hours (because there may be a certain time error in the actual situation), and the reference time difference is 1 hour. In this case, the computer system can determine that the IoT detection timing set does not have a null value.
[0046] By periodically identifying and determining the reference time difference, the computer system can establish a benchmark for determining whether the data is complete. Then, by comparing the actual time difference with the reference time difference, it can accurately detect possible null values in the data. This not only helps with subsequent data processing and analysis to ensure the accuracy of the results, but also can promptly remind staff to check and maintain the data collection system to avoid misjudgments and decision-making errors caused by missing data.
[0047] As an implementation mode, the IoT detection sequence set includes multiple loss detection result tuples, and the loss detection result tuple includes two random adjacent loss detection results in the IoT detection sequence set. Based on this, step S111, periodically identifying the IoT detection sequence set to obtain a target time interval, includes: Step S1111: for each loss detection result tuple, determine the time difference between the collection nodes of two adjacent loss detection results in the loss detection result tuple; Step S1112: if the time differences corresponding to the multiple loss detection result tuples are the same, then determine the target time interval based on the time difference; Step S1113: If the time differences corresponding to the multiple loss detection result binary groups are different, then the adjustment calculation results of the multiple time differences are determined, and the target time interval is determined according to the adjustment calculation results.
[0048] In step S1111, the computer system determines the time difference between the collection nodes of two adjacent loss detection results in each loss detection result tuple for each loss detection result tuple in the IoT detection time series set. A loss detection result tuple is composed of two random adjacent loss detection results in the IoT detection time series set. To achieve this operation, the computer system first extracts all loss detection result tuples from the IoT detection time series set. For example, in a tap water loss monitoring scenario in a small community, the IoT detection time series set records the tap water loss data collected every 15 minutes in a day, with a total of 96 data points, which also forms 95 loss detection result tuples.
[0049] The computer system reads the collection time information attached to each loss detection result and accurately calculates the time difference between the collection nodes of two adjacent loss detection results in each tuple. Specifically, if the collection time of the first loss detection result is 8:00 am and the collection time of the second loss detection result is 8:15 am, then the time difference between the collection nodes of these two adjacent loss detection results is 15 minutes. The computer system will perform this operation on all 95 loss detection result tuples in turn to obtain a series of time difference data.
[0050] After completing the calculation of the time difference of all loss detection result binary groups, proceed to step S1112. In this step, the computer system analyzes the time difference corresponding to multiple loss detection result binary groups. If the time difference corresponding to multiple loss detection result binary groups is the same, this means that the IoT detection timing set shows obvious periodic characteristics, and the computer system determines the target time interval based on this same time difference. Continuing with the above-mentioned small community case, if the computer system finds through calculation that the time difference of all 95 loss detection result binary groups is 15 minutes, then the target time interval can be determined to be 15 minutes. This shows that the tap water loss data collection in this community has strict periodicity, and data collection is performed every 15 minutes.
[0051] If all time differences are equal, then this equal time difference is the target time interval. This simple and direct method can quickly and effectively determine the target time interval when the amount of data is small and the periodicity is obvious. However, the actual situation is often more complicated. In many scenarios, the time differences corresponding to multiple loss detection result tuples may not be the same. At this point, enter step S1113. When faced with multiple different time differences, the computer system needs to determine the adjustment calculation results of these time differences, such as calculating their greatest common divisor. The calculation of the greatest common divisor can use the Euclidean algorithm, and the formula is expressed as: for two positive integers a and , where gcd represents the greatest common divisor and a mod b represents the remainder when a is divided by b. By repeatedly applying this formula, we can eventually get the greatest common divisor of a and b.
[0052] Through this adjustment calculation method, the potential periodicity can be extracted from the complex time difference data. Even if there are some irregularities in the data collection process, a suitable time interval can still be found to reflect the periodic characteristics of the data through adjustment calculation methods such as calculating the greatest common divisor. This target time interval is of great significance for the subsequent determination of the reference time difference and the judgment of whether there is a null value in the IoT detection time series set.
[0053] In the actual tap water loss detection project, the accurate execution of steps S1111-S1113 can help the computer system to deeply analyze the periodic characteristics of the IoT detection time series set. By determining the target time interval, key basic information is provided for the entire data processing process. If the target time interval is not accurately determined, it may lead to incorrect judgment of the subsequent reference time difference, which in turn affects the judgment of whether there is a null value in the IoT detection time series set.
[0054] As an implementation manner, step S120, performing null value filling on the IoT detection timing set to obtain a target IoT detection timing set, includes: Step S121: filling in the missing target acquisition node between the two acquisition nodes corresponding to the target real time difference according to the reference time difference, and setting the data corresponding to the target acquisition node to a missing value; Step S122: Determine the tap water loss data corresponding to the target collection node according to the null value filling strategy, and replace the missing value with the tap water loss data.
[0055] In step S121, the computer system fills in the missing target acquisition node between the two acquisition nodes corresponding to the target real time difference according to the reference time difference, and sets the data corresponding to the target acquisition node to the missing value. The reference time difference is determined by the computer system in the previous step by periodically identifying and analyzing the IoT detection timing set, which represents the time interval between adjacent acquisition nodes under normal circumstances. The target real time difference is the actual time interval greater than the reference time difference found by the computer system when checking the acquisition nodes of adjacent loss detection results in the IoT detection timing set.
[0056] For example, in a tap water loss monitoring project in a small town, the computer system determined through preliminary analysis that the reference time difference was 1 hour. When checking the IoT detection time series set, it was found that the target real time difference between the collection nodes of two adjacent loss detection results was 3 hours. This means that there is at least two hours of data missing between the two collection nodes. The computer system evenly inserts two target collection nodes between the two collection nodes based on the reference time difference. Assuming that the time of the previous collection node is 10 am and the time of the next collection node is 1 pm, the computer system will insert two target collection nodes at 11 am and 12 noon. At the same time, the data corresponding to the two newly inserted target collection nodes are set to missing values to mark the data at these locations as requiring further processing.
[0057] The computer system can identify the location of the target real time difference by traversing the IoT detection time series set. For each such location, the number and location of the target acquisition nodes to be inserted are calculated based on the reference time difference. For example, if the target real time difference is T real , the reference time difference is T ref , then the number of target acquisition nodes that need to be inserted (Assumption Then, these target acquisition nodes are inserted between the previous and next acquisition nodes in an evenly spaced manner, and their corresponding data are set to specific missing value identifiers, such as "null" or other custom missing symbols.
[0058] After completing the insertion and missing value setting of the target collection node, the process proceeds to step S122. In this step, the computer system determines the tap water loss data corresponding to the target collection node based on the null value filling strategy, and replaces the missing value with the tap water loss data. There are many ways to fill the null value strategy, such as the mean filling method, the linear interpolation method, the model-based prediction method, etc.
[0059] The mean filling method is a relatively simple and direct strategy. The computer system calculates the average value of the existing tap water loss data in the IoT detection time series set, and then uses this average value to fill all missing values. The linear interpolation method estimates the missing values based on the linear relationship between two adjacent known data points. Assuming that the time corresponding to the two adjacent data points x1 and x2 is known to be t1 and t2, and the time corresponding to the missing value to be filled is t, the calculation formula for the missing value x is: .
[0060] Model-based prediction methods are relatively more complex and accurate. Computer systems can use machine learning or deep learning models, such as linear regression models, decision tree models, recurrent neural networks (RNNs), etc., to learn and train existing data and build a model that can predict tap water loss. Then, use this model to predict missing values and use the predicted results as fill-in values. Taking the linear regression model as an example, its basic formula is: , where y is the predicted water consumption, are the coefficients of the model, is the input feature variable (such as time, date, weather and other related factors), The computer system first collects various characteristic data related to tap water loss, and uses them together with the known tap water loss data as a training set to train the linear regression model and obtain the coefficients of the model. . Then, for the inserted target acquisition node, according to its corresponding time and other feature information, it is input into the trained model for prediction, and the predicted tap water loss is obtained, and it is used as a filling value to replace the missing value. By executing steps S121-S122, the empty values in the IoT detection time series set can be effectively filled to obtain the target IoT detection time series set. This not only ensures the integrity of the data, provides a reliable data basis for subsequent multi-scale extraction processing and analysis, but also reduces errors and inaccurate results caused by missing data.
[0061] As an implementation method, each loss detection result included in the IoT detection sequence set includes a corresponding acquisition node, and the IoT detection sequence set includes multiple loss detection result tuples, and the loss detection result tuple includes two random adjacent loss detection results in the IoT detection sequence set. Based on this, step S110 performs null value diagnosis on the IoT detection sequence set, and the obtained diagnosis results include: Step S1101: for each loss detection result tuple, determine the time difference between the collection nodes of two adjacent loss detection results in the loss detection result tuple; Step S1102: if the time differences corresponding to the multiple loss detection result tuples are the same, a diagnosis result indicating that the IoT detection time series set does not have a null value is obtained; Step S1103: If the time differences corresponding to the multiple loss detection result tuples are different, a diagnosis result indicating that the IoT detection timing set has a null value is obtained.
[0062] In step S1101, the computer system determines the time difference between the collection nodes of two adjacent loss detection results in each loss detection result tuple for each loss detection result tuple in the IoT detection time series set. A loss detection result tuple is composed of two random adjacent loss detection results in the IoT detection time series set. To achieve this operation, the computer system first traverses the entire IoT detection time series set and divides the data therein into loss detection result tuples according to the adjacent relationship.
[0063] For example, in a city's tap water loss monitoring system, the IoT detection time series set records the tap water loss data collected every 30 minutes within a week. The computer system will process these data in sequence, and form a tuple of every two adjacent loss detection results. Assuming that in the first tuple, the collection time of the first loss detection result is 8:00 am on Monday, and the collection time of the second loss detection result is 8:30 am on Monday, then the computer system will calculate that the time difference between the collection nodes of the two adjacent loss detection results in this tuple is 30 minutes. Then, the computer system will continue to process the next tuple, and so on, until all loss detection result tuples are processed, thereby obtaining a series of time difference data.
[0064] After completing the calculation of the time differences of all loss detection result binary groups, in step S1102, the computer system analyzes the time differences corresponding to the multiple loss detection result binary groups. If the time differences corresponding to the multiple loss detection result binary groups are the same, this indicates that the IoT detection time series set has good periodicity, data collection is performed at a fixed time interval, and there is no abnormal time interval, so the computer system can obtain a diagnosis result indicating that the IoT detection time series set does not have a null value.
[0065] Continuing with the above-mentioned city tap water loss monitoring system as an example, if the computer system finds through calculation that the time difference corresponding to all loss detection result tuples is 30 minutes, this means that the collection time interval of the IoT detection time series set is very regular, and there is no null value situation that may be caused by abnormal time interval. This judgment method based on time difference consistency can quickly and effectively determine the integrity of the IoT detection time series set when the data collection process is relatively stable and the equipment is operating normally. It provides a simple and direct way for the computer system to evaluate the quality of the data and ensure that subsequent data processing and analysis can be based on complete and reliable data. However, in actual tap water loss monitoring, due to the influence of various factors, such as failure of data acquisition equipment, network transmission problems or external environmental interference, the time differences corresponding to multiple loss detection result tuples may not be the same. This leads to step S1103.
[0066] When the computer system finds that the time differences corresponding to multiple loss detection result tuples are different, it means that the collection time interval of the IoT detection time series set is abnormal. This abnormality may be due to omissions or delays in data collection in certain time periods, resulting in inconsistent time intervals between adjacent data, which suggests that the IoT detection time series set may have null values. Therefore, the computer system will obtain a diagnostic result indicating that the IoT detection time series set has null values.
[0067] The computer system can keenly capture the abnormal changes in time intervals by comparing and analyzing the time difference data one by one. Once different time differences are found, it can be determined that the IoT detection time series set has null values. This judgment is very critical for subsequent data processing, because the existence of null values may affect the accuracy and reliability of the entire data analysis.
[0068] If the IoT detection time series set contains a large amount of data in the tap water loss monitoring of a large enterprise, the computer system can promptly detect abnormalities in the data collection process by executing these three steps. If it is determined that the IoT detection time series set has a null value, the enterprise can promptly check the problems of the data collection equipment and network, supplement or correct the missing data, and ensure that the subsequent analysis of the tap water loss is accurate and reliable.
[0069] The computer system executes steps S1101-S1103, and provides an effective method for determining whether the IoT detection timing set has a null value by analyzing the time difference of the collection nodes of the loss detection result tuple in the IoT detection timing set.
[0070] As another implementation, step S100 performs multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales, including: Step S1001: obtaining the collection nodes of each loss detection result included in the IoT detection time series set, and obtaining a plurality of different time intervals for multi-scale extraction processing, wherein the time intervals and time scales are matched one by one; Step S1002: for each time interval, multiple loss detection results are integrated at the time interval according to the collection node to obtain an integrated set corresponding to the time interval; Step S1003: Determine the integrated set corresponding to the multiple time intervals as multiple IoT detection timing subsets with different time scales.
[0071] In step S1001, the computer system obtains the collection nodes of each loss detection result included in the IoT detection time series set, and obtains multiple different time intervals for multi-scale extraction processing, and the time intervals and time scales match one by one. The IoT detection time series set is a series of tap water loss detection data sets arranged in chronological order, and each loss detection result is associated with the collection node information, and these collection nodes record the data collection time. By reading the data structure of the IoT detection time series set, the computer system can accurately extract the collection node information corresponding to each loss detection result. For example, in a tap water loss monitoring project in a medium-sized city, the IoT detection time series set covers the tap water loss data collected every 15 minutes in multiple areas of the city within a week. The computer system can directly read each loss detection result record from the data storage structure (such as a database table or file), and parse out the corresponding collection node identifier from it. These identifiers may be specific geographical location information (such as a water supply point on a street in a district) or the number of the collection device, etc.
[0072] At the same time, the computer system also obtains a plurality of different time intervals for multi-scale extraction processing. These time intervals are pre-set according to analysis requirements and data characteristics, and different time intervals correspond to different time scales.
[0073] In step S1002, the computer system integrates multiple loss detection results at each time interval according to the collection node to obtain an integrated set corresponding to the time interval. The core of this step is to regroup and summarize the data in the IoT detection time series set according to different time intervals.
[0074] Still taking the above-mentioned city tap water loss monitoring project as an example, for a 30-minute time interval, the computer system traverses all loss detection results in the IoT detection time series set. Assuming that a certain collection node has a loss detection result at 8:00 and another loss detection result at 8:15, since both results are within the 30-minute time interval of 8:00-8:30, the computer system will integrate the two loss detection results. The integration method can be a simple summation, average or other statistical operations.
[0075] For all collection nodes, the computer system will integrate the loss detection results in each 30-minute time interval in the same way. In this way, for all collection nodes in the entire city, a set of integrated results with a time interval of 30 minutes is obtained. For other time intervals, such as 1 hour, 3 hours, etc., the computer system will perform similar operations. Taking the 1-hour time interval as an example, assuming that a collection node has loss detection results at 8:00, 8:15, 8:30 and 8:45, the computer system will integrate these four results into a comprehensive result of the collection node in the 1-hour time interval from 8:00 to 9:00.
[0076] Finally, step S1003 is entered, and the computer system determines the integrated sets corresponding to the multiple time intervals as multiple IoT detection time series subsets with different time scales. After step S1002, the computer system has generated a corresponding integrated set for each preset time interval. These integrated sets reflect the changes in the amount of tap water loss from different time scales.
[0077] Taking the previous urban tap water loss monitoring project as an example, the integrated set with a time interval of 30 minutes, the integrated set with a time interval of 1 hour, and the integrated set with a time interval of 3 hours are respectively determined as IoT detection time series subsets of different time scales. These subsets are different in time granularity. The subset with a time scale of 30 minutes can reflect the high-frequency fluctuation of tap water loss in a short period of time, which is suitable for analyzing the short-term changes in daily water use; the subset with a time scale of 1 hour smoothes the data to a certain extent, and can better reflect the overall loss trend per hour; while the subsets with longer time scales such as 3 hours and 6 hours can be used to observe the loss pattern in a longer period of time, such as the different water use patterns on weekdays and weekends.
[0078] In this way, the computer system divides the original IoT detection time series set into multiple scales according to different time intervals, and obtains multiple IoT detection time series subsets with different time scales. These subsets provide rich perspectives for subsequent data analysis and processing, and can meet analysis needs at different levels.
[0079] The computer system executes steps S1001-S1003, obtains collection nodes and multiple time intervals, integrates the IoT detection time series set by time interval, and finally determines it as multiple IoT detection time series subsets with different time scales, providing a comprehensive and rich data foundation for in-depth analysis and accurate prediction of tap water loss. This multi-scale extraction and processing method helps to mine the characteristics and laws of data in different time dimensions, improve the accuracy and effectiveness of tap water loss detection, and thus better support urban water supply management and decision-making.
[0080] As an implementation mode, the tap water loss estimation network includes multiple IoT detection time series subset reasoning networks; step S200, using the tap water loss estimation network, respectively reasoning each IoT detection time series subset, and obtaining multiple reasoning IoT detection time series subsets of tap water loss in the detection cycle to be tested, including: For each IoT detection timing subset, complete the following steps respectively: Step S210: for each IoT detection timing subset inference network, use the IoT detection timing subset inference network to infer the IoT detection timing subset, and obtain a temporary inference IoT detection timing subset corresponding to the IoT detection timing subset; Step S220: Obtaining the influence coefficient corresponding to each temporary reasoning IoT detection time series subset; Step S230: According to the influence coefficient corresponding to each temporary reasoning IoT detection timing subset, multiple temporary reasoning IoT detection timing subsets are adjusted to obtain adjustment results, and the adjustment results are determined as the reasoning IoT detection timing subset of the tap water loss in the detection cycle to be tested.
[0081] In step S210, the computer system uses the IoT detection timing subset reasoning network to reason about each IoT detection timing subset, so as to obtain a temporary reasoning IoT detection timing subset corresponding to the IoT detection timing subset. The IoT detection timing subset reasoning network is a model specially designed for processing IoT detection timing subsets of a specific time scale. It can be constructed based on a variety of machine learning or deep learning algorithms, such as artificial neural networks, recurrent neural networks (RNNs) and their variants, long short-term memory networks (LSTMs), gated recurrent units (GRUs), etc.
[0082] For example, after the multi-scale extraction process in step S100, a subset of IoT detection time series with hours as the time scale is obtained. The computer system uses the IoT detection time series subset inference network built based on LSTM to infer the subset. The LSTM network has the ability to process long-term and short-term dependencies in time series data, and its core structure includes an input gate, a forget gate, an output gate, and a memory unit.
[0083] During the reasoning process, the computer system organizes the hourly IoT detection time series subset according to the input requirements of the LSTM network. Assuming that the subset contains the hourly tap water loss data in the past week, the computer system inputs this data into the LSTM network hour by hour. The LSTM network calculates the input data for each time step based on the weights and parameters that have been learned internally. For details, please refer to the above related introduction, which will not be repeated here. Through such a calculation process, the LSTM network infers the entire hourly IoT detection time series subset and outputs a corresponding temporary reasoning IoT detection time series subset. This temporary subset contains the preliminary reasoning results of the LSTM network on the hourly tap water loss in the test cycle to be tested.
[0084] For IoT detection time series subsets with other time scales, such as subsets with a time scale of days, the computer system will use another IoT detection time series subset inference network specially trained for the day scale to perform similar inference operations. This network may be built based on GRU, which simplifies the structure of LSTM and can also effectively process time series data. The computer system inputs the IoT detection time series subset with days as the unit into the GRU network. After calculation and processing within the network, it outputs a temporary inference IoT detection time series subset with a scale of days, which reflects the GRU network's inference of the daily tap water loss in the test cycle.
[0085] After completing the reasoning of each IoT detection timing subset and obtaining the corresponding temporary reasoning IoT detection timing subset, proceed to step S220. In this step, the computer system needs to obtain the influence coefficient corresponding to each temporary reasoning IoT detection timing subset. These influence coefficients are used to measure the importance or reliability of each temporary reasoning IoT detection timing subset in the final result.
[0086] The computer system can obtain these influence coefficients in a variety of ways. For example, by analyzing and comparing historical data, the accuracy of each IoT detection time series subset reasoning network in predicting actual tap water loss in the past is evaluated. If an IoT detection time series subset reasoning network with an hourly scale has accurately predicted the hourly tap water loss many times in the past, then the influence coefficient of its corresponding temporary reasoning IoT detection time series subset can be set relatively high; conversely, if the prediction error of the reasoning network at a certain time scale is large, its influence coefficient will be reduced accordingly.
[0087] Another way to obtain the influence coefficient is to use machine learning algorithms for prediction. For example, a classification fusion neural network is trained, the input of which is the output results of multiple IoT detection time series subset reasoning networks and related feature information, and the output is the reliability evaluation of each reasoning network, that is, the influence coefficient. During the training process, the classification fusion neural network will learn the performance of different reasoning networks in different situations, thereby assigning a suitable influence coefficient to each temporary reasoning IoT detection time series subset. Continuing with the above example, by analyzing the tap water loss data in the past few months, it is found that the IoT detection time series subset reasoning network with hourly scale has a higher prediction accuracy on weekdays, while the reasoning network with daily scale is more accurate in grasping the overall trend on weekends. Based on this analysis, the computer system may set the influence coefficient of the temporary reasoning IoT detection time series subset with hourly scale to 0.7 on weekdays and 0.4 on weekends; and set the influence coefficient of the temporary reasoning IoT detection time series subset with day scale to 0.3 on weekdays and 0.6 on weekends.
[0088] After obtaining the influence coefficients corresponding to each temporary reasoning IoT detection timing subset, in step S230, the computer system adjusts multiple temporary reasoning IoT detection timing subsets based on these influence coefficients to obtain adjustment results, and determines the adjustment results as the reasoning IoT detection timing subset of the tap water loss in the test cycle to be tested. The adjustment process is a weighted fusion process. Multiply each data point in each temporary reasoning IoT detection timing subset by its corresponding influence coefficient, and then perform aggregation or averaging operations to obtain the final reasoning IoT detection timing subset.
[0089] The computer system calculates all time points in this way to obtain the adjusted result, which is the inference IoT detection time series subset of the tap water loss in the test cycle to be tested. This inference IoT detection time series subset integrates the inference information of multiple time scales and performs weighted fusion according to the reliability of the inference results of each time scale, so it can more accurately reflect the situation of the tap water loss in the test cycle to be tested.
[0090] By executing steps S210-S230, the computer system can make full use of the advantages of the IoT detection time series subset reasoning network at different time scales, combine the reliability of each reasoning result, and obtain a more accurate reasoning IoT detection time series subset of tap water loss in the test cycle through weighted fusion. This process not only takes into account the changing characteristics of tap water loss at different time scales, but also reasonably integrates the reasoning results of each scale through the influence coefficient, thereby improving the accuracy and reliability of reasoning.
[0091] As an implementation mode, step S220, obtaining the influence coefficient corresponding to each temporary reasoning IoT detection time sequence subset, includes: For each IoT detection time series subset inference network, complete the following steps respectively: Step S221: using a neural network algorithm to predict the network influence coefficient of the IoT detection time series subset reasoning network, and obtaining the reasoning network influence coefficient of the IoT detection time series subset reasoning network; Step S222: Determine the inference network influence coefficient of the IoT detection timing subset inference network as the influence coefficient corresponding to the temporary inference IoT detection timing subset output by the IoT detection timing subset inference network.
[0092] In step S221, the computer system uses a neural network algorithm to predict the network influence coefficient of the IoT detection time series subset reasoning network to obtain the reasoning network influence coefficient of the IoT detection time series subset reasoning network. The neural network algorithm is a powerful machine learning tool, which consists of a large number of neurons. By learning a large amount of data, it can automatically extract features and patterns in the data. Viable neural network types include feedforward neural networks, convolutional neural networks (CNNs), recurrent neural networks (RNNs) and their variants, etc. Different types of neural networks are suitable for different types of data and tasks.
[0093] First, the computer system collects a large amount of historical data as a training set. These historical data include not only IoT detection time series subsets at different time scales, but also the corresponding actual tap water loss data and other related information that may affect the loss, such as weather data, holiday information, etc. For example, for the hourly IoT detection time series subset, the training set contains hourly tap water loss records in the past few months, as well as the weather conditions of the day (sunny, cloudy, rainy, etc.), whether it is a working day, and other information.
[0094] The computer system preprocesses these data to make them meet the input requirements of the classification fusion neural network. For example, different types of data are encoded and normalized. For weather data, one-hot encoding may be used to convert it into a numerical form that the computer can process; for tap water loss data, it may be normalized to a value between 0 and 1 to improve the training effect of the neural network.
[0095] Next, the computer system constructs a classification fusion neural network. The network usually includes an input layer, multiple hidden layers, and an output layer. The number of neurons in the input layer is determined by the number of features of the input data. For example, if the input data contains hourly scale IoT detection time series subsets, daily scale IoT detection time series subsets, weekly scale IoT detection time series subsets, and weather, holidays, and other information, with a total of n features, then the input layer has n neurons.
[0096] The hidden layer is the key part of the neural network to learn data features. In the hidden layer, neurons receive input from the previous layer through weighted connections and are transformed nonlinearly through activation functions. Possible activation functions include sigmoid function , ReLU function ReLU(x) = max(0, x), etc. For example, in a hidden layer, neuron j receives input xi from neuron i in the previous layer, and its weight is w ij , with a bias of b j , then the output y of this neuron is j The formula can be Calculation (here we take the sigmoid function as an example).
[0097] The number of neurons in the output layer is the same as the number of IoT detection time series subset inference networks that need to be predicted. In this example, there are three IoT detection time series subset inference networks (corresponding to hour, day, and week scales respectively), so the output layer has three neurons. The neurons in the output layer receive the output from the hidden layer through weighted connections and convert the output into a probability distribution form through an activation function (such as the softmax function). The formula of the softmax function is ,in, is the input of the jth neuron in the output layer, and K is the total number of neurons in the output layer. Through the softmax function, each neuron in the output layer outputs a value between 0 and 1, and the sum of these values is 1, which represents the reliability probability of each IoT detection time series subset inference network, that is, the inference network influence coefficient. The computer system uses the training set to train the classification fusion neural network. During the training process, the network continuously adjusts the weights and biases to make the prediction results as close as possible to the reliability of the actual IoT detection time series subset inference network. The training process usually uses the back propagation algorithm, which backpropagates from the output layer to the input layer according to the error between the prediction results and the actual results, and gradually adjusts the weights and biases. For example, assuming that the error between the prediction results and the actual results is E, according to the chain rule, the gradient of each weight and bias is calculated, and then the gradient descent algorithm (such as stochastic gradient descent, Adagrad, Adadelta, etc.) is used to update the weights and biases.
[0098] After multiple trainings, when the prediction error of the classification fusion neural network reaches a certain threshold (such as the mean square error is less than a certain set value) or the training reaches a certain number of rounds, the training ends. At this point, the classification fusion neural network has learned the performance of different IoT detection time series subset reasoning networks in different situations, and can accurately predict their network influence coefficients. For example, after training, for a specific set of input data (such as a certain period of time IoT detection time series subset and related weather, holidays and other information), the values of the three neurons output by the classification fusion neural network are 0.8, 0.1, and 0.1 respectively. This means that in this case, the reasoning network influence coefficient of the IoT detection time series subset reasoning network at the hourly scale is 0.8, the daily scale is 0.1, and the weekly scale is 0.1. This shows that in the current situation, the hourly scale reasoning network is considered to be the most reliable, and its reasoning results should account for a larger proportion in the final integration.
[0099] After completing the prediction of the network influence coefficient of the IoT detection time sequence subset reasoning network, the process proceeds to step S222. In this step, the computer system determines the reasoning network influence coefficient of the IoT detection time sequence subset reasoning network as the influence coefficient corresponding to the temporary reasoning IoT detection time sequence subset output by the IoT detection time sequence subset reasoning network.
[0100] Continuing with the above-mentioned urban tap water loss monitoring project as an example, the computer system determines the inference network influence coefficient of 0.8 of the hourly-scale IoT detection time series subset inference network predicted by the classification fusion neural network as the influence coefficient of the temporary inference IoT detection time series subset output by the inference network; determines the inference network influence coefficient of 0.1 of the day-scale inference network as the influence coefficient of its corresponding temporary inference IoT detection time series subset; and determines the inference network influence coefficient of 0.1 of the weekly-scale inference network as the influence coefficient of its corresponding temporary inference IoT detection time series subset.
[0101] In this way, the computer system assigns an influence coefficient reflecting its reliability to each temporary reasoning IoT detection time series subset. These influence coefficients will be used to adjust multiple temporary reasoning IoT detection time series subsets in subsequent steps, so that when integrating the reasoning results of different time scales, they can be reasonably weighted and fused according to the reliability of each subset, thereby improving the accuracy of the final reasoning result.
[0102] In practical applications, the implementation of steps S221-S222 enables the computer system to dynamically evaluate the reliability of the reasoning network of different IoT detection timing subsets, and assign appropriate influence coefficients to the temporary reasoning IoT detection timing subsets it outputs. This process makes full use of the powerful learning and prediction capabilities of the neural network algorithm and considers the impact of multiple factors on the reliability of the reasoning network. Through the training of a large amount of historical data, the classification fusion neural network can automatically learn the performance of each reasoning network under different circumstances, thereby providing a scientific basis for the determination of the influence coefficient.
[0103] As an implementation mode, step S300 performs time scale fusion processing on multiple inference IoT detection time series subsets to obtain an inference IoT detection time series set containing a target time scale, including: Step S310: Obtaining the subset influence coefficient corresponding to each inference IoT detection time series subset; Step S320: According to the subset influence coefficient corresponding to each inference IoT detection timing subset, multiple inference IoT detection timing subsets are adjusted to obtain an inference IoT detection timing set including a target time scale.
[0104] The computer system executes steps S310-S320 in the implementation method of step S300, with the purpose of obtaining the subset influence coefficient corresponding to each inference IoT detection timing subset, and adjusting multiple inference IoT detection timing subsets according to these coefficients, thereby obtaining an inference IoT detection timing set containing a target time scale, which can more accurately reflect the situation of tap water loss in the detection cycle to be tested.
[0105] In step S310, the computer system obtains the subset influence coefficient corresponding to each inference IoT detection time series subset. The inference IoT detection time series subset is the result of inference by the IoT detection time series subset inference network of different time scales after step S200. These subsets reflect the characteristics of tap water loss from different time dimensions, but their importance in the overall analysis may be different, so it is necessary to determine their respective influence coefficients.
[0106] There are many ways for a computer system to determine the subset impact coefficient. One common method is to evaluate the accuracy based on historical data. The computer system will compare and analyze the past inference results of each inference IoT detection time series subset with the actual tap water loss data. For example, in a tap water loss monitoring project in a city, inference IoT detection time series subsets with time scales of hours, days, and weeks have been obtained. The computer system will collect the actual tap water loss data in the past period of time (such as the past three months), as well as the inference results of the inference IoT detection time series subsets of these three time scales in the same time period.
[0107] For the subset of inference IoT detection time series on an hourly scale, the computer system calculates the error between each inference data point and the actual loss data point. The mean square error (MSE) formula can be used to measure the error.
[0108] Similarly, for the time series subsets of inference IoT detections with a daily scale and a weekly scale, their mean square error (MSE) is calculated respectively. 天 and MSE 周 Then, the subset influence coefficient is determined according to the size of the error. The smaller the error, the closer the inference result of the inference IoT detection time series subset is to the actual situation, and the higher its influence coefficient is. For example, the following formula can be used to calculate the subset influence coefficient: .
[0109] In this way, the computer system can assign corresponding subset influence coefficients to each inference IoT detection time series subset according to their performance in historical data. For example, the calculation results may show that the coefficient of the inference IoT detection time series subset based on the hourly scale is 0.6, the coefficient based on the day scale is 0.3, and the coefficient based on the week scale is 0.1. This shows that in the actual situation in the past, the reasoning results based on the hourly scale are relatively more accurate and have a greater impact on the overall analysis. In addition to the accuracy assessment based on historical data, the computer system can also determine the subset influence coefficient through expert experience.
[0110] After obtaining the subset influence coefficients corresponding to each inference IoT detection timing subset, the process proceeds to step S320. In this step, the computer system adjusts multiple inference IoT detection timing subsets according to the subset influence coefficients corresponding to each inference IoT detection timing subset to obtain an inference IoT detection timing set containing the target time scale.
[0111] The adjustment process is a weighted fusion process. For each time point, the computer system multiplies the inference loss at that time point in each inference IoT detection time series subset by its corresponding subset influence coefficient, and then summarizes it.
[0112] The computer system performs such calculations for each time point in the test cycle to be tested, thereby obtaining a new inference IoT test time series set, which is the inference IoT test time series set containing the target time scale. For example, in the above-mentioned urban tap water loss monitoring project, for a certain day in the test cycle to be tested, after weighted fusion of the inference loss of each hour according to the corresponding subset influence coefficient, the complete inference loss data for that day is obtained. These data integrate the inference information of different time scales and more accurately reflect the tap water loss of that day.
[0113] By executing steps S310-S320, the computer system can comprehensively consider the importance and accuracy of the inference IoT detection time series subsets of different time scales, integrate them together through weighted fusion, and obtain a more comprehensive and accurate inference IoT detection time series set. This process not only takes advantage of the data of different time scales, but also ensures that the contribution of each subset in the final result is properly reflected through reasonable coefficient allocation.
[0114] As an implementation mode, in step S200, before using the tap water loss estimation network to infer each IoT detection time series subset respectively, the method further includes: For each IoT detection timing subset, complete the following steps respectively: Step S200A: performing multi-scale extraction on the IoT detection time series subset to obtain a target seasonal component, a target abnormal situation component, and a target other component; wherein the abnormal situation corresponding to the target abnormal situation component has an impact on the loss detection result of the tap water loss in the triggering period of the abnormal situation; Step S200, respectively inferring each IoT detection time sequence subset, including: Step S201: Reasoning on other target components of each IoT detection time series subset respectively.
[0115] In step S200A, the computer system performs multi-scale extraction on the IoT detection time series subset to obtain the target seasonal component, the target abnormal situation component and the target other components. The IoT detection time series subset is obtained after preliminary processing and represents the data sequence of tap water loss at a specific time scale. The purpose of multi-scale extraction is to deeply mine the information of the data at different time granularities and feature levels, so as to analyze and understand the laws and characteristics of tap water loss in more detail.
[0116] The computer system can implement multi-scale extraction in a variety of ways. One of the commonly used methods is based on spectrum analysis technology. For example, Fourier transform (FT) is a mathematical tool that converts time domain signals into frequency domain representations, and its formula is referred to in the above introduction. Through Fourier transform, the computer system can convert the IoT detection time series subset from the time domain to the frequency domain, where different frequency components correspond to changes in different time scales. Low-frequency components are usually associated with trends in longer time scales, while high-frequency components reflect fluctuations in a short time. The computer system can identify frequency components associated with seasonal changes by analyzing the peaks and spectrum distribution in the frequency domain, and then determine the target seasonal components. In addition to Fourier transform, the computer system can also use wavelet transform (WT) for multi-scale extraction. Wavelet transform can analyze signals at different resolutions. It decomposes the signal into wavelet coefficients of different frequencies and positions. Please refer to the above introduction for the formula of continuous wavelet transform (CWT), which will not be repeated here. In this example of a small town, using wavelet transform, by selecting appropriate wavelet functions and scale parameters, seasonal changes in tap water loss data and possible abnormalities can be captured more finely. For example, at certain scales, some local wavelet coefficients are found to be abnormally increased, which may correspond to abnormal components in the data.
[0117] Through these multi-scale extraction techniques, the target seasonal component, target abnormal situation component and target other components can be separated from the IoT detection time series subset. The target seasonal component reflects the periodic law of tap water loss over time, such as the increase in loss due to increased water consumption by residents in summer and the relatively low seasonal changes in winter. The target abnormal situation component represents the part of the data that does not conform to the normal pattern, such as abnormal fluctuations in loss due to sudden pipeline leaks, failures of large water-using equipment, etc. The target other components contain other information besides seasonality and abnormal situations, which may be some random noise or short-term fluctuations that have not been clearly classified.
[0118] After completing step S200A, proceed to sub-step S201 of step S200. In this step, the computer system infers the target other components of each IoT detection time series subset. Since the target other components do not contain the separated seasonal and abnormal situation information, reasoning about them can focus more on mining potential and stable trends and patterns in the data.
[0119] Computer systems can use a variety of reasoning methods, such as regression models based on machine learning. In addition to linear regression models, computer systems can also use more complex machine learning models, such as decision trees, support vector machines (SVMs), or neural networks. Taking neural networks as an example, they can automatically learn complex nonlinear relationships in data. A simple feedforward neural network contains an input layer, a hidden layer, and an output layer. The input layer receives feature variables related to other components of the target, the hidden layer transforms and extracts features through nonlinear activation functions (such as the ReLU function: ReLU (x) = max (0, x)), and the output layer gives the reasoning results. The computer system trains the neural network through a large amount of historical data, adjusts the weights and biases of the network, and enables it to accurately reason about other components of the target.
[0120] In practical applications, the execution of steps S200A and S201 helps to improve the accuracy of the reasoning of tap water loss. Step S200A extracts the IoT detection time series subset at multiple scales and separates components with different characteristics, so that the computer system can understand the internal structure and regularity of the data more clearly. Step S201 makes inferences on other target components, which can eliminate the interference of seasonality and abnormal conditions and focus on mining stable trends and potential patterns in the data, thereby providing a more accurate and reliable basis for subsequent comprehensive reasoning.
[0121] For example, in a tap water loss monitoring project in a large city, the IoT detection time series subset contains a huge amount of data. Through step S200A, the computer system can accurately identify seasonal components, such as peak water consumption caused by high temperatures in summer and relatively low water consumption in winter; at the same time, some abnormal components are found, such as a surge in losses in a certain area due to pipeline maintenance in a short period of time. In step S201, reasoning about other target components can reveal some long-standing but not obvious rules, such as differences in water use patterns on weekdays and weekends. This information combined can help water supply management departments understand tap water losses more comprehensively and accurately, formulate more reasonable water supply plans, resource allocation strategies, and equipment maintenance plans, thereby improving the utilization efficiency of water resources and reducing unnecessary losses.
[0122] As an implementation mode, step S200A performs multi-scale extraction on the IoT detection time series subset to obtain target seasonal components, target abnormal situation components, and target other components, including: Step S200A1: performing a first multi-scale extraction on the IoT detection time series subset to obtain a first target seasonal component, a first abnormal situation component, and a first other component; Step S200A2: filtering out the first abnormal situation component in the IoT detection time series subset to obtain a first other IoT detection time series subset, and performing a second multi-scale extraction on the first other IoT detection time series subset to obtain a second target seasonal component and a second other component; Step S200A3: filtering out the second target seasonal component in the IoT detection time series subset to obtain a second other IoT detection time series subset, and performing a third multi-scale extraction on the second other IoT detection time series subset to obtain a second abnormal situation component and a third other component; Step S200A4: Determine the second target seasonal component as the target seasonal component, determine the second abnormal situation component as the target abnormal situation component, and determine the third other component as the target other component.
[0123] In step S200A1, the computer system performs a first multi-scale extraction on the IoT detection time series subset to obtain a first target seasonal component, a first abnormal situation component, and a first other component. Multi-scale extraction aims to analyze data from different time scales and frequency characteristics to mine various information components hidden in the data. The computer system can use the empirical mode decomposition (EMD) method to implement this operation. The EMD method is an adaptive signal decomposition technology that decomposes a complex signal into multiple intrinsic mode functions (IMFs) and a residual function. IMF is a component that meets certain conditions, and each IMF represents the characteristics of the signal at different time scales.
[0124] Taking the monitoring of tap water loss in a small community as an example, the IoT detection time series subset records the daily tap water loss in the community within a year. The computer system uses the EMD method to perform the first multi-scale extraction on the IoT detection time series subset. First, the computer system will determine all local maximum and minimum points in the data, obtain the upper and lower envelopes through cubic spline interpolation, calculate the average of the upper and lower envelopes, and subtract the average from the original signal to obtain a new signal. Repeat this process until the new signal meets the IMF conditions.
[0125] Assume that after multiple decompositions, multiple IMFs and a residual function are obtained. Among them, some IMFs show obvious cyclical characteristics, corresponding to the seasonal changes in the year, and these IMFs constitute the first target seasonal component. For example, the temperature is higher in summer and residents' water use increases. The corresponding IMF may show a higher fluctuation range in the summer time period, reflecting the seasonal water use changes. Some IMFs have sudden fluctuations that are significantly different from the overall pattern. These may correspond to abnormal situations such as sudden pipeline leaks and failures of large water-using equipment, constituting the first abnormal situation component. The remaining components constitute the first other components, which may contain some random noise or short-term fluctuations that have not yet been clearly classified.
[0126] In addition to the EMD method, the computer system can also use wavelet transform to perform the first multi-scale extraction.
[0127] After completing the first multi-scale extraction, in step S200A2, the computer system filters out the first abnormal situation component in the IoT detection time series subset to obtain the first other IoT detection time series subset, and then performs a second multi-scale extraction on the first other IoT detection time series subset to obtain the second target seasonal component and the second other component.
[0128] Continuing with the example of a small community, the computer system identifies the first abnormal component obtained by the first multi-scale extraction through certain algorithms and rules, and removes it from the original IoT detection time series subset. This can be achieved by setting some thresholds. For example, if the fluctuation range of a certain IMF exceeds a certain standard deviation range, it will be determined as the first abnormal component and filtered out.
[0129] After obtaining the first other IoT detection time series subset, the computer system performs multi-scale extraction again. This time, the computer system can use a multi-scale extraction method different from the first time, such as Fourier transform. Through Fourier transform, the computer system converts the first other IoT detection time series subset to the frequency domain. In the frequency domain, the computer system analyzes the spectrum distribution and finds the frequency components related to seasonal changes. The signal part corresponding to these frequency components is the second target seasonal component. For example, in the frequency domain, it is found that the period corresponding to a frequency is about 30 days, which is related to the monthly periodic changes. The signal corresponding to this frequency component constitutes the second target seasonal component after inverse Fourier transform. The remaining components form the second other components, which may contain some more subtle noise that is not completely separated in the first stage or fluctuations related to other factors.
[0130] After the second multi-scale extraction is completed, the process proceeds to step S200A3. The computer system filters out the second target seasonal component in the IoT detection time series subset to obtain a second other IoT detection time series subset, and then performs a third multi-scale extraction on the second other IoT detection time series subset to obtain a second abnormal situation component and a third other component.
[0131] The computer system uses specific algorithms and analysis to accurately identify and remove the second target seasonal component from the IoT detection time series subset. This may involve techniques such as data correlation analysis and pattern matching. For example, by comparing with known seasonal patterns, the data that meets seasonal characteristics is removed to obtain the second other IoT detection time series subset.
[0132] Then, the computer system performs a third multi-scale extraction on the second other IoT detection time series subset. This time, the computer system can use a method related to the autoregressive moving average (ARMA) model. The formula of the ARMA model is: ,in, is the value of the time series at time t, is the autoregressive coefficient, yes The hysteresis value of is the moving average coefficient, is a white noise sequence, p and q are the orders of autoregression and moving average, respectively.
[0133] The computer system performs ARMA model analysis on the second other IoT detection time series subset to find abnormal fluctuation components in the data. These abnormal fluctuation components may be caused by some sudden events that are difficult to explain with conventional seasonal or periodic patterns, and constitute the second abnormal situation component. For example, during the analysis process, it is found that the data of a certain time period deviates significantly from the predicted value of the ARMA model, and this deviation does not conform to the normal fluctuation range. Then the component corresponding to this part of the data is the second abnormal situation component. The remaining components constitute the third other components, which may be some more random noise or small fluctuations that have not been fully resolved.
[0134] Finally, in step S200A4, the computer system determines the second target seasonal component as the target seasonal component, determines the second abnormal situation component as the target abnormal situation component, and determines the third other component as the target other component.
[0135] In the case of tap water loss monitoring in the above-mentioned small community, after the multi-scale extraction and component separation in the previous three steps, the computer system finally identified the target seasonal component, the target abnormal situation component and the target other components. After verification and confirmation, the second target seasonal component was determined to be the target seasonal component that can accurately reflect the seasonal changes in the tap water loss in the community. The water supply management department can formulate water supply plans and resource allocation strategies for different seasons based on this component. The second abnormal situation component was determined as the target abnormal situation component, which helps to timely detect sudden problems such as pipeline leakage and equipment failure, so as to take timely maintenance and treatment measures. The third other component was determined as the target other component. Although this part of the components is relatively complex and contains some fluctuations that are difficult to explain, it also has certain reference value for further in-depth analysis of the changing trend and potential factors of tap water loss.
[0136] By rigorously executing steps S200A1-S200A4 and utilizing a variety of multi-scale extraction techniques and component separation methods, the computer system can accurately obtain target seasonal components, target abnormal situation components, and target other components from the IoT detection time series subset, providing strong support for more accurate analysis of tap water loss, thereby improving the scientificity and effectiveness of urban water supply management.
[0137] See also Figure 3 , is a schematic diagram of the structure of a tap water loss detection device based on the Internet of Things provided in an embodiment of the present application. The above-mentioned tap water loss detection device based on the Internet of Things can be a computer program (including program code) running in a network device. For example, the tap water loss detection device based on the Internet of Things is an application software; the device can be used to execute the corresponding steps of the method provided in the embodiment of the present application. Figure 3 As shown, the tap water loss detection device based on the Internet of Things may include: a multi-scale extraction module 310, a subset reasoning module 320, and a scale fusion module 330.
[0138] Among them, the multi-scale extraction module 310 is used to perform multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales; the time scale and the IoT detection time series subset are matched one by one, and the IoT detection time series set includes multiple loss detection results of the tap water loss in the known detection cycle; the subset reasoning module 320 is used to use the tap water loss estimation network to reason on each of the IoT detection time series subsets respectively to obtain multiple reasoned IoT detection time series subsets of the tap water loss in the detection cycle to be tested; the scale fusion module 330 is used to perform time scale fusion processing on multiple reasoned IoT detection time series subsets to obtain a reasoned IoT detection time series set containing the target time scale, and the reasoned IoT detection time series set includes the reasoned loss detection results of the tap water loss in the detection cycle to be tested.
[0139] According to one embodiment of the present application, Figure 2 The steps involved in the IoT-based water loss detection method can be Figure 3 The various modules in the IoT-based tap water loss detection device are executed.
[0140] According to one embodiment of the present application, Figure 3The various modules in the tap water loss detection device based on the Internet of Things shown can be separately or completely combined into one or several units to constitute, or one (some) of the units can be further divided into at least two functionally smaller sub-units, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above modules are divided based on logical functions. In actual applications, the functions of one module can also be implemented by at least two units, or the functions of at least two modules can be implemented by one unit. In other embodiments of the present application, the tap water loss detection device based on the Internet of Things can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of at least two units.
Claims
1. A tap water loss detection method based on the Internet of Things, characterized in that: The method comprises: Performing multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales; the time scales are matched one-to-one with the IoT detection time series subsets, and the IoT detection time series set includes multiple loss detection results of the tap water loss in the known detection cycle; Using a tap water loss estimation network, inferring each of the IoT detection time series subsets respectively, and obtaining multiple inferred IoT detection time series subsets of the tap water loss in the detection cycle to be tested; Time scale fusion processing is performed on multiple inference IoT detection time series subsets to obtain an inference IoT detection time series set containing a target time scale, wherein the inference IoT detection time series set includes an inference loss detection result of the tap water loss in the detection cycle to be tested.
2. The method according to claim 1, characterized in that: The multi-scale extraction process is performed on the IoT detection time series set of the tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales, including: Performing null value diagnosis on the IoT detection time series set to obtain a diagnosis result; If the diagnosis result indicates that the IoT detection time series set has a null value, the IoT detection time series set is filled with null values to obtain a target IoT detection time series set, and the target IoT detection time series set is subjected to multi-scale extraction processing to obtain a plurality of IoT detection time series subsets with different time scales; If the diagnosis result indicates that the IoT detection time series set does not have a null value, a multi-scale extraction process is performed on the IoT detection time series set to obtain a plurality of IoT detection time series subsets with different time scales.
3. The method according to claim 2, characterized in that Each loss detection result included in the IoT detection time series set includes a corresponding acquisition node, and performing null value diagnosis on the IoT detection time series set to obtain a diagnosis result includes: Periodically identifying the IoT detection time series set to obtain a target time interval, and determining a reference time difference between two acquisition nodes of the loss detection results in the IoT detection time series set based on the target time interval; For two random adjacent loss detection results in the IoT detection time series set, obtaining a real time difference between collection nodes of the two random adjacent loss detection results; If the target real time difference is greater than the reference time difference, obtaining a diagnosis result indicating that the IoT detection timing set has a null value; If there is no target real time difference greater than the reference time difference, a diagnostic result indicating that the IoT detection timing set does not have a null value is obtained.
4. The method according to claim 3, characterized in that The IoT detection time series set includes a plurality of loss detection result tuples, and the loss detection result tuple includes two random adjacent loss detection results in the IoT detection time series set; The periodic identification of the IoT detection time series set to obtain a target time interval includes: For each of the loss detection result tuples, determining a time difference between collection nodes of two adjacent loss detection results in the loss detection result tuple; If the time differences corresponding to the plurality of loss detection result tuples are the same, determining the target time interval according to the time differences; If the time differences corresponding to the plurality of loss detection result tuples are different, determining the adjustment calculation results of the plurality of time differences, and determining the target time interval according to the adjustment calculation results; The step of filling the IoT detection timing set with null values to obtain a target IoT detection timing set includes: According to the reference time difference, fill in the missing target acquisition node between the two acquisition nodes before and after the target real time difference, and set the data corresponding to the target acquisition node to a missing value; According to the null value filling strategy, the tap water loss data corresponding to the target collection node is determined, and the missing value is replaced with the tap water loss data.
5. The method according to claim 2, characterized in that: Each loss detection result included in the IoT detection time series set includes a corresponding acquisition node, the IoT detection time series set includes a plurality of loss detection result tuples, and the loss detection result tuple includes two random adjacent loss detection results in the IoT detection time series set; The performing null value diagnosis on the IoT detection time series set to obtain a diagnosis result includes: For each of the loss detection result tuples, determining a time difference between collection nodes of two adjacent loss detection results in the loss detection result tuple; If the time differences corresponding to the plurality of loss detection result tuples are the same, obtaining a diagnosis result indicating that the IoT detection timing set does not have a null value; If the time differences corresponding to the plurality of loss detection result tuples are different, a diagnostic result indicating that the IoT detection timing set has a null value is obtained.
6. The method according to claim 1, characterized in that The multi-scale extraction process is performed on the IoT detection time series set of the tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales, including: Acquire the collection nodes of the loss detection results included in the IoT detection time series set, and acquire a plurality of different time intervals for the multi-scale extraction process, wherein the time intervals and the time scales are matched one by one; For each of the time intervals, integrating the multiple loss detection results at the time interval according to the collection node to obtain an integrated set corresponding to the time interval; Determine the integrated sets corresponding to the multiple time intervals as the multiple IoT detection time series subsets with different time scales; The tap water loss estimation network includes multiple IoT detection time series subset reasoning networks; the tap water loss estimation network is used to reason each of the IoT detection time series subsets, respectively, to obtain multiple reasoning IoT detection time series subsets of the tap water loss in the detection cycle to be tested, including: For each of the IoT detection timing subsets, complete the following steps respectively: For each of the IoT detection timing subset inference networks, use the IoT detection timing subset inference network to infer the IoT detection timing subset to obtain a temporary inference IoT detection timing subset corresponding to the IoT detection timing subset; Obtaining the influence coefficient corresponding to each of the temporary reasoning IoT detection time series subsets; According to the influence coefficient corresponding to each of the temporary reasoning Internet of Things detection timing subsets, multiple temporary reasoning Internet of Things detection timing subsets are adjusted to obtain adjustment results, and the adjustment results are determined as the reasoning Internet of Things detection timing subset of the tap water loss in the detection cycle to be tested.
7. The method according to claim 6, characterized in that The obtaining of the influence coefficient corresponding to each of the temporary reasoning IoT detection time sequence subsets includes: For each of the IoT detection time series subset inference networks, complete the following steps respectively: Using a neural network algorithm, predicting the network influence coefficient of the IoT detection time series subset reasoning network, and obtaining the reasoning network influence coefficient of the IoT detection time series subset reasoning network; The inference network influence coefficient of the IoT detection timing subset inference network is determined as the influence coefficient corresponding to the temporary inference IoT detection timing subset output by the IoT detection timing subset inference network.
8. The method according to claim 1, characterized in that The performing time scale fusion processing on the multiple inference IoT detection time series subsets to obtain the inference IoT detection time series set containing the target time scale includes: Obtaining a subset influence coefficient corresponding to each of the inference IoT detection timing subsets; According to the subset influence coefficient corresponding to each of the inference IoT detection timing subsets, a plurality of the inference IoT detection timing subsets are adjusted to obtain an inference IoT detection timing set including the target time scale; Before using the tap water loss estimation network to infer each of the IoT detection time series subsets, the method further includes: For each of the IoT detection timing subsets, complete the following steps respectively: Perform multi-scale extraction on the IoT detection time series subset to obtain a target seasonal component, a target abnormal situation component, and a target other component; wherein the abnormal situation corresponding to the target abnormal situation component has an impact on the loss detection result of the tap water loss in the triggering period of the abnormal situation; The reasoning on each of the IoT detection time sequence subsets respectively includes: Inference is performed on the target other components of each of the IoT detection time series subsets respectively.
9. The method according to claim 8, characterized in that The multi-scale extraction of the IoT detection time series subset to obtain the target seasonal component, the target abnormal situation component and the target other components includes: Performing a first multi-scale extraction on the IoT detection time series subset to obtain a first target seasonal component, a first abnormal situation component, and a first other component; Filtering out the first abnormal situation component in the IoT detection time series subset to obtain a first other IoT detection time series subset, and performing a second multi-scale extraction on the first other IoT detection time series subset to obtain a second target seasonal component and a second other component; Filtering out the second target seasonal component in the IoT detection time series subset to obtain a second other IoT detection time series subset, and performing a third multi-scale extraction on the second other IoT detection time series subset to obtain a second abnormal situation component and a third other component; The second target seasonal component is determined as the target seasonal component, the second abnormal situation component is determined as the target abnormal situation component, and the third other component is determined as the target other component.
10. A tap water loss detection device based on the Internet of Things, characterized in that: The device comprises: A multi-scale extraction module is used to perform multi-scale extraction processing on the IoT detection time series set of tap water loss in a known detection cycle to obtain multiple IoT detection time series subsets with different time scales; the time scales are matched one-to-one with the IoT detection time series subsets, and the IoT detection time series set includes multiple loss detection results of the tap water loss in the known detection cycle; A subset reasoning module is used to use a tap water loss estimation network to reason about each of the IoT detection time series subsets, and obtain multiple reasoned IoT detection time series subsets of the tap water loss in the detection cycle to be tested; A scale fusion module is used to perform time scale fusion processing on multiple inference IoT detection time series subsets to obtain an inference IoT detection time series set containing a target time scale, wherein the inference IoT detection time series set includes the inference loss detection result of the tap water loss in the detection cycle to be tested.
Citation Information
Patent Citations
Distributed running water pipe network loss monitoring system and method
CN109932009A
Cross-scale time series data fusion method and system for Internet of Things
CN116049764A
Aviation compressor fault prediction method and system
CN119004226A
System, Method and Cloud-Based Platform for Predicting Energy Consumption
US20170124466A1
Time sequence data prediction method and apparatus, and storage medium
WO2024183565A1