Method for predicting incoming water flow of sewage pipe network based on time sequence neural network

By applying the incoming water flow prediction method based on a timing neural network in the sewage pipeline network, the problem of pump gate control in the prior art is difficult to cope with large changes in water volume or emergencies, and higher prediction accuracy and initiative in pipeline regulation are achieved.

CN119623709APending Publication Date: 2025-03-14POWERCHINA HUADONG ENG CORP LTD

Patent Information

Application Number
CN202411675036.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing sewage pipeline pump gate control relies on human experience or passive logic algorithms, and it is difficult to deal with large changes in water volume or emergencies, resulting in frequent start and stopping of the pump, increasing energy consumption and wear, and it is difficult to achieve refined control.

Method used

The sewage pipeline incoming water flow prediction method based on the timing neural network is adopted. The sewage pipeline network IoT monitoring system obtains the water volume timing data of the target site and the water level timing data of the auxiliary site, and inputs the preprocessed data to the timing neural network of the WaveNet convolutional architecture to output the predicted water flow.

Benefits of technology

It improves the accuracy and reliability of the water volume prediction of sewage pipelines, promotes the transformation of sewage pipelines from passive regulation to active regulation, and helps to achieve refined and systematic management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623709A_ABST
    Figure CN119623709A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of urban drainage, in particular to a sewage pipe network incoming water flow prediction method based on a time sequence neural network, and the method comprises the steps: selecting a water volume monitoring historical value and a real-time value of a target site and a water level monitoring historical value and a real-time value of an auxiliary site as input features based on a topological structure of a sewage pipe network; according to the method, periodic changes of the water volume of the sewage pipe network are considered, incoming water volume information of an upstream pipe network communicated with a target site is also considered, water level data input characteristics of different auxiliary sites are extracted in combination with a time sequence neural network based on a WaveNet convolution architecture, a short-term mode and a long-term mode are learned at the same time, explosion of model complexity cannot be caused, and the method is suitable for large-scale popularization and application. The precision and reliability of predicting the water volume of the sewage pipe network can be improved, the conversion of the sewage pipe network from passive regulation to active regulation is promoted, and refined systematic management and control of the sewage pipe network are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of urban drainage, and in particular to a method for predicting the inflow flow of a sewage pipe network based on a time series neural network. Background Art

[0002] The sewage network is an important part of the urban sewage system. Pump gate control is an important link to ensure the normal operation of the sewage network, and it is also a key node to achieve refined and systematic operation of the sewage network. At present, the pump gate control of the sewage network still relies heavily on human experience, or passive regulation based on the logical algorithm set by the monitoring instrument. For example, the lifting pump station usually passively judges the start and stop needs of the pump station based on the water level of the water collection tank in the station. However, this passive regulation is difficult to cope with large changes in pipeline water volume or emergencies. At the same time, it will cause the pump to start and stop frequently, increase pump wear and energy consumption, and it is difficult to achieve refined management and control of the pump station group.

[0003] In recent years, with the introduction and gradual implementation of the concept of "plant-network" integration, the construction of interconnected sewage pipelines and the scheme of connecting different sewage treatment plants in the region for sewage transfer and dispatch have gradually attracted attention. This can balance the operating load of sewage treatment plants and improve the operating safety factor of sewage systems. However, there is still a lack of corresponding solutions for the water volume dispatch of interconnected sewage pipelines.

[0004] Water volume forecasting in sewage pipe networks is an important reference for the formulation of sewage pump station upgrading, joint drainage and coordination plans. With the rapid development of emerging technologies such as the Internet of Things, big data, and artificial intelligence, traditional water volume forecasting methods based on mechanism models have been challenged. Summary of the invention

[0005] In view of this, the object of the present invention is to provide a method for predicting the inflow flow of a sewage pipe network based on a time series neural network.

[0006] In a first aspect, an embodiment of the present invention provides a method for predicting water flow in a sewage network based on a time series neural network, the method comprising:

[0007] Based on the sewage pipe network topology in the sewage pipe network IoT monitoring system, determine the target site for water volume prediction and the auxiliary site supporting water volume prediction;

[0008] Obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site;

[0009] The preprocessed water volume time series data of the target site and the water level time series data of the auxiliary site are input into the pre-trained time series neural network based on the WaveNet convolutional architecture to output the predicted water flow of the target site in the target period.

