A multi-agent based method for collaborative multi-point flow prediction of pipe network
Patent Information
- Application Number
- CN202610900169.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-22
- Publication Date
- 2026-09-01
AI Technical Summary
然而,现有的深度学习方法主要集中在单点数据或单一模型上,无法有效地结合管网节点间的空间信息和协同优化
通过本发明提出的基于多智能体的管网多点流量协同预测方法,相较于现有技术,能够有效地克服传统方法在管网流量预测中的局限性,特别是在处理复杂管网系统的时空依赖关系和节点协同优化问题上。现有技术中,大多数流量预测方法仅关注单点数据,忽视了管网系统中各节点之间的空间依赖性和协同关系,这导致了预测精度的局限性和对突发事件的响应能力不足。而本发明通过基于ResNetV2网络的时空特征建模和改进MADDPG模型的多智能体协同优化,能够全面捕捉管网系统中各节点之间的时空依赖关系,从而提高流量预测的精度与实时性。
Smart Images

Figure CN122674935A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flow forecasting technology, and in particular to a multi-agent-based method for collaborative flow forecasting of pipeline networks at multiple points. Background Technology
[0002] As the scale of modern urban pipeline systems continues to expand, the complexity of pipeline management is also increasing, making traditional flow forecasting methods insufficient to meet the demands for efficiency and accuracy. Most traditional flow forecasting methods are based on single-point data analysis, estimating flow through a single measurement point, neglecting the spatial dependencies and temporal dynamics between multiple nodes in the pipeline system. When dealing with complex pipeline structures, this method often fails to provide accurate global forecasts, leading to unreasonable allocation of pipeline resources and impacting the operational efficiency and safety of the pipeline system.
[0003] Existing methods for single-point flow forecasting typically employ traditional statistical models, such as autoregressive (AR) and moving average (MA) models, which rely on historical data for prediction. However, these methods are limited in their inability to effectively capture the spatiotemporal dependencies between nodes in a pipeline network, particularly lacking consideration of the collaborative relationships between multiple nodes. This makes single-point forecasting less applicable to large-scale, complex pipeline systems, especially in the face of sudden events or significant flow fluctuations, making it difficult to provide timely adjustments and early warnings. With the development of big data and artificial intelligence technologies, more and more research is attempting to utilize machine learning and deep learning algorithms for flow forecasting. Deep neural networks (DNNs) and long short-term memory networks (LSTMs) have shown good capabilities in time-series data forecasting. However, existing deep learning methods mainly focus on single-point data or single models, failing to effectively combine spatial information and collaborative optimization between pipeline network nodes. This results in even if some accuracy is achieved in the prediction of local nodes, it is still difficult to improve the overall prediction accuracy of the pipeline system, especially when there is a strong flow dependency between nodes, where the shortcomings of traditional methods become more apparent.
[0004] Therefore, how to provide a multi-agent-based method for collaborative prediction of multi-point flow in pipeline networks is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] One objective of this invention is to propose a multi-agent-based multi-point flow collaborative prediction method for pipeline networks. This invention improves the accuracy of pipeline network flow prediction by combining a ResNetV2 network and an improved MADDPG model through a multi-agent collaborative optimization method. By employing node encoders, a flow trend sharing mechanism, and a dynamic reward mechanism, the personalized prediction strategy of each node is optimized, achieving network-wide collaborative optimization. Consistency verification and trend smoothing effectively eliminate sudden fluctuations, ensuring stable and accurate flow prediction, significantly improving the prediction accuracy and real-time performance of the pipeline network system, and promoting intelligent management of the pipeline network.
[0006] A multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to an embodiment of the present invention includes the following steps: Step 1: Collect raw pipeline data from each node of the pipeline network, and preprocess the raw pipeline data to obtain a standard pipeline dataset; Step 2: Extract time-series features from the standard pipeline dataset by periodicity and trend decomposition to obtain the pipeline time-series feature vector; Step 3: Input the pipeline network temporal feature vector into the ResNetV2 network to perform spatial feature modeling, and obtain the pipeline network feature vector set; Step 4: Based on the pipeline feature vector set, construct a pipeline feature map by calculating the Manhattan distance between the pipeline feature vectors; Step 5: Input the pipeline feature map into the improved MADDPG model, and make traffic prediction decisions through node encoders, traffic trend sharing mechanisms and dynamic reward mechanisms to obtain the optimal traffic prediction strategy for each pipeline node; Step 6: Verify the consistency of the optimal traffic prediction strategy for each pipeline node and perform trend smoothing to generate the final traffic prediction strategy.
[0007] Optionally, step one specifically includes: By installing multi-source sensors at various nodes in the pipeline network, the raw data of each node in the pipeline network is collected in real time. The raw data of the pipeline network includes flow data, pressure data and temperature data. The temperature data includes the ambient temperature and pipe temperature at the pipeline node, and the multi-source sensor collects the data in real time at set equal time intervals. Data cleaning is performed on the raw pipeline data. The data cleaning includes removing invalid and duplicate data, and identifying and eliminating abnormal data caused by sensor failure or environmental interference. Missing values in the original pipeline network data are filled in using mean interpolation to fill in missing flow, pressure, or temperature data points. The original pipeline data was normalized using the Min-Max normalization method to obtain a standard pipeline dataset.
[0008] Optionally, step two specifically includes: The standard dataset of the pipeline network is decomposed into a trend change component, a seasonal change component, and a residual component. The trend change portion is the time-varying trend of pipeline flow, the seasonal change portion is the periodic fluctuation of pipeline flow with the seasons, and the residual portion is the part of the flow that is not explained by the trend and seasonal changes. Wavelet transforms were applied to the trend change component, seasonal change component, and residual component respectively, and the temporal characteristics of the pipeline network standard dataset were extracted using a multi-scale analysis method. The wavelet transform is used to extract high-frequency and low-frequency components of flow data at different scales, capturing the short-term fluctuations and long-term trends of pipeline flow. The time dependence analysis of the standard dataset of the pipeline network is performed by calculating the autoregressive features to analyze the lag effect of the standard dataset of the pipeline network, and the time series feature vector of the pipeline network is obtained. The regression features include autocorrelation analysis and partial autocorrelation analysis.
[0009] Optionally, step three specifically includes: The pipeline network temporal feature vector is input into a ResNetV2 network for spatial feature modeling. The ResNetV2 network extracts the spatial dependencies between pipeline network nodes layer by layer through multiple convolutional layers and residual connections. The spatial feature modeling includes: The temporal feature vector of each pipeline node is combined with the spatial features of the current pipeline node to form a comprehensive feature vector of the pipeline node. Local features are extracted from the comprehensive feature vector through convolutional layers, and the spatial dependency between each pipeline node and its neighboring pipeline nodes is extracted through the residual connection mechanism. The convolution operation involves the convolution kernel performing spatial feature aggregation on the features of the pipeline node through a sliding window to obtain the convolutional feature map of the pipeline node. The residual connection mechanism involves using the output of the first convolutional layer as the residual input and adding it to the output of the next convolutional operation. The convolutional feature map is processed by max pooling in a pooling layer to reduce its dimensionality, resulting in a pooled feature map. The pooling feature map is input into the fully connected layer, which flattens the pooling feature map into a one-dimensional vector and performs feature fusion through multiple fully connected neurons to obtain the spatiotemporal feature representation of the pipeline node. The spatiotemporal feature representation of the pipeline network nodes is nonlinearly transformed by the ReLU activation function, setting all negative values to zero and keeping positive values unchanged, thus obtaining the pipeline network feature vector set.
[0010] Optionally, step four specifically involves: Each pipeline feature vector in the pipeline feature vector set is used as a node in the pipeline feature graph, thus obtaining the node set of the pipeline feature graph; Based on the node set of the pipeline feature map, undirected edges are established between the nodes. The conditions for establishing the undirected edges include: Calculate the Manhattan distance between every two pipeline feature vectors. If the Manhattan distance is less than a preset distance threshold, establish an edge connection between the corresponding nodes to obtain the edge set of the pipeline feature map. The weight of the undirected edge is the corresponding Manhattan distance; Based on the correspondence between the node set and edge set of the pipeline feature map, construct the pipeline feature map.
[0011] Optionally, the improved MADDPG model specifically refers to: The improved MADDPG model treats each node in the pipeline feature map as an agent; the agent makes flow prediction decisions based on the spatiotemporal characteristics of the current node's flow, pressure, and temperature, combined with the feature information of neighboring nodes. The pipeline feature vector corresponding to each node in the pipeline feature map is input to the node encoder. The node encoder generates a personalized feature representation for each node by dynamically embedding the historical flow data of each node. The personalized feature representation is automatically adjusted according to the historical data of each node. The personalized feature representation is used as the input for each agent. The personalized feature representation of each node and the feature information of neighboring nodes are used to make traffic prediction decisions and optimize traffic prediction through cooperation with neighboring nodes. Through a traffic trend sharing mechanism, each agent optimizes its own traffic prediction strategy by utilizing the traffic trend information of neighboring nodes, thereby generating a shared traffic trend optimization strategy. By optimizing the shared traffic trend optimization strategy through a dynamic reward mechanism, the optimal traffic prediction strategy for each pipeline node in the pipeline feature map is obtained. The dynamic reward mechanism adjusts the reward based on the difference between the traffic prediction error of each node and the prediction error of its neighboring nodes. Specifically, when the difference between the traffic prediction error of a node and the prediction error of its neighboring nodes is less than a preset threshold, the reward increases; when the difference is greater than the preset threshold, the reward increases.
[0012] Optionally, the traffic trend sharing mechanism specifically includes: The flow change trend of each pipeline node is calculated by analyzing the historical flow data of each pipeline node to obtain the flow trend of the pipeline node. The flow trend is obtained by performing trend analysis and periodic decomposition on the historical flow data. Each pipeline node obtains the traffic trend of its neighboring nodes from the neighboring nodes. The traffic trend of the neighboring nodes is the traffic trend extracted by the neighboring nodes based on historical traffic data. Each pipeline node shares the traffic trend information with its neighboring nodes according to the pipeline topology. The node flow trend of each pipeline node and the flow trend of adjacent nodes are merged to form joint flow trend information; Each network node adjusts its own traffic prediction strategy based on the joint traffic trend information to generate a shared traffic trend optimization strategy. The adjustment involves the network node comparing its own traffic trend with the traffic trends of its neighboring nodes to determine whether it needs to adjust its prediction strategy to be consistent with the traffic trends of its neighboring nodes.
[0013] Optionally, step six specifically includes: The optimal flow prediction strategy for each pipeline node is validated for consistency until the prediction results of each pipeline node are consistent with the flow prediction results of its neighboring nodes in both time and space. The consistency verification involves calculating the error between the predicted flow of each pipeline node and the predicted flow of its neighboring nodes, and controlling the error within a preset tolerance range. If the error exceeds the tolerance range, the prediction strategy for the corresponding pipeline node is further optimized. The optimal flow prediction strategy for each pipeline node is subjected to trend smoothing. By analyzing the historical flow trends of each pipeline node, sudden fluctuations in the prediction strategy are smoothed to eliminate abnormal fluctuations caused by sudden events or noisy data, and the final flow prediction strategy is generated.
[0014] The beneficial effects of this invention are: The multi-agent-based multi-point flow collaborative prediction method for pipeline networks proposed in this invention effectively overcomes the limitations of traditional methods in pipeline network flow prediction compared to existing technologies, especially in handling the spatiotemporal dependencies and node collaborative optimization problems of complex pipeline systems. In existing technologies, most flow prediction methods only focus on single-point data, neglecting the spatial dependencies and collaborative relationships between nodes in the pipeline system. This leads to limitations in prediction accuracy and insufficient response to sudden events. In contrast, this invention, through spatiotemporal feature modeling based on ResNetV2 networks and multi-agent collaborative optimization using an improved MADDPG model, can comprehensively capture the spatiotemporal dependencies between nodes in the pipeline system, thereby improving the accuracy and real-time performance of flow prediction.
[0015] This invention introduces a node encoder and a flow trend sharing mechanism, enabling each pipeline node to generate a personalized prediction strategy based on its historical flow data and share flow trend information with neighboring nodes. This mechanism not only optimizes the node's own prediction capabilities but also enables collaborative optimization among nodes, improving the overall flow prediction accuracy of the pipeline system. The introduction of a dynamic reward mechanism, adjusting rewards based on differences in prediction errors between nodes, further promotes collaborative work among nodes, avoids local optima, and ensures overall optimization of the network's flow prediction. Through consistency verification and trend smoothing, this invention effectively eliminates abnormal fluctuations caused by sudden events or noisy data, making the final flow prediction strategy more stable and continuous. Furthermore, this method constructs a pipeline feature map using Manhattan distance, further enhancing the spatial correlation between nodes, allowing the flow prediction model to more accurately reflect the actual flow transmission characteristics between pipeline nodes. This invention, through the combination of multi-agent collaborative optimization and deep learning technology, significantly improves the accuracy, real-time performance, and robustness of pipeline flow prediction. Compared with traditional methods, this invention can not only more accurately predict the flow of individual nodes, but also achieve collaborative optimization among nodes in the pipeline network system, thereby improving the overall operating efficiency and resource scheduling capability of the pipeline network and providing more effective technical support for the intelligent management of the pipeline network. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a multi-agent-based pipeline network multi-point flow collaborative prediction method proposed in this invention; Figure 2 This diagram illustrates the steps of spatial feature modeling for the ResNetV2 network in the multi-agent-based multi-point traffic collaborative prediction method for pipeline networks proposed in this invention. Figure 3 This is a flowchart of the improved MADDPG model processing method for multi-point flow collaborative prediction of pipeline networks based on multi-agent systems, as proposed in this invention. Detailed Implementation
[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0018] refer to Figure 1-3 A multi-agent-based multi-point traffic collaborative prediction method for pipeline networks includes the following steps: Step 1: Collect raw pipeline data from each node of the pipeline network, and preprocess the raw pipeline data to obtain a standard pipeline dataset; Step 2: Extract time-series features from the standard pipeline dataset by periodicity and trend decomposition to obtain the pipeline time-series feature vector; Step 3: Input the pipeline network temporal feature vector into the ResNetV2 network to perform spatial feature modeling, and obtain the pipeline network feature vector set; Step 4: Based on the pipeline feature vector set, construct a pipeline feature map by calculating the Manhattan distance between the pipeline feature vectors; Step 5: Input the pipeline feature map into the improved MADDPG model, and make traffic prediction decisions through node encoders, traffic trend sharing mechanisms and dynamic reward mechanisms to obtain the optimal traffic prediction strategy for each pipeline node; Step 6: Verify the consistency of the optimal traffic prediction strategy for each pipeline node and perform trend smoothing to generate the final traffic prediction strategy.
[0019] In this embodiment, step one specifically includes: By installing multi-source sensors at various nodes in the pipeline network, the raw data of each node in the pipeline network is collected in real time. The raw data of the pipeline network includes flow data, pressure data and temperature data. The temperature data includes the ambient temperature and pipe temperature at the pipeline node, and the multi-source sensor collects the data in real time at set equal time intervals. Data cleaning is performed on the raw pipeline data. The data cleaning includes removing invalid and duplicate data, and identifying and eliminating abnormal data caused by sensor failure or environmental interference. Missing values in the original pipeline network data are filled in using mean interpolation to fill in missing flow, pressure, or temperature data points. The original pipeline data was normalized using the Min-Max normalization method to obtain a standard pipeline dataset.
[0020] In this embodiment, step two specifically includes: The standard dataset of the pipeline network is decomposed into a trend change component, a seasonal change component, and a residual component. The trend change portion is the time-varying trend of pipeline flow, the seasonal change portion is the periodic fluctuation of pipeline flow with the seasons, and the residual portion is the part of the flow that is not explained by the trend and seasonal changes. Wavelet transforms were applied to the trend change component, seasonal change component, and residual component respectively, and the temporal characteristics of the pipeline network standard dataset were extracted using a multi-scale analysis method. The wavelet transform is used to extract high-frequency and low-frequency components of flow data at different scales, capturing the short-term fluctuations and long-term trends of pipeline flow. The time dependence analysis of the standard dataset of the pipeline network is performed by calculating the autoregressive features to analyze the lag effect of the standard dataset of the pipeline network, and the time series feature vector of the pipeline network is obtained. The regression features include autocorrelation analysis and partial autocorrelation analysis.
[0021] This step effectively extracts short-term fluctuations and long-term trends in pipeline flow by performing multi-level time-series decomposition and wavelet transform on the standard pipeline dataset, thus improving the accuracy of flow prediction. By decomposing the data into trend changes, seasonal variations, and residual components, various types of flow fluctuations can be captured more accurately, avoiding the simplistic approach of traditional methods and reducing noise interference. Wavelet transform and multi-scale analysis further enhance the ability to capture high-frequency and low-frequency components, enabling predictions to better reflect actual pipeline flow changes. Combined with autoregressive feature analysis, the time dependence of flow data can be effectively captured, improving the understanding of lag effects and thus enhancing the stability and accuracy of flow prediction. These technical improvements enable this invention to provide more accurate and stable flow predictions in complex pipeline systems, improving the level of intelligence in pipeline management.
[0022] In this embodiment, step three specifically includes: The pipeline network temporal feature vector is input into a ResNetV2 network for spatial feature modeling. The ResNetV2 network extracts the spatial dependencies between pipeline network nodes layer by layer through multiple convolutional layers and residual connections. The spatial feature modeling includes: The temporal feature vector of each pipeline node is combined with the spatial features of the current pipeline node to form a comprehensive feature vector of the pipeline node. Local features are extracted from the comprehensive feature vector through convolutional layers, and the spatial dependency between each pipeline node and its neighboring pipeline nodes is extracted through the residual connection mechanism. The convolution operation involves the convolution kernel performing spatial feature aggregation on the features of the pipeline node through a sliding window to obtain the convolutional feature map of the pipeline node. The residual connection mechanism involves using the output of the first convolutional layer as the residual input and adding it to the output of the next convolutional operation. The convolutional feature map is processed by max pooling in a pooling layer to reduce its dimensionality, resulting in a pooled feature map. The pooling feature map is input into the fully connected layer, which flattens the pooling feature map into a one-dimensional vector and performs feature fusion through multiple fully connected neurons to obtain the spatiotemporal feature representation of the pipeline node. The spatiotemporal feature representation of the pipeline network nodes is nonlinearly transformed by the ReLU activation function, setting all negative values to zero and keeping positive values unchanged, thus obtaining the pipeline network feature vector set.
[0023] This step involves inputting the pipeline network's temporal feature vectors into a ResNetV2 network for spatial feature modeling. This effectively extracts the spatial dependencies between pipeline nodes, thereby improving the accuracy and robustness of traffic prediction. By combining multiple convolutional layers with residual connections, this method can progressively uncover the complex spatial dependencies between each pipeline node and its neighbors, thus optimizing traffic prediction. Convolutional operations aggregate pipeline node features through a sliding window, while pooling layers effectively reduce dimensionality through max pooling, decreasing computational complexity while preserving key information. Fully connected layers further fuse spatial features, and the nonlinear transformation of the ReLU activation function makes the spatiotemporal features of each pipeline node more accurate and stable. The final generated pipeline feature vector set not only reflects the spatiotemporal changes of each node but also effectively captures the interdependencies between nodes, contributing to accurate and collaborative optimization of subsequent traffic prediction and significantly improving the overall performance and accuracy of pipeline traffic prediction.
[0024] In this embodiment, step four specifically includes: Each pipeline feature vector in the pipeline feature vector set is used as a node in the pipeline feature graph, thus obtaining the node set of the pipeline feature graph; Based on the node set of the pipeline feature map, undirected edges are established between the nodes. The conditions for establishing the undirected edges include: Calculate the Manhattan distance between every two pipeline feature vectors. If the Manhattan distance is less than a preset distance threshold, establish an edge connection between the corresponding nodes to obtain the edge set of the pipeline feature map. The weight of the undirected edge is the corresponding Manhattan distance; Based on the correspondence between the node set and edge set of the pipeline feature map, construct the pipeline feature map.
[0025] This step significantly improves the accuracy and collaborative optimization capability of pipeline network flow prediction by constructing a feature graph from the pipeline network feature vector set and establishing undirected edge connections between nodes by calculating Manhattan distance. Each node's feature vector is mapped to a node in the pipeline network feature graph, and the Manhattan distance-based edge connections ensure that the spatial dependencies and similarities between nodes are accurately reflected. The weights of the undirected edges better quantify the connection strength between nodes, thereby enhancing the collaborative effect between nodes during flow prediction. This method effectively improves the expressive power of the pipeline network feature graph, provides more informative input data for subsequent flow prediction models, enhances the global consistency and stability of predictions, and thus improves the accuracy and robustness of pipeline network flow prediction, making it particularly suitable for intelligent prediction and management in complex pipeline network systems.
[0026] In this embodiment, the improved MADDPG model is specifically as follows: The improved MADDPG model treats each node in the pipeline feature map as an agent; the agent makes flow prediction decisions based on the spatiotemporal characteristics of the current node's flow, pressure, and temperature, combined with the feature information of neighboring nodes. The pipeline feature vector corresponding to each node in the pipeline feature map is input to the node encoder. The node encoder generates a personalized feature representation for each node by dynamically embedding the historical flow data of each node. The personalized feature representation is automatically adjusted according to the historical data of each node. The personalized feature representation is used as the input for each agent. The personalized feature representation of each node and the feature information of neighboring nodes are used to make traffic prediction decisions and optimize traffic prediction through cooperation with neighboring nodes. Through a traffic trend sharing mechanism, each agent optimizes its own traffic prediction strategy by utilizing the traffic trend information of neighboring nodes, thereby generating a shared traffic trend optimization strategy. By optimizing the shared traffic trend optimization strategy through a dynamic reward mechanism, the optimal traffic prediction strategy for each pipeline node in the pipeline feature map is obtained. The dynamic reward mechanism adjusts the reward based on the difference between the traffic prediction error of each node and the prediction error of its neighboring nodes. Specifically, when the difference between the traffic prediction error of a node and the prediction error of its neighboring nodes is less than a preset threshold, the reward increases; when the difference is greater than the preset threshold, the reward increases.
[0027] This step utilizes an improved MADDPG model to achieve intelligent collaborative optimization of pipeline network flow forecasting. Each pipeline node acts as an independent intelligent agent, generating personalized forecasting strategies by combining historical flow data and neighboring node information, significantly improving node forecasting accuracy. A flow trend sharing mechanism enables nodes to collaboratively optimize forecasting strategies, further enhancing the accuracy and consistency of network-wide flow forecasting. A dynamic reward mechanism optimizes forecasting strategies by adjusting error differences between nodes, avoiding local optima and ensuring global collaborative optimization of flow forecasting. This method effectively handles the spatiotemporal dependencies between nodes in large-scale, complex pipeline systems, improving flow forecasting accuracy, enhancing system adaptability and robustness, and providing efficient support for intelligent pipeline network management.
[0028] In this embodiment, the traffic trend sharing mechanism is specifically as follows: The flow change trend of each pipeline node is calculated by analyzing the historical flow data of each pipeline node to obtain the flow trend of the pipeline node. The flow trend is obtained by performing trend analysis and periodic decomposition on the historical flow data. Each pipeline node obtains the traffic trend of its neighboring nodes from the neighboring nodes. The traffic trend of the neighboring nodes is the traffic trend extracted by the neighboring nodes based on historical traffic data. Each pipeline node shares the traffic trend information with its neighboring nodes according to the pipeline topology. The node flow trend of each pipeline node and the flow trend of adjacent nodes are merged to form joint flow trend information; Each network node adjusts its own traffic prediction strategy based on the joint traffic trend information to generate a shared traffic trend optimization strategy. The adjustment involves the network node comparing its own traffic trend with the traffic trends of its neighboring nodes to determine whether it needs to adjust its prediction strategy to be consistent with the traffic trends of its neighboring nodes.
[0029] This step calculates the flow trends of pipeline nodes based on historical flow data, and generates the flow trend for each node using trend analysis and periodic decomposition techniques. This method can accurately capture long-term changes and periodic fluctuations in node flow, providing a more accurate basis for flow forecasting. Each pipeline node can also obtain flow trend information from neighboring nodes and share this information through the pipeline topology, thereby achieving collaborative optimization among nodes. By merging the flow trends of each node with those of neighboring nodes, joint flow trend information is generated, further enhancing the global coordination of the forecasting strategy. Nodes adjust according to the merged flow trend information to ensure that the forecasting strategy is consistent with that of neighboring nodes, thereby optimizing the flow forecasting accuracy of the entire pipeline system. This method improves the collaborative capabilities between nodes, making flow forecasting more accurate and stable across the entire network, ultimately achieving intelligent optimization management of pipeline flow.
[0030] In this embodiment, step six specifically includes: The optimal flow prediction strategy for each pipeline node is validated for consistency until the prediction results of each pipeline node are consistent with the flow prediction results of its neighboring nodes in both time and space. The consistency verification involves calculating the error between the predicted flow of each pipeline node and the predicted flow of its neighboring nodes, and controlling the error within a preset tolerance range. If the error exceeds the tolerance range, the prediction strategy for the corresponding pipeline node is further optimized. The optimal flow prediction strategy for each pipeline node is subjected to trend smoothing. By analyzing the historical flow trends of each pipeline node, sudden fluctuations in the prediction strategy are smoothed to eliminate abnormal fluctuations caused by sudden events or noisy data, and the final flow prediction strategy is generated.
[0031] Example 1: To verify the feasibility of this invention in practice, it was applied to a city's water supply network system. Flow prediction in this network is crucial for ensuring the rational allocation and optimized scheduling of water resources, as well as improving network operational efficiency. However, traditional flow prediction methods often rely solely on data from a single node, neglecting the interdependencies between network nodes. This leads to unsatisfactory prediction results during large-scale network operation, especially when flow fluctuations between nodes are significant, making it difficult to effectively predict coordinated flow changes. Therefore, the multi-agent-based multi-point flow collaborative prediction method for water supply networks proposed in this paper utilizes the spatiotemporal characteristics of network nodes for collaborative optimization, significantly improving the accuracy of flow prediction.
[0032] The system comprises 100 flow monitoring nodes, covering the main water supply pipelines in the urban area. Each node is equipped with flow, pressure, and temperature sensors to collect data in real time. The raw pipeline data includes flow rate (m³ / s), pressure (Pascals), and temperature (degrees Celsius). Flow rate is the key monitoring parameter, while pressure and temperature data are used to assist in analyzing the pipeline network's operational status. The system collects raw data from each node in the pipeline network and uses data preprocessing techniques, including data cleaning, outlier repair, missing value imputation, and data standardization, to obtain a standard pipeline dataset. During this process, missing values in the collected flow rate data are imputed using mean interpolation, outliers are removed using the Z-score method, and all data is normalized to ensure data quality and consistency. Time-series feature extraction is performed on the standard pipeline dataset using periodicity and trend decomposition to obtain a pipeline network time-series feature vector. The time-series feature vector for each node contains information on the node's flow trend changes, seasonal fluctuations, and residual components. These time-series feature vectors provide strong data support for subsequent flow prediction. The temporal feature vectors of the pipeline network are input into a ResNetV2 network for spatial feature modeling. The temporal feature vector of each pipeline node is combined with its spatial features (such as flow rate, pressure, and temperature data). Through convolutional layers and residual connections, the spatial dependencies between each node and its neighbors are extracted, generating a spatiotemporal feature representation of the pipeline node. This step fully considers the mutual influence between nodes in the pipeline system, ensuring that each node's prediction not only relies on its own data but also incorporates information from neighboring nodes, enhancing the synergy of flow prediction.
[0033] In the pipeline feature map construction phase, undirected edge connections between nodes are established by calculating the Manhattan distance between pipeline feature vectors, generating the pipeline feature map. The Manhattan distance, as the edge weight, reflects the spatial dependency between nodes. In this step, the similarity of pipeline nodes is quantified as the strength of edge connections, further enhancing the traffic prediction model's ability to capture dependencies between pipeline nodes. The improved MADDPG model uses the pipeline feature map as input and makes traffic prediction decisions through a node encoder, a traffic trend sharing mechanism, and a dynamic reward mechanism. Each pipeline node acts as an agent, optimizing its traffic prediction strategy through collaboration with neighboring nodes. The node encoder generates personalized feature representations for each node, enabling each agent to make personalized predictions based on historical traffic data. The traffic trend sharing mechanism allows each node to utilize the traffic trend information of neighboring nodes to optimize its own prediction strategy, while the dynamic reward mechanism adjusts rewards based on the difference between the node's traffic prediction error and the neighboring node's prediction error, further promoting collaborative optimization among nodes. In the model training phase, through consistency verification and trend smoothing, the traffic prediction strategy of each pipeline node is optimized, resulting in a more stable and accurate traffic prediction strategy. The key advantage of this process is that traffic prediction between nodes is no longer isolated, but fully considers the synergistic effect between nodes, effectively improving prediction accuracy and robustness.
[0034] Table 1 Comparison of Errors in Pipeline Flow Prediction Methods
[0035] As shown in Table 1, the average prediction error using the method of this invention is significantly lower than that of traditional prediction methods, especially during peak periods when pipeline flow fluctuates greatly. Even during off-peak periods, the prediction error is significantly reduced, demonstrating high stability and robustness. This indicates that the method of this invention has a much better flow prediction capability than traditional methods in complex dynamic environments, and can effectively improve the efficiency of pipeline flow scheduling and resource allocation. The ARIMA model is a traditional method based on time series analysis, processing flow data through autoregression and moving average, but its prediction performance is poor, especially during peak periods when pipeline flow fluctuates greatly, resulting in large errors. This method ignores the spatial dependence between pipeline nodes and cannot effectively handle the spatiotemporal changes in complex pipeline systems.
[0036] LSTM (Long Short-Term Memory) networks excel in processing time-series data, handling long-term dependencies. While they offer improved prediction accuracy compared to ARIMA, they still suffer from local optimization issues and fail to consider spatial dependencies between network nodes, resulting in significant prediction errors. Graph neural network-based prediction methods attempt to model spatial dependencies between network nodes using graph neural networks, demonstrating better predictive capabilities, especially when inter-node relationships are strong, leading to reduced prediction errors. However, these methods still do not consider the individualized adjustments of each node and cannot handle dynamic collaborative optimization among nodes in the network system.
[0037] This invention utilizes an improved Multi-Agent Reinforcement Learning (MADDPG) framework, combining node encoders, a traffic trend sharing mechanism, and a dynamic reward mechanism. This method effectively addresses the spatiotemporal dependencies in pipeline systems, optimizes the traffic prediction strategy for each node, and achieves collaborative optimization among nodes. Through traffic trend sharing and dynamic reward adjustment, this method exhibits significantly lower prediction errors during both peak and off-peak periods compared to traditional methods. It demonstrates strong stability and accuracy, especially under conditions of significant traffic fluctuations.
[0038] 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 equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A multi-agent-based multi-point flow collaborative prediction method for pipeline networks, characterized in that, Includes the following steps: Step 1: Collect raw pipeline data from each node of the pipeline network, and preprocess the raw pipeline data to obtain a standard pipeline dataset; Step 2: Extract time-series features from the standard pipeline dataset by periodicity and trend decomposition to obtain the pipeline time-series feature vector; Step 3: Input the pipeline network temporal feature vector into the ResNetV2 network for spatial feature modeling to obtain the pipeline network feature vector set; Step 4: Based on the pipeline feature vector set, construct a pipeline feature map by calculating the Manhattan distance between the pipeline feature vectors; Step 5: Input the pipeline feature map into the improved MADDPG model, and make traffic prediction decisions through node encoders, traffic trend sharing mechanisms and dynamic reward mechanisms to obtain the optimal traffic prediction strategy for each pipeline node; Step 6: Verify the consistency of the optimal traffic prediction strategy for each pipeline node and perform trend smoothing to generate the final traffic prediction strategy.
2. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, Step one specifically involves: By installing multi-source sensors at various nodes in the pipeline network, the raw data of each node in the pipeline network is collected in real time. The raw data of the pipeline network includes flow data, pressure data and temperature data. The temperature data includes the ambient temperature and pipe temperature at the pipeline node, and the multi-source sensor collects the data in real time at set equal time intervals. Data cleaning is performed on the raw pipeline data. The data cleaning includes removing invalid and duplicate data, and identifying and eliminating abnormal data caused by sensor failure or environmental interference. Missing values in the original pipeline network data are filled in using mean interpolation to fill in missing flow, pressure, or temperature data points. The original pipeline data was normalized using the Min-Max normalization method to obtain a standard pipeline dataset.
3. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, Step two specifically involves: The standard dataset of the pipeline network is decomposed into a trend change component, a seasonal change component, and a residual component. The trend change portion is the time-varying trend of pipeline flow, the seasonal change portion is the periodic fluctuation of pipeline flow with the seasons, and the residual portion is the part of the flow that is not explained by the trend and seasonal changes. Wavelet transforms were applied to the trend change component, seasonal change component, and residual component respectively, and the temporal characteristics of the pipeline network standard dataset were extracted using a multi-scale analysis method. The wavelet transform is used to extract high-frequency and low-frequency components of flow data at different scales, capturing the short-term fluctuations and long-term trends of pipeline flow. The time dependence analysis of the standard dataset of the pipeline network is performed by calculating the autoregressive features to analyze the lag effect of the standard dataset of the pipeline network, and the time series feature vector of the pipeline network is obtained. The regression features include autocorrelation analysis and partial autocorrelation analysis.
4. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, Step three specifically involves: The pipeline network temporal feature vector is input into a ResNetV2 network for spatial feature modeling. The ResNetV2 network extracts the spatial dependencies between pipeline network nodes layer by layer through multiple convolutional layers and residual connections. The spatial feature modeling includes: The temporal feature vector of each pipeline node is combined with the spatial features of the current pipeline node to form a comprehensive feature vector of the pipeline node. Local features are extracted from the comprehensive feature vector through convolutional layers, and the spatial dependency between each pipeline node and its neighboring pipeline nodes is extracted through the residual connection mechanism. The convolution operation involves the convolution kernel performing spatial feature aggregation on the features of the pipeline node through a sliding window to obtain the convolutional feature map of the pipeline node. The residual connection mechanism involves using the output of the first convolutional layer as the residual input and adding it to the output of the next convolutional operation. The convolutional feature map is processed by max pooling in a pooling layer to reduce its dimensionality, resulting in a pooled feature map. The pooling feature map is input into the fully connected layer, which flattens the pooling feature map into a one-dimensional vector and performs feature fusion through multiple fully connected neurons to obtain the spatiotemporal feature representation of the pipeline node. The spatiotemporal feature representation of the pipeline network nodes is nonlinearly transformed by the ReLU activation function, setting all negative values to zero and keeping positive values unchanged, thus obtaining the pipeline network feature vector set.
5. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, Step four specifically involves: Each pipeline feature vector in the pipeline feature vector set is used as a node in the pipeline feature graph, thus obtaining the node set of the pipeline feature graph; Based on the node set of the pipeline feature map, undirected edges are established between the nodes. The conditions for establishing the undirected edges include: Calculate the Manhattan distance between every two pipeline feature vectors. If the Manhattan distance is less than a preset distance threshold, establish an edge connection between the corresponding nodes to obtain the edge set of the pipeline feature map. The weight of the undirected edge is the corresponding Manhattan distance; Based on the correspondence between the node set and edge set of the pipeline feature map, construct the pipeline feature map.
6. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, The improved MADDPG model is specifically as follows: The improved MADDPG model treats each node in the pipeline feature map as an agent; the agent makes flow prediction decisions based on the spatiotemporal characteristics of the current node's flow, pressure, and temperature, combined with the feature information of neighboring nodes. The pipeline feature vector corresponding to each node in the pipeline feature map is input to the node encoder. The node encoder generates a personalized feature representation for each node by dynamically embedding the historical flow data of each node. The personalized feature representation is automatically adjusted according to the historical data of each node. The personalized feature representation is used as the input for each agent. The personalized feature representation of each node and the feature information of neighboring nodes are used to make traffic prediction decisions and optimize traffic prediction through cooperation with neighboring nodes. Through a traffic trend sharing mechanism, each agent optimizes its own traffic prediction strategy by utilizing the traffic trend information of neighboring nodes, thereby generating a shared traffic trend optimization strategy. By optimizing the shared traffic trend optimization strategy through a dynamic reward mechanism, the optimal traffic prediction strategy for each pipeline node in the pipeline feature map is obtained. The dynamic reward mechanism adjusts the reward based on the difference between the traffic prediction error of each node and the prediction error of its neighboring nodes. Specifically, when the difference between the traffic prediction error of a node and the prediction error of its neighboring nodes is less than a preset threshold, the reward increases; when the difference is greater than the preset threshold, the reward increases.
7. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, The traffic trend sharing mechanism is specifically as follows: The flow change trend of each pipeline node is calculated by analyzing the historical flow data of each pipeline node to obtain the flow trend of the pipeline node. The flow trend is obtained by performing trend analysis and periodic decomposition on the historical flow data. Each pipeline node obtains the traffic trend of its neighboring nodes from the neighboring nodes. The traffic trend of the neighboring nodes is the traffic trend extracted by the neighboring nodes based on historical traffic data. Each pipeline node shares the traffic trend information with its neighboring nodes according to the pipeline topology. The node flow trend of each pipeline node and the flow trend of adjacent nodes are merged to form joint flow trend information; Each network node adjusts its own traffic prediction strategy based on the joint traffic trend information to generate a shared traffic trend optimization strategy. The adjustment involves the network node comparing its own traffic trend with the traffic trends of its neighboring nodes to determine whether it needs to adjust its prediction strategy to be consistent with the traffic trends of its neighboring nodes.
8. The multi-agent-based multi-point flow collaborative prediction method for pipeline networks according to claim 1, characterized in that, Step six specifically involves: The optimal flow prediction strategy for each pipeline node is validated for consistency until the prediction results of each pipeline node are consistent with the flow prediction results of its neighboring nodes in both time and space. The consistency verification involves calculating the error between the predicted flow of each pipeline node and the predicted flow of its neighboring nodes, and controlling the error within a preset tolerance range. If the error exceeds the tolerance range, the prediction strategy for the corresponding pipeline node is further optimized. The optimal flow prediction strategy for each pipeline node is subjected to trend smoothing. By analyzing the historical flow trends of each pipeline node, sudden fluctuations in the prediction strategy are smoothed to eliminate abnormal fluctuations caused by sudden events or noisy data, and the final flow prediction strategy is generated.