A method and system for converting regional water consumption

CN122243153APending Publication Date: 2026-06-19ANHUI & HUAI RIVER WATER RESOURCES RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI & HUAI RIVER WATER RESOURCES RES INST
Filing Date
2026-05-25
Publication Date
2026-06-19

Smart Images

  • Figure CN122243153A_ABST
    Figure CN122243153A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for calculating regional water consumption. The method includes: collecting water supply data and obtaining water supply lag characteristics and an initial regional water consumption ratio; constructing a deep learning model based on CNN and LSTM, and training and updating the deep learning model using preprocessed water supply data; dynamically adjusting the initial regional water consumption ratio based on the output of the deep learning model to obtain a predicted value of the regional water consumption ratio; calculating the regional water consumption based on the adjusted predicted value of the regional water consumption ratio and the water supply lag characteristics; and dynamically correcting the regional water consumption based on a normal distribution correction mechanism. This invention, by combining water supply lag characteristic analysis, CNN-LSTM deep learning prediction, and normal distribution adaptive correction, can solve the problems of inaccurate sewage pipe network status analysis caused by distortion in traditional regional water consumption allocation, lack of delay effect, and outlier interference in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart water management technology, specifically to a method, system, device, and storage medium for calculating regional water consumption based on water supply mapping and normal distribution correction. Background Technology

[0002] In the field of smart water management, accurate analysis of the status of sewage pipe networks depends on accurate estimation of regional water consumption. In the process of accurately estimating regional water consumption, traditional methods generally adopt a rough estimation method based on monthly macro water consumption statistics, single normal distribution time series allocation and area proportion allocation. However, the above-mentioned traditional methods still have the following drawbacks in practical use: (1) Distortion of water consumption allocation: Existing technology relies on the normal distribution method of monthly regional water consumption to obtain the daily regional water consumption. This method cannot accurately reflect the changes in water consumption, which also makes it impossible to accurately analyze the status of sewage pipe network. Furthermore, when it is necessary to analyze the water consumption of a small part of the area, the method of simply allocating the water consumption of the large overall area according to the proportion of the area is not accurate and may even have a large error, making it impossible to carry out the research.

[0003] (2) Lack of delay effect: There is physical transmission delay in the water supply network (such as pipeline distance and pump station scheduling), but the existing model does not quantify the lag time and attenuation effect, resulting in a mismatch between the supply and use of water in time sequence; (3) Outlier interference: Random fluctuations in water consumption (such as extreme weather, metering errors) can easily generate negative values ​​or outliers, which can undermine the reliability of the hydraulic model of the pipeline network.

[0004] In summary, traditional estimation methods cannot accurately and precisely estimate regional water consumption in accordance with actual water supply and demand patterns. They are insufficient to support dynamic assessment and precise operation and maintenance of sewage pipe networks, resulting in inaccurate sewage pipe network status analysis due to distorted water consumption allocation, missing delay effects, and outlier interference.

[0005] To address this issue, this application proposes a regional water consumption conversion method and system based on water supply mapping and normal distribution correction. This method combines water supply lag characteristic analysis, CNN-LSTM deep learning prediction, and normal distribution adaptive correction to solve the aforementioned technical problems. Summary of the Invention

[0006] The main objective of this invention is to provide a regional water consumption conversion method and system based on water supply mapping and normal distribution correction, so as to solve the technical problems of inaccurate sewage pipe network status analysis caused by distortion of traditional regional water consumption allocation, lack of delay effect and outlier interference.

[0007] The present invention solves the above-mentioned technical problems by adopting the following technical solutions: A method for calculating regional water consumption, executed via computer equipment, includes the following steps: Step S1. Collect water supply data and obtain water supply lag characteristics and initial regional water consumption ratio. Among them, the water supply lag characteristics are obtained by calculating the maximum correlation between regional water consumption and reservoir water supply time series. Step S2. Construct a deep learning model based on CNN and LSTM, and train and update the deep learning model using preprocessed water supply data. Dynamically adjust the initial regional water consumption ratio according to the output of the deep learning model to obtain the predicted value of the regional water consumption ratio. Step S3. Calculate the regional water consumption based on the adjusted predicted regional water consumption ratio and the water supply lag characteristics; Step S4. Dynamically adjust the regional water consumption based on the normal distribution correction mechanism.

[0008] Preferably, the specific operation process for obtaining the water supply lag characteristics in step S1 includes: The historical time series of regional water consumption and reservoir water supply were preprocessed to obtain the original series. Based on the water consumption data of the original sequence, unit root tests were performed on each region. Differential processing was then performed on the water consumption data of the regions where the test results showed non-stationarity to obtain a preliminary stationary sequence. Based on the preliminary stationary sequence, an ARIMA model is established, and through parameter estimation and model order determination, the trend component, seasonal component and periodic structure in the sequence are fitted and separated to obtain the model fitting value. Based on the model fitting values, the residuals of the regional water consumption sequence and the residuals of the reservoir water supply sequence are calculated. Based on the residuals of regional water consumption series and reservoir water supply series, autocorrelation and partial autocorrelation tests are performed to obtain a white noise residual series that meets the characteristics of white noise. Based on the white noise residual sequence, the cross-correlation function sequence is calculated with a set lag range as the window; Traverse the sequence of cross-correlation functions, select the cross-correlation coefficient with the largest absolute value, and record the corresponding lag value as the water supply lag characteristic.

[0009] Preferably, the process for obtaining the white noise-enhanced residual sequence includes: Based on the residuals of the specified series, including the residuals of regional water consumption series and the residuals of reservoir water supply series, the autocorrelation coefficient and autocorrelation test value of each series residual at the lag order are calculated, and the partial autocorrelation coefficient is obtained. If the autocorrelation test result and the partial autocorrelation coefficient are both not significant, then the residual of the sequence is taken as the white noise residual sequence. If the autocorrelation test is significant, then the sequence residuals are differentially processed, and the difference is increased step by step until the differentially processed sequence passes the test, finally obtaining the white noise residual sequence.

[0010] Preferably, the deep learning model in step S2 includes a progressive architecture of a contrastive feature enhancement layer, a CNN spatial extraction layer, an LSTM temporal capture layer, and a fully connected output layer. The contrast feature enhancement layer adopts a fully connected structure to amplify the difference features between the current region and the overall region; The CNN spatial extraction layer includes two convolutional layers for extracting local temporal-dimensional related features and cross-dimensional synergistic effects; The LSTM time-series capture layer is divided into two layers: the first layer outputs a complete sequence to capture short-term dependencies, and the second layer outputs a single result to capture long-term cumulative effects. The fully connected layer is divided into two layers: the first layer integrates spatial and temporal features, and the second layer is the output layer, which outputs the predicted value of water usage ratio in the region.