[0010] In combination with the first aspect, based on the existing sewage pipe network IoT monitoring system, according to the sewage pipe network topology structure analysis, the steps of determining the target site to be predicted for water volume and the auxiliary site supporting water volume prediction include:

[0011] Obtaining a first position of a lift pump station and a second position of a dispatch pump station in a sewage pipe network topology;

[0012] Determine the third position between the first position and the second position as the target position for water volume prediction;

[0013] The upstream water level monitoring point connected to the target site of water volume prediction is selected as the auxiliary site to support water volume prediction.

[0014] In combination with the first aspect, the step of obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site includes:

[0015] Obtain the historical and current values ​​of water volume monitoring at the target site, as well as the historical and current values ​​of water level monitoring at the auxiliary site;

[0016] The water volume monitoring historical values ​​and current values ​​of the target site are processed by the following formula to obtain the water volume time series data of the target site; at the same time, the water level monitoring historical values ​​and current values ​​of the auxiliary site are processed to obtain the water level time series data of the auxiliary site:

[0017]

[0018] Among them, x and y are two sequences of length n, and are their means respectively, and k represents the phase difference between the two time series.

[0019] In combination with the first aspect, after the step of obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site, the method further includes:

[0020] The water volume time series data of the selected target sites and the water level time series data of the auxiliary sites are processed with missing values ​​and standardized.

[0021] In combination with the first aspect, based on the existing sewage pipe network IoT monitoring system, according to the sewage pipe network topology structure analysis, before determining the target site to be predicted for water volume and the auxiliary site supporting water volume prediction, it also includes:

[0022] Obtain an initial temporal neural network based on the WaveNet convolutional architecture, which includes an input layer, four hidden layers, and an output layer connected in sequence;

[0023] Define the parameters of the initial time series neural network, including: setting the ReLU function as the activation function, setting the He initialization method to initialize the weights of each layer of the neural network, setting the MCDropout method for regularization, and setting the Adam optimization method to iteratively update the initial weights of the neural network;

[0024] Obtain initial data and divide the initial data into training set, validation set and test set;

[0025] The initial time series neural network is trained using the training set and verified based on the verification set to obtain the verification results;

[0026] If the verification result does not satisfy the preset conditions, the model is optimized based on the preset mean square error until a time series neural network that satisfies the preset conditions is obtained;

[0027] The test set is used to test the temporal neural network that meets the preset conditions and obtain the test results.

[0028] In combination with the first aspect, the steps of setting the ReLU function as the activation function, setting the He initialization method to initialize the weights of each layer of the neural network, setting the MCDropout method to perform regularization, and setting the Adam optimization method to iteratively update the initial weights of the neural network include:

[0029] Bayesian optimization was applied to adjust hyperparameters, where the WaveNet layer diffusion rate was set to (2, 4, 8, 16), the number of filters was set to (10, 15, 20), and the convolution kernel size was set to (1, 2, 4); the dropout rate of the MCDropout method was set to (0, 0.5); and the learning rate of the Adam optimization method was set to 0.01-0.0001.

[0030] In combination with the first aspect, the steps of training the initial time series neural network using the training set and verifying it based on the verification set to obtain the verification result include:

[0031] Get the first MAPE value of the training set and the second MAPE value of the validation set;

[0032] Calculate the absolute value of the difference between the first MAPE value and the second MAPE value;

[0033] Determine whether the absolute value of the difference is less than a preset value;

[0034] If so, determine that the verification result representation satisfies the preset conditions;

[0035] If not, it is determined that the verification result representation does not meet the preset condition.

[0036] In a second aspect, the present application provides a sewage network water flow prediction device based on a time series neural network, the device comprising:

[0037] A determination module is used to determine the target site to be used for water volume prediction and the auxiliary site to support water volume prediction based on the sewage network topology in the sewage network IoT monitoring system;

[0038] An acquisition module is used to acquire the water volume time series data of the target site and the water level time series data of the auxiliary site;

[0039] The prediction module is used to input the pre-processed water volume time series data of the target site and the water level time series data of the auxiliary site into the pre-trained WaveNet convolutional architecture-based time series neural network, and output the predicted water flow of the target site in the target period.

[0040] In a third aspect, the present application provides an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above method.

[0041] In a fourth aspect, the present application provides a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the above method is executed.

