Water supply network water quality prediction method and system based on big data analysis

By constructing a source water ratio matrix and a multi-component spatiotemporal graph convolutional network, the water quality of the water supply network is decoupled and predicted, solving the problem of water quality prediction accuracy in multi-source areas and achieving high-precision and physically interpretable mixed water quality prediction.

CN121658840APending Publication Date: 2026-03-13PIPE NETWORK MANAGEMENT BRANCH OF BEIJING WATERWORKS GRP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-09
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing water quality prediction models for water supply networks cannot effectively distinguish and model the mixing process of water bodies from different sources in multi-source areas, resulting in decreased prediction accuracy, especially when the proportion of water sources changes dynamically, they cannot provide high-precision predictions.

Method used

By acquiring pipeline topology, historical hydraulic data, and water source information, a source-water ratio matrix is ​​constructed. Historical water quality data is decoupled as the initial component features, and a multi-component spatiotemporal graph convolutional network is used for independent evolution and derivation. Finally, a weighted mixture is used to generate a water quality prediction vector.

Benefits of technology

It achieves high-precision water quality prediction in multi-source water supply areas, provides physically interpretable and accurate mixed water quality prediction results, and solves the prediction bottleneck of traditional models in multi-source water areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121658840A_ABST
    Figure CN121658840A_ABST
Patent Text Reader

Abstract

The invention relates to the field of water quality prediction, and particularly discloses a water supply pipe network water quality prediction method and system based on big data analysis. The input mixed water quality signal is decoupled into a plurality of independent component branches in one-to-one correspondence with the water sources on the characteristic level. And then, through a time-space diagram convolutional network sharing parameters, parallel and independent evolution derivation is carried out on each component flow, so that pervasive transportation and attenuation laws followed by different source water in a pipe network can be respectively captured, and the fundamental defect that a traditional single model cannot be distinguished and processed is overcome. Finally, all independently predicted future component states are subjected to self-adaptive nonlinear fusion with definite physical significance according to the accurate volume ratio of the future component states at the target point, so that a final mixed water quality prediction result with physical interpretability and high precision is generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water quality prediction, and more specifically, to a method and system for predicting water quality in water supply networks based on big data analysis. Background Technology

[0002] As a critical infrastructure ensuring the normal operation of cities and the quality of life for residents, the safe, stable, and efficient operation of water supply networks is of paramount importance. Water quality safety is the core objective of water supply system management, directly impacting public health and social well-being. Within the vast and complex network, tap water, after leaving the water treatment plant, undergoes long-distance, multi-path distribution, resulting in dynamic changes in water quality (such as residual chlorine concentration and turbidity) due to factors like reactions on the pipe walls and the aging of the water. Traditional monitoring methods, relying on manual, fixed-point, and timed sampling, suffer from information lag, narrow coverage, and insufficient early warning capabilities, making it difficult to respond to sudden water pollution incidents or meet the needs of refined water management.

[0003] With the development of big data and artificial intelligence technologies, water quality prediction using massive amounts of historical operational data has become possible. Early prediction methods were mainly based on mechanistic models, simulating water quality using complex hydraulic and hydrodynamic equations. However, these methods were difficult to calibrate parameters, computationally expensive, and unsuitable for real-time prediction of large-scale pipe networks. Subsequently, data-driven methods, represented by time series models (such as LSTM) and graph neural networks, emerged. These methods improved prediction accuracy to some extent, but existing technologies revealed a fundamental technical bottleneck when dealing with specific and widespread pipe network scenarios: in complex water supply areas with multiple water sources (such as different water plants), existing models cannot effectively distinguish and model the mixing process of water bodies from different sources. Specifically, existing models typically treat the monitored water quality at any node in the pipe network as an indivisible whole signal. However, at the mixing point in a multi-source water supply area, this signal is actually a macroscopic manifestation of multiple water masses from different sources, with different initial water qualities, and undergoing different transport paths and attenuation processes. Existing models lack information about the composition of water sources at the input feature level, leading them to attempt to fit a complex nonlinear phenomenon consisting of multiple independent physical processes using a uniform, averaged pattern. This fundamentally limits the model's representation ability and prediction accuracy, especially when the proportion of water sources changes dynamically, resulting in a significant drop in prediction performance.

[0004] Therefore, an optimized water quality prediction scheme for water supply networks based on big data analysis is desired. Summary of the Invention

[0005] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and system for predicting water quality in water supply networks based on big data analysis.

[0006] According to one aspect of this application, a method for predicting water quality in a water supply network based on big data analysis is provided, comprising: Acquire pipeline network topology, historical hydraulic data, water source information, and historical water quality data; Based on the pipeline network topology, historical hydraulic data, and water source information, a source water ratio matrix is ​​constructed. Based on the source water ratio matrix, historical water quality data is decoupled and component features are initialized to obtain initial component features. Based on the pipeline network topology, a static adjacency matrix is ​​constructed. Multi-component spatiotemporal graph convolution propagation is performed on the static adjacency matrix and initial component features to obtain the predicted component states; The predicted component states and source water proportion matrix are weighted and mixed based on proportions to generate the final prediction vector.

[0007] According to another aspect of this application, a water quality prediction system for water supply networks based on big data analysis is provided, comprising: The data acquisition module is used to acquire pipeline topology, historical hydraulic data, water source information, and historical water quality data; The source water ratio matrix construction module is used to construct a source water ratio matrix based on the pipeline network topology, historical hydraulic data, and water source information. The historical water quality component feature initialization module is used to decouple historical water quality data and initialize component features based on the source water proportion matrix to obtain initial component features; The pipeline topology adjacency module is used to construct a static adjacency matrix based on the pipeline topology structure. The multi-component spatiotemporal prediction module is used to perform multi-component spatiotemporal graph convolution propagation on the static adjacency matrix and initial component features to obtain the predicted component state; The water quality prediction module is used to perform a proportion-based weighted mixing of the predicted component states and the source water proportion matrix to generate the final prediction vector.

