Water supply network water quality area monitoring point optimization method
By constructing and correcting hydraulic water quality models, combining structural depth clustering algorithms and greedy algorithms, optimizing the layout of monitoring points in the water supply pipeline network, the problem of uneven distribution of monitoring points in the existing technology is solved, and more accurate water quality monitoring and more comprehensive data representation are achieved.
Patent Information
- Application Number
- CN202510328353.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-19
AI Technical Summary
In the existing water supply pipeline water quality monitoring technology, insufficient optimization of monitoring points layout results in uneven distribution of monitoring points and the inability to fully cover key areas of the pipeline network, especially in large-scale and complex pipeline systems.
By constructing and correcting hydraulic water quality models, combining structural depth clustering algorithms and greedy algorithms, the monitoring point layout is optimized. The specific steps include: building a hydraulic and water quality model based on the existing monitoring data and pipeline topology; using a structural depth clustering algorithm to divide the nodes into mass areas; comprehensively considering node coverage and water age, and rating and sorting nodes in each mass area; selecting a combination of nodes with high scores and appropriate node spacing through the greedy algorithm to generate a combination of candidate monitoring points; finally processing the combination of candidate monitoring points through the greedy algorithm to determine the monitoring point layout scheme that meets the information gain and coverage requirements.
More accurate water quality monitoring has been achieved, monitoring point layout has been optimized, ensuring the consistency of water quality change modes in the water supply pipeline network, and improving the comprehensiveness and representativeness of monitoring data.
Smart Images