[0042] The embodiments of the present invention bring the following beneficial effects: The present application provides a method for predicting water flow in a sewage network based on a time series neural network, the method comprising: determining a target site to be predicted for water volume prediction and an auxiliary site supporting water volume prediction based on the sewage network topology in the sewage network IoT monitoring system; obtaining water volume time series data of the target site and water level time series data of the auxiliary site; inputting the preprocessed water volume time series data of the target site and the water level time series data of the auxiliary site into a pre-trained time series neural network based on the WaveNet convolutional architecture, and outputting the predicted water flow of the target site in the target time period.

[0043] The present invention provides a method for predicting the inflow flow of a sewage pipe network based on a time series neural network. The method selects the historical values ​​and real-time values ​​of water volume monitoring at the target site and the historical values ​​and real-time values ​​of water level monitoring at the auxiliary site as input features based on the topological structure of the sewage pipe network. It takes into account both the periodic changes in the water volume of the sewage pipe network and the inflow water volume information of the upstream pipe network connected to the target site. It combines a time series neural network based on a WaveNet convolutional architecture to extract input features of water level data at different auxiliary sites, and learns short-term and long-term patterns at the same time without causing an explosion in model complexity. It can improve the accuracy and reliability of water volume prediction in the sewage pipe network, promote the transformation of the sewage pipe network from passive regulation to active regulation, and contribute to the refined and systematic management and control of the sewage pipe network.

[0044] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 A schematic diagram of a flow chart of a method for predicting water flow in a sewage pipe network based on a time series neural network provided by an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the MAPE values ​​of the training set and the validation set during the initial time series neural network training process provided by an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of the test results of using the test set to test the trained temporal neural network based on the WaveNet convolutional architecture;

[0050] Figure 4 A schematic diagram of a flow chart of a sewage pipe network inflow flow prediction device based on a time series neural network provided by an embodiment of the present invention;

[0051] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.

[0052] Reference numerals:

[0053] 10-determination module, 20-acquisition module, 30-prediction module;

[0054] 130 - processor, 131 - memory, 132 - bus, 133 - communication interface. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0056] In order to facilitate the understanding of this embodiment, the technical terms designed in this application are briefly introduced below.

[0057] The WaveNet convolutional architecture is a generative model based on convolutional neural networks (CNNs). Among them, dilated convolution is one of the core innovations of WaveNet. Traditional convolutional layers only consider a few adjacent input points in each layer, while dilated convolution inserts "holes" between inputs (i.e. skips some input points) so that the receptive field of the convolution kernel can grow exponentially with the number of layers. This design allows the model to capture long-distance dependencies in shallower networks without adding a large number of parameters. In addition, WaveNet uses residual connections to help gradients transfer better, thereby avoiding the problem of gradient vanishing or exploding. The residual connection adds the input directly to the output to form a skip connection. This design helps train deeper networks and improves the performance of the model.

[0058] After introducing the technical terms involved in this application, the application scenarios and design concepts of the embodiments of this application are briefly introduced.

[0059] The prediction accuracy of traditional water volume prediction methods based on mechanism models is not ideal.

[0060] Based on this, an embodiment of the present application provides a method for predicting the inflow flow of a sewage pipe network based on a time series neural network.

[0061] Example 1

[0062] The present application provides a method for predicting the flow rate of sewage pipe network based on time series neural network. Figure 1 As shown, the method includes:

[0063] S110, based on the sewage pipe network topology in the sewage pipe network IoT monitoring system, determine the target site for water volume prediction and the auxiliary site supporting the water volume prediction.

[0064] S120, obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site.

[0065] S130, input the pre-processed water volume time series data of the target site and the water level time series data of the auxiliary site into a pre-trained time series neural network based on the WaveNet convolutional architecture, and output the predicted water flow of the target site in the target period.

[0066] In this application, the sewage pipe network topology structure in the existing sewage pipe network IoT monitoring system is used to determine the target site, auxiliary points, and related water volume time series data and water level time series data, combined with the advanced WaveNet convolutional architecture time series neural network to achieve water volume prediction at the target site. This method not only improves the accuracy of the prediction, but also can effectively manage and optimize the operation of the sewage pipe network.

[0067] In combination with the first aspect, step S110 specifically includes:

[0068] S111, obtaining a first position of a lift pump station and a second position of a dispatch pump station in a sewage pipe network topology.