[0008] Compared with existing technologies, this application provides a water quality prediction method and system for water supply networks based on big data analysis. First, it utilizes a network hydraulic model to quantify the dynamic water source composition ratio at each node. Based on this physical model, it decouples the input mixed water quality signal at the feature level into multiple independent component flows corresponding one-to-one with each water source. Subsequently, through a spatiotemporal graph convolutional network with shared parameters, it performs parallel and independent evolutionary derivation for each component flow, thereby capturing the universal transport and attenuation laws followed by different water sources in the network, overcoming the fundamental deficiency of traditional single models in their inability to differentiate and process these components. Finally, it performs an adaptive nonlinear fusion of all independently predicted future component states based on their precise volume proportions at the target point, resulting in a physically meaningful final mixed water quality prediction result that combines physical interpretability with high accuracy. Attached Figure Description

[0009] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0010] Figure 1 This is a flowchart of a water quality prediction method for water supply networks based on big data analysis according to an embodiment of this application; Figure 2 This is a data flow diagram of a water quality prediction method for water supply networks based on big data analysis according to an embodiment of this application; Figure 3 This is a flowchart illustrating the process of decoupling historical water quality data and initializing component features based on the source water ratio matrix in the water supply network water quality prediction method based on big data analysis according to the embodiments of this application, to obtain initial component features. Figure 4 This is a flowchart illustrating the process of generating a final prediction vector by performing a weighted mixing of the predicted component state and the source water ratio matrix based on a big data analysis method for predicting water quality in a water supply network according to an embodiment of this application. Figure 5 This is a block diagram of a water quality prediction system for a water supply network based on big data analysis, according to an embodiment of this application. Detailed Implementation

[0011] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0012] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0013] While this application makes various references to certain modules of the systems according to embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The modules described are merely illustrative, and different aspects of the systems and methods may use different modules.

[0014] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0015] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0016] Water quality prediction at multiple water source mixing points in current water supply networks faces the challenge of traditional models failing to effectively distinguish and model the complex interactions between water bodies from different sources. This solution proposes a big data analytics-based water quality prediction method for water supply networks, aiming to fundamentally address this problem. First, it precisely obtains the source water proportion matrix for each node at different times through fine calibration and simulation of the network's hydraulic model. Then, based on this proportion matrix, historical water quality data is decoupled into a series of initial component features, laying the foundation for the independent evolution of each water source component at the node. These initial features, combined with the network's static adjacency matrix, are fed into a weight-shared multi-component spatiotemporal graph convolution module for parallel propagation. This design allows each component to independently learn its own spatiotemporal evolution while still adhering to the overall physical consistency of the network. Finally, by introducing hybrid context feature interaction, interactive attention weights, and gated confidence scores, an adaptive nonlinear fusion of the independent predicted component states and source water proportions is performed, generating a final prediction vector that is both physically interpretable and highly accurate.

[0017] The technical solution of this application proposes a method for predicting water quality in water supply networks based on big data analysis. Figure 1This is a flowchart of a water quality prediction method for water supply networks based on big data analysis, according to an embodiment of this application. Figure 2 This is a data flow diagram illustrating the water quality prediction method for water supply networks based on big data analysis according to an embodiment of this application. Figure 1 and Figure 2 As shown, the water quality prediction method for water supply networks based on big data analysis according to an embodiment of this application includes the following steps: S100, acquiring network topology, historical hydraulic data, water source information, and historical water quality data; S200, constructing a source-water ratio matrix based on network topology, historical hydraulic data, and water source information; S300, performing historical data decoupling and component feature initialization on historical water quality data based on the source-water ratio matrix to obtain initial component features; S400, constructing a static adjacency matrix based on network topology; S500, performing multi-component spatiotemporal graph convolution propagation on the static adjacency matrix and initial component features to obtain predicted component states; S600, performing a weighted mixing based on ratio and final prediction generation on the predicted component states and the source-water ratio matrix to obtain a final prediction vector.

[0018] Specifically, in step S100, the pipeline network topology, historical hydraulic data, water source information, and historical water quality data are acquired. It should be understood that, since a water supply network is a complex physical system, its water quality changes are influenced by the static physical structure, dynamic hydraulic operation, and water source. Any predictions made without this fundamental information will lack physical basis and data support, leading to inefficient or ineffective prediction models. Therefore, in the technical solution of this application, by acquiring the pipeline network topology, historical hydraulic data, water source information, and historical water quality data, a comprehensive and accurate digital twin foundation is established, providing the necessary context and training signals for subsequent water source tracing, component data decoupling, and training of the spatiotemporal graph convolutional network. This ensures that the model faithfully reflects the physicochemical processes of the real world, achieving accurate water quality prediction.

[0019] More specifically, the implementation process of this acquisition includes: The pipeline network topology is digitally collected and stored using a geographic information system (GIS) or specialized hydraulic modeling software, accurately describing physical components such as pipes, nodes, pumps, and valves, and their connections. Historical hydraulic data is continuously collected through online sensors (such as pressure gauges and flow meters) and SCADA (Supervisory Control and Data Acquisition) systems, recording flow rate, pressure, pump operating status, and user water demand at each time step. Water source information is defined based on the actual geographical location and supply range of the water plant or main water supply point, and its corresponding node ID in the pipeline network topology is clearly identified. Historical water quality data is obtained through real-time monitoring using online water quality sensors (such as residual chlorine, turbidity, and pH sensors) deployed at key locations in the pipeline network, supplemented by periodic manual sampling and laboratory testing results. In a specific example of this application, the pipeline topology is obtained by importing an EPANET.inp file containing 2,000 pipes and 1,500 nodes; historical hydraulic data includes data collected hourly from 100 pressure sensors and 50 flow meters over the past year, as well as pump station operation logs for the corresponding periods; water source information clearly identifies the outlet of water plant A and the main pipeline inlet of water plant B as two independent water sources; historical water quality data covers residual chlorine concentration and turbidity data obtained hourly from 30 key monitoring points over the past year.

[0020] Specifically, in step S200, a source-water ratio matrix is ​​constructed based on the pipeline network topology, historical hydraulic data, and water source information. It should be understood that in the mixed area of ​​a multi-source water supply network, the instantaneous water quality at any node is a macroscopic manifestation of water bodies from different sources mixed in a specific ratio. If this mixing ratio is unknown, subsequent prediction models cannot physically decouple and model the mixing process, resulting in only fuzzy and uninterpretable fitting. Therefore, in the technical solution of this application, a source-water ratio matrix is ​​further constructed based on the pipeline network topology, historical hydraulic data, and water source information to quantitatively characterize the water source composition at any location and time within the pipeline network. This provides an accurate, dynamic, and physically realistic quantitative basis for subsequent feature decoupling and weighted fusion of prediction results.

