Pipe network pressure prediction method and system based on spatio-temporal graph convolutional neural network
Patent Information
- Application Number
- CN202310870734.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-07-14
AI Technical Summary
[0005]有鉴于此,有必要提供一种基于时空图卷积神经网络的管网压力预测方法和系统,用以解决现有技术中在对管网压力进行预测的过程中,存在的管网压力值预测精度低的问题
[0044]采用上述实施例的有益效果是:本发明提供一种基于时空图卷积神经网络的管网压力预测方法和系统,该方法通过对数据组样本进行预处理,分别得到压力特征样本和时间特征样本,实现了获取多维度的数据特征,即压力数据本身的特征和时间维度特征;通过构建时空图卷积神经网络模型,从时间及空间两个维度出发去学习管网整个系统的潜在时空关联,从而实现对管网压力的多步预测,并且通过多角度进行数据处理,能够较好地提高管网压力值的预测精度。
Smart Images

Figure CN116882290B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline inspection technology, and in particular to a pipeline pressure prediction method and system based on spatiotemporal graph convolutional neural network. Background Technology
[0002] Liquid transport pipelines (hereinafter referred to as pipelines) are an important infrastructure, such as drainage pipelines and water supply pipelines. With the development of my country's economy, water supply pipelines are not only an essential infrastructure in cities, but also widely used in rural areas. Therefore, the normal operation of pipelines is one of the important foundations for people's normal life. Pipeline maintenance (checking for leaks or bursts) is an important task to ensure the normal operation of pipelines after their construction. However, my country has a vast territory with significant differences in geographical features, so the maintenance of pipelines varies from region to region. Especially for the complex pipelines in large cities, maintenance is very complicated. Studies have found a direct correlation between pipeline leaks or bursts and pipeline transport pressure. Therefore, if the pressure of the pipeline can be accurately predicted, pipeline leaks and bursts can be prevented by controlling the pipeline transport pressure.
[0003] Currently, most technologies for predicting pipeline pressure employ simple neural network prediction methods and simple machine learning methods, while some use more complex time series models such as Long Short-Term Memory (LSTM) neural networks. However, these methods can only perform single-step predictions of simple pipeline pressures, and the prediction accuracy is relatively low.
[0004] Therefore, existing technologies suffer from low accuracy in predicting pipeline pressure values. Summary of the Invention
[0005] In view of this, it is necessary to provide a pipeline pressure prediction method and system based on spatiotemporal graph convolutional neural network to solve the problem of low prediction accuracy of pipeline pressure value in the existing technology.
[0006] To address the above problems, this invention provides a pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network, comprising:
[0007] Obtain data sets of the pipeline network and their corresponding pressure value samples;
[0008] Preprocess the data set samples to obtain pressure feature samples and time feature samples;
[0009] An initial spatiotemporal graph convolutional neural network model is constructed, which includes a gate-controlled temporal convolutional network and a graph convolutional neural network.
[0010] Simultaneously, pressure feature samples and time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained with the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0011] The system acquires data sets from the target pipeline network in real time, preprocesses the data sets to obtain pressure and time features, and then processes the pressure and time features based on a spatiotemporal graph convolutional neural network model to obtain the pressure values corresponding to the data sets.
[0012] Furthermore, pressure feature samples and time feature samples are simultaneously input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained, including:
[0013] Simultaneously, pressure feature samples and time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels. The initial spatiotemporal graph convolutional neural network model is divided into grids according to the preset interval density to obtain the corresponding multi-layer initial hyperparameters.
[0014] A layered hyperparameter search algorithm based on a greedy strategy is set up to optimize the initial hyperparameters of multiple layers and determine the optimal value of the hyperparameters for each layer.
[0015] Based on the optimal values of the hyperparameters, a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0016] Furthermore, the data set samples include pressure data samples and their corresponding timestamp samples; the data set samples are preprocessed to obtain pressure feature samples and time feature samples, including:
[0017] Outliers in the pressure data samples are removed to obtain normal pressure data samples;
[0018] Based on normal pressure data samples, outliers are restored using a low-rank smoothing tensor algorithm to obtain pressure feature samples.
[0019] Linear time feature extraction is performed on the timestamp samples to obtain time feature samples.
[0020] Furthermore, after restoring outliers from normal pressure data samples using a low-rank smoothing tensor algorithm to obtain pressure feature samples, the process also includes:
[0021] Obtain the local extreme points of the pressure feature samples;
[0022] The upper and lower envelopes of the local extreme points are obtained by cubic spline interpolation, and the mean envelope value of the local extreme points is determined based on the upper and lower envelopes.
[0023] The residual components are determined based on the pressure characteristic samples and the envelope mean.
[0024] Furthermore, based on the pressure feature samples and the envelope mean, the residual components are determined, including:
[0025] A new sequence was obtained based on the pressure feature samples and the mean value of the envelope;
[0026] Set IMF conditions;
[0027] When a new sequence meets the IMF condition, the new sequence is determined to be an IMF component, and the IMF component is stripped of signals to determine the residual components.
[0028] Furthermore, the gate control mechanism temporal convolutional network comprises two temporal convolutional networks, each employing a different activation function. Simultaneously, pressure feature samples and temporal feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained, including:
[0029] Simultaneously, pressure feature samples and time feature samples are input into the initial spatiotemporal graph convolutional neural network model. Based on the gate control mechanism, the temporal convolutional network processes the pressure feature samples and time feature samples to obtain the time dependency of pressure data.
[0030] Obtain a sample of the pipeline network topology;
[0031] The graph convolutional neural network iteratively trains an initial spatiotemporal graph convolutional neural network model based on topological structure samples, time dependencies of stress data, and stress data samples, using the corresponding stress value samples as sample labels, until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0032] Furthermore, the graph convolutional neural network obtains and outputs stress value samples based on the topological structure samples, the time dependencies of the stress data, and the stress data samples, including:
[0033] Perform matrix calculations on the topology samples to obtain the initial adjacency matrix of the pipeline network;
[0034] Node features are extracted from the initial adjacency matrix to obtain the network node features;
[0035] Based on the characteristics of pipeline nodes, the time dependence of pressure data, and pressure data samples, pressure value samples are obtained and output.
[0036] To address the above problems, this invention provides a pipeline pressure prediction system based on a spatiotemporal graph convolutional neural network, comprising:
[0037] The sample acquisition module is used to acquire data group samples of the pipeline network and their corresponding pressure value samples;
[0038] The preprocessing module is used to preprocess the data set samples to obtain pressure feature samples and time feature samples;
[0039] The spatiotemporal graph convolutional neural network model building module is used to construct the initial spatiotemporal graph convolutional neural network model, which includes a gate-controlled temporal convolutional network and a graph convolutional neural network.
[0040] The spatiotemporal graph convolutional neural network model training module is used to simultaneously input pressure feature samples and time feature samples into the initial spatiotemporal graph convolutional neural network model, and iteratively train the initial spatiotemporal graph convolutional neural network model with the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0041] The pressure prediction module is used to acquire data sets of the target pipeline network in real time, preprocess the data sets to obtain pressure features and time features, and process the pressure features and time features based on the spatiotemporal graph convolutional neural network model to obtain the pressure value corresponding to the pressure data set.
[0042] To address the aforementioned problems, this invention provides an electronic device, including a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, it implements the pipeline pressure prediction method based on spatiotemporal graph convolutional neural network as described in any of the above technical solutions.
[0043] To address the aforementioned problems, this invention provides a storage medium storing computer program instructions. When these instructions are executed by a computer, the computer performs the pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network as described in any of the above technical solutions.
[0044] The beneficial effects of the above embodiments are as follows: This invention provides a pipeline pressure prediction method and system based on spatiotemporal graph convolutional neural network. This method obtains pressure feature samples and time feature samples by preprocessing the data group samples, thereby realizing the acquisition of multi-dimensional data features, namely the features of the pressure data itself and the time dimension features. By constructing a spatiotemporal graph convolutional neural network model, the potential spatiotemporal correlation of the entire pipeline system is learned from both time and space dimensions, thereby realizing multi-step prediction of pipeline pressure. Furthermore, by processing data from multiple perspectives, the prediction accuracy of pipeline pressure values can be significantly improved. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating an embodiment of the pipeline pressure prediction method based on spatiotemporal graph convolutional neural network provided by the present invention.
[0046] Figure 2 This is a schematic flowchart of an embodiment of the present invention for preprocessing data group samples;
[0047] Figure 3 This is a schematic flowchart illustrating an embodiment of obtaining the residual component provided by the present invention.
[0048] Figure 4 A flowchart illustrating an embodiment of the present invention for determining residual components;
[0049] Figure 5 A flowchart illustrating an embodiment of the training initial spatiotemporal graph convolutional neural network model provided by the present invention;
[0050] Figure 6 This is a schematic flowchart of an embodiment of the present invention for obtaining pressure value samples;
[0051] Figure 7 A flowchart illustrating an embodiment of the training initial spatiotemporal graph convolutional neural network model provided by the present invention;
[0052] Figure 8 This is a structural block diagram of an embodiment of the pipeline pressure prediction system based on spatiotemporal graph convolutional neural network provided by the present invention;
[0053] Figure 9 A structural block diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0054] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0055] Liquid transport pipelines (hereinafter referred to as pipelines) are an important infrastructure, such as drainage pipelines and water supply pipelines. With the development of my country's economy, water supply pipelines are not only an essential infrastructure in cities, but also widely used in rural areas. Therefore, the normal operation of pipelines is one of the important foundations for people's normal life. Pipeline maintenance (checking for leaks or bursts) is an important task to ensure the normal operation of pipelines after their construction. However, my country has a vast territory with significant differences in geographical features, so the maintenance of pipelines varies from region to region. Especially for the complex pipelines in large cities, maintenance is very complicated. Studies have found a direct correlation between pipeline leaks or bursts and pipeline transport pressure. Therefore, if the pressure of the pipeline can be accurately predicted, pipeline leaks and bursts can be prevented by controlling the pipeline transport pressure.
[0056] Currently, most technologies for predicting pipeline pressure employ simple neural network prediction methods and simple machine learning methods, while some use more complex time series models such as Long Short-Term Memory (LSTM) neural networks. However, these methods can only perform single-step predictions of simple pipeline pressures, and the prediction accuracy is relatively low.
[0057] Therefore, existing technologies suffer from low accuracy in predicting pipeline pressure values.
[0058] To address the aforementioned problems, this invention provides a method, system, electronic device, and storage medium for predicting pipeline pressure based on a spatiotemporal graph convolutional neural network, which will be described in detail below.
[0059] like Figure 1 As shown, Figure 1 This is a flowchart illustrating an embodiment of the pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network provided by the present invention. The pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network includes:
[0060] Step S101: Obtain the data set samples of the pipeline network and their corresponding pressure value samples;
[0061] Step S102: Preprocess the data set samples to obtain pressure feature samples and time feature samples;
[0062] Step S103: Construct the initial spatiotemporal graph convolutional neural network model, which includes a gate-controlled temporal convolutional network and a graph convolutional neural network;
[0063] Step S104: Simultaneously input the pressure feature samples and time feature samples into the initial spatiotemporal graph convolutional neural network model, and use the corresponding pressure value samples as sample labels to iteratively train the initial spatiotemporal graph convolutional neural network model until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0064] Step S105: Acquire the data set of the target pipeline network in real time, preprocess the data set to obtain pressure features and time features, and process the pressure features and time features based on the spatiotemporal graph convolutional neural network model to obtain the pressure value corresponding to the data set.
[0065] In this embodiment, firstly, data group samples of the pipeline network and their corresponding pressure value samples are acquired; nextly, the data group samples are preprocessed to obtain pressure feature samples and time feature samples; then, an initial spatiotemporal graph convolutional neural network model is constructed, which includes a gate-controlled temporal convolutional network and a graph convolutional neural network; simultaneously, the pressure feature samples and time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained; finally, the data group of the target pipeline network is acquired in real time, and the data group is preprocessed to obtain pressure features and time features. Based on the spatiotemporal graph convolutional neural network model, the pressure features and time features are processed to obtain the pressure values corresponding to the data group.
[0066] In this embodiment, by preprocessing the data group samples, pressure feature samples and time feature samples are obtained respectively, realizing the acquisition of multi-dimensional data features, namely the features of the pressure data itself and the time dimension features; by constructing a spatiotemporal graph convolutional neural network model, the potential spatiotemporal correlation of the entire pipeline system is learned from both time and space dimensions, thereby realizing multi-step prediction of pipeline pressure, and by processing data from multiple angles, the prediction accuracy of pipeline pressure values can be improved significantly.
[0067] In a preferred embodiment, in step S101, in order to obtain the data set samples of the pipeline network and their corresponding pressure value samples, pressure sensors are first deployed at key stations of the pipeline network to collect pressure data during pipeline transportation and record the corresponding timestamp information to obtain the data set samples; correspondingly, in order to facilitate subsequent data processing, it is also necessary to obtain the pressure value samples corresponding to the pressure data samples.
[0068] In one specific embodiment, the data sets of key stations in the pipeline network are automatically acquired through a Supervisory Control and Data Acquisition (SCADA) system.
[0069] In a preferred embodiment, in step S102, the data set sample includes pressure data samples and their corresponding timestamp samples; to preprocess the data set sample to obtain pressure feature samples and time feature samples, such as... Figure 2 As shown, Figure 2 A flowchart illustrating an embodiment of preprocessing data samples provided by the present invention includes:
[0070] Step S121: Remove outliers from the pressure data samples to obtain normal pressure data samples;
[0071] Step S122: Based on the normal pressure data samples, the outliers are restored using the low-rank smoothing tensor algorithm to obtain pressure feature samples;
[0072] Step S123: Perform linear time feature extraction on the timestamp samples to obtain time feature samples.
[0073] In this embodiment, pressure feature samples are obtained by performing outlier removal and outlier restoration on the pressure data samples, thereby reducing the adverse effects of outliers and improving the reliability of pressure feature samples. By performing linear time feature extraction on the timestamp samples, the efficiency of obtaining time feature samples can be effectively guaranteed.
[0074] In one specific embodiment, in step S121, since the sensor acquires pressure data in a relatively continuous process and the liquid in the pipeline is in a state of constant motion, firstly, pressure data that has a sudden change is determined to be an abnormal value; secondly, pressure data that is in a constant state is determined to be an abnormal value.
[0075] In one specific embodiment, in step S122, considering the potential spatiotemporal correlation of the pipeline network, an extensible tensor learning model LSTC-Tubal is used to restore the removed outliers.
[0076] In this matrix, for any given partial observation data matrix Y, the columns correspond to spatial points, and the rows correspond to spatial locations (locations of pressure monitoring stations):
[0077]
[0078] Where M is the number of sensors (or spatial location), and IJ is the number of consecutive time points.
[0079] The observed value Y can be written as Operators: It is the orthogonal projection supported on the observed index set Ω:
[0080]
[0081] Where m = 1, ..., M, n = 1, ..., IJ.
[0082] The modeling objective of missing data imputation can be described as based on partial observations. Learn unobserved values.
[0083] It should be noted that LSTC-Tubal refers to the low-rank smooth tensor algorithm.
[0084] In this embodiment, the low-rank smooth tensor algorithm is used to restore the removed outliers, which can better ensure the integrity of the data.
[0085] In a preferred embodiment, in step S122, after obtaining the pressure feature samples, in order to increase the number of pressure data samples, it is necessary to further process the pressure feature samples to obtain residual components, such as... Figure 3 As shown, Figure 3 A schematic flowchart of an embodiment of obtaining residual components provided by the present invention includes:
[0086] Step S1221: Obtain the local extreme points of the pressure feature samples;
[0087] Step S1222: Obtain the upper and lower envelopes of the local extreme points using cubic spline interpolation, and determine the mean envelope value of the local extreme points based on the upper and lower envelopes;
[0088] Step S1223: Determine the residual components based on the pressure feature samples and the envelope mean.
[0089] In this embodiment, by obtaining the envelope mean of the local extreme points of the pressure feature samples and determining the residual components based on the envelope mean, the data of the pressure feature samples is enriched, thereby improving the reliability of the model.
[0090] In one specific embodiment, all local extrema of the original signal s(t) are first determined, and then the upper envelope of the signal is obtained using cubic spline interpolation. and lower envelope
[0091] Among them, the mean of the envelope is calculated. The calculation formula is:
[0092]
[0093] In a preferred embodiment, in step S1223, in order to determine the residual component, such as Figure 4 As shown, Figure 4 A flowchart illustrating an embodiment of the present invention for determining residual components includes:
[0094] Step S12231: Obtain a new sequence based on the pressure feature samples and the mean value of the envelope;
[0095] Step S12232: Set IMF conditions;
[0096] Step S12233: When the new sequence meets the IMF condition, the new sequence is determined to be an IMF component, and the IMF component is stripped of signals to determine the residual components.
[0097] In this embodiment, by setting the IMF condition, the residual component is determined only when the new sequence corresponding to the pressure feature sample and the envelope mean satisfies the IMF condition, thus ensuring the reliability of the residual component.
[0098] In one specific embodiment, a new sequence is obtained based on the original signal and the mean value of the envelope. If the IMF conditions are met, it is considered an IMF component, where the new sequence The solution is as follows:
[0099]
[0100] like If the IMF components are not satisfied, then for the new sequence Repeat steps S1221 and S1222 m times to obtain The obtained sequence is then checked again to see if it meets the IMF conditions. If not, the sequence is re-selected; if it does, the first component imf1(t) is obtained, denoted as:
[0101]
[0102] The residual component r1(t) is obtained by stripping imf1(t) from the signal.
[0103] It should be noted that IMF refers to Intrinsic Mode Function.
[0104] In a preferred embodiment, in step S103, the gate control mechanism temporal convolutional network includes two temporal convolutional networks, and the two temporal convolutional networks each employ different activation functions.
[0105] In one specific embodiment, the gate control mechanism temporal convolutional network is selected as Gate-TCN, the graph convolutional neural network is selected as GCN, and the temporal convolutional network is selected as TCN. The gate control mechanism temporal convolutional network is used to extract temporal dependencies. The two temporal convolutional network (TCN) modules are TCN-a and TCN-b, respectively. TCN-a and TCN-b employ different activation functions to implement the gate control mechanism.
[0106] It should be noted that pressure data samples and timestamp samples exist in pairs; that is, for each pressure data sample, there is a unique timestamp sample corresponding to it.
[0107] In a preferred embodiment, in step S104, in order to train the initial spatiotemporal graph convolutional neural network model, such as... Figure 5 As shown, Figure 5 A flowchart illustrating an embodiment of the training initial spatiotemporal graph convolutional neural network model provided by the present invention includes:
[0108] Step S141: Simultaneously input the pressure feature samples and time feature samples into the initial spatiotemporal graph convolutional neural network model, and perform data processing on the pressure feature samples and time feature samples based on the gate control mechanism temporal convolutional network to obtain the time dependency of pressure data;
[0109] Step S142: Obtain a sample of the pipeline network topology;
[0110] Step S143: The graph convolutional neural network iteratively trains the initial spatiotemporal graph convolutional neural network model based on the topological structure samples, the time dependency of the stress data, and the stress data samples, using the corresponding stress value samples as sample labels, until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0111] In this embodiment, by setting topological structure samples to spatially organize the temporal dependencies of the pressure data, the characteristics of the pressure data samples can be better highlighted, so that the graph convolutional neural network can obtain the relationships therein. This increases the dimensionality of the structure of the initial spatiotemporal graph convolutional neural network model and improves the accuracy of the pressure values obtained by the spatiotemporal graph convolutional neural network model.
[0112] It should be noted that in step S142, the topology sample of the pipeline network is constructed based on the actual water supply pipeline network structure and combined with complex network knowledge.
[0113] In a preferred embodiment, in step S143, in order to obtain and output pressure value samples, such as... Figure 6 As shown, Figure 6 A schematic flowchart of an embodiment of obtaining pressure value samples provided by the present invention includes:
[0114] Step S1431: Perform matrix calculations on the topology sample to obtain the initial adjacency matrix of the pipeline network;
[0115] Step S1432: Extract node features from the initial adjacency matrix to obtain the network node features;
[0116] Step S1433: Based on the characteristics of the pipeline nodes, the time dependence of pressure data, and the pressure data samples, obtain and output pressure value samples.
[0117] In this embodiment, the characteristics of the pipeline network nodes are obtained by performing matrix calculations and feature extraction on the topology samples. By comprehensively processing the pipeline network node characteristics, the time dependency of pressure data, and the pressure data samples, the reliability of the pressure value samples is greatly improved because both time and space factors are considered.
[0118] In one specific embodiment, in step S1431, node feature extraction is performed on the topology sample to obtain the adjacency matrix A∈R used for the initial calculation of the GCN layer. N×N .
[0119]
[0120] Where E1 is the embedding of the source node and E2 is the embedding of the target node.
[0121] Furthermore, the graph convolutional layer is defined as follows:
[0122]
[0123] Where P is the transition matrix, P = A / rowsum(A).
[0124] A graph convolutional neural network model is a model that, given a graph G and its historical S-step graph features, learns a function f that can predict its next T-step graph features.
[0125] The mapping relationship is represented as follows:
[0126] X (t+1):(t+T) =f(X) (t-S):t In one specific embodiment, the decomposed pressure features and time features are simultaneously input into a graph convolutional neural network. For a time series of pressure values X = {x1, x2, ... x} at multiple stations, the decomposed pressure features and time features are input simultaneously into a graph convolutional neural network. T}, where x t ∈R n Let T represent the pressure values of the n stations at time t, and T represent the length of the time series. If we consider the pressure time series of the j-th station... Empirical mode decomposition was performed, and the results are as follows:
[0127]
[0128] in, Let N represent the i-th imf of the j-th key monitoring station, and N represent the total number of imf.
[0129] In a preferred embodiment, in step S104, in order to determine the training effect of the initial spatiotemporal graph convolutional neural network model, such as... Figure 7 As shown, Figure 7 A flowchart illustrating an embodiment of the training initial spatiotemporal graph convolutional neural network model provided by the present invention includes:
[0130] Step S241: Simultaneously input pressure feature samples and time feature samples into the initial spatiotemporal graph convolutional neural network model, and use the corresponding pressure value samples as sample labels to iteratively train the initial spatiotemporal graph convolutional neural network model. Divide the initial spatiotemporal graph convolutional neural network model into grids according to the preset interval density to obtain the corresponding multi-layer initial hyperparameters.
[0131] Step S242: Set up a hierarchical hyperparameter search algorithm based on a greedy strategy to optimize the initial hyperparameters of multiple layers and determine the optimal value of the hyperparameters for each layer;
[0132] Step S243: Based on the optimal values of the hyperparameters, obtain the fully trained spatiotemporal graph convolutional neural network model.
[0133] In this embodiment, the initial spatiotemporal graph convolutional neural network model is divided into grids to achieve hierarchical management of the parameters in the initial spatiotemporal graph convolutional neural network model. Then, by setting a hierarchical hyperparameter search algorithm based on a greedy strategy to optimize the initial hyperparameters of multiple layers, the optimal values of the hyperparameters corresponding to each layer can be obtained. This can better ensure that the hyperparameters in the final spatiotemporal graph convolutional neural network model are all of relatively optimal values, thereby improving the training effect of the initial spatiotemporal graph convolutional neural network model. Since the final spatiotemporal graph convolutional neural network model is determined based on the optimal hyperparameter values, it can be concluded that the training effect of the initial spatiotemporal graph convolutional neural network model has reached the optimal level.
[0134] In one specific embodiment, a greedy strategy is employed, and the optimal hyperparameters are searched hierarchically. The initial value for the hyperparameter search at each level is the best combination of hyperparameters found in the previous level. Then, the grid is divided according to the density of the intervals; next, a random hyperparameter search is used for hyperparameter optimization; when the deep learning model obtains the optimal hyperparameters, the hyperparameters of each layer of the network are fixed.
[0135] Furthermore, by using a deep transfer learning method to pass parameters, the grid is re-divided as the scaling factor changes until the optimal combination of hyperparameters is found. This also incorporates the transfer concept, enabling better hierarchical optimal hyperparameter search.
[0136] Through the above methods, the potential spatiotemporal correlations between pipeline monitoring stations are considered from the initial data preprocessing stage to the final model learning stage. Before inputting a single pressure feature into the model, empirical mode decomposition is used to enrich the pressure feature, enabling the model to deeply explore the potential spatiotemporal correlations between pipeline monitoring stations.
[0137] In one specific embodiment, the spatiotemporal graph convolutional neural network model can accurately predict the pressure values of n key stations in the next 12 hours based on the pressure values of the previous 12 hours.
[0138] By preprocessing the data samples as described above, pressure feature samples and time feature samples are obtained respectively, thus realizing the acquisition of multi-dimensional data features, namely the features of the pressure data itself and the time dimension features. By constructing a spatiotemporal graph convolutional neural network model, the potential spatiotemporal correlation of the entire pipeline system is learned from both time and space dimensions, thereby realizing multi-step prediction of pipeline pressure. Furthermore, by processing data from multiple perspectives, the prediction accuracy of pipeline pressure values can be significantly improved.
[0139] This invention also provides a pipeline pressure prediction system based on a spatiotemporal graph convolutional neural network, such as... Figure 8 As shown, Figure 8 This is a structural block diagram of an embodiment of the pipeline pressure prediction system based on spatiotemporal graph convolutional neural network provided by the present invention. The pipeline pressure prediction system 800 based on spatiotemporal graph convolutional neural network includes:
[0140] The sample acquisition module 801 is used to acquire data group samples of the pipeline network and their corresponding pressure value samples.
[0141] The preprocessing module 802 is used to preprocess the data set samples to obtain pressure feature samples and time feature samples;
[0142] The spatiotemporal graph convolutional neural network model building module 803 is used to build an initial spatiotemporal graph convolutional neural network model, which includes a gate control mechanism temporal convolutional network and a graph convolutional neural network.
[0143] The spatiotemporal graph convolutional neural network model training module 804 is used to simultaneously input pressure feature samples and time feature samples into the initial spatiotemporal graph convolutional neural network model, and iteratively train the initial spatiotemporal graph convolutional neural network model with the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained.
[0144] The pressure prediction module 805 is used to acquire data sets of the target pipeline network in real time, preprocess the data set samples to obtain pressure features and time features, and process the pressure features and time features based on the spatiotemporal graph convolutional neural network model to obtain the pressure value corresponding to the data set.
[0145] The present invention also provides an electronic device, such as... Figure 9 As shown, Figure 9This is a structural block diagram of an embodiment of the electronic device provided by the present invention. The electronic device 900 can be a computing device such as a mobile terminal, desktop computer, laptop, handheld computer, and server. The electronic device 900 includes a processor 901 and a memory 902, wherein the memory 902 stores a pipeline pressure prediction program 903 based on a spatiotemporal graph convolutional neural network.
[0146] In some embodiments, memory 902 may be an internal storage unit of a computer device, such as a hard disk or memory. In other embodiments, memory 902 may be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, memory 902 may include both internal and external storage units of the computer device. Memory 902 is used to store application software and various types of data installed on the computer device, such as program code for installing the computer device. Memory 902 can also be used to temporarily store data that has been output or will be output. In one embodiment, a pipeline pressure prediction program 903 based on a spatiotemporal graph convolutional neural network can be executed by processor 901, thereby implementing the pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network according to various embodiments of the present invention.
[0147] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor or other data processing chip, used to run program code stored in memory 902 or process data, such as executing a pipeline pressure prediction program based on spatiotemporal graph convolutional neural network.
[0148] This embodiment also provides a computer-readable storage medium storing a pipeline pressure prediction program based on a spatiotemporal graph convolutional neural network. When the computer processor executes this program, it implements the pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network as described in any of the above technical solutions.
[0149] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0150] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting pipeline pressure based on a spatiotemporal graph convolutional neural network, characterized in that, include: Obtain data set samples of the pipeline network and their corresponding pressure value samples, wherein the data set samples include pressure data samples and their corresponding timestamp samples; Outliers are removed from the pressure data samples to obtain normal pressure data samples; based on the normal pressure data samples, the outliers are restored using a low-rank smoothing tensor algorithm to obtain the pressure feature samples; linear time feature extraction is performed on the timestamp samples to obtain the time feature samples. An initial spatiotemporal graph convolutional neural network model is constructed, which includes a gate-controlled temporal convolutional network and a graph convolutional neural network. Simultaneously, the pressure feature samples and the time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained. The data set of the target pipeline network is acquired in real time, and the data set samples are preprocessed to obtain pressure features and time features. The pressure features and time features are then processed based on the spatiotemporal graph convolutional neural network model to obtain the pressure value corresponding to the data set. The step of restoring the outliers from the normal pressure data samples using a low-rank smoothing tensor algorithm to obtain the pressure feature samples further includes: Obtain the local extreme points of the pressure feature sample; The upper and lower envelopes of the local extreme points are obtained by cubic spline interpolation, and the mean envelope value of the local extreme points is determined based on the upper and lower envelopes. A new sequence is obtained based on the pressure feature sample and the mean value of the envelope; Set IMF conditions; When the new sequence satisfies the IMF condition, the new sequence is determined to be an IMF component, and the IMF component is stripped of signals to determine the residual components.
2. The pipeline pressure prediction method based on spatiotemporal graph convolutional neural network according to claim 1, characterized in that, The process of simultaneously inputting the pressure feature samples and the time feature samples into the initial spatiotemporal graph convolutional neural network model, and iteratively training the initial spatiotemporal graph convolutional neural network model using the corresponding pressure value samples as sample labels, until a fully trained spatiotemporal graph convolutional neural network model is obtained, includes: Simultaneously, the pressure feature samples and the time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the initial spatiotemporal graph convolutional neural network model is iteratively trained using the corresponding pressure value samples as sample labels. The initial spatiotemporal graph convolutional neural network model is divided into grids according to a preset interval density to obtain the corresponding multi-layer initial hyperparameters. A layered hyperparameter search algorithm based on a greedy strategy is set up to optimize the initial hyperparameters of the multi-layered system and determine the optimal value of the hyperparameters for each layer. Based on the optimal values of the hyperparameters, a fully trained spatiotemporal graph convolutional neural network model is obtained.
3. The pipeline pressure prediction method based on spatiotemporal graph convolutional neural network according to claim 1, characterized in that, The gate control mechanism temporal convolutional network includes two temporal convolutional networks, each employing a different activation function; the simultaneous input of the pressure feature samples and the temporal feature samples into the initial spatiotemporal graph convolutional neural network model, and the iterative training of the initial spatiotemporal graph convolutional neural network model using the corresponding pressure value samples as sample labels, until a fully trained spatiotemporal graph convolutional neural network model is obtained, includes: Simultaneously, the pressure feature samples and the time feature samples are input into the initial spatiotemporal graph convolutional neural network model, and the pressure feature samples and the time feature samples are processed by the time convolutional network based on the gate control mechanism to obtain the time dependency of the pressure data; Obtain a topology sample of the pipeline network; The graph convolutional neural network iteratively trains the initial spatiotemporal graph convolutional neural network model based on the topological structure samples, the time dependency of the pressure data, and the pressure data samples, using the corresponding pressure value samples as sample labels, until a fully trained spatiotemporal graph convolutional neural network model is obtained.
4. The pipeline pressure prediction method based on spatiotemporal graph convolutional neural network according to claim 3, characterized in that, The graph convolutional neural network obtains and outputs the pressure value samples based on the topology samples, the time dependency of the pressure data, and the pressure data samples, including: Matrix calculations are performed on the topology samples to obtain the initial adjacency matrix of the pipeline network; Node features are extracted from the initial adjacency matrix to obtain the network node features; Based on the characteristics of the pipeline nodes, the time dependence of the pressure data, and the pressure data samples, the pressure value samples are obtained and output.
5. A pipeline pressure prediction system based on a spatiotemporal graph convolutional neural network, used to implement the pipeline pressure prediction method based on a spatiotemporal graph convolutional neural network as described in any one of claims 1-4, characterized in that, include: The sample acquisition module is used to acquire data group samples of the pipeline network and their corresponding pressure value samples; The preprocessing module is used to preprocess the data group samples to obtain pressure feature samples and time feature samples; A spatiotemporal graph convolutional neural network model building module is used to construct an initial spatiotemporal graph convolutional neural network model, wherein the initial spatiotemporal graph convolutional neural network model includes a gate-controlled temporal convolutional network and a graph convolutional neural network; The spatiotemporal graph convolutional neural network model training module is used to simultaneously input the pressure feature samples and the time feature samples into the initial spatiotemporal graph convolutional neural network model, and iteratively train the initial spatiotemporal graph convolutional neural network model with the corresponding pressure value samples as sample labels until a fully trained spatiotemporal graph convolutional neural network model is obtained. The pressure prediction module is used to acquire data sets of the target pipeline network in real time, preprocess the data set samples to obtain pressure features and time features, and perform data processing on the pressure features and time features based on the spatiotemporal graph convolutional neural network model to obtain the pressure value corresponding to the data set.
6. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, it implements the pipeline pressure prediction method based on spatiotemporal graph convolutional neural network as described in any one of claims 1-4.
7. A storage medium, characterized in that, The storage medium stores computer program instructions, which, when executed by a computer, cause the computer to perform the pipeline pressure prediction method based on spatiotemporal graph convolutional neural network according to any one of claims 1 to 4.
Citation Information
Patent Citations
Water supply pipeline non-monitoring node pressure determining method based on ground statistics space analysis theory
CN103617563A
Pressure pulsation prediction method for pump station unit based on instantaneous computation of computational fluid mechanics
CN109185211A