[0069] S112, determining a third position between the first position and the second position as a target position for water volume prediction.

[0070] S113, selecting an upstream water level monitoring point connected to the target site of water volume prediction as an auxiliary site supporting water volume prediction.

[0071] Specifically, based on the topological structure of the sewage pipe network, the physical layout of the sewage pipe network can be grasped, so that it is convenient to understand the connection relationship between each node and the pipe. As a preference, the selection of the target site for water volume prediction needs to be based on the needs of the pump station lifting, joint drainage and coordination schemes during the actual operation of the sewage pipe network. In this embodiment, the target site is set in front of the lifting pump station and the dispatching pump station; the selection of auxiliary sites supporting water volume prediction should be based on the topological structure of the pipe network, analyze the characteristics of the pipeline elevation slope, sewage flow direction, etc., and select the upstream water level monitoring point connected to the target site.

[0072] Specifically, first, the lift pump station in the sewage network topology is marked as the first target node to obtain the first position, and the dispatch pump station is marked as the second target node to obtain the second position. Subsequently, a third position is selected between the first position and the second position, and the node corresponding to the third position is used as the target site for water volume prediction. Finally, the nodes corresponding to multiple positions upstream of the third position are used as auxiliary sites, thereby obtaining the key nodes (i.e., target sites) for water volume prediction and auxiliary sites that can provide additional information to reflect the water flow dynamics of the target sites. There can be one or more auxiliary sites.

[0073] In combination with the first aspect, step S120 specifically includes:

[0074] S121, obtaining the historical value and current value of water volume monitoring at the target site, and the historical value and current value of water level monitoring at the auxiliary site.

[0075] S122, the historical value and current value of water volume monitoring at the target site are processed by the following formula to obtain the water volume time series data of the target site; at the same time, the historical value and current value of water level monitoring at the auxiliary site are processed to obtain the water level time series data of the auxiliary site:

[0076]

[0077] Among them, x and y are two sequences of length n, and are their means respectively, and k represents the phase difference between the two time series.

[0078] The historical water volume data of the target site is extracted from the IoT monitoring system of the sewage network. These data are usually stored in the form of time series, recording the water volume at each time point; similarly, the historical water level data of the auxiliary site is extracted from the IoT monitoring system. These data are also stored in the form of time series, recording the water level at each time point. Among them, the time series data are all processed using the above formula for time lag cross-correlation analysis to select sufficiently long time series data. The obtained time series data is then input into the time series neural network based on the WaveNet convolutional architecture.

[0079] In combination with the first aspect, step S110 further includes:

[0080] S140, performing missing value processing and standardization processing on the water volume time series data of the selected target site and the water level time series data of the auxiliary site.

[0081] It is understandable that before inputting the time series data into the time series neural network based on the WaveNet convolutional architecture, in order to avoid missing values, outliers and noise caused by sensor failure, data transmission errors and other reasons, linear interpolation and maximum-minimum standardization methods need to be applied for missing value processing and standardization. Among them, missing value processing refers to filling or deleting missing data. There are many ways to handle missing values. The choice of which method depends on the nature of the data and the specific application scenario. For example, when there are few missing values ​​in the data set and deleting these rows will not significantly affect the amount of data, delete the rows with missing values; when there are many missing values ​​in a column of data and the importance of the column to the model is low, directly delete the column with a large number of missing values; for time series data, linear interpolation of missing values ​​based on the data of adjacent time points, or filling missing values ​​with the values ​​of the previous or next time point, etc., are not limited here. Standardization (also known as normalization) in data preprocessing is a very important step, which can ensure that different features have similar scales, thereby improving the performance and stability of the model.

[0082] Specifically, the following formula is used:

[0083]

[0084] Among them, x i represents the original input, x 0 、x 1 Represents x i Two adjacent points, x max With x min They represent the maximum and minimum values ​​of the characteristic indicators respectively.

[0085] In this embodiment, the water volume time series data of the target site obtained in step S130 and the water level time series data of the auxiliary site are input into a pre-trained time series neural network based on the WaveNet convolutional architecture. In essence, the historical values ​​and real-time values ​​of the water volume monitoring at the target site are used as model input features, mainly considering the periodic changes in the water volume of the sewage network; and the historical values ​​and real-time values ​​of the water level monitoring at the auxiliary site are used as model input features, mainly considering the water volume information of the upstream network connected to the target site, and combined with the data processing capability of the model, accurate prediction of the water volume at the target site within a specified time period after the current time is achieved.