[0021] More specifically, in this embodiment of the application, a source-water ratio matrix is ​​constructed based on the pipeline network topology, historical hydraulic data, and water source information, including: calibrating the pipeline network hydraulic model based on the pipeline network topology and historical hydraulic data to obtain a calibrated model file and simulation input dataset; performing parallel simulation based on water source information, the calibrated model file, and simulation input dataset to obtain an original tracking report set; and parsing and aligning the original tracking report set to obtain the source-water ratio matrix.

[0022] Accordingly, the hydraulic model of the pipeline network is calibrated based on the pipeline network topology and historical hydraulic data to obtain a calibrated model file and simulation input dataset. It should be understood that because the original hydraulic model built solely based on design drawings has parameters (such as pipe roughness) that deviate from the actual physical state of the pipeline network after years of operation, and user water usage patterns are difficult to accurately preset, directly using such a model for simulation will lead to distortion in the calculation results of water flow path, velocity, and water age. Therefore, in the technical solution of this application, the hydraulic model of the pipeline network is further calibrated based on the pipeline network topology and historical hydraulic data to obtain a calibrated model file and simulation input dataset. This systematically corrects the model parameters, ensuring that the dynamic simulation behavior of the model highly matches the historical operating conditions of the pipeline network. This provides a validated, high-fidelity digital twin foundation for subsequent source water tracing simulations, fundamentally ensuring that the calculation of the source water proportion matrix is ​​based on an accurate hydraulic transport and distribution process.

[0023] More specifically, the calibration process begins by constructing a preliminary hydraulic model that includes the pipeline network topology and initial parameters. Then, an automated iterative optimization loop is initiated. In each iteration, historical operational data (such as pump start-up and shutdown records and valve control records) is used to drive the model's simulation. The simulated output values ​​of key nodes, such as pressure and flow rate, are compared with historical measured data from the same period to calculate the error. Next, an optimization engine, such as a genetic algorithm, is used to automatically adjust uncertain parameters in the model, such as the Hassen-Williams roughness coefficient of the pipeline or the water usage pattern multipliers for users in different areas, with the goal of minimizing this error. This loop continues until the simulation error converges to within a preset threshold. Finally, the optimized model is saved as a calibrated model file, and the historical data used to drive the simulation is organized into a formatted simulation input dataset. In a specific example of this application, an EPANET model containing 2000 pipes and 1500 nodes uses measured hourly data from 100 pressure sensors over the past year as the calibration target. The roughness coefficients of the five groups of pipes divided by pipe age in the model were adjusted using a genetic algorithm. Through hundreds of iterations of simulation, the average absolute error between the simulated pressure and the measured pressure was reduced to less than 0.5 meters. The model obtained at this point is the calibrated model file. The corresponding one-year historical operating data was organized into 365 daily simulation input files, forming the simulation input dataset.

[0024] Accordingly, parallel simulations are performed based on water source information, calibrated model files, and simulation input datasets to obtain the original tracking report set. It should be understood that while a calibrated model can accurately simulate hydraulic behavior, it does not directly provide information about the composition of water sources. To quantify the independent contribution of each water source to the water quality at various points in the pipeline network, a dedicated and independent simulation of the transport path and influence range of each water source is necessary. Therefore, in the technical solution of this application, parallel simulations are further performed based on water source information, calibrated model files, and simulation input datasets to obtain the original tracking report set, thereby generating a complete water transport trajectory record covering the entire historical cycle for each water source. This decomposes a complex, multi-source coupled physical process into a set of multiple independent, quantifiable single-source influence processes, providing a raw, unprocessed data foundation for the final accurate construction of the source-water ratio matrix.

[0025] More specifically, a batch simulation framework is first established, capable of automatically scheduling and executing large-scale simulation tasks. Then, for each defined independent water source, an independent simulation sequence is initiated. In this sequence, the simulation program loads the calibrated model file and sets the hydraulic boundary conditions chronologically (e.g., daily) based on the simulation input dataset. In each independent simulation run, the water quality module of the hydraulic model is configured in source tracking mode, and the tracking target is uniquely specified as the water source corresponding to the current sequence. This process is executed in parallel for all water sources to improve computational efficiency. After each simulation, the system generates a detailed report file containing the percentage contribution of that water source to the water volume of all nodes in the pipeline network during the simulation period. After all simulation tasks are completed, these generated report files together constitute the original tracking report set. In a specific example of this application, a Python script and the EPANETOWA-Toolkit programming interface are used to automate the simulation execution. This script initiates independent simulation processes for two water sources, water plant A and water plant B. For Water Plant A, the script continuously loads 365 daily simulation input files. After each load, it sets the model's water quality tracking target to the outlet node ID of Water Plant A via an API call, then runs a 24-hour simulation and saves the output report. The exact same process is executed for Water Plant B. Because these two processes are independent, they are distributed across different processor cores for parallel execution. Ultimately, after the calculations are complete, 730 independent, detailed original tracking report files documenting the contribution of each water source are generated.

[0026] Accordingly, the original tracking report set is parsed and aligned to obtain the source-water ratio matrix. It should be understood that the original tracking report set generated by parallel simulation is a large amount of unstructured data stored in text format, scattered according to simulation tasks and water sources. It contains a large amount of simulation logs and metadata, which cannot be directly used by subsequent machine learning models and must undergo a formatted and structured processing process. Therefore, in the technical solution of this application, the original tracking report set is further parsed and aligned to obtain the source-water ratio matrix. This allows for the accurate extraction of core water source ratio data from the massive amount of original text reports, and the data is organized and aligned according to a unified node, time, and water source dimension. This transforms the scattered and disordered simulation results into a regular, compact, and easily indexable numerical tensor, providing a standardized, ready-to-use data interface for all subsequent calculation steps requiring water source ratio information.