Figure CN119849335A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water supply pipe networks, and in particular to a method for optimizing water quality regional monitoring points in a water supply pipe network. Background Art
[0002] As an important infrastructure to ensure clean drinking water, the water supply network undertakes the core task of providing safe water sources for residents, enterprises and industries. However, due to its distributed nature and susceptibility to pollution, the water supply network faces a variety of potential risks such as exogenous pollution and endogenous pollution. These pollutions will spread through the network, affecting water quality safety and causing serious economic losses. Especially in the context of aging and management defects of the network, it has become increasingly difficult to ensure the water quality safety and stable operation of the water supply system.
[0003] With the development of water quality monitoring technology, the water quality monitoring system of modern water supply networks has been able to achieve real-time monitoring of the water quality of the network to a certain extent. By collecting data on conventional water quality indicators such as residual chlorine, water age, and turbidity in real time, the monitoring system can help water supply companies grasp the dynamic changes in the water quality of the network, and indirectly determine whether there are potential abnormalities by analyzing the abnormal fluctuations of these conventional indicators, providing data support for further investigation and rapid response. In particular, high-frequency data collection and multi-dimensional data fusion analysis can more accurately identify water quality fluctuations and improve the comprehensiveness and accuracy of the assessment.
[0004] However, the existing water quality monitoring technology still has the defect of insufficient optimization of the monitoring point layout. Specifically, the existing monitoring point layout is often based on experience or simplified rules, lacking in-depth analysis of the complex topological structure of the pipe network, resulting in uneven distribution of monitoring points and failure to fully cover the key areas of the pipe network, especially in large-scale and complex pipe network systems, where blind spots often exist. Therefore, although the existing technology has improved the monitoring capabilities of the water supply network to a certain extent, the layout of monitoring points still needs to be further optimized. Summary of the invention
[0005] In a first aspect, an embodiment of the present invention provides a method for optimizing water quality regional monitoring points in a water supply network, the method comprising: Based on the monitoring data of existing monitoring points in the water supply network and the topological structure of the water supply network, a hydraulic and water quality model is constructed and corrected to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point, wherein the monitoring points include hydraulic monitoring points and water quality monitoring points, and the monitoring data include hydraulic monitoring data and water quality monitoring data; By using a structural deep clustering algorithm, the node time-series water quality change curve simulated by the calibrated hydraulic water quality model is combined with the topological structure of the water supply network, and all nodes in the water supply network are divided into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent. The nodes in each quality area are scored by comprehensively considering the node coverage rate and node water age, and the nodes in each quality area are sorted from high to low according to the score; Through the greedy algorithm, the node combination with the highest score and node spacing that meets the set requirements is selected from each quality area to generate a candidate monitoring point combination; Taking into account the multi-index information entropy and coverage optimization objectives, combined with the node spacing constraint, the candidate monitoring point combination is processed through a greedy algorithm to determine the monitoring point layout scheme that meets the information gain and coverage requirements.
[0006] In some possible implementations of the first aspect, based on monitoring data of existing monitoring points of the water supply network and the topological structure of the water supply network, a hydraulic and water quality model is constructed and corrected so that the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point is minimized, including: Based on the topological structure of the water supply network, a hydraulic model is constructed, and the hydraulic monitoring data is used to calibrate it. On the basis of the hydraulic model, a water quality model corresponding to different water quality indicators is constructed based on the topological structure of the water supply network, and the water quality monitoring data is used to calibrate it, and the time-series water quality change curve of each node simulated by the water quality model is obtained; specifically, on the basis of the hydraulic model, a water source water quality mode of the water plant's effluent is set to simulate the changes in water quality entering the water supply network; the initial main water residual chlorine attenuation coefficient of all pipelines effluent from the same water plant is set to the same value, and different initial pipe wall residual chlorine attenuation coefficients are set for pipes of different pipe materials; through a genetic algorithm, the main water attenuation coefficient and the pipe wall residual chlorine attenuation coefficient of all pipelines are obtained, so that the difference between the simulated value of the residual chlorine concentration calculated by the water quality model and the actual monitoring value of the corresponding monitoring point is minimized.
[0007] In some implementable methods of the first aspect, a structural deep clustering algorithm is used to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and all nodes in the water supply network are divided into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent, including: Based on the topological structure of the water supply network, an adjacency matrix is generated to construct a graph structure that reflects the physical connection relationship of the nodes. At the same time, based on the time-series water quality change curve of the nodes, a node feature matrix is constructed to describe the time-series characteristics and dynamic changes of the nodes in the graph structure. Pre-train the autoencoder to compress the node feature matrix and enhance the separability of features through reconstruction loss To minimize the error between the original feature matrix and its reconstructed value to generate an effective data representation; The feature representation output by the autoencoder is passed layer by layer to the Graph Neural Network (GCN) module, and graph convolution is performed in combination with the adjacency matrix to fuse the structural information and temporal features of the nodes to generate a multi-level graph-aware node representation. The Student's t distribution is used to calculate the soft assignment probability Q of the node and the cluster center, and the target distribution P is generated. The difference between the target distribution P and the soft assignment probability Q is minimized through the KL divergence, which is the self-supervised clustering loss. , and the difference between the target distribution P and the classification distribution Z of the GCN module, that is, the classification loss of the GCN module ,Use dual self-supervision mechanism to uniformly guide joint learning; Comprehensive reconstruction loss , self-supervised clustering loss And the classification loss of the GCN module Perform joint optimization and finally determine the clustering result of each node through the classification probability distribution output by the GCN module; The elbow method is used to determine the optimal number of partitions. Specifically, by calculating the total sum of squares of the node timing characteristic curve under different numbers of partitions, the inflection point of the error change trend is found, and the number of partitions corresponding to the inflection point is taken as the optimal number of partitions.
[0008] In some implementations of the first aspect, the autoencoder is pre-trained to compress the node feature matrix and enhance the separability of the features, and the reconstruction loss is used to To minimize the error between the original feature matrix and its reconstructed value to generate an effective data representation, including: Design the encoder structure to map the input features to a low-dimensional space and generate a reduced-dimensional feature representation: ; in, is the original input feature matrix, is the feature representation of the encoder output, The encoder The feature representation of the layer, is the number of encoder layers, The encoder The weight matrices and biases of the layers, is the activation function; Design the decoder structure, reconstruct the input features, and generate the reconstructed values through inverse mapping: ; in, is the feature representation of the encoder output, The decoder is The feature representation of the layer, is the number of decoder layers, The decoder is The weight matrices and biases of the layers, is the activation function; Calculate the reconstruction loss, which measures the difference between the original feature matrix and the reconstructed matrix: ; in, is the reconstruction loss, is the number of nodes, It's Euclid norm, is the Frobenius norm, It is The original feature vector of the nodes, It is The reconstructed feature vector of nodes, is the original feature matrix of all nodes, is the reconstructed feature matrix of all nodes; By minimizing the reconstruction loss Train the autoencoder to learn the reduced-dimensional node feature representation.
[0009] In some implementations of the first aspect, the feature representation output by the autoencoder is passed layer by layer to the graph neural network GCN module, and graph convolution is performed in combination with the adjacency matrix to fuse the structural information and temporal features of the nodes to generate a multi-level graph-aware node representation, including: The GCN module is designed through the graph structure composed of the adjacency matrix, and the feature representation of the node is continuously updated through information propagation between nodes: ; in, It is the GCN module The node feature representation of the layer, is the activation function, is the normalized degree matrix, Add self-loops to the adjacency matrix, It is the GCN module The node feature representation of the layer, It is the GCN module The weight matrix of the layer, is the number of GCN module layers, the first layer of GCN module input ,in, is the original feature matrix of the input; The transfer operator is used to fuse the two feature representations of autoencoder features and GCN structure information layer by layer: ; in, is the feature representation of the fused node, Hyperparameters for weighing the two representations; The fused features are expressed as Input to the next layer of GCN: ; The last layer of the GCN module generates the probability distribution of each node belonging to each cluster center through Softmax: ; in, is the probability that node i belongs to cluster center j, It is the feature representation of the last layer of the GCN module. is the weight matrix of the last layer of the GCN module.
[0010] In some implementations of the first aspect, the soft assignment probability Q of the node and the cluster center is calculated using Student's t distribution to generate the target distribution P, and the difference between the target distribution P and the soft assignment probability Q is minimized by KL divergence, that is, the self-supervised clustering loss , and the difference between the target distribution P and the classification distribution Z of the GCN module, that is, the classification loss of the GCN module , using a dual self-supervision mechanism to uniformly guide joint learning, including: The similarity between each node and the cluster center is calculated by Student's t distribution to obtain the soft assignment probability Q: ; in, represents the soft assignment probability of node i to cluster center j, represents the feature representation of the i-th node generated by the autoencoder, represents the jth cluster center vector, represents the remaining cluster center vectors, v represents the degrees of freedom of Student's t distribution, Represents the soft assignment probability of a node to a cluster center; Generate target distribution P based on soft assignment probability Q, and increase the weight of high confidence assignment: ; in, is the cluster probability in the target distribution, is the soft assignment probability to the remaining cluster centers, is the soft assignment frequency of the jth cluster center, is the normalization term for all cluster centers. is the target distribution that enforces high-confidence cluster assignments; The difference between the target distribution P and the soft assignment probability Q is minimized by KL divergence to ensure that the features learned by the autoencoder are close to the cluster center, thereby optimizing the cluster representation: ; in, is the difference between the target distribution P and the soft assignment probability Q, Indicates the number of nodes, Indicates the number of clusters; The classification distribution Z output by the GCN module is supervised by the target distribution P, minimizing the KL divergence between the two: ; in, is the difference between the target distribution P and the classification distribution Z of the GCN module Indicates the number of nodes, Indicates the number of clusters.
[0011] In some implementations of the first aspect, the nodes in each quality area are scored by comprehensively considering the node coverage rate and the node water age, and the nodes in each quality area are sorted from high to low according to the score, including: Based on the directly connected pipelines of the nodes and the influence range of their secondary nodes, the coverage rate of each node in each quality area is calculated and converted into a coverage rate score to reflect the coverage capacity of the node for the water supply network; Based on the water age index, the water age of each node in each quality area is calculated and converted into a water age score to reflect the relative position of the node in the water supply network; The coverage score and water age score are combined and weighted calculation is performed according to the corresponding pre-set weights to obtain the comprehensive score of the node, and the nodes in each quality area are sorted from high to low according to the comprehensive score.
[0012] In some implementations of the first aspect, based on the directly connected pipeline of the node and the influence range of its secondary node, the coverage of each node in each quality area is calculated and converted into a coverage score, including: For each node, calculate the length of the pipe directly connected to it, and take other nodes connected by these pipes as secondary nodes, calculate the length of the pipe connected to the secondary nodes, and then calculate the sum of the length of the pipe directly connected to the node and the length of the pipe connected to the secondary nodes, and use this as the total coverage length of the node. Calculate the ratio of the total coverage length of the node to the total length of the pipes in the water supply network to obtain the coverage rate of the node; The coverage rates of all nodes in the water supply network are standardized and mapped to the interval [0,1] as the coverage rate score; Based on the water age index, the water age of each node in each quality area is calculated and converted into a water age score, including: For each node, the average water age of all time steps is calculated based on its water age time series characteristic data; The average water age of all nodes in the water supply network is standardized and mapped to the [0,1] interval as the water age score.
[0013] In some implementations of the first aspect, a node combination with a higher score and a node spacing that meets a set requirement is selected from each quality area through a greedy algorithm to generate a candidate monitoring point combination, including: Select the nodes with the highest comprehensive scores from each quality area as the preliminary candidate node set to provide initial input for the greedy algorithm; Calculate the straight-line distance between the current candidate node and the selected node, and determine whether it is greater than the preset distance threshold; If the straight-line distance between the current candidate node and the selected node is greater than the preset distance threshold, it will be added to the selected node list. Otherwise, the current candidate node will be skipped and nodes will continue to be selected in order of comprehensive scores until the node screening of all quality areas is completed. Based on the selected node list, output candidate monitoring point combinations.
[0014] In some possible implementations of the first aspect, the multi-index information entropy and coverage optimization objectives are integrated, and the node spacing constraint is combined to process the candidate monitoring point combination through a greedy algorithm to determine a monitoring point arrangement scheme that meets the information gain and coverage requirements, including: For each candidate monitoring point combination of each indicator, the information gain of the candidate point on all indicators is evaluated respectively, and the sum of multiple information entropies is taken as the total information gain of the candidate point; The node spacing constraint is set. On the basis of satisfying the constraint, the coverage rate and information gain changes are comprehensively considered. Through the greedy algorithm, the candidate monitoring point combination that maximizes the multi-index comprehensive information entropy gain and meets the coverage requirements is selected from all candidate monitoring point combinations to obtain the monitoring point layout plan.
[0015] In a second aspect, an embodiment of the present invention provides a device for optimizing water quality regional monitoring points in a water supply network, the device comprising: A construction module is used to construct and correct a hydraulic and water quality model based on monitoring data of existing monitoring points of the water supply network and the topological structure of the water supply network, so as to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point, wherein the monitoring point includes a hydraulic monitoring point and a water quality monitoring point, and the monitoring data includes hydraulic monitoring data and water quality monitoring data; The partitioning module is used to use a structural deep clustering algorithm to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and divide all nodes in the water supply network into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent; The scoring module is used to score the nodes in each quality area by comprehensively considering the node coverage rate and the node water age, and sort the nodes in each quality area from high to low according to the score; The selection module is used to select node combinations with the highest scores and node spacing that meet the set requirements from each quality area through a greedy algorithm to generate candidate monitoring point combinations; The determination module is used to integrate the multi-index information entropy and coverage optimization objectives, combine the node spacing constraints, and process the candidate monitoring point combinations through a greedy algorithm to determine the monitoring point layout plan that meets the information gain and coverage requirements.
[0016] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.
[0017] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute the method described above.
[0018] Compared with the prior art, the present invention has at least the following technical effects: (1) The present invention adopts structured deep clustering technology, extracts the time series features of nodes under specific water quality indicators through autoencoders, and embeds them into graph convolutional networks. At the same time, the model parameters are updated through a two-layer self-supervision mechanism, and finally all nodes are divided into quality regions based on node features and topological information. In this way, areas with similar water quality changes in the water supply network can be effectively identified, and the layout of monitoring points can be optimized, thereby achieving more accurate water quality monitoring.
[0019] (2) The present invention determines the optimal number of partitions under the water quality index through the elbow method, and comprehensively considers the node coverage and distribution to optimize the candidate monitoring point combination under the water quality index. While ensuring that the quality area can reflect the operating characteristics of the water supply network, it pays attention to the coverage of the nodes and the end (sensitive points) of the water supply network, and proposes the optimal candidate monitoring point scheme. This strategy can better represent the water quality characteristics of the water supply network, while ensuring the comprehensiveness and representativeness of the monitoring data.
[0020] (3) The present invention combines the quality zoning results of multiple water quality indicators and their optimized candidate monitoring point sets, uses information theory technology to minimize information redundancy and maximize information relevance, selects the most reasonable node combination that meets the conditions, and further optimizes the distribution of monitoring points. By building a linkage mechanism for multiple monitoring points, it is possible to supplement and cross-validate data between nodes, thereby improving the accuracy and reliability of monitoring data. At the same time, by combining monitoring point data with hydraulic models, the limited monitoring information can be accurately generalized to the entire water supply network, fully grasping the water quality status of the water supply network and improving the water quality assurance capability.
[0021] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein: Figure 1 A flow chart of a method for optimizing water quality regional monitoring points in a water supply network provided by an embodiment of the present invention; Figure 2 A schematic diagram of a curve showing the balance between the number of monitoring points and the gain effect provided in an embodiment of the present invention; Figure 3 A schematic diagram of a multi-index monitoring point arrangement scheme and a comprehensive optimization result provided by an embodiment of the present invention; Figure 4 A structural diagram of a water supply network water quality regional monitoring point optimization device provided by an embodiment of the present invention; Figure 5 The figure is a structural diagram of an exemplary electronic device capable of implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.
[0025] In order to solve the technical problems arising in the background technology, an embodiment of the present invention provides a method, device, equipment and storage medium for optimizing water quality regional monitoring points in a water supply network. Below, in combination with the accompanying drawings, a method, device, equipment and storage medium for optimizing water quality regional monitoring points in a water supply network provided by an embodiment of the present invention are described in detail through specific embodiments.
[0026] Figure 1 A flow chart of a method for optimizing water quality regional monitoring points in a water supply network provided by an embodiment of the present invention, such as Figure 1 As shown, the method 100 for optimizing water quality regional monitoring points in a water supply network may include: S110, based on the monitoring data of the existing monitoring points of the water supply network and the topological structure of the water supply network, construct and correct the hydraulic and water quality model to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point location, wherein the monitoring points include hydraulic monitoring points and water quality monitoring points, and the monitoring data include hydraulic monitoring data and water quality monitoring data.
[0027] S120 uses a structural deep clustering algorithm to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and divides all nodes in the water supply network into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent.
[0028] S130, comprehensively considering the node coverage rate and the node water age to score the nodes in each quality area, and sort the nodes in each quality area from high to low according to the score.
[0029] S140, using a greedy algorithm, select a node combination with a higher score ranking and a node spacing that meets a set requirement from each quality area to generate a candidate monitoring point combination.
[0030] S150, combining the multi-index information entropy and coverage optimization objectives, combined with the node spacing constraint, and processing the candidate monitoring point combination through a greedy algorithm to determine the monitoring point layout plan that meets the information gain and coverage requirements.
[0031] To facilitate further understanding, the above contents are described in detail below in conjunction with specific embodiments.
[0032] (1) Based on the monitoring data of existing monitoring points in the water supply network and the topological structure of the water supply network, a hydraulic and water quality model is constructed and corrected so that the error between the simulated value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point is minimized. The monitoring points include hydraulic monitoring points and water quality monitoring points, and the monitoring data include hydraulic monitoring data and water quality monitoring data.
[0033] (1.1) Collect the location and type of existing monitoring points in the water supply network (e.g. hydraulic monitoring points for monitoring pressure, flow, etc.; water quality monitoring points for monitoring residual chlorine, turbidity, etc.) and hydraulic and water quality monitoring data. Optionally, an online hydraulic and water quality monitoring system or a manual inspection method with a certain frequency can be used to detect and collect hydraulic and water quality data.
[0034] (1.2) Based on the topological structure of the water supply network, a hydraulic model is constructed, and the hydraulic monitoring data is used to calibrate it. On the basis of the hydraulic model, a water quality model corresponding to different water quality indicators is constructed based on the topological structure of the water supply network. The model is calibrated using the water quality monitoring data, and the time series water quality change curve of each node simulated by the model is obtained.
[0035] Furthermore, based on the hydraulic model, a water source water quality model of the water plant effluent is set to simulate the changes in water quality entering the water supply network.
[0036] The initial main water residual chlorine attenuation coefficient of all pipes with water outlet from the same water plant is set to the same value, and different initial pipe wall residual chlorine attenuation coefficients are set for pipes with different pipe materials.
[0037] Through genetic algorithm, the main water attenuation coefficient of all pipelines and the residual chlorine attenuation coefficient of the pipe wall are obtained, so that the difference between the simulated value of the residual chlorine concentration calculated by the water quality model and the actual monitoring value of the corresponding monitoring point is minimized.
[0038] (2) A structural deep clustering algorithm is used to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and all nodes in the water supply network are divided into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent.
[0039] (2.1) Based on the topological structure of the water supply network, an adjacency matrix is generated to construct a graph structure that reflects the physical connection relationship between nodes. At the same time, based on the node time-series water quality change curve, a node feature matrix is constructed to describe the time-series characteristics and dynamic changes of the nodes in the graph structure.
[0040] (2.2) Pre-train the autoencoder to compress the node feature matrix and enhance the separability of the features through reconstruction loss To minimize the error between the original feature matrix and its reconstructed value, a valid data representation is generated.
[0041] Furthermore, the encoder structure is designed to map the input features to a low-dimensional space and generate a reduced-dimensional feature representation: ; in, is the original input feature matrix, is the feature representation of the encoder output, The encoder The feature representation of the layer, is the number of encoder layers, The encoder The weight matrices and biases of the layers, is the activation function.
[0042] Design the decoder structure, reconstruct the input features, and generate the reconstructed values through inverse mapping: ; in, is the feature representation of the encoder output, The decoder is The feature representation of the layer, is the number of decoder layers, The decoder is The weight matrices and biases of the layers, is the activation function.
[0043] Calculate the reconstruction loss, which measures the difference between the original feature matrix and the reconstructed matrix: ; in, is the reconstruction loss, is the number of nodes, It's Euclid norm, is the Frobenius norm, It is The original feature vector of the nodes, It is The reconstructed feature vector of nodes, is the original feature matrix of all nodes, is the reconstructed feature matrix of all nodes.
[0044] By minimizing the reconstruction loss Train the autoencoder to learn the reduced-dimensional node feature representation.
[0045] (2.3) The feature representation output by the autoencoder is passed layer by layer to the graph neural network GCN module, and graph convolution is performed in combination with the adjacency matrix to fuse the structural information and temporal features of the nodes to generate a multi-level graph-aware node representation.
[0046] Furthermore, the GCN module is designed through the graph structure composed of the adjacency matrix, and the feature representation of the node is continuously updated through information propagation between nodes: ; in, It is the GCN module The node feature representation of the layer, is the activation function, is the normalized degree matrix, Add self-loops to the adjacency matrix, It is the GCN module The node feature representation of the layer, It is the GCN module The weight matrix of the layer, is the number of GCN module layers, the first layer of GCN module input ,in, is the original feature matrix of the input.
[0047] The transfer operator is used to fuse the two feature representations of autoencoder features and GCN structure information layer by layer: ; in, is the feature representation of the fused node, is a hyperparameter that trades off between the two representations.
[0048] The fused features are expressed as Input to the next layer of GCN: .
[0049] The last layer of the GCN module generates the probability distribution of each node belonging to each cluster center through Softmax: ; in, is the probability that node i belongs to cluster center j, It is the feature representation of the last layer of the GCN module. is the weight matrix of the last layer of the GCN module.
[0050] (2.4) Use Student's t distribution to calculate the soft assignment probability Q of nodes and cluster centers, generate the target distribution P, and minimize the difference between the target distribution P and the soft assignment probability Q through KL divergence, which is the self-supervised clustering loss , and the difference between the target distribution P and the classification distribution Z of the GCN module, that is, the classification loss of the GCN module , a dual self-supervision mechanism is used to uniformly guide joint learning.
[0051] Furthermore, the similarity between each node and the cluster center is calculated through Student's t distribution to obtain the soft assignment probability Q: ; in, represents the soft assignment probability of node i to cluster center j, represents the feature representation of the i-th node generated by the autoencoder, represents the jth cluster center vector, represents the remaining cluster center vectors, v represents the degrees of freedom of Student's t distribution, Represents the soft assignment probability of a node to a cluster center.
[0052] Generate target distribution P based on soft assignment probability Q, and increase the weight of high confidence assignment: ; in, is the cluster probability in the target distribution, is the soft assignment probability to the remaining cluster centers, is the soft assignment frequency of the jth cluster center, is the normalization term for all cluster centers. is the target distribution that enforces high-confidence cluster assignments.
[0053] The difference between the target distribution P and the soft assignment probability Q is minimized by KL divergence to ensure that the features learned by the autoencoder are close to the cluster center, thereby optimizing the cluster representation: ; in, is the difference between the target distribution P and the soft assignment probability Q, Indicates the number of nodes, Indicates the number of clusters.
[0054] The classification distribution Z output by the GCN module is supervised by the target distribution P, minimizing the KL divergence between the two: ; in, is the difference between the target distribution P and the classification distribution Z of the GCN module Indicates the number of nodes, Indicates the number of clusters.
[0055] (2.5) Comprehensive reconstruction loss , self-supervised clustering loss And the classification loss of the GCN module Joint optimization is performed, and finally the clustering result of each node is determined by the classification probability distribution output by the GCN module.
[0056] (2.6) The elbow method is used to determine the optimal number of partitions. Specifically, the total sum of squared errors of the node timing characteristic curve under different numbers of partitions is calculated to find the inflection point of the error change trend. The number of partitions corresponding to the inflection point is taken as the optimal number of partitions, thereby balancing the partition accuracy and model complexity and improving the rationality of the quality area division.
[0057] (3) The nodes in each quality area are scored by comprehensively considering the node coverage rate and node water age, and the nodes in each quality area are sorted from high to low according to the score.
[0058] (3.1) Based on the influence range of the node’s directly connected pipelines and its secondary nodes, the coverage rate of each node in each quality area is calculated and converted into a coverage rate score to reflect the coverage capacity of the node for the water supply network.
[0059] Furthermore, for each node, the length of the pipe directly connected to it is calculated, and other nodes connected to these pipes are taken as secondary nodes. The length of the pipes connected to the secondary nodes is calculated, and then the sum of the length of the pipe directly connected to the node and the length of the pipe connected to the secondary node is calculated. This is taken as the total coverage length of the node. The total coverage length of the node is calculated by ratio to the total length of the pipes in the water supply network to obtain the coverage rate of the node.
[0060] The coverage rates of all nodes in the water supply network are standardized and mapped to the interval [0,1] as the coverage rate score to ensure that the coverage ranges of different nodes can be compared on a unified scale to reflect the relative importance of the nodes to the network coverage capacity. The formula used for the standardization process is as follows: ; in, is the node coverage score, is the node coverage, is the minimum node coverage, is the maximum node coverage.
[0061] (3.2) Based on the water age index, the water age of each node in each quality area is calculated. Nodes with longer water ages are usually closer to the end of the pipe network and may have higher water quality risks. The water age score is then converted into a water age score to reflect the relative position and importance of the node in the water supply network.
[0062] For each node, based on its water age time series characteristic data, the average water age of all time steps is calculated to characterize the overall level of water retention time at the node; The average water age of all nodes in the water supply network is standardized and mapped to the [0,1] interval as the water age score, eliminating the absolute scale differences of water age values at different nodes and ensuring that the scores are compared within a unified range, thereby reflecting the relative position of the nodes and their potential impact on water quality safety. The formula used for standardization is as follows: ; in, is the node water age score, is the average water age of the nodes, is the minimum node average water age, is the average water age of the maximum node.
[0063] (3.3) Combine the coverage score and water age score, and perform weighted calculation according to the corresponding pre-set weights to obtain the comprehensive score of the node, and sort the nodes in each quality area from high to low according to the comprehensive score.
[0064] (4) Through the greedy algorithm, select the node combination with the highest score in each quality area and the node spacing that meets the set requirements to generate the candidate monitoring point combination.
[0065] (4.1) Select the nodes with the highest comprehensive scores from each quality area as the preliminary candidate node set to provide initial input for the greedy algorithm; (4.2) Based on the comprehensive score ranking, the physical distance constraint between nodes must be met, and the straight-line distance between the current candidate node and the selected node is calculated, and it is determined whether it is greater than the preset distance threshold; (4.3) If the straight-line distance between the current candidate node and the selected node is greater than the preset distance threshold, it will be added to the selected node list. Otherwise, the current candidate node will be skipped and nodes will continue to be selected in order of comprehensive scores until all quality areas are screened. (4.4) Based on the selected node list, output the candidate monitoring point combination.
[0066] (5) Taking into account the multi-index information entropy and coverage optimization objectives and combining them with the node spacing constraint, the candidate monitoring point combinations are processed through a greedy algorithm to determine the monitoring point layout that meets the information gain and coverage requirements.
[0067] (5.1) For each candidate monitoring point combination of each indicator, the information gain of the candidate point on all indicators is evaluated respectively, and the sum of multiple information entropies is taken as the total information gain of the candidate point; (5.2) Set the node spacing constraint. On the basis of satisfying the constraint, comprehensively consider the changes in coverage and information gain. Through the greedy algorithm, select the candidate monitoring point combination that maximizes the multi-index comprehensive information entropy gain and meets the coverage requirements from all candidate monitoring point combinations, so as to obtain the monitoring point layout plan.
[0068] As an example, the implementation process of the water quality regional monitoring point optimization method of the water supply network proposed in the present invention is further explained below in combination with the case network 1 in the BWSN competition.
[0069] (1) Based on the existing monitoring point data and the pipe network topology, a hydraulic water quality model is constructed and corrected to minimize the error between the simulated value and the monitored value at the monitoring point location, thereby improving the accuracy of the model. The EPANET water quality solver is used for water quality modeling to simulate the water age and residual chlorine concentration of the calculation node. In this case, the monitoring data used for verification is generated by EPANET software simulation, and the measurement error follows a Gaussian distribution with a mean of 0. The frequency of extracting water quality simulation data is once every 30 minutes. From the start of the simulation, water quality data of 126 nodes are collected for 96 consecutive hours. The processed data are stored in the feature matrices of water age and residual chlorine, respectively, for a total of 193 time steps of water quality data. The dimension of each feature matrix is 126 rows and 193 columns, which are used for subsequent analysis and modeling.
[0070] (2) The structural deep clustering method is used to combine the node time series water quality change curve simulated by the calibrated water quality model with the topological structure of the water supply network, and all nodes are divided into quality areas. By comprehensively considering the node characteristics and topological relationships, the water quality change pattern of nodes in the same area is ensured to be consistent. The elbow rule is used to analyze the total square error of the node time series characteristic curve under different partition numbers, determine the inflection point of the error change trend, and use the number of partitions corresponding to the inflection point as the optimal quality partition number. Under the water age index, through calculation and verification, the optimal number of partitions for the water supply network is determined to be 9; under the residual chlorine index, the optimal number of partitions is 10. Finally, the partition results are combined with the actual situation of the network, and the economic cost and partition effect are comprehensively considered to optimize the partition results, providing a basic basis for the layout of subsequent monitoring points.
[0071] (3) The nodes in each quality area are scored. The scoring criteria comprehensively consider the coverage rate and the water age of the node, and the nodes in the area are sorted by score. The coverage rate score is obtained by calculating the ratio of the length of the pipeline directly connected to the node and the length of the pipeline within the influence range of its secondary nodes to the total length of the pipeline network. The higher the coverage rate, the wider the monitoring range of the node. The water age score is calculated based on the average water age of the node. The higher the water age, the closer the node is to the end of the pipeline network and the more it can pay attention to the water quality changes in sensitive areas. Finally, the comprehensive score of each node is generated by weighted synthesis of the coverage rate and water age score. The node with a higher comprehensive score can more widely monitor the water quality changes in the pipeline network and pay attention to the water quality characteristics at the end of the pipeline network.
[0072] (4) Through the greedy algorithm, select node combinations with higher scores and node spacing that meet the set requirements from each quality area to generate candidate monitoring point plans. When arranging monitoring points, in order to ensure the coverage effect between monitoring points, the physical distance between any two monitoring points must be set to be no less than 1 km. Specifically, sort the nodes from high to low according to their scores, select the nodes with the highest scores in turn, and check whether the shortest path distance between the node and the selected nodes meets the constraint conditions. On the basis of satisfying the distance constraint, give priority to node combinations with higher scores to ensure that the monitoring point layout can not only widely cover the pipeline network, but also maximize the effectiveness and rationality of the monitoring plan.
[0073] (5) Comprehensively consider the multi-indicator information entropy and coverage optimization objectives, combine the node spacing constraints, and finally determine the monitoring point layout plan that meets the information gain and coverage requirements through a greedy algorithm. In the specific implementation, based on the quality zoning results of the two indicators of water age and residual chlorine, first extract the intersection nodes of the candidate sets of monitoring points corresponding to the two indicators, and give priority to them in the final layout plan. Subsequently, the remaining candidate nodes are weightedly calculated for information gain and coverage gain, and sorted according to the weighted scores. In the node selection process, the physical constraint condition that the node spacing is not less than 1 km must be met at the same time. On the premise of meeting the constraints, combined with the cost-effectiveness trade-off relationship of the monitoring point layout, nodes with higher scores are gradually selected from the candidate nodes to be added to the final plan. Finally, according to the balance relationship between the number of layouts and the gain effect (such as Figure 2 As shown in Figure 2), the number of monitoring points is selected as 7, and the specific layout plan is as follows: Figure 3 shown.
[0074] In summary, the present invention has at least the following technical effects: (1) The present invention adopts structured deep clustering technology, extracts the time series features of nodes under specific water quality indicators through autoencoders, and embeds them into graph convolutional networks. At the same time, the model parameters are updated through a two-layer self-supervision mechanism, and finally all nodes are divided into quality regions based on node features and topological information. In this way, areas with similar water quality changes in the water supply network can be effectively identified, and the layout of monitoring points can be optimized, thereby achieving more accurate water quality monitoring.
[0075] (2) The present invention determines the optimal number of partitions under the water quality index through the elbow method, and comprehensively considers the node coverage and distribution to optimize the candidate monitoring point combination under the water quality index. While ensuring that the quality area can reflect the operating characteristics of the water supply network, it pays attention to the coverage of the nodes and the end (sensitive points) of the water supply network, and proposes the optimal candidate monitoring point scheme. This strategy can better represent the water quality characteristics of the water supply network, while ensuring the comprehensiveness and representativeness of the monitoring data.
[0076] (3) The present invention combines the quality zoning results of multiple water quality indicators and their optimized candidate monitoring point sets, uses information theory technology to minimize information redundancy and maximize information relevance, selects the most reasonable node combination that meets the conditions, and further optimizes the distribution of monitoring points. By building a linkage mechanism for multiple monitoring points, it is possible to supplement and cross-validate data between nodes, thereby improving the accuracy and reliability of monitoring data. At the same time, by combining monitoring point data with hydraulic models, the limited monitoring information can be accurately generalized to the entire water supply network, fully grasping the water quality status of the water supply network and improving the water quality assurance capability.
[0077] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0078] The above is an introduction to a method embodiment. The following is a further explanation of the solution of the present invention through an apparatus embodiment.
[0079] Figure 4 A structural diagram of a water supply network water quality regional monitoring point optimization device provided by an embodiment of the present invention, such as Figure 4 As shown, the water supply network water quality regional monitoring point optimization device 400 may include: Construction module 410 is used to construct and correct the hydraulic and water quality model based on the monitoring data of the existing monitoring points in the water supply network and the topological structure of the water supply network, so as to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point location, wherein the monitoring points include hydraulic monitoring points and water quality monitoring points, and the monitoring data include hydraulic monitoring data and water quality monitoring data.
[0080] The division module 420 is used to adopt a structural deep clustering algorithm to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and divide all nodes in the water supply network into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent.
[0081] The scoring module 430 is used to score the nodes in each quality area by comprehensively considering the node coverage rate and the node water age, and to sort the nodes in each quality area from high to low according to the score.
[0082] The selection module 440 is used to select, from each quality area, a node combination with a higher score ranking and a node spacing that meets a set requirement by using a greedy algorithm to generate a candidate monitoring point combination.
[0083] The determination module 450 is used to integrate the multi-index information entropy and coverage optimization objectives, combine the node spacing constraints, and process the candidate monitoring point combinations through a greedy algorithm to determine a monitoring point layout plan that meets the information gain and coverage requirements.
[0084] Understandably, Figure 4 Each module / unit in the water supply network water quality regional monitoring point optimization device 400 shown has the function of realizing Figure 1 The functions of the various steps in the water supply network water quality regional monitoring point optimization method 100 shown and their corresponding technical effects are not described here for the sake of brevity.
[0085] Figure 5 5 is a block diagram of an exemplary electronic device capable of implementing an embodiment of the present invention. Electronic device 500 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 500 may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown in the present invention, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required in the present invention.
[0086] like Figure 5As shown, the electronic device 500 may include a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0087] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0088] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer program product, including a computer program, which is tangibly contained in a computer-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0089] The various embodiments described above in the present invention can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0090] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0091] In the context of the present invention, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a computer-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0092] It should be noted that the present invention also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute method 100 and achieve the corresponding technical effect achieved by executing the method in an embodiment of the present invention. For the sake of concise description, they will not be repeated here.
[0093] In addition, the present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method 100 is implemented.
[0094] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and the present invention is not limited here.
[0095] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing water quality regional monitoring points in a water supply network, characterized in that: The method comprises: Based on the monitoring data of existing monitoring points in the water supply network and the topological structure of the water supply network, a hydraulic and water quality model is constructed and corrected to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point, wherein the monitoring points include hydraulic monitoring points and water quality monitoring points, and the monitoring data include hydraulic monitoring data and water quality monitoring data; By using a structural deep clustering algorithm, the node time-series water quality change curve simulated by the calibrated hydraulic water quality model is combined with the topological structure of the water supply network, and all nodes in the water supply network are divided into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent. The nodes in each quality area are scored by comprehensively considering the node coverage rate and node water age, and the nodes in each quality area are sorted from high to low according to the score; Through the greedy algorithm, the node combination with the highest score and node spacing that meets the set requirements is selected from each quality area to generate a candidate monitoring point combination; Taking into account the multi-index information entropy and coverage optimization objectives, combined with the node spacing constraint, the candidate monitoring point combination is processed through a greedy algorithm to determine the monitoring point layout scheme that meets the information gain and coverage requirements.
2. The method according to claim 1, characterized in that The method constructs and corrects a hydraulic and water quality model based on the monitoring data of existing monitoring points in the water supply network and the topological structure of the water supply network, so as to minimize the error between the simulation value output by the hydraulic and water quality model and the monitoring value of the monitoring point at the monitoring point, including: Based on the topological structure of the water supply network, a hydraulic model is constructed, and the hydraulic monitoring data is used to calibrate it. On the basis of the hydraulic model, a water quality model corresponding to different water quality indicators is constructed based on the topological structure of the water supply network, and the water quality monitoring data is used to calibrate it, and the time-series water quality change curve of each node simulated by the water quality model is obtained; specifically, on the basis of the hydraulic model, a water source water quality mode of the water plant's effluent is set to simulate the changes in water quality entering the water supply network; the initial main water residual chlorine attenuation coefficient of all pipelines effluent from the same water plant is set to the same value, and different initial pipe wall residual chlorine attenuation coefficients are set for pipes of different pipe materials; through a genetic algorithm, the main water attenuation coefficient and the pipe wall residual chlorine attenuation coefficient of all pipelines are obtained, so that the difference between the simulated value of the residual chlorine concentration calculated by the water quality model and the actual monitoring value of the corresponding monitoring point is minimized.
3. The method according to claim 1, characterized in that The structural deep clustering algorithm is used to combine the node time-series water quality change curve simulated by the calibrated hydraulic water quality model with the topological structure of the water supply network, and divide all nodes in the water supply network into quality areas to ensure that the water quality change patterns of nodes in the same quality area are consistent, including: Based on the topological structure of the water supply network, an adjacency matrix is generated to construct a graph structure that reflects the physical connection relationship of the nodes. At the same time, based on the time-series water quality change curve of the nodes, a node feature matrix is constructed to describe the time-series characteristics and dynamic changes of the nodes in the graph structure. Pre-train the autoencoder to compress the node feature matrix and enhance the separability of features through reconstruction loss To minimize the error between the original feature matrix and its reconstructed value to generate an effective data representation; The feature representation output by the autoencoder is passed layer by layer to the graph neural network GCN module, and graph convolution is performed in combination with the adjacency matrix to fuse the structural information and temporal features of the nodes to generate a multi-level graph-aware node representation; The Student's t distribution is used to calculate the soft assignment probability Q of the node and the cluster center, and the target distribution P is generated. The difference between the target distribution P and the soft assignment probability Q is minimized through the KL divergence, which is the self-supervised clustering loss. , and the difference between the target distribution P and the classification distribution Z of the GCN module, that is, the classification loss of the GCN module ,Use dual self-supervision mechanism to uniformly guide joint learning; Comprehensive reconstruction loss , self-supervised clustering loss And the classification loss of the GCN module Perform joint optimization and finally determine the clustering result of each node through the classification probability distribution output by the GCN module; The elbow method is used to determine the optimal number of partitions. Specifically, by calculating the total sum of squares of the node timing characteristic curve under different numbers of partitions, the inflection point of the error change trend is found, and the number of partitions corresponding to the inflection point is taken as the optimal number of partitions.
4. The method according to claim 3, characterized in that The pre-trained autoencoder compresses the node feature matrix and enhances the separability of features through reconstruction loss To minimize the error between the original feature matrix and its reconstructed value to generate an effective data representation, including: Design the encoder structure to map the input features to a low-dimensional space and generate a reduced-dimensional feature representation: ; in, is the original input feature matrix, is the feature representation of the encoder output, The encoder The feature representation of the layer, is the number of encoder layers, The encoder The weight matrices and biases of the layers, is the activation function; Design the decoder structure, reconstruct the input features, and generate the reconstructed values through inverse mapping: ; in, is the feature representation of the encoder output, The decoder is The feature representation of the layer, is the number of decoder layers, The decoder is The weight matrices and biases of the layers, is the activation function; Calculate the reconstruction loss, which measures the difference between the original feature matrix and the reconstructed matrix: ; in, is the reconstruction loss, is the number of nodes, It's Euclid norm, is the Frobenius norm, It is The original feature vector of the nodes, It is The reconstructed feature vector of nodes, is the original feature matrix of all nodes, is the reconstructed feature matrix of all nodes; By minimizing the reconstruction loss Train the autoencoder to learn the reduced-dimensional node feature representation.
5. The method according to claim 4, characterized in that The feature representation output by the autoencoder is passed layer by layer to the graph neural network GCN module, and graph convolution is performed in combination with the adjacency matrix to fuse the structural information and temporal features of the nodes to generate a multi-level graph-aware node representation, including: The GCN module is designed through the graph structure composed of the adjacency matrix, and the feature representation of the node is continuously updated through information propagation between nodes: ; in, It is the GCN module The node feature representation of the layer, is the activation function, is the normalized degree matrix, Add self-loops to the adjacency matrix, It is the GCN module The node feature representation of the layer, It is the GCN module The weight matrix of the layer, is the number of GCN module layers, the first layer of GCN module input ,in, is the original feature matrix of the input; The transfer operator is used to fuse the two feature representations of autoencoder features and GCN structure information layer by layer: ; in, is the feature representation of the fused node, Hyperparameters for weighing the two representations; The fused features are expressed as Input to the next layer of GCN: ; The last layer of the GCN module generates the probability distribution of each node belonging to each cluster center through Softmax: ; in, is the probability that node i belongs to cluster center j, It is the feature representation of the last layer of the GCN module. is the weight matrix of the last layer of the GCN module.
6. The method according to claim 5, characterized in that The Student's t distribution is used to calculate the soft assignment probability Q of the node and the cluster center, generate the target distribution P, and minimize the difference between the target distribution P and the soft assignment probability Q through KL divergence, that is, the self-supervised clustering loss , and the difference between the target distribution P and the classification distribution Z of the GCN module, that is, the classification loss of the GCN module , using a dual self-supervision mechanism to uniformly guide joint learning, including: The similarity between each node and the cluster center is calculated by Student's t distribution to obtain the soft assignment probability Q: ; in, represents the soft assignment probability of node i to cluster center j, represents the feature representation of the i-th node generated by the autoencoder, represents the jth cluster center vector, represents the remaining cluster center vectors, v represents the degrees of freedom of Student's t distribution, Represents the soft assignment probability of a node to a cluster center; Generate target distribution P based on soft assignment probability Q, and increase the weight of high confidence assignment: ; in, is the cluster probability in the target distribution, is the soft assignment probability to the remaining cluster centers, is the soft assignment frequency of the jth cluster center, is the normalization term for all cluster centers. is the target distribution that enforces high-confidence cluster assignments; The difference between the target distribution P and the soft assignment probability Q is minimized by KL divergence to ensure that the features learned by the autoencoder are close to the cluster center, thereby optimizing the cluster representation: ; in, is the difference between the target distribution P and the soft assignment probability Q, Indicates the number of nodes, Indicates the number of clusters; The target distribution P supervises the classification distribution Z output by the GCN module and minimizes the KL divergence between the two: ; in, is the difference between the target distribution P and the classification distribution Z of the GCN module Indicates the number of nodes, Indicates the number of clusters.
7. The method according to claim 1, characterized in that The nodes in each quality area are scored by comprehensively considering the node coverage rate and the node water age, and the nodes in each quality area are sorted from high to low according to the score, including: Based on the directly connected pipelines of the nodes and the influence range of their secondary nodes, the coverage rate of each node in each quality area is calculated and converted into a coverage rate score to reflect the coverage capacity of the node for the water supply network; Based on the water age index, the water age of each node in each quality area is calculated and converted into a water age score to reflect the relative position of the node in the water supply network; The coverage score and water age score are combined and weighted calculation is performed according to the corresponding pre-set weights to obtain the comprehensive score of the node, and the nodes in each quality area are sorted from high to low according to the comprehensive score.
8. The method according to claim 7, characterized in that The coverage of each node in each quality area is calculated based on the directly connected pipeline of the node and the influence range of its secondary node, and converted into a coverage score, including: For each node, calculate the length of the pipe directly connected to it, and take other nodes connected by these pipes as secondary nodes, calculate the length of the pipe connected to the secondary nodes, and then calculate the sum of the length of the pipe directly connected to the node and the length of the pipe connected to the secondary nodes, and use this as the total coverage length of the node. Calculate the ratio of the total coverage length of the node to the total length of the pipes in the water supply network to obtain the coverage rate of the node; The coverage rates of all nodes in the water supply network are standardized and mapped to the interval [0,1] as the coverage rate score; Based on the water age index, the water age of each node in each quality area is calculated and converted into a water age score, including: For each node, based on its water age time series characteristic data, the average water age of all time steps is calculated; The average water age of all nodes in the water supply network is standardized and mapped to the [0,1] interval as the water age score.
9. The method according to claim 1, characterized in that: The method uses a greedy algorithm to select node combinations with the highest scores and node spacing that meets the set requirements from each quality area to generate candidate monitoring point combinations, including: Select the nodes with the highest comprehensive scores from each quality area as the preliminary candidate node set to provide initial input for the greedy algorithm; Calculate the straight-line distance between the current candidate node and the selected node, and determine whether it is greater than the preset distance threshold; If the straight-line distance between the current candidate node and the selected node is greater than the preset distance threshold, it will be added to the selected node list. Otherwise, the current candidate node will be skipped and nodes will continue to be selected in order of comprehensive scores until the node screening of all quality areas is completed. Based on the selected node list, output candidate monitoring point combinations.
10. The method according to claim 1, characterized in that The comprehensive multi-index information entropy and coverage optimization objectives are combined with node spacing constraints to process candidate monitoring point combinations through a greedy algorithm to determine a monitoring point layout plan that meets the information gain and coverage requirements, including: For each candidate monitoring point combination of each indicator, the information gain of the candidate point on all indicators is evaluated respectively, and the sum of multiple information entropies is taken as the total information gain of the candidate point; The node spacing constraint is set. On the basis of satisfying the constraint, the coverage rate and information gain changes are comprehensively considered. Through the greedy algorithm, the candidate monitoring point combination that maximizes the multi-index comprehensive information entropy gain and meets the coverage requirements is selected from all candidate monitoring point combinations to obtain the monitoring point layout plan.
Citation Information
Patent Citations
Automatic recognition method at drainage network monitoring point
CN106484971A
Water supply pipe network optimization method based on dynamic operation comprehensive state evaluation
CN112348231A
Arrangement optimization method for urban water supply pipe network monitoring points
CN114580786A
Comprehensive safety evaluation and monitoring point site selection method for urban water supply pipe network
CN117522199A
Urban drainage pipe network monitoring point optimization arrangement method based on graph theory and machine learning
CN118095606A
Cited By
Digital twin intelligent water saving system based on distributed optical fiber sensing network
CN120669619A
Layout method, device and equipment of drainage pipe network monitoring equipment, medium and product
CN120911050A
Method and device for determining equipment layout area, equipment and medium
CN121073010A
Urban drainage system sensor network evaluation method based on causal discovery
CN121257990A
A Sensor Network Evaluation Method for Urban Drainage Systems Based on Causal Discovery
CN121257990B