[0086] In combination with the first aspect, before step S110, the method further includes:

[0087] S010, obtaining an initial temporal neural network based on the WaveNet convolutional architecture, the initial temporal neural network comprising an input layer, four hidden layers and an output layer connected in sequence.

[0088] S020, define the parameters of the initial time series neural network, the parameters include: setting the ReLU function as the activation function, setting the He initialization method to initialize the weights of each layer of the neural network, setting the MCDropout method for regularization, and setting the Adam optimization method to iteratively update the initial weights of the neural network.

[0089] S030, obtaining initial data, and dividing the initial data into a training set, a validation set, and a test set.

[0090] S040, training the initial time series neural network using the training set, and verifying it based on the verification set to obtain a verification result.

[0091] S050: If the verification result indicates that the preset conditions are not met, the model is optimized based on a preset mean square error until a time series neural network that meets the preset conditions is obtained.

[0092] S060, using the test set to test the temporal neural network that meets the preset conditions to obtain a test result.

[0093] In combination with the first aspect, step S040 specifically includes:

[0094] S041, obtaining a first MAPE value of the training set and a second MAPE value of the validation set.

[0095] S042, calculating the absolute value of the difference between the first MAPE value and the second MAPE value.

[0096] S043, determining whether the absolute value of the difference is less than a preset value.

[0097] If yes, go to step S044; if no, go to step S045.

[0098] S044: If yes, determine whether the verification result representation satisfies the preset condition.

[0099] S045, determining that the verification result representation does not satisfy a preset condition.

[0100] Before practical application, we need to build and train an initial time series neural network based on the WaveNet convolutional architecture to obtain a time series neural network based on the WaveNet convolutional architecture that can meet the prediction accuracy.

[0101] First, we need to define an initial temporal neural network, which includes an input layer, four hidden layers, and an output layer. Next, we need to define the parameters of the initial temporal neural network, including activation function, weight initialization method, regularization method, and optimizer. After that, the initial temporal neural network is continuously trained and optimized until it meets the preset conditions, and a pre-trained temporal neural network based on the WaveNet convolutional architecture is obtained.

[0102] It is worth noting that the core of WaveNet is the expanded causal convolution layer, which allows the efficiency of the convolution layer to be utilized. By doubling the diffusion rate of each layer, the lower layers learn short-term patterns, while the higher layers learn long-term patterns, thereby correctly handling the temporal order and handling long-term dependencies without causing an explosion in model complexity. By using expanded causal convolution layers, WaveNet is able to effectively capture long-distance dependencies while maintaining the efficiency and trainability of the model.

[0103] WaveNet is suitable for sewage pipe network water volume prediction scenarios. First, the sewage pipe network has a complex topological structure, and the target sites mentioned above have multiple water inflow directions, so it is necessary to rely on the convolutional layer to extract the input features of water level data at different auxiliary sites. Secondly, the distances between different auxiliary sites and the target sites vary greatly, resulting in large differences in the temporal dependence of the data.

[0104] Preferably, during the training process of the initial sequential neural network based on the WaveNet convolutional architecture, the mean square error (MSE) is set as the loss function, and the output loss of each time step is calculated to optimize the model parameters, so that the loss will include the output item of each time step, which means that more errors will flow through the model, enhancing the stability of the model (i.e., the sequential neural network based on the WaveNet convolutional architecture) training. At the same time, preferably, the mean absolute percentage error (MAPE) output at the last time step is used as the evaluation index of the model performance.

[0105] The calculation formulas for mean square error and percentage error are as follows:

[0106]

[0107] Among them, m is the number of samples, y i is the true value of the i-th sample, is the predicted value of the i-th sample.

[0108] In this way, by obtaining the first MAPE value of the training set and the second MAPE value of the validation set, and then comparing the absolute value of the difference between the first MAPE value and the second MAPE value with the preset value, the verification result is obtained. If the absolute value of the difference is greater than the preset value, it means that the prediction result deviation is large and does not meet the preset conditions. At this time, the loss function is optimized according to the mean square error (MSE) until it meets the preset conditions.