[0027] More specifically, the implementation process begins with developing a dedicated report parser. This parser utilizes regular expressions or high-precision string matching algorithms to accurately identify and extract the tracking percentage values ​​for each pipeline node at each time step in the report files. Subsequently, a three-dimensional zero matrix conforming to the target dimensions (total number of nodes × total number of time steps × total number of water sources) is initialized as a data container. Next, an automated script iterates through each file in the original tracking report set, identifying the corresponding water source and time period based on the filename, calling the report parser to extract data, and precisely filling the extracted proportion values ​​(after conversion from percentage to decimal) into the corresponding positions in the three-dimensional matrix. After filling, to ensure the completeness of the physical meaning, the matrix is ​​normalized to ensure that the sum of the proportions of all water sources is strictly equal to 1 at any node and at any time. The resulting normalized three-dimensional matrix is ​​the source-water proportion matrix. In a specific example of this application, a Python script combined with the Pandas library is used for data processing. This script first creates an empty NumPy array with dimensions (1500, 8760, 2). The script then iterates through the folder containing 730 report files, parsing each filename to determine its corresponding water source (A or B) and date. For each file, the script reads line by line, using predefined regular expressions to match and extract the tracking percentages of all 1500 nodes across 24 time steps, and populates this data into the correct positions in a NumPy array. After all files have been processed, normalization is performed on the last dimension of the entire array (the water source dimension) to ensure that the sum of the proportions of the two water sources at each (node, time) position is 1, thus generating the final source-water ratio matrix.

[0028] Specifically, in step S300, based on the source water ratio matrix, historical water quality data is decoupled and component features are initialized to obtain initial component features. It should be understood that since the original historical water quality monitoring data are macroscopic measurements of the mixture of various water sources, they do not contain explicit information about the state of each independent component. Subsequent prediction models require separate component features corresponding to each water source as input to perform independent spatiotemporal evolution. Therefore, in the technical solution of this application, historical water quality data is further decoupled and component features are initialized based on the source water ratio matrix to obtain initial component features. This transforms a single, mixed observation data stream into a multi-channel parallel feature structure representing the contributions of different water sources. This provides a structured, information-aligned input for the subsequent multi-component spatiotemporal graph convolutional network, thereby initiating an end-to-end learning process from the decoupled state to the prediction state.

[0029] Figure 3 This is a flowchart illustrating the process of decoupling historical water quality data and initializing component features based on the source water ratio matrix in a water supply network water quality prediction method based on big data analysis, according to an embodiment of this application, to obtain initial component features. For example... Figure 3 As shown, step S300 includes: S310, defining the feature tensor structure and dividing the node type set for historical water quality data, water source information, and pipeline metadata to obtain an initialized component feature tensor, a set of water source nodes, and a set of non-water source nodes; S320, precisely assigning values ​​to the initialized component feature tensor based on the set of water source nodes, historical water quality data, and water source information to obtain a partially filled component feature tensor; S330, broadcasting the non-water source node component features to the partially filled component feature tensor based on the set of non-water source nodes and historical water quality data to obtain the initial component features.

[0030] More specifically, the process of decoupling historical water quality data and initializing component features involves first defining the feature tensor structure and dividing the node type set for historical water quality data, water source information, and pipeline metadata. This involves creating a four-dimensional zero tensor with dimensions of (total number of nodes × total number of time steps × total number of water sources × number of features), and dividing all pipeline nodes into a water source node set and a non-water source node set based on the water source information. Then, based on the water source node set, historical water quality data, and water source information, the initialized component feature tensor is precisely assigned values. For each water source node, only its corresponding water source channel is filled with its historical measured water quality data, while other water source channels remain zero, resulting in a partially filled component feature tensor. Finally, based on the non-water source node set and historical water quality data, the partially filled component feature tensor is broadcast-filled with non-water source node component features. That is, for all non-water source nodes, their mixed measured water quality data values ​​are simultaneously filled into all water source channels corresponding to that node, ultimately generating complete initial component features. In a specific example of this application, a zero-value tensor with dimensions (1500, 8760, 2, 1) is first created, and the outlet nodes of water plants A and B are assigned to the water source node set, while the remaining 1498 nodes are assigned to the non-water source node set. Next, for the outlet node of water plant A, its 8760 historical hourly residual chlorine data are filled into the first water source channel (index 0) corresponding to that node in the tensor, while the second channel (index 1) remains zero; a similar operation is performed for water plant B. Finally, for any of the remaining 1498 non-water source nodes, its 8760 historical hourly residual chlorine data are simultaneously copied and filled into the first and second water source channels corresponding to that node, thus completing the construction of the initial component feature tensor.

[0031] Specifically, in step S400, a static adjacency matrix is ​​constructed based on the pipeline network topology. It should be understood that since the propagation and evolution of water quality within the pipeline network strictly follows the physical connection paths of the pipes, the water quality state of a node is directly affected by its physically adjacent nodes. Without a mathematical description of this spatial adjacency relationship, subsequent graph convolutional models will be unable to effectively aggregate and propagate information. Therefore, in the technical solution of this application, a static adjacency matrix is ​​further constructed based on the pipeline network topology to create a graph-theoretic structured representation of the entire water supply network. Nodes represent pipeline intersections, water tanks, etc., and edges represent physical pipes. This provides a necessary input defining the spatial relationships between nodes for subsequent multi-component spatiotemporal graph convolutional networks, enabling them to perform feature learning and state prediction along the actual pipeline network paths.

[0032] The construction process begins by parsing the network topology data to obtain a list containing all node IDs and a list containing all pipe connections, where each connection explicitly identifies the IDs of the two connected nodes. Next, a zero-based square matrix is ​​created based on the total number of nodes. Then, each unique node ID is assigned an integer index starting from 0, and a mapping from ID to index is established. Finally, all pipe connections are traversed, and for each pipe connecting node A and node B, the corresponding index is found using the mapping. and and in the square formation and A value of 1 is assigned to a position to indicate a physical connection between the two nodes. After traversing all pipelines, this matrix is ​​the desired static adjacency matrix. In a specific example of this application, the [PIPES] and [JUNCTIONS] sections of the EPANET .inp file, which contains 2000 pipelines and 1500 nodes, are first parsed. A 1500×1500 zero matrix is ​​created based on the 1500 nodes. Then, a mapping dictionary to integer indices (0 to 1499) is built for the 1500 node IDs (e.g., J101, ReservoirA). Finally, the [PIPES] section is read line by line, and for each line describing a pipeline and the two node IDs it connects to, their indices in the dictionary are looked up. and and in the corresponding positions of the 1500×1500 matrix. and The value is set to 1. After all 2000 pipelines have been processed, the resulting binary symmetric matrix is ​​the static adjacency matrix.