[0011] Preferably, the deep learning model further includes a three-layer update mechanism for retraining, specifically: Acquire multi-source water supply data and preprocess the multi-source data. The preprocessed data is then used as input data for a deep learning model. Collect the input data for the current month and the actual water usage percentage label data for the region to construct the incremental training dataset for the current month; While maintaining the parameters of the historical deep learning model, incremental training is performed on the incremental training dataset, and the historical deep learning model is iteratively optimized using a mini-batch parameter update method. At the end of each quarterly cycle, a full training dataset of all samples from the past to the current quarter is constructed, and the deep learning model is fully retrained to update the model parameters. Based on real-time comparison of model prediction results and actual proportion label data, anomaly monitoring is performed: when the model prediction error is detected to be greater than the preset threshold for several consecutive days, a manual review process is triggered. Update the model based on the model parameters obtained after incremental training or full retraining.

[0012] Preferably, the specific operation process of step S3 includes: Step S31. Obtain reservoir data, including reservoir water supply and reservoir water transfer volume, as the first data for the reservoir; Step S32. Obtain the basic hydraulic structure information of the water supply network and calculate the water volume attenuation coefficient of the water supply network; Step S33. Based on the first data of the reservoir, combined with the predicted value of regional water consumption, water supply lag characteristics, and water supply network attenuation coefficient, calculate the regional water consumption. The calculation formula is as follows:

[0013] In the formula, Let t be the regional water consumption of the target area on day t. This represents the predicted regional water consumption percentage for day t. The water volume attenuation coefficient of the water supply network. For the first Daily water supply from the reservoir's own storage capacity The water diversion attenuation coefficient is... For the tth w represents the daily water diversion volume from the reservoir, where w is the number of days the water diversion is delayed.

[0014] Preferably, the specific operation process of step S32 includes: Based on the basic hydraulic structure information of the water supply network, the friction loss rate per unit length is calculated. Based on the friction loss rate per unit length of each pipe section of the water supply network, and based on the network topology, calculate the total friction loss and the loss of local components. The specific calculation formula for the local component loss is as follows:

[0015] In the formula, For local component loss, Let be the drag coefficient of the j-th local component, describing the magnitude of the resistance of a single local component to water flow. Let be the flow velocity at j local components, and g be the acceleration due to gravity; The sum of total friction loss and local loss is calculated as the theoretical pressure loss and converted into the friction attenuation coefficient. The specific formula for calculating the friction attenuation coefficient is as follows:

[0016] In the formula, The frictional attenuation coefficient, For total losses along the route, Pressure loss influencing factors; Calculate the leakage rate, and then establish a comprehensive attenuation model based on the friction attenuation coefficient and the leakage rate to output the water volume attenuation coefficient of the water supply network. The specific formula for calculating the leakage rate is as follows:

[0017] In the formula, Leakage rate Input water volume at the pipeline inlet. This refers to the water output at the end of the pipeline network. The specific calculation formula for the comprehensive attenuation model is as follows:

[0018] In the formula, This is the water volume attenuation coefficient of the water supply network.

[0019] Preferably, the specific operation process of step S4 includes: Step S41. Collect historical daily regional water consumption data and preprocess it, determine the rolling window length, and divide the processed historical daily regional water consumption data into a rolling window sequence of the rolling window length; Step S42. Based on the historical daily water consumption data in the scrolling window, calculate the dynamic mean, standard deviation, and coefficient of variation of the water consumption data; Step S43. Dynamically adjust the upper and lower limits of water consumption data based on the coefficient of variation to adapt to different fluctuations in water consumption data, thereby obtaining the dynamic upper and lower limits of water consumption data. Step S44. Compare the regional water consumption data with the dynamic upper limit and dynamic lower limit, and output the corrected regional daily water consumption based on the comparison results.

[0020] Preferably, the specific operation process of step S43 includes: Construct an adaptive mapping function, including Dynamic upper limit multiple adaptive mapping function and The dynamic lower limit multiple adaptive mapping function maps the coefficient of variation to the corresponding upper and lower limit multiples; Tag time series data to identify special event types; Historical statistical analysis is performed on each type of event to obtain the average impact of the current event on regional water consumption; A dynamic adjustment factor is generated based on the ratio of the average impact magnitude of the event to the mean of the rolling window. The specific calculation formula for the dynamic adjustment factor is as follows:

[0021] In the formula, As a dynamic adjustment factor, The average impact of the event. This represents the dynamic average value within the scrolling window. The initial upper and lower limit multiples are updated and mapped in real time according to the dynamic adjustment factor to obtain the dynamic multiple, which includes the upper limit dynamic multiple and the lower limit dynamic multiple. The specific calculation formula for the upper limit dynamic multiple is as follows:

[0022] The specific calculation formula for the lower limit dynamic multiple is as follows:

[0023] In the formula, This is a dynamic multiple of the upper limit. This is the lower limit dynamic multiple. This is the initial upper limit dynamic multiple. This is the initial lower limit dynamic multiple. , These are the adjustment coefficients, The coefficient of variation; Calculate the daily dynamic upper and lower limits based on the dynamic multiplier; The specific calculation formula for the dynamic upper limit is as follows:

[0024] The specific calculation formula for the dynamic lower limit is as follows:

[0025] In the formula, The upper limit is dynamic. It is a dynamic lower limit. The max function represents the dynamic standard deviation within the scrolling window, and guarantees that the lower limit is not less than zero.

[0026] On the other hand, the present invention also discloses a regional water consumption conversion system for performing any of the aforementioned regional water consumption conversion methods, comprising: The data acquisition module is used to collect water supply data and obtain water supply lag characteristics and initial regional water consumption ratio. Among them, the cross-correlation analysis method is used to calculate the maximum correlation between regional water consumption and reservoir water supply time series in order to construct water supply lag characteristics. The dynamic adjustment module is used to build a deep learning model based on CNN and LSTM, train and update the deep learning model, and dynamically adjust the water usage ratio of the initial area according to the output of the deep learning model. The regional water consumption calculation module is used to calculate regional water consumption based on the adjusted regional water consumption ratio prediction value and water supply lag characteristics. The regional water consumption correction module is used to dynamically correct regional water consumption based on a normal distribution correction mechanism.