[0109] Among them, setting the ReLU function as the activation function during the training of the initial time series neural network helps to alleviate the gradient vanishing problem and increase the sparsity of the network; setting the He initialization method to initialize the weights of each layer of the initial time series neural network is an initialization method suitable for the ReLU activation function; setting the MCDropout method for regularization processing, by combining Monte Carlo sampling and Dropout, provides uncertainty estimation, which can effectively improve the generalization ability and robustness of the neural network, and at the same time, there is no need to change the network structure, with high computational efficiency. In addition, setting the Adam optimization method to iteratively update the initial weights of the initial time series neural network, combining the advantages of the two optimization algorithms AdaGrad and RMSProp, is currently the most popular optimizer, which can efficiently and simply realize the automatic adjustment of the learning rate.

[0110] In combination with the first aspect, step S020 includes:

[0111] Bayesian optimization was applied to adjust hyperparameters, where the WaveNet layer diffusion rate was set to (2, 4, 8, 16), the number of filters was set to (10, 15, 20), and the convolution kernel size was set to (1, 2, 4); the dropout rate of the MCDropout method was set to (0, 0.5); and the learning rate of the Adam optimization method was set to 0.01-0.0001.

[0112] Bayesian optimization is applied to adjust hyperparameters during the initial time series neural network training process. Bayesian optimization has become a powerful tool for hyperparameter adjustment and optimization through its efficient search strategy, reduced computational cost, flexible objective function, strong interpretability and easy integration. It is an active search method that can improve the learning effect during the initial time series neural network training process.

[0113] Here are some examples:

[0114] This case is based on a sewage pipe network IoT monitoring system that has been built in the southern part of a city. It can obtain basic physical parameters of the pipe network, such as pipe elevation, length, and sewage flow direction. At the same time, flow meters and liquid level meters are installed at key nodes of the pipe network to collect hourly liquid level and flow data, meeting the requirements for the implementation of the present invention.

[0115] First, based on the above-mentioned pipe network IoT monitoring system, the pipe network topology structure analysis was carried out, and site ① was selected as the target site for water volume prediction. This site is before the lifting pump station, and there is a demand for sewage lifting during the actual operation of the pipe network. At the same time, based on key information such as pipeline elevation and sewage flow direction, the upstream water level monitoring points ②, ③, and ④ connected to the target site were identified.

[0116] Furthermore, based on the long-term monitoring of flow meters and liquid level meters, the flow time series data of location ① and the water level time series data of locations ②, ③, and ④ are collected. In order to avoid missing values, outliers, and noise caused by sensor failures, data transmission errors, etc., the missing values ​​and standardization processing are performed by traversing the characteristic information of the data set and applying linear interpolation and maximum-minimum standardization methods. Specifically, the formula of the linear interpolation method is as follows:

[0117]

[0118] The formula for the maximum-minimum normalization method is as follows:

[0119]

[0120] Among them, x i represents the original input, x 0 、x 1 Represents x i Two adjacent points, x max With x minThey represent the maximum and minimum values ​​of the characteristic indicators respectively.

[0121] After data preprocessing, the input characteristics of the model are clarified. According to experience, the water volume of the sewage pipe network has periodic changes, and its flow is affected by the upstream water. Therefore, the historical and real-time values ​​of the water volume monitoring at the target site and the historical and real-time values ​​of the water level monitoring at the auxiliary site are used as model inputs.

[0122] At the same time, in order to optimize the model input, time-lagged cross-correlation analysis is performed, and the specific formula is as follows:

[0123]

[0124] Among them, x and y are two sequences of length n, and are their means respectively, and k represents the phase difference between the two time series.

[0125] Through the above analysis, the time step of input data is selected as 48h; according to the lifting needs of the sewage pumping station at location ①, the time step of the model output target is set to 24h.

[0126] On the basis of the above, the required initial time series neural network based on the WaveNet convolutional architecture is constructed. According to the actual analysis of the pipe network and the analysis of the time lag of the data, the target site ① has three upstream water directions, and the distances from the water level monitoring points ②, ③, and ④ are different. The water volume data of the target site ① and the water level data of sites ②, ③, and ④ have both short-term and long-term dependencies in time series. Therefore, the time series neural network based on the WaveNet convolutional architecture is preferred, which allows the efficiency of the convolutional layer to be utilized. By doubling the diffusion rate of each layer, the lower layers learn short-term patterns, while the higher layers learn long-term patterns, thereby correctly processing the time sequence and processing long-term dependencies without causing an explosion in the complexity of the model. The time series neural network in this example includes an input layer (InputLayer), four hidden layers (WaveNet), and an output layer (WaveNet) connected in sequence.

