Pipeline network node flow prediction model construction and pipeline network node flow prediction method
By constructing a pipeline network node flow prediction model, using the dynamic graph neural network model to consider the mutual influence of water flow processes between each node, the problem of inaccurate flow prediction under manual inspection and sampling detection methods in the existing technology is solved, and urban drainage is achieved Quick and accurate management of the pipeline network and emergency decision-making support.
Patent Information
- Application Number
- CN202410699926.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-05-31
AI Technical Summary
In the prior art, the prediction of the node flow of urban drainage pipeline networks through manual inspection and sampling detection has problems such as large workload, long cycle and inaccurate prediction results.
Build a pipeline network node flow prediction model, and obtain the water flow timing data and pipeline line data of each monitoring point, and build a dynamic graph neural network model, considering the mutual influence of the water flow processes between each node, and achieving fast and accurate flow prediction.
It realizes rapid and accurate prediction of pipeline node traffic, provides scientific data support for refined urban drainage management and emergency decision-making, and solves the problem of inaccurate prediction results under manual inspection and sampling inspection methods.
Smart Images

Figure CN118536427B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technology, and in particular to the construction of a pipeline network node flow prediction model and a pipeline network node flow prediction method. Background Art
[0002] With the development of cities and population growth, the management and monitoring of urban drainage networks have become increasingly important. Insufficient drainage capacity of urban pipe networks can lead to many problems such as urban waterlogging, causing significant losses of personnel and property. In the actual operation of urban drainage pipe networks, problems such as insufficient flow rate and low discharge pressure may occur. If these problems are not discovered and resolved in time, they will cause drainage accidents. At present, if the urban pipe network nodes lack effective remote monitoring and remote scheduling of drainage conditions, or lack drainage data analysis, it will be inconvenient for urban construction and development. Therefore, the prediction of flow at urban pipe network nodes is of great significance to the stable operation of urban drainage pipe networks.
[0003] In the related technology, the management of drainage network nodes usually relies on manual inspection and sampling detection to obtain the water flow status data of the network nodes, and analyze the obtained water flow status data to achieve flow prediction of the network nodes. The shortcomings of this method are large workload and long cycle, and it is easy to ignore the mutual influence of the water flow process between the nodes, resulting in inaccurate prediction results. Summary of the invention
[0004] In view of this, the present invention provides a pipeline node flow prediction model construction and a pipeline node flow prediction method to solve the problem of inaccurate prediction results in predicting pipeline flow through manual inspection and sampling detection in the related art.
[0005] In a first aspect, the present invention provides a method for constructing a pipeline node flow prediction model, wherein the pipeline network includes multiple monitoring points, and the method includes: obtaining water flow time series data and pipeline line data of each monitoring point, the pipeline line data is used to characterize the connection relationship between each monitoring point and other monitoring points, and the water flow time series data of each monitoring point includes water flow data of each monitoring point at multiple moments; taking each monitoring point as a node, and the correlation relationship between different monitoring points corresponding to each moment as an edge, to construct a pipeline network connectivity graph at the corresponding moment, and the correlation relationship between different monitoring points corresponding to each moment is determined by the pipeline line data and the water flow data corresponding to different monitoring points at the corresponding moment; dividing the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data; dividing the pipeline network connectivity graphs corresponding to different moments according to the second cycle length as a sliding window to obtain second training data; associating the first training data and the second training data according to the prediction requirements to construct a data set; and using the data set to train a dynamic graph neural network model to obtain a pipeline node flow prediction model.
[0006] The method for constructing a pipeline node flow prediction model provided by the present invention determines the correlation between different monitoring points corresponding to each moment through pipeline line data and water flow data corresponding to different monitoring points at corresponding moments, takes each monitoring point as a node, and the correlation between different monitoring points corresponding to each moment as an edge, constructs a pipeline network connectivity graph at the corresponding moment, uses a sliding window to divide the water flow time series data of each monitoring point and the pipeline network connectivity graph corresponding to different moments, and associates the divided water flow time series data of each monitoring point and the pipeline network connectivity graph corresponding to different moments to obtain a data set, uses the data set to train a dynamic graph neural network model, and obtains a pipeline node flow prediction model. The method provided by the present invention constructs a pipe network connectivity diagram corresponding to different time periods through the water flow time series data of each monitoring point in the pipe network, divides the water flow time series data of each monitoring point and the pipe network connectivity diagram corresponding to different time periods by using a sliding window, and associates the water flow time series data of each monitoring point after division with the pipe network connectivity diagram corresponding to different time periods to obtain a data set, and uses the data set to train a dynamic graph neural network model to learn the correlation between the water flow data of different nodes and the pipe network connectivity diagram to obtain a pipe network node flow prediction model, which can be used for subsequent prediction of pipe network node flow, and the model takes into account the mutual influence of the water flow process between each node, realizes rapid and accurate prediction of the flow of each node in the pipe network, provides scientific and effective data support for refined management of urban drainage, emergency decision-making and command, and industry applications, and solves the problem of inaccurate prediction results in predicting pipe network flow by manual inspection and sampling detection in related technologies.
[0007] In an optional embodiment, each monitoring point is taken as a node, and the correlation between different monitoring points at each moment is taken as an edge. The step of constructing a pipe network connectivity diagram at the corresponding moment includes: using a feature extraction model to extract water flow data corresponding to different monitoring points at each moment to obtain the correlation between different monitoring points at the corresponding moment; and constructing a pipe network connectivity diagram at the corresponding moment based on the correlation between different monitoring points at each moment.
[0008] In an optional embodiment, the step of training the dynamic graph neural network model using a data set to obtain a pipeline node flow prediction model includes: constructing a target loss function based on a mean square error model and a mean absolute error model; training the dynamic graph neural network model using a data set, and adjusting the network parameters of the model based on the target loss function until the prediction accuracy of the model meets preset conditions, thereby obtaining a pipeline node flow prediction model.
[0009] The method provided by this optional implementation effectively ensures the prediction accuracy of the pipeline network node flow prediction model.
[0010] In an optional embodiment, the step of obtaining water flow time series data and pipeline line data of each monitoring point includes: obtaining first water flow monitoring data of each monitoring node, the first water flow data is collected by a flow monitor; using a signal processing algorithm and a hydraulic model to process the initial water flow data of each monitoring node to obtain second water flow monitoring data; filling missing values and eliminating anomalies for the second water flow data corresponding to different monitoring points, respectively, to obtain water flow time series data of each monitoring point.
[0011] The method provided by this optional implementation ensures the integrity and accuracy of the data by processing the water flow monitoring data.
[0012] In a second aspect, the present invention provides a method for predicting flow at a pipe network node, the method comprising: obtaining water flow data of each node in the pipe network; inputting the water flow data of each node into a pipe network node flow prediction model, so that the pipe network node flow prediction model outputs a target pipe network connectivity diagram, the pipe network node flow prediction model is constructed by the pipe network node flow prediction model construction method of the first aspect or any corresponding embodiment thereof; determining the flow prediction value of the node in the pipe network based on the target pipe network connectivity diagram.
[0013] The pipeline node flow prediction method provided by the present invention inputs the water flow data of each node in the pipeline network into the pipeline node flow prediction model, so that the pipeline node flow prediction model outputs a target pipeline network connectivity diagram, and determines the flow prediction value of the node in the pipeline network based on the target pipeline network connectivity diagram. The pipeline node flow prediction model takes into account the mutual influence of the water flow process between each node when performing flow prediction, realizes the rapid and accurate prediction of the flow of each node in the pipeline network, provides scientific and effective data support for the refined management of urban drainage, emergency decision-making and command, and industry applications, and solves the problem of inaccurate prediction results in the prediction of pipeline network flow through manual inspection and sampling detection in related technologies.
[0014] In the third aspect, the present invention provides a pipeline node flow prediction system, the system comprising: a data acquisition module, a data storage module and a prediction module; the data acquisition module includes multiple flow monitors, the multiple flow monitors correspond one-to-one to multiple monitoring points in the pipeline network, and are used to collect water flow data at each monitoring point; the data storage module is connected to the data acquisition module, and is used to store and manage the water flow data of each monitoring point; the prediction module is connected to the data storage module, and is used to execute the pipeline node flow prediction model construction method of the above-mentioned first aspect or any corresponding embodiment thereof, or to execute the pipeline node flow prediction method of the above-mentioned second aspect.
[0015] The pipe network node flow prediction system provided by the present invention includes a plurality of flow monitors to collect water flow data of different monitoring points through a data acquisition module, a data storage module stores and manages the water flow data of each monitoring point, and a prediction module is connected to the data storage module to realize the prediction of pipe network node flow. When performing flow prediction, the mutual influence of water flow processes between nodes is taken into account, and a rapid and accurate prediction of the flow of each node in the pipe network is realized, providing scientific and effective data support for refined management of urban drainage, emergency decision-making and command, and industry applications, and solving the problem of inaccurate prediction results in predicting pipe network flow through manual inspections and sampling tests in related technologies.
[0016] In a third aspect, the present invention provides a device for constructing a pipeline node flow prediction model, wherein the pipeline network includes multiple monitoring points, and the device includes: a first acquisition module, used to obtain water flow time series data and pipeline line data of each monitoring point, the pipeline line data is used to characterize the connection relationship between each monitoring point and other monitoring points, and the water flow time series data of each monitoring point includes water flow data of each monitoring point at multiple moments; each monitoring point is taken as a node, and the association relationship between different monitoring points corresponding to each moment is taken as an edge, to construct a pipeline network connectivity graph at the corresponding moment, and the association relationship between different monitoring points corresponding to each moment is determined by the pipeline line data and the water flow data corresponding to different monitoring points at the corresponding moment; a first division module, used to divide the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data; a second division module, used to divide the pipeline network connectivity graph corresponding to different moments according to the second cycle length as a sliding window to obtain second training data; an association module, used to associate the first training data and the second training data according to the prediction demand to construct a data set; a training module, used to train the dynamic graph neural network model using the data set to obtain a pipeline node flow prediction model.
[0017] In a fourth aspect, the present invention provides a pipeline node flow prediction device, which includes: a second acquisition module, used to obtain water flow data of each node in the pipeline network; a prediction module, used to input the water flow data of each node into a pipeline network node flow prediction model, so that the pipeline network node flow prediction model outputs a target pipeline network connectivity diagram; a determination module, used to determine the flow prediction value of the node in the pipeline network based on the target pipeline network connectivity diagram.
[0018] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for constructing a pipeline node flow prediction model according to the first aspect or any corresponding embodiment thereof, or executes the method for predicting pipeline node flow according to the second aspect by executing the computer instructions.
[0019] In a sixth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for constructing a pipeline node flow prediction model according to the first aspect or any corresponding embodiment thereof, or to execute the method for predicting pipeline node flow according to the second aspect.
[0020] In the seventh aspect, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the method for constructing a pipeline node flow prediction model according to the first aspect or any corresponding embodiment thereof, or to execute the method for predicting pipeline node flow according to the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] 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 ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flow chart of a method for constructing a pipeline network node flow prediction model according to an embodiment of the present invention;
[0023] Figure 2 is a flow chart of another method for constructing a pipeline network node flow prediction model according to an embodiment of the present invention;
[0024] Figure 3 is a schematic flow chart of a method for predicting flow at a pipe network node according to an embodiment of the present invention;
[0025] Figure 4 is a structural block diagram of a pipeline network node flow prediction system according to an embodiment of the present invention;
[0026] Figure 5 is a structural block diagram of a device for constructing a pipeline network node flow prediction model according to an embodiment of the present invention;
[0027] Figure 6 is a structural block diagram of a pipeline network node flow prediction device according to an embodiment of the present invention;
[0028] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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.
[0030] In the related technology, the management of drainage network nodes usually relies on manual inspection and sampling detection to obtain the water flow status data of the network nodes, and analyze the obtained water flow status data to achieve flow prediction of the network nodes. The shortcomings of this method are large workload and long cycle, and it is easy to ignore the mutual influence of the water flow process between the nodes, resulting in inaccurate prediction results.
[0031] In view of this, a method for constructing a pipeline node flow prediction model provided by an embodiment of the present application can be applied to a server to realize the construction of a pipeline node flow prediction model. The method for constructing a pipeline node flow prediction model provided by the present invention constructs a pipeline network connectivity diagram corresponding to different times through the water flow time series data of each monitoring point in the pipeline network, and uses a sliding window to divide the water flow time series data of each monitoring point and the pipeline network connectivity diagram corresponding to different times, and associates the water flow time series data of each monitoring point after division and the pipeline network connectivity diagram corresponding to different times to obtain a data set, and uses the data set to train a dynamic graph neural network model to learn the correlation between the water flow data of different nodes and the pipeline network connectivity diagram, and obtain a pipeline network node flow prediction model, which can be used for the subsequent prediction of pipeline network node flow, and the model takes into account the mutual influence of the water flow process between each node, and realizes the rapid and accurate prediction of the flow of each node in the pipeline network, and provides scientific and effective data support for urban drainage refined management, emergency decision-making command and industry application, etc., and solves the problem of inaccurate prediction results in the prediction of pipeline network flow by manual inspection and sampling detection in related technologies.
[0032] According to an embodiment of the present invention, an embodiment of a method for constructing a pipeline node flow prediction model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0033] In this embodiment, a method for constructing a pipeline network node flow prediction model is provided, which can be used for the above-mentioned server. In the embodiment of the present application, the pipeline network includes multiple monitoring points. The embodiment of the present application does not limit the setting location of the monitoring points, and those skilled in the art can determine it according to needs; Figure 1 is a flow chart of a method for constructing a pipeline network node flow prediction model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0034] Step S101, obtaining water flow time series data and pipe network line data of each monitoring point. The pipe network line data is used to characterize the connection relationship between each monitoring point and other monitoring points. The water flow time series data of each monitoring point includes water flow data of each monitoring point at multiple time points.
[0035] Exemplarily, the water flow time series data at each monitoring point may include but are not limited to time series data of dimensions such as water flow, water flow velocity, and water level depth. The pipeline line data may be the topological structure data of the pipeline network loaded from the data source of the urban pipeline network. These data describe the connection relationship between the pipelines and the characteristic information of the nodes. The connection relationship between the pipelines includes the starting point, end point, length, diameter and other information of the pipelines. The characteristic data of the nodes include node attributes, etc. The node attributes include water flow information and information on the number of pipes connected to the node, etc.
[0036] Step S102, taking each monitoring point as a node and the correlation between different monitoring points at each time as an edge, constructing a pipe network connectivity graph at the corresponding time. The correlation between different monitoring points at each time is determined by the pipe network line data and the water flow data corresponding to different monitoring points at the corresponding time.
[0037] Exemplarily, the pipe network connectivity diagram at each time is used to characterize the connectivity of the pipes between nodes and the water flow information of each node. The connectivity of the pipes between nodes includes information such as the increase, decrease, and temporary blockage of the connected pipes. The pipe network connectivity diagram at different times can reflect the timing of flow changes in the pipe network in the real world. In the embodiment of the present application, the pipe network connectivity diagram at different times can also be called a dynamic graph structure. The connectivity of the edges and the node attributes in the dynamic graph structure change dynamically over time to maintain the adaptability to real-time data. The pipe network connectivity diagram can be represented by an adjacency matrix.
[0038] Step S103, dividing the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data.
[0039] Exemplarily, the first cycle length is used to characterize the sliding window length. The specific content of the first cycle length is not limited in the embodiment of the present application. As long as the prediction requirements are met, the water flow time series data rows of each monitoring point are divided according to the first cycle length as a sliding window, and the first training data can be obtained based on the division result. In the embodiment of the present application, the sliding window method is a technology for real-time updating of time series data, and the purpose is to construct a feature data set for model training. The method for determining the first cycle length is: initialize a sliding window of size 1 at the starting point, and gradually add subsequent trajectory points to the window. Connect the first point and the last point in the window to obtain an approximate line segment. Calculate the vertical Euclidean distance between the approximate line segment and the original trajectory. If it is less than the set distance threshold, continue to increase the sliding window, and the points greater than the threshold are retained as feature points. At the same time, update the window until the error in the window is less than the threshold, and repeat the above steps.
[0040] Step S104, dividing the pipe network connectivity graph corresponding to different moments according to the second cycle length as a sliding window to obtain second training data.
[0041] Exemplarily, in the embodiment of the present application, the method for determining the second cycle length is similar to the method for determining the first cycle length and is similar to the above step S103, and will not be repeated here.
[0042] Step S105: Associating the first training data and the second training data according to the prediction requirement to construct a data set.
[0043] Exemplarily, based on the embodiments of the present application, there is no limitation on the specific content of the predicted demand, as long as the prediction of the flow of the pipeline node can be achieved.
[0044] Step S106, using the data set to train the dynamic graph neural network model to obtain a pipeline network node flow prediction model.
[0045] Exemplarily, in an embodiment of the present application, the dynamic graph neural network model may include but is not limited to a directed graph convolutional network model (DGCN). The dynamic graph neural network model is trained using a data set so that the dynamic graph neural network model learns the correlation between the water flow data of different monitoring nodes and the pipe network connectivity diagram to obtain a pipe network node flow prediction model.
[0046] The method for constructing a pipeline node flow prediction model provided in this embodiment constructs a pipeline network connectivity diagram corresponding to different time periods through the water flow time series data of each monitoring point in the pipeline network, and uses a sliding window to divide the water flow time series data of each monitoring point and the pipeline network connectivity diagram corresponding to different time periods, and associates the water flow time series data of each monitoring point after division with the pipeline network connectivity diagram corresponding to different time periods to obtain a data set, and uses the data set to train a dynamic graph neural network model to learn the correlation between the water flow data of different nodes and the pipeline network connectivity diagram to obtain a pipeline network node flow prediction model. The pipeline network node flow prediction model can be used for subsequent prediction of pipeline network node flow. The model takes into account the mutual influence of the water flow process between each node, and realizes rapid and accurate prediction of the flow of each node in the pipeline network, providing scientific and effective data support for refined management of urban drainage, emergency decision-making and command, and industry applications, and solves the problem of inaccurate prediction results in predicting pipeline network flow through manual inspections and sampling detection in related technologies.
[0047] In this embodiment, a method for constructing a pipeline network node flow prediction model is provided, which can be used for the above-mentioned server. Figure 2 is a flow chart of a method for constructing a pipeline network node flow prediction model according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0048] Step S201, obtain the water flow time series data and pipe network line data of each monitoring point. The pipe network line data is used to characterize the connection relationship between each monitoring point and other monitoring points. The water flow time series data of each monitoring point includes the water flow data of each monitoring point at multiple times. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0049] Specifically, the above step S201 includes:
[0050] Step S2011, obtaining first water flow monitoring data of each monitoring node, where the first water flow data is collected by a flow monitor.
[0051] For example, in the embodiment of the present application, flow monitors are deployed at key nodes of the pipe network, and advanced millimeter wave technology is used to collect key data such as flow, flow velocity and water level of the drainage pipe network in real time. The millimeter wave flow monitoring instrument used has high-frequency signal transmission and reception functions, and can perform precise detection and measurement of water flow.
[0052] Step S2012: using a signal processing algorithm and a hydraulic model to process the initial water flow data of each monitoring node to obtain second water flow monitoring data.
[0053] For example, in the embodiment of the present application, by dynamically analyzing the changes in water flow velocity and water depth, combined with advanced signal processing algorithms and hydraulic model calculations, the instantaneous flow in the pipeline can be accurately calculated to obtain the second water flow monitoring data. This processing method enables the monitoring instrument to achieve non-contact measurement, which is not affected by external factors such as water quality, sediment and floating objects, thereby ensuring the accuracy and reliability of data collection.
[0054] Step S2013, performing missing value filling and abnormal elimination processing on the second water flow data corresponding to different monitoring points, so as to obtain the water flow time series data of each monitoring point.
[0055] For example, in the embodiment of the present application, due to certain limitations in the hardware technology of the monitoring equipment, the quality of the data collected by the monitoring is currently low, and there are problems such as high data dimension, large data volume, missing data, anomalies and noise, which affect the training accuracy and robustness of the model. The embodiment of the present application adopts average value filling to solve the problem of missing data, and adopts the 3sigma method to remove outliers. In order to solve the problem of missing data, the method of average value filling is adopted. The mean value of the feature where the missing data point is located is used to replace the missing value to maintain the integrity and continuity of the data. The specific filling method can be shown as follows (1):
[0056]
[0057] Where N is the number of valid data points for the feature; x i Represents the value of the i-th valid data point, and then the mean Used to fill in missing data points to maintain data integrity and continuity.
[0058] The 3Sigma method is a quality control method based on statistics. It is a method to judge whether the data is qualified by the degree of variation of statistical data under the assumption of normal distribution. In the 3Sigma method, a band interval is formed with the mean value as the center and a distance of 3 standard deviations extending to both sides. If the sample data point falls within this band interval, the data is considered normal; if it falls outside the band interval, the data is considered abnormal.
[0059] Step S202, taking each monitoring point as a node and the correlation between different monitoring points at each time as an edge, constructing a pipe network connectivity graph at the corresponding time. The correlation between different monitoring points at each time is determined by the pipe network line data and the water flow data corresponding to different monitoring points at the corresponding time.
[0060] Specifically, the above step S202 includes:
[0061] Step S2021, using a feature extraction model to extract water flow data corresponding to different monitoring points at each time, to obtain the correlation relationship between different monitoring points at the corresponding time.
[0062] Exemplarily, in the embodiments of the present application, there is no limitation on the specific content of the feature extraction model, as long as it can realize the extraction of the correlation relationship between different monitoring points.
[0063] Step S2022: construct a pipe network connectivity diagram at the corresponding time based on the association relationship between different monitoring points at each time.
[0064] Exemplarily, in the embodiment of the present application, the essence of the graph structure is an N*N adjacency matrix, where N represents the number of pipeline nodes, and the adjacency matrix represents the relationship between the nodes in the entire pipeline. The learning of the adjacency matrix is completed by a fully connected neural network FC. The whole process of extracting features from input (N, D) to the adjacency matrix of (N, N) is as follows:
[0065] Step (1), keep the dimension of N of the input (N, D) unchanged, perform feature extraction on the dimension of D, extract the information features of different pipeline states, and use a fully connected layer with M nodes to obtain the feature output of (N, M);
[0066] Step (2), transpose the feature matrix of (M, N) to obtain (M, N), extract features through a fully connected layer of the same scale, and then transpose it to obtain (N, M). The purpose of this step is to extract the feature information of the mutual influence between the pipeline nodes;
[0067] Step (3), repeat the above steps (1) and (2) to perform deep feature extraction, iterate n steps, and the last step of step (1) is the fully connected layer to obtain the (N, 2Rank) feature matrix that fully extracts relevant information, where Rank is a hyperparameter representing the rank of the matrix, and its size is determined by the size of N and is much smaller than N. Using Rank can reduce the amount of adjacency matrix calculations; at the same time, it can reduce parameters and avoid overfitting;
[0068] Step (4), split the (N, 2Rank) feature matrix into two (N, Rank) matrices, multiply the two matrices, and pass the activation function and Soft-max function to obtain the final adjacency matrix output.
[0069] The overall calculation formula of dynamic graph convolution is shown in the following formula (2):
[0070] ( ,N) = Softmax(ReLU(( ,Rank)*(N,Rank) T )) (2)
[0071] in, z iis the output value of the i-th node, and C is the number of nodes.
[0072] Step S203, dividing the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data.
[0073] Step S204, dividing the pipe network connectivity graph corresponding to different moments according to the second cycle length as a sliding window to obtain second training data.
[0074] Step S205 , associating the first training data and the second training data according to the prediction requirement to construct a data set.
[0075] Step S206, using the data set to train the dynamic graph neural network model to obtain a pipeline network node flow prediction model.
[0076] Specifically, the above step S206 includes:
[0077] Step S2061, constructing a target loss function based on the mean square error model and the mean absolute error model.
[0078] For example, in the present embodiment, a combination of mean square error and mean absolute error is used as the loss function. Assume that the true value of the pipeline flow is y i The model’s predicted value is Then the loss function can be expressed as follows:
[0079]
[0080] Among them, N is the number of samples, w1 and w2 are the weights of mean square error and mean absolute error, both of which are set to 1, that is, the weights are the same.
[0081] Step S2062, use the data set to train the dynamic graph neural network model, and adjust the network parameters of the model based on the target loss function until the prediction accuracy of the model meets the preset conditions, and obtain the pipeline node flow prediction model.
[0082] Exemplarily, in the embodiments of the present application, historical data is used for training, and stochastic gradient descent (SGD) or other optimization algorithms are used to continuously adjust network parameters to minimize the loss function.
[0083] The method provided in the embodiment of the present application can be used to perform the training operation of the DGCN model after obtaining the adjacency matrix between each node of the pipeline, that is, the graph structure (pipeline network connectivity graph). During model training, the input of DGCN includes two parts: one is the graph structure itself, that is, the N*N adjacency matrix, denoted as A; the other is N nodes and their D features, which form an N*D feature matrix H. The operation principle of each convolution kernel of DGCN is shown in the following formula (4):
[0084] f(H l+1 , ) = σ(AH l W l ) (3)
[0085] Among them, l represents the current number of graph convolution layers; W l is the convolution kernel of the l-th layer graph convolution; H l represents the feature matrix of the lth layer; H l+1 represents the feature value of the l+1th layer after the graph convolution kernel operation; σ represents the activation function. The number of hidden layers and hidden nodes of DGCN is determined by the specific value and experience of N.
[0086] In the embodiment of the present application, when training the model, a segmented training strategy is adopted, first fixing the fully connected layer of the final output, training the graph structure to generate a neural network, and then training the entire network. The loss function uses a combination of mean square error and mean absolute error, and the weighted ratio of the two is 1:1.
[0087] The training steps of the segmented training strategy include:
[0088] Phase 1: Fix the fully connected layer and only train the graph structure generation neural network. The purpose of this phase is to train the graph structure generation neural network so that it can effectively learn the structural characteristics of the pipeline from historical data.
[0089] The second stage: training the entire network. In this stage, the fully connected layer is also involved in the training, so that the entire network can learn end-to-end and optimize the prediction results.
[0090] After training is completed, the model is evaluated using methods such as validation sets or cross-validation, and hyperparameters are adjusted to optimize model performance.
[0091] According to the results of perfect model training, these trained models can be used in practical applications to accurately predict the pipeline flow at a certain time or even multiple nodes in the future by analyzing the current input data. This prediction capability can not only provide reliable data support for the refined management of urban drainage, emergency decision-making and command, but also provide scientific and effective data support for industry applications, thereby ensuring the safe and reliable operation of pipeline network drainage.
[0092] In this embodiment, a method for predicting the flow rate of a pipe network node is provided, which can be used in a server. Figure 3 is a flow chart of a method for predicting flow at a pipe network node according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0093] Step S301, obtaining water flow data of each node in the pipe network.
[0094] Exemplarily, the water flow data of each node in the pipeline network may be water flow data used to predict the flow rate of the pipeline network nodes. The water flow data may be water flow data of multiple dimensions. In an embodiment of the present application, the water flow data of each node in the pipeline network may be water flow data of each node within a certain time period.
[0095] Step S302, inputting the water flow data of each node into the pipe network node flow prediction model so that the pipe network node flow prediction model outputs a target pipe network connectivity diagram, and the pipe network node flow prediction model is constructed by the pipe network node flow prediction model construction method in the above embodiment.
[0096] Exemplarily, in an embodiment of the present application, water flow data of each node in a first time period is input into a pipeline node flow prediction model, and the model will output a target pipeline connectivity diagram in a second time period, and the second time period may be later than the first time period.
[0097] Step S303, determining the flow prediction values of the nodes in the pipe network based on the target pipe network connectivity graph.
[0098] Exemplarily, in an embodiment of the present application, the target pipe network connectivity diagram can reflect the connectivity relationship between nodes, and the flow prediction values of the nodes in the pipe network can be accurately determined based on the connectivity relationship between the points. Based on the flow prediction value of each node, a flow limit exceeding warning can also be issued for the corresponding node.
[0099] The pipeline node flow prediction method provided in this embodiment inputs the water flow data of each node in the pipeline network into the pipeline node flow prediction model, so that the pipeline node flow prediction model outputs a target pipeline network connectivity diagram, and determines the flow prediction value of the node in the pipeline network based on the target pipeline network connectivity diagram. The pipeline node flow prediction model takes into account the mutual influence of the water flow process between each node when predicting the flow, and realizes the rapid and accurate prediction of the flow of each node in the pipeline network, providing scientific and effective data support for the refined management of urban drainage, emergency decision-making and command, and industry applications, and solves the problem of inaccurate prediction results in predicting pipeline network flow through manual inspections and sampling tests in related technologies.
[0100] In this embodiment, a pipeline network node flow prediction system is provided. Figure 4 is a structural block diagram of a pipeline network node flow prediction system according to an embodiment of the present invention. Figure 4As shown, the system includes:
[0101] Data collection module 401, data storage module 402 and prediction module 403;
[0102] The data collection module 401 includes a plurality of flow monitors, which correspond one-to-one to a plurality of monitoring points in the pipe network and are used to collect water flow data at each monitoring point.
[0103] Exemplarily, in the embodiment of the present application, the data acquisition module 401 uses various sensors to monitor the flow conditions of important nodes in the pipeline network in real time.
[0104] The data storage module 402 is connected to the data acquisition module 401 and is used to store and manage the water flow data of each monitoring point.
[0105] Exemplarily, the data storage module 402 is responsible for collecting, storing and managing data, and providing professional and convenient data interface services for the pipe network monitoring platform and other application platforms. It can effectively manage and utilize the massive data collected by the monitoring system, and provide sufficient data support for subsequent data analysis and decision-making.
[0106] The prediction module 403 is connected to the data storage module 402 and is used to execute the pipeline node flow prediction model construction method in the above embodiment, or to execute the pipeline node flow prediction method in the above embodiment.
[0107] Exemplarily, the prediction module 403 includes a drainage pipe flow monitoring system platform and a third-party application platform, providing information services such as data display and decision analysis for operation and maintenance departments, pipeline ownership units and other relevant departments. By combining various advanced data analysis and decision-making algorithms, it can provide users with efficient and intelligent data management and decision support, further improving the efficiency and stability of pipe network operation.
[0108] The communication between the modules in this system adopts the NB-IoT communication network, which has the characteristics of wide coverage, large number of connections, fast data transmission rate, low cost, low power consumption and optimized architecture, ensuring efficient transmission and reliable exchange of data.
[0109] The pipe network node flow prediction system provided in the embodiment of the present application includes a plurality of flow monitors for collecting water flow data at different monitoring points through a data acquisition module, a data storage module for storing and managing the water flow data at each monitoring point, and a prediction module connected to the data storage module to realize the prediction of pipe network node flow. When performing flow prediction, the mutual influence of the water flow process between each node is taken into account, thereby realizing rapid and accurate prediction of the flow at each node of the pipe network, providing scientific and effective data support for refined management of urban drainage, emergency decision-making and command, and industry applications, and solving the problem of inaccurate prediction results in predicting pipe network flow through manual inspections and sampling tests in related technologies.
[0110] In this embodiment, a device for constructing a pipeline node flow prediction model is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0111] This embodiment provides a device for constructing a pipeline network node flow prediction model. Figure 5 As shown, including:
[0112] The first acquisition module 501 is used to acquire the water flow time series data and the pipe network line data of each monitoring point. The pipe network line data is used to characterize the connection relationship between each monitoring point and other monitoring points. The water flow time series data of each monitoring point includes the water flow data of each monitoring point at multiple time points.
[0113] A construction module 502 is used to construct a pipe network connectivity graph at a corresponding time by taking each monitoring point as a node and the association relationship between different monitoring points at each time as an edge, wherein the association relationship between different monitoring points at each time is determined by pipe network line data and water flow data corresponding to different monitoring points at the corresponding time;
[0114] A first division module 503 is used to divide the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data;
[0115] A second division module 504 is used to divide the pipe network connectivity graphs corresponding to different moments according to the second cycle length as a sliding window to obtain second training data;
[0116] An association module 505 is used to associate the first training data and the second training data according to the prediction requirements to construct a data set;
[0117] The training module 506 is used to train the dynamic graph neural network model using the data set to obtain a pipeline network node flow prediction model.
[0118] In some optional implementations, the building block 502 includes:
[0119] The extraction submodule is used to extract the water flow data corresponding to different monitoring points at each time by using the feature extraction model to obtain the correlation relationship between the different monitoring points at the corresponding time;
[0120] The first construction submodule is used to construct a pipe network connectivity diagram at a corresponding moment based on the association relationship between different monitoring points at each moment.
[0121] In some optional implementations, the training module 506 includes:
[0122] The second construction submodule is used to construct a target loss function based on a mean square error model and a mean absolute error model;
[0123] The training submodule is used to train the dynamic graph neural network model using the data set, and adjust the network parameters of the model based on the target loss function until the prediction accuracy of the model meets the preset conditions, thereby obtaining the pipeline node flow prediction model.
[0124] In some optional implementations, the acquisition module 501 includes:
[0125] An acquisition submodule is used to acquire first water flow monitoring data of each monitoring node, where the first water flow data is collected by a flow monitor;
[0126] The first processing submodule is used to process the initial water flow data of each monitoring node using a signal processing algorithm and a hydraulic model to obtain second water flow monitoring data;
[0127] The second processing submodule is used to perform missing value filling and abnormal elimination processing on the second water flow data corresponding to different monitoring points, so as to obtain the water flow time series data of each monitoring point.
[0128] This embodiment provides a pipeline network node flow prediction device, such as Figure 6 As shown, including:
[0129] The second acquisition module 601 is used to acquire water flow data of each node in the pipe network;
[0130] Prediction module 602, used for inputting water flow data of each node into the pipe network node flow prediction model, so that the pipe network node flow prediction model outputs a target pipe network connectivity graph, and the pipe network node flow prediction model is constructed by the pipe network node flow prediction model construction method in the above embodiment;
[0131] The determination module 603 is used to determine the flow prediction value of the node in the pipe network based on the target pipe network connectivity graph.
[0132] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0133] The network node flow prediction model building device and the network node flow prediction device in this embodiment are presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0134] The embodiment of the present invention also provides a computer device having the above Figure 5 The pipeline network node flow prediction model building device shown in the figure, or having the above Figure 6 The pipeline node flow prediction device shown.
[0135] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0136] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0137] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0138] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0139] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0140] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0141] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0142] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0143] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for constructing a pipeline network node flow prediction model, characterized in that: The pipe network includes multiple monitoring points, and the method includes: Obtaining water flow time series data and pipe network line data of each monitoring point, wherein the pipe network line data is used to characterize the connection relationship between each monitoring point and other monitoring points, and the water flow time series data of each monitoring point includes water flow data of each monitoring point at multiple time points; Each monitoring point is taken as a node, and the correlation between different monitoring points at each time is taken as an edge, so as to construct a pipe network connectivity graph at the corresponding time, wherein the correlation between different monitoring points at each time is determined by the pipe network line data and the water flow data corresponding to different monitoring points at the corresponding time; Dividing the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data; The pipe network connectivity graphs corresponding to different moments are divided according to the second cycle length as a sliding window to obtain second training data; Associating the first training data and the second training data according to prediction requirements to construct a data set; The data set is used to train the dynamic graph neural network model to obtain a pipeline network node flow prediction model.
2. The method according to claim 1, characterized in that The steps of constructing a pipe network connectivity graph at the corresponding time by taking each monitoring point as a node and the association relationship between different monitoring points at each time as an edge include: The feature extraction model is used to extract the water flow data corresponding to the different monitoring points at each time, so as to obtain the correlation relationship between the different monitoring points at the corresponding time; The pipe network connectivity diagram at the corresponding moment is constructed based on the association relationship between different monitoring points at each moment.
3. The method according to claim 1, characterized in that The step of training the dynamic graph neural network model using the data set to obtain a pipeline network node flow prediction model includes: Construct the target loss function based on the mean square error model and the mean absolute error model; The dynamic graph neural network model is trained using the data set, and the network parameters of the model are adjusted based on the target loss function until the prediction accuracy of the model meets the preset conditions, thus obtaining the pipeline node flow prediction model.
4. The method according to claim 3, characterized in that The steps of obtaining the water flow time series data and pipe network line data of each monitoring point include: Acquire first water flow monitoring data of each monitoring node, where the first water flow data is collected by a flow monitor; The initial water flow data of each monitoring node is processed using a signal processing algorithm and a hydraulic model to obtain second water flow monitoring data; The missing values are filled and the abnormalities are eliminated for the second water flow data corresponding to different monitoring points, so as to obtain the water flow time series data of each monitoring point.
5. A method for predicting flow at a pipe network node, characterized in that: The method comprises: Obtain water flow data for each node in the pipe network; Inputting the water flow data of each node into a pipe network node flow prediction model so that the pipe network node flow prediction model outputs a target pipe network connectivity diagram, wherein the pipe network node flow prediction model is constructed by the pipe network node flow prediction model construction method according to any one of claims 1 to 4; The flow prediction values of the nodes in the pipe network are determined based on the target pipe network connectivity graph.
6. A pipeline network node flow prediction system, characterized in that: The system comprises: Data collection module, data storage module and prediction module; The data acquisition module includes a plurality of flow monitors, which correspond one-to-one to a plurality of monitoring points in the pipe network and are used to collect water flow data at each monitoring point; The data storage module is connected to the data acquisition module and is used to store and manage the water flow data of each monitoring point; The prediction module is connected to the data storage module, and is used to execute the pipeline node flow prediction model construction method described in any one of claims 1 to 4, or to execute the pipeline node flow prediction method described in claim 5.
7. A device for constructing a pipeline network node flow prediction model, characterized in that: The pipe network includes multiple monitoring points, and the device includes: A first acquisition module is used to acquire water flow time series data and pipe network line data of each monitoring point, wherein the pipe network line data is used to characterize the connection relationship between each monitoring point and other monitoring points, and the water flow time series data of each monitoring point includes water flow data of each monitoring point at multiple time points; A construction module is used to construct a pipe network connectivity graph at the corresponding time by taking each monitoring point as a node and the correlation between different monitoring points at each time as an edge, wherein the correlation between different monitoring points at each time is determined by the pipe network line data and the water flow data corresponding to different monitoring points at the corresponding time; A first division module is used to divide the water flow time series data rows of each monitoring point according to the first cycle length as a sliding window to obtain first training data; A second division module is used to divide the pipe network connectivity graphs corresponding to different moments according to the second cycle length as a sliding window to obtain second training data; An associating module, used to associate the first training data and the second training data according to the prediction requirements to construct a data set; The training module is used to train the dynamic graph neural network model using the data set to obtain a pipeline network node flow prediction model.
8. A pipeline network node flow prediction device, characterized in that: The device comprises: The second acquisition module is used to obtain water flow data of each node in the pipe network; A prediction module, used for inputting the water flow data of each node into a pipe network node flow prediction model so that the pipe network node flow prediction model outputs a target pipe network connectivity diagram, wherein the pipe network node flow prediction model is constructed by the pipe network node flow prediction model construction method according to any one of claims 1 to 4; A determination module is used to determine the flow prediction value of the node in the pipeline network based on the target pipeline network connectivity diagram.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for constructing a pipeline node flow prediction model according to any one of claims 1 to 4, or executes the pipeline node flow prediction method according to claim 5, by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for constructing a pipeline node flow prediction model according to any one of claims 1 to 4, or to execute the pipeline node flow prediction method according to claim 5.
11. A computer program product, characterized in that It includes computer instructions, which are used to enable a computer to execute the pipeline node flow prediction model construction method described in any one of claims 1 to 4, or execute the pipeline node flow prediction method described in claim 5.