[0027] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0028] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0029] As can be seen from the above technical solution, the present invention provides a method and system for calculating regional water consumption. Compared with the prior art, the present invention has the following advantages: 1. This invention, through cross-correlation analysis, after stabilizing and white-noiseing the time series, can calculate the maximum correlation between regional water consumption and reservoir water supply, thereby determining the optimal water supply lag characteristics. This facilitates an objective reflection of the time delay caused by factors such as water delivery distance and pipeline capacity in the actual operation of the water supply system, accurately identifies the lag relationship of the water supply system, and makes the mapping relationship between water supply and regional water consumption more consistent with the actual water supply process. This improves the time matching accuracy of water consumption calculation and ultimately enhances the accuracy of regional water consumption estimation.

[0030] 2. This invention uses CNN to extract the correlation features between multiple variables and combines LSTM to capture short-term fluctuations and long-term trends in time series, thereby establishing a nonlinear mapping relationship between regional features and regional water use ratio and constructing a corresponding deep learning model to achieve dynamic prediction of regional water use ratio. Moreover, this model can effectively reflect the impact of complex factors such as population changes, industrial structure adjustments and seasonal changes on water use behavior, thereby improving the accuracy of regional water use ratio prediction.

[0031] 3. By introducing multi-source data features such as population proportion and industrial electricity consumption proportion during model training, this invention enables the model to characterize the changing patterns of regional water use behavior from multiple dimensions such as population, industry, and climate. This overcomes the problem of insufficient information caused by traditional methods relying solely on historical water use data, improves the model's ability to express actual water use behavior, and ultimately enhances the reliability and applicability of prediction results.

[0032] 4. This invention constructs a dynamic correction mechanism for normal distribution based on rolling window statistics. By dynamically calculating the mean, standard deviation, and coefficient of variation, and combining it with special event identification, it can dynamically correct the upper and lower limits of regional water consumption, avoiding abnormal extreme values ​​or unreasonable results. This improves the stability, robustness, and reliability of the system output results, and ultimately solves the problems of random fluctuations and abnormal changes in actual water consumption in the prior art.

[0033] It should be understood that the descriptions in this section are not intended to identify key or essential features of embodiments of the invention, nor are they intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Of course, implementing any product of the invention does not necessarily require achieving all of the advantages described above simultaneously. Attached Figure Description

[0034] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the overall process of the method of the present invention; Figure 2 This is a schematic diagram of the data acquisition and preprocessing process of the present invention; Figure 3 This is a schematic diagram of the deep learning model prediction process of the present invention; Figure 4 This is a schematic diagram of the regional water consumption calculation process of the present invention; Figure 5 This is a schematic diagram of the normal distribution dynamic correction process of the present invention; Figure 6 This is a system structure diagram of the present invention. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] For details in the embodiments, please refer to Figures 1 to 6 .

[0037] like Figure 1 As shown, the regional water consumption conversion method proposed in this embodiment of the invention includes the following steps: S1, Data acquisition and preprocessing operations, such as Figure 2 As shown: Water supply data is collected, and water supply lag characteristics and initial regional water consumption ratio are obtained based on the water supply data. The acquisition of water supply lag characteristics includes calculating the maximum correlation between regional water consumption and reservoir water supply time series based on cross-correlation analysis to obtain water supply lag characteristics.

[0038] This involves obtaining daily water supply data from the reservoir's water supply record system. The water supply data includes historical regional water consumption and historical reservoir water supply, typically stored in time-series format. After data acquisition, preprocessing is performed, including handling duplicate values ​​and missing values ​​(using linear imputation or mean imputation methods).

[0039] The initial regional water usage percentage was obtained as follows: At a specific time point t, the initial regional water consumption ratio is obtained based on the proportion of water consumption in the target area to the total water consumption in the entire service area of ​​the reservoir to which it belongs.

[0040] In this embodiment, the maximum correlation between the time series of regional water consumption and reservoir water supply is calculated based on cross-correlation analysis to obtain the water supply lag characteristics, specifically: Historical regional water consumption time series and reservoir water supply time series are preprocessed to obtain original series that meet the requirements of consistent time scale, providing a unified data foundation for subsequent model construction; The preprocessing includes time alignment and handling of missing values.

[0041] Based on the original sequences, unit root tests are performed. If the test results show that there is non-stationarity, the corresponding original sequences are differencing to obtain preliminary stationary sequences for constructing the ARIMA model. Among these, a unit root test is performed, specifically the ADF (Augmented Dickey-Fuller) test, which is as follows: Construct a regression equation for the sequence to be tested, estimate the parameters to be tested using the least squares method, and obtain the estimated values ​​and standard errors of the parameters to be tested. The test statistic is obtained by the ratio of the estimated value of the parameter to be tested to the standard error. Compare the test statistic with the ADF critical value. If the test statistic is greater than the ADF critical value, the series is stationary; if the test statistic is less than the ADF critical value, the series is non-stationary.

[0042] The regression equation for the sequence to be tested, and the specific calculation formula are as follows:

[0043] In the formula, The first difference of the original sequence, This is the constant term in the regression equation, used to simulate the long-term average level of the original sequence. For time trend items, The trend coefficient characterizes the linear change of the original sequence over time. For time, The parameter to be tested is used to determine whether the original sequence contains a unit root. For the original sequence at time t The observed value is 1, where p is the lag order. The coefficients of the lagged difference term are... This represents the first-order difference of the original sequence at lag i. This is the error term.

[0044] Based on the preliminary stationary series, ARIMA models were established for the regional water consumption series and the reservoir water supply series, respectively. Through parameter estimation and model order determination, the trend components, seasonal components and periodic structures in the series were fitted and stripped to obtain the model fitting values ​​for each series. Specifically, the parameters of the ARIMA model and the seasonal parameters are determined by the autocorrelation plot (ACF) and the partial autocorrelation plot (PACF); the optimal model order is selected by using the minimum AIC or BIC criterion; the model parameters are estimated using the maximum likelihood method; and the trend component, seasonal component and periodic component obtained from the model fitting are separated from the series to obtain the model fitting value for each series.

[0045] Based on the model fitting values, the actual observed values ​​of each time series are subtracted from the corresponding model fitting values ​​to obtain the residuals of the regional water consumption series and the reservoir water supply series, respectively. This allows the two residual series to simultaneously possess statistical properties close to white noise, so as to collaboratively eliminate the inherent autocorrelation structure of the two series. Based on the residuals of regional water consumption series and reservoir water supply series, autocorrelation and partial autocorrelation tests are performed to obtain a white noise residual series that meets the characteristics of white noise. Based on the white noise residual sequence, with the set lag range as the window, the cross correlation coefficient under each lag shift is calculated according to the preset cross correlation function formula to obtain the cross correlation function sequence used to determine the true interactive dependency between the two sequences. The formula for the cross-correlation function is as follows:

[0046] In the formula, Here, k is the cross-correlation coefficient, and k is the lag. This is the white-noiseed residual sequence of the regional water consumption series at time t. is the value of the white noise residual sequence of the reservoir water supply sequence after shifting it forward or backward by k time units, where n is the number of sample points.

[0047] Based on the cross-correlation function sequence, iterate through the cross-correlation coefficients corresponding to each lag, select the cross-correlation coefficient with the largest absolute value, and record the corresponding lag, so as to determine the lag position where the two time series reach the maximum correlation in a statistical sense. The recorded lag is used as the optimal water supply lag characteristic that most significantly affects the reservoir's water supply due to changes in regional water consumption.

[0048] It should be noted that the water supply process involves a certain delay due to factors such as distance and pipeline capacity. Determining the water supply lag characteristics helps to more accurately reflect the mapping relationship between the reservoir's water supply and the region's water consumption. The lag phenomenon in the water supply system is essentially the time delay of fluid transmission in the pipeline, a process that follows the basic laws of fluid mechanics.

[0049] Furthermore, based on the residuals of the regional water consumption series and the reservoir water supply series, autocorrelation and partial autocorrelation tests are performed to obtain a white-noiseed residual series that meets the characteristics of white noise, specifically: Based on the sequence residuals, the autocorrelation coefficient of each sequence residual under the lag order is calculated, and the Ljung-Box test scalar is obtained by the Ljung-Box test method. If the test value is greater than the preset significance level, it indicates that there is significant autocorrelation in the sequence residuals, and further differencing or model adjustment is required; if the test value does not exceed the preset significance level, it indicates that the sequence residuals can be considered as white noise and can be directly used for cross-correlation analysis. For the sequence residuals, the partial autocorrelation coefficient is calculated using the successive regression method (fitting the residuals with an AR model and extracting the autoregressive coefficients at each lag order). This is used to detect the independent linear dependence of the residuals at each lag order, and the significance level is used to determine whether the partial autocorrelation is significant. The determination method is consistent with the method for determining significant autocorrelation of the autocorrelation coefficient mentioned above. Based on the results of the autocorrelation and partial autocorrelation tests, it is determined whether the sequence residuals meet the white noise characteristics. If the results of the autocorrelation and partial autocorrelation tests are not significant, the sequence residuals are used as white noise residual sequences for subsequent cross-correlation analysis. If the autocorrelation and partial autocorrelation test results show significant autocorrelation, then perform first-order or multi-order differencing on the sequence residuals, increasing the differencing order by order until the differencing sequence passes the autocorrelation and partial autocorrelation tests and satisfies the white noise characteristics; If the difference still cannot eliminate autocorrelation, revert to the ARIMA model, adjust its model order and model parameters, refit the sequence and recalculate the sequence residuals until the final residual sequence that satisfies the white noise characteristics is obtained, that is, the white noise-modified residual sequence of the regional water consumption sequence residual and the reservoir water supply sequence residual.

[0050] The autocorrelation coefficient is calculated using the following formula:

[0051] In the formula, The autocorrelation coefficient of the residuals of the series at different lag orders reflects the strength of the linear correlation of the series at different lag orders. Let be the sequence residual at time t. Let be the mean of the sequence residuals. Let m be the lag order, and m be the total length of the sequence residuals. In time The sequence residuals.

[0052] It should be noted that by fully considering the time delay and dynamic dependence between reservoir water supply and regional water consumption, and by white-noise processing of the series to eliminate inherent autocorrelation interference, and by using cross-correlation analysis to accurately determine the lag position of the statistically maximum correlation between the two series, the optimal lag characteristic reflecting the actual impact of water supply is obtained. This lag characteristic can not only quantify the delay effects caused by transmission distance, pipeline capacity, and fluid transport characteristics in the water supply system, but also provide a reliable time series mapping basis for regional water use forecasting, scheduling optimization, and water resource management, improving the accuracy and scientific nature of water supply regulation and decision-making.

[0053] S2, deep learning model prediction operation, such as Figure 3 As shown: A deep learning model is built based on CNN and LSTM, and the model is trained and updated. The initial regional water use ratio is dynamically adjusted according to the model output to adapt to the dynamic fluctuations caused by various complex factors such as population density changes, industrial structure adjustments, seasonal water use differences, and holiday effects.