[0127] Specifically, during the neural network training process, the mean square error (MSE) is set as the loss function. In order to allow more errors to flow through the model and enhance the stability of the model training, the output loss of each time step is calculated to optimize the model parameters. At the same time, the mean absolute percentage error (MAPE) output at the last time step is used as the evaluation indicator of model performance. At the same time, during the model training process, the ReLU function is set as the activation function, the He initialization method is set to initialize the weights of each layer of the neural network, the MCDropout method is set for regularization, and the Adam optimization method is set to iteratively update the initial weights of the neural network.

[0128] In addition, Bayesian optimization was applied for hyperparameter adjustment, where the WaveNet layer diffusion rate was set to (2, 4, 8, 16), the number of filters was set to (10, 15, 20), and the convolution kernel size was set to (1, 2, 4); the dropout rate of the MCDropout method was set to (0, 0.5); and the learning rate of the Adam optimization method was set to 0.01-0.0001.

[0129] Based on the above settings, the data set is divided into a training set, a validation set, and a test set. The training set is used for model training, the validation set is used to verify the effect of the model during the training process, and the test set is used to evaluate the final performance of the model. The initial neural network is trained based on the training set, and the model is verified based on the validation set to obtain a temporal neural network based on the WaveNet convolutional architecture that meets the preset conditions. Its hyperparameters are: the WaveNet layer diffusion rate is 16, the number of filters is 15, the convolution kernel size is 2, the dropout rate of the MCDropout method is 0.35, and the learning rate of the Adam optimization method is 0.0013. Figure 2 As shown in the figure, the MAPE values ​​of the training set and validation set during the model training process are 6.8% and 9.2% respectively. At this time, the difference between the validation set and the training set results is small, indicating that the model has a strong learning ability. The above hyperparameters are used to build the final model, and the data from the 24th hour after the current time is used for testing. The results are as follows Figure 3 As shown, the MAPE value is 12.5%, indicating that the model performs well and has strong generalization performance.

[0130] In the second aspect, the present application provides a sewage pipe network water flow prediction device based on a time series neural network, combined with Figure 4 As shown, the device includes: a determination module 10, an acquisition module 20 and a prediction module 30.

[0131] The determination module 10 is used to determine the target site for water volume prediction and the auxiliary site supporting water volume prediction based on the sewage network topology in the sewage network IoT monitoring system.

[0132] The acquisition module 20 is used to acquire the water volume time series data of the target site and the water level time series data of the auxiliary site.

[0133] The prediction module 30 is used to input the pre-processed water volume time series data of the target site and the water level time series data of the auxiliary site into a pre-trained WaveNet convolutional architecture-based time series neural network, and output the predicted water flow of the target site in the target period.

[0134] In a third aspect, the present application provides an electronic device, Figure 5As shown, the electronic device includes a memory 131 and a processor 130. The memory 131 is used to store computer programs, and the processor 130 runs the computer programs to enable the electronic device to perform the above method.

[0135] Furthermore, combined with Figure 5 The electronic device shown further includes a bus 132 and a communication interface 133 , and the processor 130 , the communication interface 133 and the memory 131 are connected via the bus 132 .

[0136] The memory 131 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 133 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 132 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0137] The processor 130 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 130. The above processor 130 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 131, and the processor 130 reads the information in the memory 131 and completes the steps of the method of the above embodiment in combination with its hardware.

[0138] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the above method is executed.

[0139] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0140] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0141] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0142] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0143] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for predicting water flow in a sewage network based on a time series neural network, characterized in that: The method comprises: Based on the sewage pipe network topology in the sewage pipe network IoT monitoring system, determine the target site for water volume prediction and the auxiliary site supporting water volume prediction; Acquire the water volume time series data of the target site and the water level time series data of the auxiliary site; The preprocessed water volume time series data of the target site and the water level time series data of the auxiliary site are input into a pre-trained time series neural network based on the WaveNet convolutional architecture to output the predicted water flow of the target site in the target period.