[0033] Specifically, in step S500, multi-component spatiotemporal graph convolution propagation is performed on the static adjacency matrix and initial component features to obtain the predicted component states. It should be understood that since the initial component features are merely snapshots of historical data, they themselves do not possess the ability to predict the future. Furthermore, the evolution of water quality is a complex process involving both temporal decay and spatial propagation, requiring a model capable of simultaneously capturing these two dependencies. Each water source component is processed independently to maintain decoupling. Therefore, in the technical solution of this application, multi-component spatiotemporal graph convolution propagation is further performed on the static adjacency matrix and initial component features to obtain the predicted component states. This allows for end-to-end learning and simulation of the spatiotemporal evolution of each independent water source component on the pipeline topology, i.e., the decay of water quality over time and its spatial propagation along the pipeline. This generates a set of independent future state predictions that precisely correspond to each water source, providing a core, decoupled predictive input for the final physical mixing step.

[0034] More specifically, in the embodiments of this application, multi-component spatiotemporal graph convolution propagation is performed on the static adjacency matrix and initial component features to obtain the predicted component state, including: demultiplexing the component data stream of the initial component features to obtain a parallel component data stream; inputting the parallel component data stream and the static adjacency matrix into the spatiotemporal graph convolution module to obtain the evolved component data stream; and reconstructing the predicted component state on the evolved component data stream to obtain the predicted component state.

[0035] Accordingly, the initial component features are demultiplexed into component data streams to obtain parallel component data streams. It should be understood that since the initial component feature tensor is a four-dimensional tensor that reuses all water source information in the same data structure, and the subsequent spatiotemporal evolution module is designed to process each water source independently and in parallel, this reuse format does not match the input requirements of the computation module. Therefore, in the technical solution of this application, the initial component features are further demultiplexed into component data streams to obtain parallel component data streams, thereby accurately decomposing a unified, multi-source input tensor into a set of independent spatiotemporal data streams, each corresponding to a single water source. This provides correctly formatted and information-independent input for subsequent parallel evolution computation, ensuring that each water source component can enter its dedicated computation pipeline, thus achieving true decoupled propagation.

[0036] More specifically, this demultiplexing process is implemented based on a standard tensor slicing operation. First, the dimension representing the water source in the initial four-dimensional tensor of component features is determined. Then, iterative slicing is performed along this dimension, and for each water source index, its corresponding three-dimensional sub-tensor is extracted. This sub-tensor completely contains the feature information of the single water source at all nodes and all historical time steps. After all slicing operations are completed, the resulting multiple three-dimensional sub-tensors are organized into a list or set, which is the parallel component data stream. In a specific example of this application, the input initial component features are a four-dimensional tensor with dimensions (1500, 12, 2, 1). The demultiplexing operation is performed along the third dimension (the water source dimension, with a length of 2). First, the slice with index 0 in this dimension is extracted, resulting in a three-dimensional tensor with dimensions (1500, 12, 1), which represents the component data stream of water plant A. Subsequently, the slice with index 1 in that dimension is extracted to obtain another three-dimensional tensor with dimension (1500, 12, 1), representing the component data stream of water plant B. These two three-dimensional tensors together form a list containing two elements, which is the final output parallel component data stream.

[0037] Accordingly, the parallel component data streams and the static adjacency matrix are input into the spatiotemporal graph convolution module to obtain the evolved component data streams. It should be understood that since the demultiplexed data streams only represent separated historical states, they themselves lack the ability to predict the future. However, the evolution of water quality is subject to the dual physical constraints of temporal decay and spatial transport, requiring processing through a deep learning module capable of simultaneously modeling both effects. Therefore, in the technical solution of this application, the parallel component data streams and the static adjacency matrix are further input into the spatiotemporal graph convolution module to obtain the evolved component data streams. This allows a unified, learned spatiotemporal evolution operator to be applied to each independent component data stream. This operator captures spatial dependencies through graph convolution and temporal dynamics through temporal convolution. In this way, a predictive sequence reflecting the future state of each water source component can be independently generated, providing core dynamic evolutionary information for the final mixed prediction.

[0038] More specifically, the implementation process includes: firstly, applying the same spatiotemporal graph convolutional module with shared learnable parameters to each parallel component data stream. Within this module, the data stream first passes through one or more temporal convolutional layers, which learn local patterns and trends of water quality components changing over time by performing convolution operations in the temporal dimension. Subsequently, the feature tensors processed by temporal convolution are fed into one or more spatial graph convolutional layers, which use a static adjacency matrix as a guide to aggregate and update feature information between each node and its physical neighbors, thereby simulating the propagation effect of water quality on the pipe network topology. This combination of temporal and spatial convolution operations is repeatedly stacked multiple times to construct a deep model, and the final output of the module is the spatiotemporally evolved component data stream within the prediction time window. In a specific example of this application, two data streams with dimensions (1500, 12, 1) from water plants A and B are input in parallel into a weight-shared STGCN module consisting of two interleaved temporal convolutional layers and a Chebyshev graph convolutional layer (ChebNet, K=3). For the data stream from water plant A, it first passes through a temporal convolutional layer. Then, its output features are calculated in a graph convolutional layer with a 1500×1500 static adjacency matrix to achieve spatial information aggregation. Next, it passes through a second temporal convolutional layer. The same computational process is performed on the data stream from water plant B, and the weight parameters of all convolutional layers remain consistent in both processes. Finally, this module outputs an evolved data stream with dimensions (1500, 6, 16) for both water plant A and water plant B. These two data streams together constitute the output of this step.

[0039] Accordingly, the evolved component data stream is reconstructed to predict the component states. It should be understood that since the output of the spatiotemporal graph convolution module is a set of physically separate parallel data streams generated in their respective independent computational pipelines, this dispersed data organization cannot support the subsequent final mixing step that requires comparison and weighting across all components. Therefore, in the technical solution of this application, the evolved component data stream is further reconstructed to predict the component states, thereby re-aggregating and aligning all independently evolved single-source prediction results into a unified, regular four-dimensional data structure. This provides a compact and complete input tensor for the final weighted mixing and nonlinear fusion steps, where any (node, time) position contains complete prediction information for all water source components.