[0054] In this embodiment, a deep learning model is constructed based on CNN and LSTM, and the model is trained and updated. The initial water usage ratio in the region is dynamically adjusted according to the model output, specifically as follows: Acquire multi-source data and preprocess the multi-source data to obtain input data; The multi-source data includes population proportion, industrial electricity consumption proportion, population change rate, industrial electricity consumption change rate, temperature-population interaction characteristics, rainfall-industrial electricity consumption interaction, historical water inflow proportion, and water inflow trend. Among them, the population percentage = regional population / total population within the service area; Industrial electricity consumption percentage = Current regional industrial electricity consumption / Total industrial electricity consumption within the service area; Population change rate = [population - population (t-7)] / population (t-7), where population (t-7) represents the total population in the seven days preceding the current reference time point t; Industrial electricity consumption change rate = [Industrial electricity consumption index (t) - Industrial electricity consumption index (t-30)] / Industrial electricity consumption index (t-30), where the industrial electricity consumption index (t-30) represents the total industrial electricity consumption index for the 30 days prior to the current reference time point t; Temperature-population interaction characteristics = Temperature × Population percentage; Industrial electricity consumption based on rainfall = rainfall amount × industrial electricity consumption ratio; Historical inflow percentage (t) 1) = Q_plant_in(t-1) / Q_total_sewer(t-1), where Q_plant_in(t-1) represents the inflow of the target wastewater treatment plant at the current time t on the previous day, and Q_total_sewer(t-1) represents the total inflow of all wastewater treatment plants within the entire service area of ​​the reservoir at time t. 1. Total water inflow; The influent change trend = [Q_plant_in(t-1)-Q_plant_in(t-7)] / Q_plant_in(t-7), where Q_plant_in(t-7) represents the influent volume of the target wastewater treatment plant in the seven days prior to the current time t; A deep learning model is constructed, which includes a progressive architecture of a contrast feature enhancement layer, a CNN spatial extraction layer, an LSTM temporal capture layer, and a fully connected output layer. It is specifically adapted to the supervised training requirements of "dual-region contrast features + temporal labels". The input dimension is (None, 7, 16) (None represents the number of samples, 7 is the number of days in the time window, and 16 is the feature dimension), and the output dimension is (None, 1) (predicted water usage percentage for a single output region). The core function of the input layer of the deep learning model is to receive time-series samples of “7 days × 16-dimensional features”. This time window matches the 7-day cycle of the sliding window sampling to ensure that the input data is consistent with the structure of the training samples. The contrast feature enhancement layer adopts a fully connected structure, with units=32 and the activation function set to ReLU. The input is a 7×16 feature matrix. Its core function is to amplify the difference features between the current region and the overall region (such as the proportion of industrial electricity consumption and the proportion of population), allowing the model to prioritize learning the association between "proportion-type features" and labels. The output dimension is 7×32. The CNN spatial extraction layer consists of two layers: The first layer is configured with filters=64, kernel_size=(3,1), strides=1, padding='same', and activation function is ReLU. It uses a 3×1 convolutional kernel (sliding only in the time dimension while maintaining the spatial dimension) to extract the local spatial correlation features of "industrial electricity consumption ratio + temperature difference" over three days, with an output dimension of 7×64. The second layer is configured with filters=128, kernel_size=(3,1), strides=1, padding='same', and activation function is ReLU. It further deepens the spatial feature learning and captures cross-dimensional correlations (such as the synergistic effect of "population ratio + rainfall difference"), with an output dimension of 7×128. The pooling layer is set with pool_size=(2,1) and padding='valid'. Max pooling is performed on the 7×128 feature matrix output by the CNN to reduce the dimensionality in the time dimension (while retaining key features and reducing the amount of computation), and the final output dimension is 3×128. The flattening layer transforms the pooled 3×128 two-dimensional feature matrix into a 1-dimensional vector (dimension = 3×128 = 384), adapting it to the input requirements of subsequent LSTM layers; The LSTM temporal capture layer consists of two layers: the first layer sets units=128, return_sequences=True, and dropout=0.25. Return_sequences=True ensures that the output is a complete temporal sequence, which is used to capture the short-term temporal dependence of the features on the label in the first 3 days. The second layer sets units=64, return_sequences=False, dropout=0.25, and return_sequences=True to output a single time series result, which is used to capture the long-term cumulative effect of features within 7 days (especially for the continuous feature of the proportion of industrial electricity consumption). The fully connected layer consists of two layers: the first layer sets units=32, the activation function is ReLU, and L2 regularization (regularization coefficient 0.01) is added. Its core function is to fuse spatial and temporal features and avoid overfitting through regularization; the second layer is the output layer, which sets units=1 and the activation function is sigmoid. It maps the output to the [0,1] interval, which is consistent with the label range of regional water use ratio. Finally, it outputs the predicted value of regional water use ratio.

[0055] It should be noted that the key design logic of the progressive architecture of the deep learning model includes three points: First, the contrast feature enhancement layer is specifically designed for "dual-region features" to amplify the influence weight of the difference features; second, the kernel_size=(3,1) of the CNN only performs convolution in the time dimension to avoid destroying the integrity of the regional contrast features in the spatial dimension; third, dropout=0.25 is the optimal value based on 1089 samples, which can reduce the overfitting rate of the test set from 15% to less than 5%, balancing fitting accuracy and generalization ability.

[0056] The deep learning model is trained under supervision using input data. The loss function is set as mean squared error (MSE) and the optimizer (Adam). The historical actual water inflow ratio is used as the supervision label. Through iterative training, the model gradually learns the mapping relationship between the input variables and the regional water use ratio. The model was validated using an independent test set, and the error index between the predicted and actual values ​​was calculated. The error index includes root mean square error and mean absolute error. The actual value is obtained by the ratio of the influent data of the sewage treatment plant to the total influent data of the sewage treatment plant within the service area of ​​the reservoir. Since there is a strong correlation between regional water consumption and sewage treatment plant influent: after domestic and industrial water use, about 70% to 90% will be converted into sewage (after deducting losses such as evaporation, greening, and infiltration). Moreover, the "water consumption-sewage discharge" conversion ratio (i.e., "pollution generation coefficient") in the same area is relatively stable. Therefore, the "actual influent ratio" is directly used to replace the "actual water consumption ratio". According to the verification results, if the error index is less than the preset threshold, it means that the model prediction is more accurate and the model structure, feature selection, and parameter settings are better. If the error index is greater than the preset threshold, the hyperparameters of the model, such as the learning rate, the number of network layers, and the number of neurons, are adjusted so that the model gradually converges in the direction of reducing error and obtains better prediction performance.

[0057] To address data distribution drift (such as changes in water usage patterns due to population growth and industrial restructuring), a three-layer update mechanism is implemented for retraining the deep learning model, specifically: Collect the input data and actual percentage label data for the current month to construct the incremental training dataset for the current month. The actual percentage label data is the actual water consumption percentage of the region, which is replaced by the percentage of water inflow. While maintaining the parameters of the historical model, incremental training is performed on the incremental training dataset. The incremental training is set with a fixed number of iterations (epoch=5). The historical model is iteratively optimized by updating parameters in mini batches to compensate for the performance degradation caused by changes in data distribution. At the end of each quarterly cycle, a full training dataset of all samples from the past to the current quarter is constructed. The full training dataset covers long-term time series features to reflect the overall water use patterns caused by population changes, industrial restructuring, etc. The model is fully retrained based on the full training dataset to update the model parameters, enabling the model to adapt to long-term trend changes and obtain stable generalization ability. Based on the real-time comparison of the continuous prediction results and the actual proportion label data during the model operation, anomaly monitoring is performed. When the model prediction error is detected for several consecutive days, that is, the difference between the prediction result and the actual proportion label is greater than the preset threshold, the manual review process is triggered. The review process includes checking the sewage treatment plant influent metering equipment, industrial electricity data acquisition system and population data update process to ensure that the input data quality meets the model training requirements. The model is updated based on the model parameters obtained after incremental training or full retraining, and the predicted value of regional water use ratio is generated by combining the latest input data.

[0058] It should be noted that by introducing multi-source dynamic features, constructing a CNN-LSTM deep learning architecture that integrates spatial correlation and temporal dependence, and employing a three-layer model update mechanism of incremental training, full retraining, and anomaly detection, the model can fully learn the differences between regions and the whole in terms of structure, capture short-term fluctuations and long-term trends in the time dimension, and continuously adapt to the ever-changing real water use environment such as population changes, industrial adjustments, seasonal differences, and holiday effects. By establishing reliable supervision labels by replacing the actual water consumption ratio with the proportion of inflow, the model training becomes more stable and reliable. Through dynamic training and retraining strategies, the model maintains high accuracy and strong generalization ability when facing data distribution drift, thereby achieving accurate, real-time, and sustainable updates and predictions of regional water consumption ratios, providing a more reliable and intelligent decision-making basis for water supply scheduling, leakage diagnosis, and water resource management.