2. The method according to claim 1, characterized in that Based on the existing sewage pipe network IoT monitoring system and according to the sewage pipe network topology analysis, the steps of determining the target site to be predicted for water volume and the auxiliary site to support water volume prediction include: Obtaining a first position of a lift pump station and a second position of a dispatch pump station in a sewage pipe network topology; Determine the first position and a third position between the second position as a target site for water volume prediction; An upstream water level monitoring point connected to the target site of the water volume prediction is selected as an auxiliary site to support the water volume prediction.

3. The method according to claim 1, characterized in that The step of obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site comprises: Acquire the historical value and current value of water volume monitoring of the target site, and the historical value and current value of water level monitoring of the auxiliary site; The water volume monitoring history value and current value of the target site are processed by the following formula to obtain the water volume time series data of the target site; at the same time, the water level monitoring history value and current value of the auxiliary site are processed to obtain the water level time series data of the auxiliary site: Among them, x and y are two sequences of length n, and are their means respectively, and k represents the phase difference between the two time series.

4. The method according to claim 1, characterized in that: After the step of obtaining the water volume time series data of the target site and the water level time series data of the auxiliary site, the method further includes: The water volume time series data of the selected target site and the water level time series data of the auxiliary site are processed with missing values ​​and standardized.

5. The method according to claim 1, characterized in that Based on the existing sewage pipe network IoT monitoring system, according to the sewage pipe network topology structure analysis, before determining the target site to be predicted for water volume and the auxiliary site to support water volume prediction, it also includes: Obtaining an initial temporal neural network based on a WaveNet convolutional architecture, wherein the initial temporal neural network includes an input layer, four hidden layers, and an output layer connected in sequence; Defining the parameters of the initial time series neural network, the parameters include: setting the ReLU function as the activation function, setting the He initialization method to initialize the weights of each layer of the neural network, setting the MCDropout method to perform regularization, and setting the Adam optimization method to iteratively update the initial weights of the neural network; Obtaining initial data, and dividing the initial data into a training set, a validation set, and a test set; Using the training set to train the initial time series neural network, and verifying it based on the verification set to obtain a verification result; If the verification result representation does not meet the preset conditions, optimization is performed based on the preset mean square error until a temporal neural network that meets the preset conditions is obtained; The test set is used to test the temporal neural network that meets the preset conditions to obtain a test result.

6. The method according to claim 1, characterized in that The steps of setting the ReLU function as the activation function, setting the He initialization method to initialize the weights of each layer of the neural network, setting the MCDropout method for regularization, and setting the Adam optimization method to iteratively update the initial weights of the neural network include: Bayesian optimization was applied to adjust hyperparameters, where the WaveNet layer diffusion rate was set to (2, 4, 8, 16), the number of filters was set to (10, 15, 20), and the convolution kernel size was set to (1, 2, 4); the dropout rate of the MCDropout method was set to (0, 0.5); and the learning rate of the Adam optimization method was set to 0.01-0.0001.

7. The method according to claim 5, characterized in that The step of training the initial time series neural network using the training set and verifying it based on the verification set to obtain a verification result includes: Obtaining a first MAPE value of the training set and a second MAPE value of the validation set; Calculating an absolute value of a difference between the first MAPE value and the second MAPE value; Determine whether the absolute value of the difference is less than a preset value; If so, determining that the verification result indicates that a preset condition is satisfied; If not, it is determined that the verification result representation does not meet the preset condition.

8. A sewage pipe network water flow prediction device based on time series neural network, characterized in that: The device comprises: A determination module is used to determine the target site to be used for water volume prediction and the auxiliary site to support water volume prediction based on the sewage network topology in the sewage network IoT monitoring system; An acquisition module, used for acquiring the water volume time series data of the target site and the water level time series data of the auxiliary site; The prediction module is used to input the pre-processed water volume time series data of the target site and the water level time series data of the auxiliary site into a pre-trained WaveNet convolutional architecture-based time series neural network, and output the predicted water flow of the target site in the target period.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to perform the method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Prediction model generation method, system and device, storage medium and prediction method

    CN113240187A

  • Sewage pipe network flow prediction method based on LSTM neural network

    CN117313949A

  • Drainage operation support device in combined pump station and operation method thereof

    JP2010084493A

  • Fault detection method and equipment for drainage pipe network, server, and storage medium

    WO2023109370A1

Cited By

  • Water flow management optimization method and system based on machine learning

    CN119918752A

  • A Smart Early Warning Method for Wind Farm Operation and Maintenance Based on Big Data

    CN122678298A