[0040] More specifically, this reconstruction process is essentially the inverse of the data stream demultiplexing operation, i.e., tensor stacking. First, all evolved 3D data streams representing the predicted future states of different water source components are collected into a single set. Then, a tensor stacking function is called, specifying a new dimension as the water source dimension. This function connects all the 3D tensors in the set along this new dimension, generating a 4D tensor. This newly generated 4D tensor is the final predicted component state. In a specific example of this application, the input evolved component data stream is a list containing two elements, each of which is a 3D tensor with dimensions (1500, 6, 16), representing the predicted states of water plant A and water plant B for the next 6 hours, respectively. The reconstruction operation uses a tensor stacking function (e.g., torch.stack in PyTorch) to specify stacking on the third dimension (index 2). This operation merges two (1500, 6, 16) tensors to generate a single four-dimensional tensor with dimensions (1500, 6, 2, 16). This tensor is the complete predictive component state containing the prediction information of the two water sources and can be directly used for subsequent fusion calculations.

[0041] Specifically, in step S600, the predicted component states and source water proportion matrix are weighted and mixed based on proportions to generate the final prediction vector. It should be understood that since the predicted component states obtained through independent evolution are separate, and what needs to be provided to the user is a single predicted value representing the mixed water quality in the physical world, a simple linear weighted summation cannot capture the complex nonlinear chemical interactions that occur when different water bodies are mixed, nor can it handle the inherent uncertainties in the predicted values ​​of each component. In other words, in the scenario of multi-source water mixing in a water supply network, predicting the water quality at the mixing point presents an inherent technical challenge. It typically uses a static, linear weighted summation formula to calculate the final mixed water quality. The fundamental flaw of this method lies in its overly simplistic physical assumption: that the final mixed water quality is a simple linear superposition of the water qualities of each source component, and that the weight of the superposition is uniquely determined only by their respective volume proportions. This rigid linear mixing assumption ignores a crucial special relationship in the water mixing process: the nonlinear interactions between components. Specifically, this flaw leads to the neglect of changes in chemical reaction kinetics. For example, when predicting residual chlorine, the mixing of water bodies from different sources with varying ages, temperatures, pH levels, and total organic carbon concentrations creates a completely new chemical environment. The rate of residual chlorine decay is not a simple weighted average of the decay rates of each component, and the original linear summation formula cannot capture this abrupt change in reaction kinetics caused by mixing. Furthermore, this mechanism treats all uncertainties in the model predictions equally. The component predictions output by the upstream model themselves contain uncertainty, while the original formula assigns the same level of confidence—determined solely by volume ratio—to both a highly uncertain prediction and a highly certain prediction, lacking the ability to dynamically adjust the degree of confidence in the predictions. Simultaneously, this mechanism lacks adaptability to mixing states; it uses the same linear model for all mixing ratios, such as a violently mixed 50 / 50 ratio and a near-single-source 99 / 1 ratio, failing to adapt to the physicochemical properties under different mixing states.

[0042] To address the aforementioned technical shortcomings, this proposed solution employs an attention-gated adaptive nonlinear fusion method in its optimization mechanism. This method replaces static weighted summation calculations with a learnable neural network module. It explicitly models the interactions between components, adaptively adjusts the contribution of each component, and achieves final nonlinear fusion. Furthermore, the technical solution further performs proportion-based weighted fusion of the predicted component states and the source water ratio matrix to generate the final prediction vector. This allows for the design of an intelligent fusion module capable of data-driven learning of inter-component interactions and adaptively evaluating the confidence level of each component's contribution. This results in a final prediction that is not only more numerically accurate but also more physicochemically reasonable, significantly improving the model's robustness and reliability under complex mixed conditions.

[0043] Figure 4 This is a flowchart illustrating the process of generating a final prediction vector by performing a weighted mixing of the predicted component states and source water proportion matrix based on proportions, according to an embodiment of the present application's water quality prediction method for water supply networks based on big data analysis. Figure 4 As shown, step S600 includes: S610, performing mixed context feature interaction on the predicted component state and source water proportion matrix to obtain a mixed context tensor; S620, determining interactive attention weights and gated confidence scores based on the mixed context tensor; S630, performing nonlinear fusion on the predicted component state based on the interactive attention weights and gated confidence scores to obtain the final prediction vector.

[0044] Accordingly, in step S610, a mixed context feature interaction is performed on the predicted component state and the source water proportion matrix to obtain a mixed context tensor. It should be understood that single component prediction information is insufficient to support complex interaction analysis. That is, a single predicted component state feature only describes the predicted water quality status of that component itself, while its actual influence in the mixture—that is, the strength and manner of its nonlinear interaction with other components—depends on the crucial context information of its volume proportion. If these two are input separately, subsequent analysis modules will struggle to learn the coupling relationship between state and proportion. Therefore, in the technical solution of this application, a mixed context feature interaction is further performed on the predicted component state and the source water proportion matrix to obtain a mixed context tensor. This effectively binds and concatenates the predicted feature vector describing the water quality state of a component with the volume proportion scalar describing its relative position in the mixture. This provides a richer, more comprehensive feature expression that supports complex dynamic interaction analysis for subsequent interactive attention weight and gating confidence calculation steps, enabling the model to understand how a component in a specific state should interact with other components at a specific proportion.

[0045] Specifically, this interaction process involves performing a vector concatenation operation on each spatiotemporal location and water source component in the four-dimensional predicted component state tensor and the three-dimensional source-water proportion matrix. Specifically, for any node... Arbitrary prediction time step and any water source components The corresponding predicted component state feature vector and the source water proportion scalar at the same spatiotemporal location are extracted. Then, this proportion scalar is appended as a new feature element to the end of the predicted component state feature vector, thus forming a new mixed context feature vector with one more dimension. This operation is performed in parallel on all nodes, all prediction time steps, and all water sources, ultimately generating a complete mixed context tensor. This process is expressed by the formula: In the above formula, This represents a feature vector in the generated mixed context tensor; Represents the node from the upstream module. ,time Water source The predicted component state feature vector; A scalar representing the proportion of water source volume at the same time and space location; This represents a vector concatenation operation. This step explicitly binds together the two parts of information: what (the water quality state of the component) and how much it accounts for (volume proportion). This provides the necessary and rich raw input for the subsequent model to understand how a component with state X should interact with other components when its proportion is Y, in order to construct a comprehensive feature representation that can support subsequent dynamic interaction analysis.