[0059] S3, Regional water consumption calculation operation: (e.g., ...) Figure 4 As shown, the regional water consumption is calculated based on the adjusted regional water consumption ratio forecast and the water supply lag characteristics.

[0060] In this embodiment, the regional water consumption is calculated based on the adjusted predicted regional water consumption ratio and the water supply lag characteristics, specifically as follows: Obtain the first data of the reservoir, which includes the reservoir's water supply and water transfer volume; Obtain basic hydraulic structure information of the water supply network and calculate the water volume attenuation coefficient of the water supply network. Basic hydraulic structure information includes pipe diameter, pipe length, material type, roughness coefficient, node pressure data and zone metering table data. Based on the first data of the reservoir, combined with the predicted value of regional water consumption, water supply lag characteristics, and water volume attenuation coefficient of the water supply network, the regional water consumption is calculated. The specific formula for calculating regional water consumption is as follows:

[0061] In the formula, Let t be the regional water consumption of the target area on day t. This is a predicted value for the proportion of regional water consumption. The water volume attenuation coefficient of the water supply network. For the first Daily water supply from the reservoir's own storage capacity The value is γ = 0.95 ± 0.02, representing the additional losses during the water diversion process. For the tth w is the daily water diversion volume from the reservoir, where w is the number of days the water diversion is delayed, which is one day longer than the water supply delay.

[0062] Obtain the basic hydraulic structure information of the water supply network and calculate the water volume attenuation coefficient of the water supply network, specifically: Based on the basic hydraulic structure information, the head loss of the pipe section is calculated according to the Darcy–Weisbach equation or the Hazen–Williams equation, and the friction loss rate per unit length under different flow conditions is obtained. The Reynolds number is calculated based on pipe diameter, flow velocity and roughness coefficient. The friction coefficient of the pipe section is determined by the friction coefficient formula in order to obtain the theoretical friction loss of each pipe section. The friction coefficient formula is the Colebrook–White formula. Based on the unit friction loss rate of each pipe segment and the pipeline network topology, the friction loss of each pipe segment is accumulated segment by segment to obtain the total friction loss. Based on the resistance coefficient of local components such as elbows, valves, and water meters in the pipeline network, the loss of local components is calculated. Local component losses refer to the head height corresponding to the pressure loss caused by friction and disturbance when water flows through local components such as valves, elbows, joints, and pumps. The specific calculation formula is as follows:

[0063] In the formula, For local component loss, Let be the drag coefficient of the j-th local component, describing the magnitude of the resistance of a single local component to water flow. Let be the flow velocity at j local components, and g be the acceleration due to gravity.

[0064] The sum of total friction loss and local loss constitutes the theoretical pressure loss caused by pipeline friction, and the theoretical pressure loss is converted into the corresponding friction attenuation coefficient. The friction attenuation coefficient is the proportion of water volume reduction due to friction along the pipeline and losses of local components. The specific calculation formula is as follows:

[0065] In the formula, The frictional attenuation coefficient, For total losses along the route, The pressure loss influencing factor is used to map the head loss to the exponential coefficient of water volume decay, reflecting the sensitivity of pipeline head loss to water volume decay. It is obtained by fitting historical pressure-flow data, for example, by performing least squares fitting using the exponential relationship between actual water volume and calculated head loss.

[0066] The leakage rate is calculated based on the input water volume recorded by the zone metering device and the output water volume of the terminal metering point. The leakage rate is calculated using the following formula:

[0067] In the formula, Leakage rate Input water volume at the pipeline inlet. This refers to the water output at the end of the pipeline network.

[0068] Based on the friction attenuation coefficient and leakage rate, a comprehensive attenuation model is established by water conservation to output the water supply network attenuation coefficient. The water supply network attenuation coefficient reflects the water supply attenuation level after the combined effect of friction loss and leakage loss under the actual operation of the pipeline. The comprehensive attenuation model uses the following specific calculation formula:

[0069] In the formula, This is the water volume attenuation coefficient of the water supply network.

[0070] S4, dynamically adjusts regional water consumption based on a normal distribution correction mechanism, such as... Figure 5 As shown.

[0071] The regional water consumption calculated through the dynamic mapping of reservoir water supply and regional water consumption is estimated based on data such as reservoir water supply, water transfer volume, and correlation coefficients. However, actual water consumption is affected by various complex factors, such as random fluctuations in water consumption, measurement errors, and extreme weather, which may lead to some unreasonable water consumption estimates. For example, during periods of low water consumption, the actual water consumption may be very low, but due to measurement errors or other factors, the estimated water consumption may be negative, which is unreasonable in practice. In such cases, a normal distribution correction mechanism is needed to correct the results obtained by the algorithm.

[0072] In this embodiment, the regional water consumption is dynamically corrected based on the normal distribution correction mechanism, specifically as follows: Collect historical daily water consumption data for the target area and preprocess the data; Determine the length of the rolling window to reflect short-term trends in recent water use behavior; The processed historical daily water consumption data is divided into a rolling window sequence with a rolling window length, providing basic data for dynamic statistics for each day; For historical daily water consumption data within the rolling window, calculate the dynamic mean and standard deviation, and obtain the coefficient of variation based on the ratio of the standard deviation to the mean. The coefficient of variation is used to quantify the relative fluctuation intensity of water consumption within the time window. The upper and lower limits are dynamically adjusted based on the coefficient of variation to adapt to different fluctuation ranges, thus obtaining the dynamic upper limit and dynamic lower limit. Compare regional water consumption with dynamic upper and lower limits; If the regional water consumption is less than the dynamic lower limit, it will be adjusted to the dynamic lower limit value. If the regional water consumption exceeds the dynamic upper limit, it will be adjusted to the dynamic upper limit value. If the regional water consumption exceeds the dynamic lower limit but does not exceed the dynamic upper limit, the original value will be maintained. The corrected daily water consumption data for the region will be output for subsequent scheduling, forecasting, or analysis.

[0073] Furthermore, the upper and lower limits are dynamically adjusted based on the coefficient of variation to accommodate different fluctuation ranges, resulting in a dynamic upper limit and a dynamic lower limit, as follows: Constructing an adaptive mapping function and The coefficient of variation is mapped to the corresponding upper and lower limit multiples, where, It is a dynamic upper limit multiple adaptive mapping function. The dynamic lower limit multiple adaptive mapping function can be linear, power function or exponential form, so that the multiple increases with CV(t) to adapt to periods of large fluctuations; The time series is labeled to identify special event types, including holidays (Spring Festival, National Day, etc.), extreme weather (high temperature, rainstorm, cold wave), and large-scale events (industrial shutdown, major sports events). Among these, the specific dates of these events can be identified through multi-source information such as calendar data, meteorological monitoring data, and industrial scheduling records; For each type of event, conduct historical statistical analysis to obtain the average impact of the current event on regional water consumption. The average impact can be obtained by comparing the water consumption on the current event day with the average water consumption on non-event days in the same period. A dynamic adjustment factor is generated based on the ratio of the average impact magnitude of the event to the mean of the rolling window. The dynamic adjustment factor is calculated using the following formula:

[0074] In the formula, As a dynamic adjustment factor, The average impact of the event. This represents the dynamic mean within the scrolling window.

[0075] If there are no special events on that day, then set =1; if the event is a reduction in water usage, then If the value is negative, the upper and lower limits will be dynamically adjusted to decrease; if the event is an increase in water usage, then... If the value is positive, the upper limit increases accordingly.

[0076] The initial upper and lower limit multiples are updated and mapped in real time based on the dynamic adjustment factor to obtain the dynamic multiple, which includes the upper limit dynamic multiple and the lower limit dynamic multiple. The upper limit dynamic multiple is calculated using the following formula:

[0077] The lower limit dynamic multiple is calculated using the following formula:

[0078] In the formula, This is a dynamic multiple of the upper limit. This is the lower limit dynamic multiple. This is the initial upper limit dynamic multiple. This is the initial lower limit dynamic multiple. , These are the adjustment coefficients, is the coefficient of variation.

[0079] Calculate the daily dynamic upper and lower limits based on the dynamic multiple.

[0080] The dynamic upper limit is calculated using the following formula:

[0081] The dynamic lower limit is calculated using the following formula:

[0082] In the formula, The upper limit is dynamic. It is a dynamic lower limit. The max function represents the dynamic standard deviation within the scrolling window, and guarantees that the lower limit is not less than zero to meet the requirements of physical reality.

[0083] It should be noted that by setting dynamic upper and lower limits, adaptive regulation of regional water consumption can be achieved. The upper and lower limits can be dynamically adjusted according to the actual fluctuation of water consumption, short-term random changes, and special events (such as holidays, extreme weather, or industrial shutdowns). This avoids unreasonable overestimation or underestimation of predicted values, improves the accuracy and robustness of water consumption estimation, and takes into account both long-term trends and short-term anomalies. This is conducive to scientific decision-making in water resource allocation and sewage network status assessment.

[0084] On the other hand, such as Figure 6 As shown, this invention also discloses a regional water consumption conversion system based on water supply mapping and normal distribution correction, including a data acquisition module, a dynamic adjustment module, a regional water consumption calculation module, and a regional water consumption correction module, with connections between the modules: The data acquisition module is used to collect water supply data and obtain water supply lag characteristics and initial regional water consumption ratio. Among them, the maximum correlation between regional water consumption and reservoir water supply time series is calculated based on cross-correlation analysis to obtain water supply lag characteristics. The dynamic adjustment module is used to build a deep learning model based on CNN and LSTM, train and update the model, and dynamically adjust the water usage ratio of the initial area according to the model output. The regional water consumption calculation module is used to calculate regional water consumption based on the adjusted regional water consumption ratio prediction value and water supply lag characteristics. The regional water consumption correction module is used to dynamically correct regional water consumption based on a normal distribution correction mechanism.

[0085] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.

[0086] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.

[0087] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the regional water consumption conversion methods described above.

[0088] It is understood that the system provided in the embodiments of the present invention corresponds to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.

[0089] This application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus. Memory, used to store computer programs; The processor, when executing the program stored in memory, implements the above-mentioned method for calculating water consumption in the region.

[0090] The communication bus mentioned in the above-mentioned electronic devices can be a standard bus for interconnecting peripheral components or an extended industrial standard structure bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.

[0091] The communication interface is used for communication between the aforementioned electronic devices and other devices.

[0092] The memory may include random access memory or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0093] The processors mentioned above can be general-purpose processors, including central processing units, network processors, etc.; they can also be digital signal processors, application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0094] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, an optical medium, or a semiconductor medium, etc.

[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0096] Furthermore, it should be noted that if any directional indication (such as up, down, left, right, front, back, etc.) is involved in the embodiments of the present invention, the directional indication is only used to explain the relative positional relationship and movement of each component in a specific posture. If the specific posture changes, the directional indication will also change accordingly.

[0097] Furthermore, those skilled in the art should understand that in the actual use of the embodiments of this application, there may be preset thresholds used as the basis for judging the corresponding technical solutions. These thresholds are conventional technical means commonly used in the field to implement functions such as state judgment, condition recognition, and control logic switching. The specific values, setting basis, value selection methods, determination methods, and adjustment rules of the thresholds involved in this technical solution are all conventional technical choices that can be reasonably determined by those skilled in the art based on conventional technical factors such as actual application scenarios, system working states, characteristics of the detection object, hardware performance parameters, and functional requirements, through conventional experiments, calibrations, and debugging. The specific setting and adjustment of the aforementioned thresholds will not cause this technical solution to be unimplementable as a whole, nor will it affect the realization of the core concept and the achievement of the technical effects of this technical solution.

[0098] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, in the embodiments of this invention, "multiple" refers to two or more. Moreover, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.

Claims

1. A method for calculating regional water consumption, characterized in that, include: Step S1. Collect water supply data and obtain water supply lag characteristics and initial regional water consumption ratio. Among them, the water supply lag characteristics are obtained by calculating the maximum correlation between regional water consumption and reservoir water supply time series. Step S2. Construct a deep learning model based on CNN and LSTM, and train and update the deep learning model using preprocessed water supply data. Dynamically adjust the initial regional water consumption ratio according to the output of the deep learning model to obtain the predicted value of the regional water consumption ratio. Step S3. Calculate the regional water consumption based on the adjusted predicted regional water consumption ratio and the water supply lag characteristics; Step S4. Dynamically adjust the regional water consumption based on the normal distribution correction mechanism.

2. The regional water consumption conversion method as described in claim 1, characterized in that, The specific operational procedure for obtaining the water supply lag characteristics in step S1 includes: The historical time series of regional water consumption and reservoir water supply were preprocessed to obtain the original series. Based on the water consumption data of the original sequence, unit root tests were performed on each region. Differential processing was then performed on the water consumption data of the regions where the test results showed non-stationarity to obtain a preliminary stationary sequence. Based on the preliminary stationary sequence, an ARIMA model is established, and through parameter estimation and model order determination, the trend component, seasonal component and periodic structure in the sequence are fitted and separated to obtain the model fitting value. Based on the model fitting values, the residuals of the regional water consumption sequence and the residuals of the reservoir water supply sequence are calculated. Based on the residuals of regional water consumption series and reservoir water supply series, autocorrelation and partial autocorrelation tests are performed to obtain a white noise residual series that meets the characteristics of white noise. Based on the white noise residual sequence, the cross-correlation function sequence is calculated with a set lag range as the window; Traverse the sequence of cross-correlation functions, select the cross-correlation coefficient with the largest absolute value, and record the corresponding lag value as the water supply lag characteristic.