[0046] Accordingly, in step S620, interactive attention weights and gating confidence scores are determined based on the mixed context tensor. It should be understood that the core drawback of the simple, volume-proportion-based static linear weighting method is that it ignores the crucial nonlinear interactions between components during water mixing, such as abrupt changes in chemical reaction kinetics caused by mixing. Furthermore, this method assigns equal confidence to all component predictions output by the upstream model, lacking the ability to dynamically adjust the confidence level of the predictions. Therefore, to overcome the core shortcomings of the original linear model in failing to capture nonlinear interactions and treating uncertainty equally, the technical solution of this application further determines interactive attention weights and gating confidence scores based on the mixed context tensor, thereby introducing a dynamic, data-driven dual allocation mechanism for weights and confidence scores.

[0047] Specifically, the determination process involves two parallel computational streams, both taking a mixed context tensor as input. The first stream determines the interactive attention weights using a scaled dot product self-attention mechanism to dynamically calculate the interactions between components. For any node in the pipeline network at any prediction time, all water source components have their corresponding mixed context feature vectors first input into two independent learnable feedforward neural networks to generate query and key vectors. Then, by calculating the dot product of the query vector and all key vectors, and performing scaling and Softmax normalization, a set of interactive attention weights is obtained. This set of weights is no longer a fixed volume ratio but is dynamically generated based on the contextual features of each component and its interactions with all other components, thus enabling the simulation of complex chemical interactions. The calculation process for the interactive attention weights is shown below: In the above formula, It is the mixed context feature vector generated in the previous step; It is a matrix composed of the contextual features of all components at that spatiotemporal location; and These are two small, learnable feedforward neural networks, used to generate the query vector and the key matrix, respectively. It is the attention score vector; It represents the dimension of the key vector, used for scaling; It is the final interactive attention weight vector that has been normalized by Softmax.

[0048] The second computational flow determines the gated confidence score. It employs a separate gating unit to evaluate the validity and confidence of each component's own prediction. The mixed context feature vector of each water source component is input into another learnable feedforward network, whose output is then passed through a sigmoid activation function to generate a gated confidence score between 0 and 1. This score acts as an information valve, allowing the model to learn to judge the validity of the component's contribution. The formula for calculating the gated confidence score is as follows: In this formula, It is another learnable feedforward network; It is the Sigmoid activation function, which constrains the output to between 0 and 1; This is the final generated gated confidence score. This step introduces the role of an information valve, allowing the model to learn to judge the validity of a component's contribution based on its contextual features. For example, when a component has an extremely low proportion or an abnormal predicted value, it can be gated with a near-zero confidence score. The value is used to weaken its influence. In this way, a dual dynamic modulation of the contribution of each component can be achieved through a data-driven approach. It takes into account the interaction between components through an attention mechanism and evaluates the confidence of each component itself through a gating mechanism. This replaces the static weight allocation method based solely on volume ratio and greatly improves the adaptability and robustness of the mixing mechanism.

[0049] Accordingly, in step S630, the predicted component states are nonlinearly fused based on interactive attention weights and gated confidence scores to obtain the final prediction vector. It should be understood that even after dynamic weighting, the intermediate result formed by superimposing the contributions of each component may still have a complex nonlinear mapping relationship with the actual final mixed water quality. A simple summation operation is insufficient to capture this final chemophysical effect. Therefore, in the technical solution of this application, the predicted component states are further nonlinearly fused based on interactive attention weights and gated confidence scores to obtain the final prediction vector, thereby fully realizing an end-to-end learnable nonlinear mapping process from each independent component to the final mixed state.

[0050] Specifically, the implementation process of this nonlinear fusion is divided into two core stages. The first stage is dynamic weighted summation. For any node in the pipeline network at any prediction time, a scalar representing the core prediction value is first extracted from the prediction component state at that spatiotemporal location. Then, the core prediction value of each water source component is multiplied by its corresponding interactive attention weight and gated confidence score obtained in the previous calculation step. Finally, the results of all water source components after this dual modulation are summed to form an intermediate state scalar that integrates the interaction relationship and confidence assessment. The second stage is nonlinear transformation. This intermediate state scalar is input into a final, learnable nonlinear transformation network (e.g., a small feedforward neural network). This network performs the final mapping and adjustment of the intermediate state through its nonlinear activation function and learned weights, thereby generating a single final mixed water quality prediction value for that node at that time. This process is performed on all nodes and all prediction time steps to form the final prediction vector. This process is described by the following formula: In the final formula above, It is the final predicted mixed water quality value of node i at prediction time t; and These are the attention weights and gating scores calculated in the previous step, respectively. These are the original predicted values ​​of the components; It represents the total number of water sources; It is a learnable feedforward network for the final nonlinear mapping. This step fully realizes an end-to-end learnable nonlinear mapping process from each independent component to the final mixed state. In this way, a final prediction result is generated that can fully reflect the complex mixing effects determined by water chemistry and hydraulics in the real world, with an accuracy and physical plausibility far exceeding that of a simple linear superposition model.

[0051] Through the aforementioned technical means, this method transforms a static, linear hybrid model into a dynamic, nonlinear, data-driven adaptive fusion module. The ultimate technical effect and objective is to significantly improve the accuracy of water quality prediction in multi-source water supply networks, particularly in areas with mixed water sources. This method can capture and simulate the nonlinear chemical interactions generated when different water components are mixed using learned attention weights. Through a gating mechanism, it adaptively manages and fuses component prediction information with varying degrees of uncertainty, thereby enhancing the robustness of the entire prediction system and its adaptability to complex operating conditions. Ultimately, the water quality prediction results output by this method are not only more numerically accurate, but also more physically interpretable due to the simulation of physicochemical interactions inherent in its fusion process. This provides more reliable technical support for the refined scheduling of water supply systems and early warning of water quality safety risks.

[0052] In summary, the water quality prediction method for water supply networks based on big data analysis according to the embodiments of this application is explained. First, it utilizes a network hydraulic model to quantify the dynamic water source composition ratio at each node. Based on this, it decouples the input mixed water quality signal at the feature level into multiple independent component flows corresponding one-to-one with each water source. Subsequently, through a spatiotemporal graph convolutional network with shared parameters, it performs parallel and independent evolutionary derivation for each component flow, thereby capturing the universal transport and attenuation laws followed by different source waters in the network, solving the fundamental deficiency of traditional single models that cannot differentiate between them. Finally, it performs an adaptive nonlinear fusion of all independently predicted future component states based on their precise volume proportion at the target point, resulting in a physically meaningful final mixed water quality prediction result that combines physical interpretability and high accuracy.

[0053] Furthermore, a water quality prediction system for water supply networks based on big data analysis is also provided.

[0054] Figure 5 This is a block diagram of a water quality prediction system for a water supply network based on big data analysis, according to an embodiment of this application. Figure 5As shown, the water quality prediction system 100 for water supply networks based on big data analysis according to an embodiment of this application includes: a data acquisition module 110, used to acquire network topology, historical hydraulic data, water source information, and historical water quality data; a source-water ratio matrix construction module 120, used to construct a source-water ratio matrix based on network topology, historical hydraulic data, and water source information; a historical water quality component feature initialization module 130, used to perform historical data decoupling and component feature initialization on historical water quality data based on the source-water ratio matrix to obtain initial component features; a network topology adjacency module 140, used to construct a static adjacency matrix based on network topology; a multi-component spatiotemporal prediction module 150, used to perform multi-component spatiotemporal graph convolution propagation on the static adjacency matrix and initial component features to obtain predicted component states; and a water quality prediction module 160, used to perform weighted mixing based on ratio and final prediction generation on the predicted component states and the source-water ratio matrix to obtain a final prediction vector.

[0055] As described above, the water quality prediction system 100 for water supply networks based on big data analysis according to embodiments of this application can be implemented in various wireless terminals, such as servers with water quality prediction algorithms for water supply networks based on big data analysis. In one possible implementation, the water quality prediction system 100 for water supply networks based on big data analysis according to embodiments of this application can be integrated into the wireless terminal as a software module and / or a hardware module. For example, the water quality prediction system 100 for water supply networks based on big data analysis can be a software module in the operating system of the wireless terminal, or it can be an application developed for the wireless terminal; of course, the water quality prediction system 100 for water supply networks based on big data analysis can also be one of many hardware modules of the wireless terminal.

[0056] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for predicting water quality in water supply networks based on big data analysis, characterized in that, include: Acquire pipeline network topology, historical hydraulic data, water source information, and historical water quality data; Based on the pipeline network topology, historical hydraulic data, and water source information, a source water ratio matrix is ​​constructed. Based on the source water ratio matrix, historical water quality data is decoupled and component features are initialized to obtain initial component features. Based on the pipeline network topology, a static adjacency matrix is ​​constructed. Multi-component spatiotemporal graph convolution propagation is performed on the static adjacency matrix and initial component features to obtain the predicted component states; The predicted component states and source water proportion matrix are weighted and mixed based on proportions to generate the final prediction vector.

2. The water quality prediction method for water supply networks based on big data analysis according to claim 1, characterized in that, Based on the pipeline network topology, historical hydraulic data, and water source information, a source-water ratio matrix is ​​constructed, including: The hydraulic model of the pipeline network is calibrated based on the pipeline network topology and historical hydraulic data to obtain the calibrated model file and simulation input dataset; Parallel simulations were performed based on water source information, calibrated model files, and simulation input datasets to obtain the original tracking report set; The original tracking report set was parsed and data aligned to obtain the source water proportion matrix.

3. The water quality prediction method for water supply networks based on big data analysis according to claim 1, characterized in that, Based on the source water proportion matrix, historical water quality data is decoupled and its component characteristics are initialized to obtain initial component characteristics, including: The feature tensor structure of historical water quality data, water source information and pipeline metadata is defined and the node type set is divided to obtain the initialized component feature tensor, water source node set and non-water source node set; Based on the set of water source nodes, historical water quality data and water source information, the initialized component feature tensor is precisely assigned values ​​to obtain a partially filled component feature tensor. Based on the set of non-water source nodes and historical water quality data, the component feature tensor of the partially filled component is broadcast-filled with the component features of the non-water source nodes to obtain the initial component features.

4. The water quality prediction method for water supply networks based on big data analysis according to claim 1, characterized in that, Multi-component spatiotemporal graph convolution propagation is performed on the static adjacency matrix and initial component features to obtain the predicted component states, including: The initial component features are demultiplexed with the component data stream to obtain a parallel component data stream; The parallel component data stream and the static adjacency matrix are input into the spatiotemporal graph convolution module to obtain the evolved component data stream; The predicted component states are reconstructed from the evolved component data stream to obtain the predicted component states.

5. The water quality prediction method for water supply networks based on big data analysis according to claim 1, characterized in that, The predicted component states and source water proportion matrix are weighted and mixed based on proportions to generate the final prediction vector, including: The mixed context feature interaction between the predicted component state and the source water proportion matrix is ​​used to obtain the mixed context tensor; Based on the hybrid context tensor, interactive attention weights and gating confidence scores are determined; Based on interactive attention weights and gating confidence scores, the predicted component states are nonlinearly fused to obtain the final predicted vector.

6. The water quality prediction method for water supply networks based on big data analysis according to claim 5, characterized in that, To obtain a mixed context tensor, the predicted component states and the source water proportion matrix are subjected to mixed context feature interaction, including: performing mixed context feature interaction on the predicted component states and the source water proportion matrix using the following formula: , in, This represents a feature vector in the generated mixed context tensor; The predicted component state feature vector is defined by node i, time t, and water source s in the predicted component state. Let be the scalar of the water source volume ratio at node i, time t, and water source s in the source water ratio matrix; This indicates a vector concatenation operation.

7. A water quality prediction system for water supply networks based on big data analysis, characterized in that, include: The data acquisition module is used to acquire pipeline topology, historical hydraulic data, water source information, and historical water quality data; The source water ratio matrix construction module is used to construct a source water ratio matrix based on the pipeline network topology, historical hydraulic data, and water source information. The historical water quality component feature initialization module is used to decouple historical water quality data and initialize component features based on the source water proportion matrix to obtain initial component features; The pipeline topology adjacency module is used to construct a static adjacency matrix based on the pipeline topology structure. The multi-component spatiotemporal prediction module is used to perform multi-component spatiotemporal graph convolution propagation on the static adjacency matrix and initial component features to obtain the predicted component states; The water quality prediction module is used to perform proportional weighted mixing and final prediction generation on the predicted component states and source water proportion matrix to obtain the final prediction vector.

Citation Information

Cited By

  • Rural water supply-oriented pipe network anomaly identification model construction method

    CN122388885A