3. The regional water consumption conversion method as described in claim 2, characterized in that, The process for obtaining the white noise-enhanced residual sequence includes: Based on the residuals of regional water consumption series and reservoir water supply series, the autocorrelation coefficient and autocorrelation test value of each series residual at the lag order are calculated, and the partial autocorrelation coefficient is obtained. If the autocorrelation test result and the partial autocorrelation coefficient are both not significant, then the residual of the sequence is taken as the white noise residual sequence. If the autocorrelation test is significant, then the sequence residuals are differentially processed, and the difference is increased step by step until the differentially processed sequence passes the test, finally obtaining the white noise residual sequence.

4. The regional water consumption conversion method as described in claim 1, characterized in that, The deep learning model in step S2 includes a progressive architecture consisting of a contrastive feature enhancement layer, a CNN spatial extraction layer, an LSTM temporal capture layer, and a fully connected output layer. The contrast feature enhancement layer adopts a fully connected structure to amplify the difference features between the current region and the overall region; The CNN spatial extraction layer includes two convolutional layers for extracting local temporal-dimensional related features and cross-dimensional synergistic effects; The LSTM time-series capture layer is divided into two layers: the first layer outputs a complete sequence to capture short-term dependencies, and the second layer outputs a single result to capture long-term cumulative effects. The fully connected layer is divided into two layers: the first layer integrates spatial and temporal features, and the second layer is the output layer, which outputs the predicted value of water usage ratio in the region.

5. The regional water consumption conversion method as described in claim 4, characterized in that, The deep learning model also includes a three-layer update mechanism for retraining, specifically: Acquire multi-source water supply data and preprocess the multi-source data. The preprocessed data is then used as input data for a deep learning model. Collect the input data for the current month and the actual water usage percentage label data for the region to construct the incremental training dataset for the current month; While maintaining the parameters of the historical model, incremental training is performed on the incremental training dataset, and the historical deep learning model is iteratively optimized using a mini-batch parameter update method. At the end of each quarterly cycle, a full training dataset of all samples from the past to the current quarter is constructed, and the deep learning model is fully retrained to update the model parameters. Based on real-time comparison of model prediction results and actual proportion label data, anomaly monitoring is performed: when the model prediction error is detected to be greater than the preset threshold for several consecutive days, a manual review process is triggered. Update the model based on the model parameters obtained after incremental training or full retraining.

6. The regional water consumption conversion method as described in claim 1, characterized in that, The specific operation process of step S3 includes: Step S31. Obtain the reservoir water supply and water transfer volume as the first data of the reservoir; Step S32. Obtain the basic hydraulic structure information of the water supply network and calculate the water volume attenuation coefficient of the water supply network; Step S33. Based on the first data of the reservoir, combined with the predicted value of regional water consumption, water supply lag characteristics, and water supply network attenuation coefficient, calculate the regional water consumption. The calculation formula is as follows: In the formula, Let t be the regional water consumption of the target area on day t. This represents the predicted regional water consumption percentage for day t. The water volume attenuation coefficient of the water supply network. For the first Daily water supply from the reservoir's own storage capacity The water diversion attenuation coefficient is... For the tth w represents the daily water diversion volume from the reservoir, where w is the number of days the water diversion is delayed.

7. The regional water consumption conversion method as described in claim 6, characterized in that, The specific operation process of step S32 includes: Based on the basic hydraulic structure information of the water supply network, the friction loss rate per unit length is calculated. Based on the friction loss rate per unit length of each pipe section of the water supply network, and based on the network topology, calculate the total friction loss and the loss of local components. The sum of total friction loss and local loss is calculated as the theoretical pressure loss and converted into the friction attenuation coefficient. Calculate the leakage rate, and then establish a comprehensive attenuation model based on the friction attenuation coefficient and the leakage rate to output the water supply network water volume attenuation coefficient.

8. The regional water consumption conversion method as described in claim 1, characterized in that, The specific operation process of step S4 includes: Step S41. Collect historical daily regional water consumption data and preprocess it, determine the rolling window length, and divide the processed historical daily regional water consumption data into a rolling window sequence of the rolling window length; Step S42. Based on the historical daily water consumption data in the scrolling window, calculate the dynamic mean, standard deviation, and coefficient of variation of the water consumption data; Step S43. Dynamically adjust the upper and lower limits of water consumption data based on the coefficient of variation to adapt to different fluctuations in water consumption data, thereby obtaining the dynamic upper and lower limits of water consumption data. Step S44. Compare the regional water consumption data with the dynamic upper limit and dynamic lower limit, and output the corrected regional daily water consumption based on the comparison results.

9. The regional water consumption conversion method as described in claim 8, characterized in that, The specific operation process of step S43 includes: Construct an adaptive mapping function to map the coefficient of variation to the corresponding upper and lower limit multiples; Tag time series data to identify special event types; Historical statistical analysis is performed on each type of event to obtain the average impact of the current event on regional water consumption; A dynamic adjustment factor is generated based on the ratio of the average impact magnitude of the event to the mean of the rolling window. The initial upper and lower limit multiples are updated and mapped in real time according to the dynamic adjustment factor to obtain the dynamic multiple, which includes the upper limit dynamic multiple and the lower limit dynamic multiple. Calculate the daily dynamic upper and lower limits based on the dynamic multiple.

10. A regional water consumption conversion system, used to execute the regional water consumption conversion method according to any one of claims 1-9, characterized in that, include: The data acquisition module is used to collect water supply data and obtain water supply lag characteristics and initial regional water consumption ratio. Among them, the cross-correlation analysis method is used to calculate the maximum correlation between regional water consumption and reservoir water supply time series in order to construct water supply lag characteristics. The dynamic adjustment module is used to build a deep learning model based on CNN and LSTM, train and update the deep learning model, and dynamically adjust the water usage ratio of the initial area according to the output of the deep learning model. The regional water consumption calculation module is used to calculate regional water consumption based on the adjusted regional water consumption ratio prediction value and water supply lag characteristics. The regional water consumption correction module is used to dynamically correct regional water consumption based on a normal distribution correction mechanism.