Graph neural network model based on Markov diffusion kernel and its application and framework extension
By introducing Markov diffusion kernel and attention mechanism into the graph neural network model, the problem of insufficient utilization of long-distance information and over-smoothing in the prediction of facility node pressure values in the water supply network is solved, the prediction accuracy is improved, and the node pressure value is realized. Accurate predictions.
Patent Information
- Application Number
- CN202410789923.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-19
AI Technical Summary
When the existing graph neural network model predicts the pressure value of facility nodes in the water supply network, it is difficult to effectively utilize the information of distant nodes, resulting in over-smoothing problems and affecting the prediction accuracy, especially when the node pressure value is highly dependent and the observable pressure value is limited. case.
The graph neural network model based on Markov diffusion kernel is used, through the graph convolution module and node feature aggregation module, combined with the attention mechanism and residual connection, to strengthen the node's own information and neighborhood information, aggregate multi-layer node features, and alleviate Over-smoothing problem and improved prediction accuracy.
It achieves high-precision prediction in the prediction of pressure values of facility nodes in the water supply network, overcomes the problems of insufficient information utilization and over-smoothing of remote nodes in traditional models, and improves the distinction and prediction accuracy of node representation.
Smart Images

Figure CN118350166B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer science, hydrology and machine learning technology, and more specifically, it is a graph neural network model based on Markov diffusion kernel. The present invention also relates to the application and framework expansion of the graph neural network model based on Markov diffusion kernel in water supply network. Background Art
[0002] A water distribution network (WDN) is a system designed to deliver treated water from water treatment plants to consumers in residential, commercial and industrial areas. Facility node pressure value prediction refers to the estimation or calculation of pressure at various nodes (connection points) within a WDN. Facility node pressure value prediction is a key aspect of the effective management and operation of a WDN. It is used to ensure that the network can provide a reliable and efficient water supply to all consumers while maintaining the integrity and security of the network and preventing leaks and bursts;
[0003] Predicting the stress values at facility nodes in WDN is indeed a critical task that faces significant challenges, the main difficulty being the lack of data. In many networks, only a small fraction of facility nodes have sensors due to cost constraints, making it difficult to obtain a complete picture of the system status, and this limited visibility hinders the ability to simulate and calculate network behavior using physical models, such as hydraulic simulations based on fluid mechanics principles. In addition, physical models usually require a high level of expertise to accurately set up and interpret the results, so they are not easily transferable from one system to another due to differences in network configuration and operating conditions;
[0004] To address the many challenges mentioned above, graph neural network models (GNNs) have emerged as a powerful tool that can significantly enhance capabilities in this area. GNNs are particularly well suited to handling complex, interconnected water supply network structures because they can naturally represent the topology of the network as a graph, where nodes represent junctions and edges represent pipes or flow paths between junctions. In addition, as a data-driven model, GNNs can leverage available partial data to infer the conditions of unmonitored parts of the network;
[0005] Therefore, people began to try to fit the pressure values of facility nodes in the water supply network based on physical modeling and combined with data mining methods to try to solve these problems. In 2021, Gergely Hajgat′o et al. first tried the graph neural network method, designed the corresponding graph neural network model GCW, and applied it to the problem of predicting the pressure values of facility nodes in the water supply network. The experimental results proved that the results obtained by using the graph neural network model are more significant than traditional methods such as linear interpolation. Then, on this basis, Inaam Ashraf et al. utilized the edge information in the graph in 2022, proposed mGCN, and achieved better results. On the other hand, the application of attention mechanism is also the focus of people's attention. Huy Truong et al. designed GATRes based on the characteristics of the indicator values of facility nodes in the water supply network based on the ordinary graph attention neural network model, and achieved good performance in many different water supply networks. From the above, it can be seen that in the task of missing value prediction, GNN will be better than traditional interpolation methods and have higher prediction accuracy.
[0006] Although better performance has been achieved compared to the classical methods based on physical models, the existing GNN methods are still subject to certain limitations: in order to obtain information about distant nodes, they often stack the model in multiple layers, which will inevitably be affected by the over-smoothing problem. Especially in WDN, the pressure values at the facility nodes show a strong dependence relationship. At the same time, since the observable pressure values are very limited, it is also necessary to consider remote information to make accurate predictions;
[0007] Therefore, it is necessary to develop a model that can make full use of the information of distant nodes and alleviate the over-smoothing problem of the model when multiple layers are stacked. Summary of the invention
[0008] The first purpose of the present invention is to provide a graph neural network model based on the Markov diffusion kernel, which utilizes the characteristics of the Markov diffusion kernel, makes full use of distant node information, and alleviates the impact of over-smoothing problems on the model when multiple layers are stacked.
[0009] The second purpose of the present invention is to provide an application of a graph neural network model based on a Markov diffusion kernel in a water supply network. It is a method for using a graph neural network model based on a Markov diffusion kernel to predict missing values of facility nodes in a water supply network, which can improve the pressure value prediction accuracy of any facility node in the water supply network that does not have a sensor installed.
[0010] The third purpose of the present invention is to provide a framework extension of the graph neural network model based on the Markov diffusion kernel, so that the graph neural network model based on the Markov diffusion kernel can be expanded into a general framework, adapted to other graph neural network models, and can be used by different graph neural network models.
[0011] In order to achieve the first purpose of the present invention, the technical solution of the present invention is: a graph neural network model based on Markov diffusion kernel, characterized by: comprising a graph convolution module and a node feature aggregation module; the node representation of the graph convolution layer obtained by the graph convolution module is aggregated and converted by the node feature aggregation module to obtain the node index value required for the downstream task;
[0012] The graph convolution module includes the first input_dim×hidden linear transformation layer and the hidden×hidden graph convolution block; there are multiple hidden×hidden graph convolution blocks; the function of the first input_dim×hidden linear transformation layer is to map the node features with the initial data dimension of input_dim to the hidden dimension through linear transformation; the function of the multiple hidden×hidden graph convolution blocks in the middle is to continuously aggregate the feature information of the neighboring nodes around the node during the convolution process, and in this process, the node feature dimension always maintains the hidden size;
[0013] The first input_dim×hidden linear transformation layer and multiple hidden×hidden graph convolution blocks are connected in sequence to form a graph convolution module; the preprocessed graph structure data is input, and after passing through the graph convolution module, the node representation of each graph convolution layer is obtained (that is, the input of the graph convolution module is the preprocessed graph structure data, and the output is the node representation of each graph convolution layer);
[0014] The node feature aggregation module includes a node feature aggregation layer and a second hidden×output_dim linear transformation layer; the node feature aggregation layer is to perform secondary aggregation on the output results of each block of the above-mentioned multiple graph convolutions to form a final node representation; the second hidden×output_dim linear transformation layer is to use the obtained node representation in downstream tasks, and to meet the task requirements, its feature dimension is converted from hidden to output_dim; for example, in the present invention, the downstream task is to predict the pressure value of the water supply network facility node, then its output_dim is set to 1;
[0015] The node feature aggregation layer and the second hidden×output_dim linear transformation layer are connected in sequence to form a node feature aggregation module. The node representations of the above-mentioned graph convolutional layers are input, and after passing through the node feature aggregation layer, the final node representation is aggregated (the final node representation can be used for many downstream tasks, such as user node classification in social networks, article node classification in citation networks, and in this article, the pressure value prediction of facility nodes) as the input of the second hidden×output_dim linear transformation layer. This process together constitutes a node feature aggregation module. The input of the node feature aggregation module is the node representation of each graph convolutional layer obtained by the graph convolution module. After being processed by the node feature aggregation layer and the second hidden×output_dim linear transformation layer of the node feature aggregation module, the node feature aggregation module outputs the node index value required for the downstream task (when the downstream task is the prediction of the pressure value of the facility node in the water supply network, the output is the final prediction value of the node pressure; when the downstream task is the user node classification in the social network, the paper classification in the citation network, etc., the output is the final classification result).
[0016] In the above technical solution, the hidden×hidden graph convolution block includes a hidden×hidden graph convolution layer, a basic graph attention mechanism module (generally a single-layer GAT), a residual connection mechanism module (generally a residual connection with the initial node features), and a relu activation function; the hidden×hidden graph convolution layer is respectively connected to the attention mechanism module, the residual connection mechanism module and the relu activation function.
[0017] In the above technical solution, the node feature aggregation layer aggregates multiple layers of node features in a certain manner, which adopts the same form as the diffusion of the Markov diffusion kernel in the graph.
[0018] In the above technical solution, the method for constructing a graph neural network model based on Markov diffusion kernel includes the following steps:
[0019] First, define the graph structure data;
[0020] For a graph structure data with n nodes and m edges, it is recorded as G = (V, E), where V is the initial node set and E is the initial edge set; A is used to represent the adjacency matrix of G, and D is the degree information diagonal matrix of G; for each node, it will have corresponding features, To represent, where q0 is the feature dimension of the node in G;
[0021] Next, a basic definition of graph neural network model GNN is given;
[0022] Generally speaking, a GNN performs feature convolution and information aggregation on each node in the graph, outputs the corresponding node-level representation, and finally uses it in downstream tasks; in most cases, they follow the message passing paradigm, where graph neural networks are regarded as a message passing algorithm, and nodes can use different aggregation methods and combination functions to aggregate information from their neighbors. In each propagation step, each node i in V aggregates messages from the neighborhood e∈E and passes the message in the aggregation method to its previous representation h i Combine to update its representation; in form, each node has its initial features, recorded as ; In the single-step iteration process, the features of each node are updated from its direct neighborhood, and generated through K steps In general, a k-layer graph neural network model can be expressed as:
[0023] (1)
[0024] Among them, f k is an aggregation function that acts on each node through its neighborhood; N i represents the first-order neighborhood corresponding to the node; θ k is the weight matrix of the kth layer, which is composed of learnable parameters; j refers to the neighboring nodes of node i; k≤K, K is the total number of layers of the graph neural network model, and the K range is generally 15-25. The total number of layers K is a hyperparameter determined based on experience. In most graph neural networks, a shallow structure is generally adopted, that is, a two-layer graph neural network model can achieve the best results. However, in graph networks, it is often necessary to set K very large to aggregate information from distant nodes, so the graph neural network model needs to have the ability to capture information from distant nodes;
[0025] Next, define the Markov diffusion distance;
[0026] The Markov Diffusion Kernel (MDK) on the graph is a kernel method, which is generally used to represent the degree of similarity between two nodes; it describes that in multiple Markov processes in the graph, when two nodes diffuse in the graph in a similar way, they are considered similar because they affect other nodes in a similar way. In addition, if the two nodes are in the same cluster, they are considered neighbors. In addition, if the two nodes are in the same cluster, they are considered neighbors. At time T, the Markov Diffusion Distance between node i and node j is defined as:
[0027] (2)
[0028] Among them, d ij (T) is the Markov diffusion distance between node i and node j at time T; x j (T) is the average access probability of node j at time T; x i (T) is the average access probability of node i at time T, which is calculated as:
[0029]
[0030] Among them, Trans represents the transition probability matrix of node i in this Markov process, x i (0) is the initial state of the node transfer probability matrix; then by defining , formula (2) can be rewritten as follows:
[0031] (4)
[0032] in, It can be regarded as the Euclidean distance between two nodes, which is mapped into a high-dimensional space through Filter(T); Filter(T) can be regarded as a graph filter. While retaining most of the eigenvalues of the transition probability matrix, the low-pass property of the filter becomes stronger as the number of transfer steps K increases. In other words, as K increases, the filter can explore a wider neighborhood while maintaining the nearest locality of the node.
[0033] Based on the kernel method (the kernel method is shown in the above formula (1)-formula (3)) and its derived graph filter (the graph filter is shown in the above formula (4)), a graph neural network model MDKNet based on Markov diffusion kernel can be obtained. The node representation obtained by the model MDKNet at the K layer is It can be expressed as:
[0034] (5)
[0035] in, represents the standardized transition probability matrix, which is generally calculated by the Laplace matrix of the graph. W represents the weight matrix. It can be regarded as the representation of the node in the kth layer of the graph neural network model; It refers to the node feature of node i at layer 0, that is, the initial node representation obtained after its initial feature passes through the first linear transformation layer.
[0036] In the above technical solution, it can be observed that the cumulative term in formula (5) starts from k=1, which means that in the process of information aggregation, the central node will not consider its own information, but will continuously aggregate neighborhood information. However, in the water supply network, the facility node's own information plays a very significant role in its own pressure value prediction, especially for those facility nodes with sensors installed, which generally helps them obtain better prediction accuracy. Therefore, the Markov diffusion kernel-based graph neural network model MDKNet described in the present invention strengthens the node's own information from two aspects:
[0037] First, in the information aggregation stage, the initial representation of the nodes is added to each layer of the Markov diffusion kernel-based graph neural network model MDKNet proposed in this invention through the attention mechanism; the information aggregation mode of MDKNet can be expressed as:
[0038] (6)
[0039] Where Attn represents the basic graph attention mechanism. In the graph neural network model MDKNet described in the present invention, a general graph attention mechanism is used. Of course, in the specific implementation, this part can also be replaced by other types of attention mechanisms; σ Represents a sum calculation. In the graph neural network model MDKNet proposed in the present invention, the simplest sum calculation is adopted. In the specific implementation, this part can also use a more complex sum function, such as a sum function with custom weights or learnable weights.
[0040] Next, in the result output stage, on the basis of maintaining the original sum calculation, the k=0 item is added to the output representation as an additional item, and a parameter α is used to dynamically control the proportion of the node's own information and the node's neighborhood information. Finally, in MDKNet, the node representation obtained after multiple layers of iteration is It can be expressed as:
[0041] (7)
[0042] By stacking multiple layers, MDKNet can not only aggregate information from more distant nodes, but also maintain the original local structure of the nodes; the node feature aggregation layer of the graph neural network model based on the Markov diffusion kernel of the present invention aggregates multiple layers of node features in the above manner, alleviates the impact of the over-smoothing problem on the model when stacking multiple layers, and improves the prediction accuracy;
[0043] The above formula (5) describes a node representation of a single layer of a graph neural network model based on a Markov diffusion kernel; while formulas (6) and (7) are supplements to formula (5). Based on the above formula (5), improvements are made from the perspective of information aggregation (as shown in the above formula (6)) and the perspective of result output (as shown in the above formula (7)). The graph neural network model based on the Markov diffusion kernel constructed by the present invention is shown in the above formula (7).
[0044] In order to achieve the second purpose of the present invention, the technical solution of the present invention is: the application of the graph neural network model based on Markov diffusion kernel in the water supply network is characterized by: comprising the following method steps,
[0045] Step 1: Obtain water supply network data, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges, and perform data preprocessing on the water supply network graph data;
[0046] Step 2: Train the graph neural network model and serialize the trained graph neural network model and store it permanently on the hard disk;
[0047] Step 3: Input the graph structure data preprocessed in step 1 into the graph neural network model trained in step 2 to complete the pressure value prediction of the facility node in the water supply network.
[0048] In the above technical solution, in step one, data preprocessing is performed on the water supply network diagram data, including variable derivation, data cleaning, data conversion, feature standardization processing, and installation of facility node sensors in the water supply network.
[0049] In the above technical solution, the variable derivation is specifically implemented by one or more of the following combined processing:
[0050] For data sets that originally have no node features, the degree of each node is OneHot encoded according to the connectivity of the nodes in the graph to form its features;
[0051] For graphs with node degrees greater than a preset value, orthogonal transformation is performed on each node degree to use this as their feature;
[0052] According to the importance of the attributes in the diagram, a series of weights reflecting these attributes are added, and the variables are added, connected, or one or more of the Cartesian products are calculated to integrate multiple attributes together to obtain new characteristic variables that better reflect the nature of the water supply network diagram.
[0053] In the above technical solution, data cleaning is to remove isolated nodes and obtain a maximum connected subgraph;
[0054] Data conversion is to process graph data of different data types into a unified format;
[0055] Feature normalization is to perform a linear transformation on the node features in the original graph data so that the resulting values are mapped to the range [0, 1].
[0056] In the above technical solution, the installation of sensors at the facility nodes is to simulate a real-life scenario where only some of the monitoring values of the facility nodes in the water supply network are visible. For example, there are 100 nodes in the water supply network, and the network visibility is set to 0.05, then the total number of nodes with sensors installed in the entire network is 5. The pressure value prediction of the facility nodes in the entire water supply network is divided into the pressure value prediction of the sensor nodes installed and the pressure value prediction of the sensor nodes not installed. The difference between the two is reflected in the loss value in the model training process described later. In the present invention, the installation method of facility node sensors in the water supply network includes the following steps:
[0057] According to the installation mode selected in the configuration file of the sensor node and parameters such as network visibility, sensors are installed for several facility nodes in the water supply network, and a binary mask matrix is returned, denoted as Mask, whose value form is:
[0058] (8)
[0059] The matrix value corresponding to the node with the sensor installed is 1, and the matrix value corresponding to the node without the sensor installed is 0.
[0060] In the above technical solution, in step 2, the training process of the graph neural network model is:
[0061] (1) First, some relevant information / data in the water supply network dataset is obtained, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges. The water supply network data is preprocessed to obtain a dataset; and the dataset is divided into a training set, a test set, and a validation set. The preprocessing methods include variable derivation, data cleaning, data conversion, feature standardization, and installation of facility node sensors in the water supply network.
[0062] (2) Then, the graph structure of the sample image selected from the training data set is input into the graph neural network model MDKNet described in the present invention, and the loss value of the model during the training process is calculated; the learnable parameters in the model are updated by the loss value;
[0063] (3) Finally, based on the loss value and the complete graph neural network model MDKNet, after multiple iterations of training, the loss values of the training set and the validation set are used to monitor whether the MDKNet in training meets the training completion conditions;
[0064] If the training completion conditions are met, the training is terminated and used in the task of predicting the pressure values of facility nodes in different types of water supply networks;
[0065] If MDKNet does not meet the training completion conditions, adjust the relevant parameters in MDKNet to make the loss value of MDKNet converge. After multiple iterations of training based on the adjusted MDKNet and the loss value of the adjusted MDKNet, monitor whether the MDKNet in training meets the training completion conditions through the loss values of the training set and the validation set.
[0066] The training completion conditions include: the number of training iterations reaches a predetermined iteration threshold (a threshold pre-estimated by the loss value of MDKNet), and / or the loss value of MDKNet is less than a predetermined loss value threshold. For example, the training iterations reach 5,000 and / or the loss value is less than 0.05. Setting the training completion conditions can speed up the model convergence.
[0067] In the above technical solution, in the above step (2), the loss value is calculated as follows:
[0068] Through the preset network visibility, the pressure values and mask matrices of some facility nodes are taken as input. After passing through the graph neural network model MDKNet described in the present invention, the model MDKNet outputs the complete facility node pressure values;
[0069] By comparing the gap between the predicted value of the facility node and the actual value monitored by the sensor of the facility node, the loss value of the model MDKNet can be calculated; since the facility nodes are divided into two types: nodes with sensors installed and nodes without sensors installed, the loss value in the training process includes the loss values of these two types of facility nodes and the loss value of the network as a whole (i.e., the loss value of the sensor node installed, the loss value of the sensor node not installed, and the loss value of the water supply network as a whole). The parameter β is used to dynamically balance the ratio between the loss values of these two types of nodes. The loss value can be expressed as:
[0070] Loss = β Loss obs +(1-β)·Loss hid +Loss all (9)
[0071] Among them, Loss obs Represents the loss value of the observable facility node (i.e., the facility node with the sensor installed), Loss hid Represents the loss value of the unobserved facility node (i.e., the facility node without sensors installed), Loss all Represents the loss value of all nodes in the entire water supply network.
[0072] In the above technical solution, in step three, the trained graph neural network model completes the pressure value prediction of the facility node in the water supply network, which specifically includes the following steps:
[0073] First, the water supply network topology and simulation data are provided as input to the Markov diffusion kernel-based graph neural network model;
[0074] Next, the Markov diffusion kernel-based graph neural network model obtains the final node representation through steps such as feature linear transformation, node feature aggregation, and weight matrix multiplication.
[0075] Finally, through the linear transformation of the output layer of the graph neural network model based on the Markov diffusion kernel, the prediction data of the corresponding node is obtained, that is, the node pressure value is obtained.
[0076] In order to achieve the third purpose of the present invention, the technical solution of the present invention is: the framework expansion of the graph neural network model based on Markov diffusion kernel, characterized in that:
[0077] From a macroscopic perspective, the graph neural network model MDKNet proposed in the present invention can be expanded into a universal graph neural network framework uni-MDK (a unified framework based on Markov diffusion kernel applicable to different types of graph neural network models), whose formula is the same as the above formula (7), except that: h in the universal graph neural network framework uni-MDK i It is derived from the convolutional layers of other graph neural network models. The general graph neural network framework uni-MDK can be adapted to other graph neural network models to achieve prediction of downstream practical applications of various node classification tasks and improve prediction accuracy.
[0078] The framework expansion method of the graph neural network model based on Markov diffusion kernel includes the following steps:
[0079] The graph convolution module of the graph neural network model is replaced with the graph convolution module of other graph neural network models, while retaining the node feature aggregation module, thereby forming a new graph neural network model that can be used in the above-mentioned water supply network facility node pressure value prediction task;
[0080] Developing a general framework approach is critical to driving innovation in the field of neural networks. These general frameworks can provide standardized tools, interfaces and methods to help researchers realize ideas, compare results and promote progress in the field more quickly. The general graph neural network framework extended from the graph neural network model proposed in the present invention has the characteristics of being adaptable to other graph neural network models and can be used by different graph neural network models. It also has the advantage of being able to effectively improve the prediction accuracy of downstream practical applications of various node classification tasks (e.g., it can effectively improve its prediction accuracy in the application scenario of water supply network facility node pressure value prediction, it can effectively improve its prediction accuracy of user node classification in social networks, it can effectively improve its prediction accuracy of paper classification in citation networks, etc.). It solves the problems caused by the lack of a general framework method in the field of neural networks (e.g., (1) duplication of work and waste of resources: the lack of a general framework method means that researchers need to design and implement their neural network models from scratch, which will lead to a lot of duplication of work and waste of resources; (2) technological fragmentation: the lack of a general framework method may lead to technological fragmentation, that is, there are a large number of incompatible or difficult to integrate neural network models and algorithms; this makes the development of the entire field scattered and chaotic; (3) limited innovation: the lack of a general framework method may limit the space for innovation, and researchers will spend more time on basic implementation rather than on higher-level innovation and exploration).
[0081] Compared with the prior art, the beneficial effects of the present invention are:
[0082] (1) The present invention has the advantage of making full use of the features of distant nodes in the graph. The present invention obtains the information of distant nodes through a graph neural network model based on the Markov diffusion kernel, and uses the characteristics of the Markov diffusion kernel to alleviate the over-smoothing problem of the model when stacking multiple layers (so that when stacking multiple layers, the final node representation is distinguishable. For downstream tasks of node classification (including the user classification, text classification and pressure value prediction mentioned above), the more obvious the distinction between nodes is, the higher the final accuracy is); it overcomes the problem that the prior art graph attention neural network model stacks multiple layers of models in order to obtain distant node information, causing the model to be affected by over-smoothing (from the perspective of model training, over-smoothing will cause the final node representation to tend to be consistent, that is, the representations of different nodes also look consistent and lose their distinguishability; from the perspective of downstream applications, if the difference between different nodes is not large, then the model will lose the ability to distinguish these nodes, resulting in low prediction accuracy);
[0083] (2) The Markov diffusion kernel-based graph neural network model described in the present invention has strong applicability and is suitable for downstream practical applications of various node classification tasks. In addition to being applicable to water supply network node pressure prediction, it can also be applied to user node classification in social networks, paper classification in citation networks, etc. (i.e., downstream practical applications of node classification tasks in graph neural networks); when the downstream task is the prediction of facility node pressure value in the water supply network, the output of the graph neural network model for predicting missing value of water supply network facility nodes described in the present invention is the final predicted value of node pressure; when the downstream task is user node classification in social networks, paper classification in citation networks, etc., the output of the graph neural network model for predicting missing value of water supply network facility nodes described in the present invention is the final classified predicted value;
[0084] (3) The present invention realizes the application of Markov diffusion kernel, so that the graph neural network model proposed by the present invention also has its characteristics, and fully considers remote information. In the application of predicting the pressure value of the node of the water supply network facility, the present invention has the advantage of higher prediction accuracy than other graph neural network models by applying the Markov diffusion kernel, and adding the attention mechanism and residual connection structure, and can well cope with the scenario of missing values of the facility node; it overcomes the problem that the graph neural network model of the prior art is difficult to capture the characteristics of long-distance nodes and cannot make accurate predictions of the node pressure values; at the same time, in the prediction of the pressure value of the facility node of the water supply network, it solves the problem that the traditional physical method cannot cope with the scenario of missing values of the facility node;
[0085] (4) The application method of the graph neural network model based on the Markov diffusion kernel in the water supply network of the present invention is a method for predicting the missing values of nodes of water supply network facilities using the graph neural network model based on the Markov diffusion kernel, which can improve the prediction accuracy of the pressure value of any node in the water supply network that is not equipped with a sensor. By utilizing the characteristics of the Markov diffusion kernel, a wider neighborhood can be explored while maintaining the nearest locality of the node, thereby alleviating the over-smoothing problem. After multiple layers of convolution, the representations of different nodes can be distinguished, and the predicted value of each node in the water supply network obtained thereby is more accurate.
[0086] (5) The general graph neural network framework expanded from the graph neural network model proposed in the present invention has the characteristics of being adaptable to other graph neural network models, can be used by different graph neural network models, and has the advantage of being able to effectively improve the prediction accuracy in the application scenario of water supply network facility node pressure value prediction; it solves the problem of lack of a general framework method in the current application scenario of water supply network facility node pressure value prediction (in the application direction of water supply network facility node pressure value prediction, the existing graph neural network technology still lacks a general framework that can be used by different graph neural network models). BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 It is a principle block diagram of the graph neural network model based on Markov diffusion kernel and its application method in water supply network of the present invention;
[0088] Figure 2 This is a structural diagram of a neural network model of the present invention;
[0089] Figure 3 This is a block diagram of the graph convolution module of the graph neural network model MDKNet of the present invention;
[0090] Figure 4 It is a block diagram of the node information aggregation module of the graph neural network model MDKNet of the present invention;
[0091] Figure 5 This is a schematic diagram comparing the Mean Square Error of different graph neural network models of the examples of the present invention on the Richmond dataset. DETAILED DESCRIPTION
[0092] The following is a detailed description of the implementation of the present invention in conjunction with the accompanying drawings, but they do not constitute a limitation of the present invention and are only used as examples. At the same time, the advantages of the present invention are made clearer and easier to understand through the description.
[0093] like Figure 1 As shown, the present invention provides a graph neural network model based on Markov diffusion kernel and its application and framework extension, including the following steps:
[0094] Step 1: construct the graph neural network model based on Markov diffusion kernel described in the present invention, including multiple graph convolution layers, node feature aggregation layers and activation functions; through the basic components of the graph neural network model (multiple graph convolution layers, node feature aggregation layers and activation functions), construct the graph neural network model proposed in the present invention;
[0095] like Figure 2 As shown, the graph neural network model of the present invention is composed of a graph convolution module and a node feature aggregation module as a whole, including a first input_dim×hidden linear transformation layer, multiple hidden×hidden graph convolution blocks, a node feature aggregation layer, and a second hidden×output_dim linear transformation layer;
[0096] The first input_dim×hidden linear transformation layer and multiple hidden×hidden graph convolution blocks are sequentially connected to form a graph convolution module. The preprocessed graph structure data is input and passed through the graph convolution module to obtain the node representation of each graph convolution layer.
[0097] The node feature aggregation layer and the second hidden×output_dim linear transformation layer are sequentially connected to form a node feature aggregation module, which inputs the node representations of the above-mentioned graph convolutional layers, passes through the node feature aggregation layer, and aggregates to obtain the final node representation as the input of the second hidden×output_dim linear transformation layer; this process together constitutes a node feature aggregation module, which inputs the node representations of each graph convolutional layer obtained by the graph convolution module, and after being processed by the node feature aggregation layer and the linear transformation layer, outputs the node index value required for the downstream task;
[0098] Each of the multiple hidden×hidden graph convolution blocks is composed of a hidden×hidden graph convolution layer, a basic graph attention mechanism module (generally a single-layer GAT), a residual connection mechanism module (generally a residual connection with the initial node feature), and a relu activation function; the node feature aggregation layer aggregates multiple layers of node features in a certain way, which adopts the same form as the diffusion method of the Markov diffusion kernel in the graph;
[0099] For a graph structure data with n nodes and m edges, the present invention uses G = (V, E) to represent it, where V is the initial node set of G, E is the initial edge set of G, and A is used to represent the adjacency matrix of G, and D is the degree information diagonal matrix of G. For each node, it will have corresponding features, and the present invention uses To represent, where q0 is the feature dimension of the node in G;
[0100] Next, the definition of the basic graph neural network model (GNN) in this invention is given. Generally speaking, a GNN performs feature convolution and information aggregation on each node in the graph, outputs the corresponding node-level representation, and finally uses it in downstream tasks. In most cases, they follow the message passing paradigm, where the graph neural network is regarded as a message passing algorithm, and nodes can use different aggregation methods and combination functions to aggregate information from their neighbors. In each propagation step, each node i in V aggregates messages from the neighborhood e∈E, and passes the message in the aggregation method to its previous representation h i Combine to update its representation. Formally, each node has its initial features, denoted as ; In the single-step iteration process, the features of each node are updated from its direct neighborhood, and generated through K steps In general, a k-layer graph neural network model can be expressed as:
[0101] (1)
[0102] Among them, f kis an aggregation function that acts on each node through its neighborhood; N i Represents the first-order neighborhood of the node. k is the weight matrix of the kth layer, which is composed of learnable parameters; j refers to the neighboring nodes of node i; the total number of layers K is a hyperparameter determined based on experience. In most graph neural networks, a shallow structure is generally adopted, that is, a two-layer graph neural network model can achieve its best results. However, in graph networks, K often needs to be set very large to aggregate information from distant nodes, so the graph neural network model needs to have the ability to capture information from distant nodes; K is set to 15-25;
[0103] Next, the Markov Diffusion Kernel (MDK) on the graph is a kernel method, which is generally used to represent the similarity between two nodes; it describes that in multiple Markov processes in the graph, when two nodes diffuse in the graph in a similar way, they are considered to be similar because they affect other nodes in a similar way. In addition, if the two nodes are in the same cluster, they are considered to be neighbors. In addition, if the two nodes are in the same cluster, they are considered to be neighbors. In the present invention, for time T, the Markov Diffusion Distance between node i and node j is defined as:
[0104] (2)
[0105] Among them, d ij (T) is the Markov diffusion distance between node i and node j at time T; x j (T) is the average access probability of node j at time T; x i (T) is the average access probability of node i at time T, which is calculated as:
[0106]
[0107] Among them, Trans represents the transition probability matrix of node i in this Markov process, and xi(0) is its initial state; then by defining , formula (2) can be rewritten as follows:
[0108] (4)
[0109] In this formula, It can be regarded as the Euclidean distance between two nodes, which is mapped into a high-dimensional space through Filter(T). Filter(T) can be regarded as a graph filter. While retaining most of the eigenvalues of the transition probability matrix, the low-pass property of the filter becomes stronger as the number of transition steps K increases. In other words, as K increases, the filter can explore a wider neighborhood while maintaining the nearest locality of the node.
[0110] Based on the kernel method and its derived graph filter, the graph neural network model proposed in this invention can be obtained. The node representation obtained by this model at the k layer is It can be expressed as:
[0111] (5)
[0112] in, represents the standardized transition probability matrix, which is generally calculated by the Laplace matrix of the graph. W represents the weight matrix. It can be regarded as the representation of the node in the Kth layer of the graph neural network model; It refers to the node feature of node i at layer 0, that is, the initial node representation obtained after its initial feature passes through the first linear transformation layer;
[0113] It can be observed that the cumulative term in formula (5) starts from k = 1, which means that in the process of information aggregation, the central node will not consider its own information, but will continuously aggregate neighborhood information. However, in the water supply network, the facility node's own information plays a significant role in its own pressure value prediction, especially for those facility nodes with sensors installed, which generally helps them obtain better prediction accuracy. Therefore, the graph neural network model MDKNet proposed in this invention strengthens the node's own information from two aspects:
[0114] First, in the information aggregation stage, the initial representation of nodes is added to each layer of the graph neural network model MDKNet proposed in this invention through the attention mechanism. Figure 3 As shown, the information aggregation model of MDKNet can be expressed as:
[0115] (6)
[0116] Among them, Attn represents the basic graph attention mechanism. In the graph neural network model MDKNet proposed in the present invention, a general graph attention mechanism is used. Of course, in the specific implementation, this part can also be replaced by other types of attention mechanisms; fσ represents a summation calculation. In the graph neural network model MDKNet proposed in the present invention, the simplest summation calculation is used. In the specific implementation, this part can also use a more complex summation function, such as a summation function with custom weights or learnable weights.
[0117] Next, in the result output stage, on the basis of maintaining the original sum calculation, the k=0 item is added to the output representation as an additional item, and a parameter α is used to dynamically control the proportion of the node's own information and the node's neighborhood information. Figure 4 As shown, in MDKNet, the node representation is finally obtained after multiple layers of iteration. It can be expressed as:
[0118] (7)
[0119] By stacking multiple layers, MDKNet can not only aggregate information from more distant nodes, but also maintain the original local structure of the nodes;
[0120] Step 2: Obtain water supply network data, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges, and perform data preprocessing on the water supply network graph data;
[0121] In the present invention, data preprocessing is performed on water supply network data, including variable derivation, data cleaning and conversion, feature standardization processing and facility node sensor installation;
[0122] The reason for the variable derivation of the present invention is that the index value of the facility node in the water supply network has a certain spatiotemporal continuity. The index value of a certain facility node will be greatly affected by its own corresponding index value at the previous moment, and is also related to the other topologically adjacent facility nodes. It is difficult to predict the corresponding index value by relying solely on a single node feature information. Therefore, it is necessary to process and integrate the topological connection relationship between different facility nodes to form new variables. The present invention adopts a water supply network scene data generation algorithm based on user demand and pump station flow rate. The algorithm takes into account the continuity of time changes in the water supply network and the changes in user demand at different time periods. A large amount of extensive scene data can be generated to simulate the changes in index values in a real water supply network. In addition, according to some of the more important attributes in the graph, a series of weights reflecting these attributes can be added, and various calculation methods such as adding, connecting, and calculating Cartesian products can be performed on the variables to integrate multiple attributes together to obtain new characteristic variables that better reflect the characteristics of the water supply network;
[0123] The data cleaning conversion in the present invention mainly includes the following tasks. Cleaning of isolated nodes. In the graph data of some water supply networks, there will be some isolated nodes. Although they also contain some information, their existence brings greater noise impact to the model, so they are often directly eliminated to obtain a maximum connected subgraph. Data cleaning technology is relatively simple, but the processing is relatively complicated. In addition to using tools or manual processing, you can also write some code to help with cleaning;
[0124] Data conversion includes processing the original graph data of different data types, including scipy.sparse.coo_matrix, numpy.ndarray and other data types, into the form of edge_index+edge_weight. On the one hand, it is beneficial to the subsequent model training, and on the other hand, processing it into such a form can significantly reduce memory overhead. For some models, the sparse matrix form cannot meet its input requirements, and it is also necessary to convert the graph data into a dense matrix form for this method before the next step of model training;
[0125] The specific operation of feature normalization is to perform linear transformation on the node features in the original graph data so that the result value is mapped to [0, 1], and the value of each attribute is mapped to a relatively close numerical value and fluctuation range, thereby improving the convergence speed and model accuracy during gradient descent.
[0126] In the present invention, the installation of facility node sensors is mainly to simulate the scenario in which only some of the monitoring values of the facility nodes in the water supply network are visible in real situations. For example, there are 100 nodes in the water supply network, and the network visibility is set to 0.05, then the total number of nodes with sensors installed in the entire network is 5. The pressure value prediction of the facility nodes in the entire water supply network is divided into the pressure value prediction of the sensor nodes installed and the pressure value prediction of the sensor nodes not installed. The difference between the two is reflected in the loss value in the model training process described later. In the present invention, the sensor node installation method includes the following steps:
[0127] According to the installation method selected in the configuration file of the sensor node, as well as parameters such as network visibility, sensors are installed on several facility nodes in the water supply network, and a binary mask matrix is returned, denoted as Mask, whose value form is:
[0128] (8)
[0129] Among them, the matrix value corresponding to the node with the sensor installed is 1, otherwise it is 0;
[0130] Step 3: Input the preprocessed graph structure data obtained in step 2 into the graph neural network model constructed in step 1 to complete the pressure value prediction of the facility node in the water supply network;
[0131] The graph neural network models used in this invention are all trained graph neural network models, and their training process is as follows:
[0132] (1) Obtain relevant information / data from the water supply network dataset, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges, and preprocess the water supply network data; and divide the dataset into a training set, a test set, and a validation set;
[0133] (2) Then, the graph structure of the sample image selected from the training data set is input into the graph neural network model to calculate its loss value. Through the preset network visibility, the pressure value and mask matrix of a part of the facility nodes are taken as input. After passing through the graph neural network model, the model outputs the complete facility node pressure value. By comparing the gap between the predicted value and the actual value, the training loss value of the graph neural network can be calculated. Since the nodes are divided into two types: nodes with sensors installed and nodes without sensors installed, the loss value in the training process includes the loss values of these two types of facility nodes and the loss value of the network as a whole. The parameter β (β in the present invention is generally taken as 0.5) is used to dynamically balance the ratio between the loss values of these two types of nodes. The loss value can be expressed as:
[0134] Loss = β Loss obs+(1-β)·Loss hid +Loss all (9)
[0135] Among them, Loss obs Represents the loss value of the observable facility node (i.e., the facility node with the sensor installed), Loss hid Represents the loss value of the unobserved facility node (i.e., the facility node without sensors installed), Loss all Represents the loss value of all nodes in the entire network;
[0136] (3) Finally, based on the loss value and the complete graph neural network model, after multiple iterations of training, the loss values of the training set and the validation set are used to monitor whether the graph neural network model in training meets the training completion conditions. If it meets the training completion conditions, the training is terminated and used in the task of predicting the pressure values of facility nodes in different types of water supply networks.
[0137] The training completion condition includes at least one of the following: the number of training iterations reaches a predetermined iteration threshold (a threshold pre-estimated by the loss value of the graph neural network model), and the loss value of the graph neural network model is less than the predetermined loss value threshold. For example, the training iterations reach 5,000 times and the loss value is less than 0.05. Setting the training completion condition can speed up the model convergence;
[0138] If the graph neural network model does not meet the training completion conditions, the relevant parameters in the graph neural network model are adjusted to make the loss value of the graph neural network model converge, based on the adjusted graph neural network model and the loss value of the adjusted graph neural network model;
[0139] After the entire graph neural network model is trained, the model can be serialized and permanently stored on the hard disk;
[0140] The graph neural network model is used to predict the pressure value of the facility node on the water supply network graph data. The specific steps are to deserialize from the hard disk to the memory, input the new water supply network graph structure data, and then predict the pressure value of its facility node;
[0141] If new data appears after a period of time and needs retraining, return to step 1;
[0142] Step 4: By expanding the graph neural network model constructed in step 1, a general graph neural network framework can be obtained, which can be adapted to other graph neural network models to complete the pressure value prediction of facility nodes in the water supply network.
[0143] Verification experiment: In order to verify the effectiveness of the graph neural network model described in the present invention, the following comparative experiments were conducted:
[0144] This validation experiment uses the following datasets:
[0145] A water supply network diagram with 865 facility nodes extracted from a small town with about 8,000 residents in a certain country. The prediction task is to randomly cover the pressure values of some facility nodes and then use the graph neural network model to predict the pressure values of this part. It contains 865 facility nodes and 949 pipelines (edges). The diameter of the graph is 234, and the average number of edges is 2.19;
[0146] The Markov diffusion kernel-based graph neural network proposed in this paper is compared with the following three graph neural network models:
[0147] (1) GATRes (a graph attention neural network model with a special residual structure);
[0148] (2) mGCN (a multi-layer graph convolutional neural network model that utilizes side information);
[0149] (3) GCW (a graph neural network model based on K-order local spectral filter);
[0150] In order to verify the feasibility of the Markov diffusion kernel-based graph neural network used in the present invention in predicting the pressure value of the water supply network facility node, an experiment was designed to compare the graph neural network in the present invention with the above three comparative graph neural network models, and to compare the prediction error rate of the graph neural network in the present invention on the above data set of a certain country and a certain place;
[0151] The relevant parameters of the graph neural network model in the task of predicting the pressure value of the facility node in the water supply network are mainly the visibility of the nodes in the graph (that is, how many facility nodes in the graph are equipped with sensors to obtain accurate monitoring values). In this verification test, a relatively severe situation is adopted. The visibility of the nodes in the graph is only 0.05, that is, the monitoring values of most facility nodes are unknown. This verification test experimentally explores the prediction error rate comparison of the graph neural network model MDKNet proposed by the present invention and the above three comparison graph neural network models on the above-mentioned data set of a certain country and a certain place. The smaller the error rate, the higher the prediction accuracy of the model;
[0152] It should be noted that: in the task of missing value prediction, GNN (i.e. GATRes, mGCN, GCW) performs better than traditional interpolation methods, which is reflected in the lower error rate (error value) of GNN.
[0153] The prediction results of each model in this verification test are as follows Figure 5 As shown (in Figure 5 In the figure, the horizontal axis Models represents the model; the vertical axis MSE (Mean Square Error) represents the mean square error);
[0154] from Figure 5 It can be observed that the graph neural network model MDKNet proposed in the present invention has a significant improvement in prediction error rate compared with the GCW method, and the error rate of the MDKNet of the present invention is relatively lower than that of the mGCN and GATRes methods. Therefore, in the task application of predicting the pressure value of facility nodes in the water supply network, the graph neural network model MDKNet proposed in the present invention can achieve good results (i.e., full use of remote node information and high prediction accuracy); it solves the problem that the existing technology model does not fully utilize the information of remote nodes and has low prediction accuracy when predicting the pressure value of facility nodes in the water supply network when there are fewer sensor nodes in the graph.
[0155] Other parts not described belong to the prior art.
Claims
1. Application of a graph neural network model based on Markov diffusion kernel in water supply network, Features: The graph neural network model based on Markov diffusion kernel includes a graph convolution module and a node feature aggregation module; the node representation of the graph convolution layer obtained by the graph convolution module is aggregated and converted by the node feature aggregation module to obtain the node index value required for the downstream task; The graph convolution module includes a first input_dim×hidden linear transformation layer and a hidden×hidden graph convolution block; there are multiple hidden×hidden graph convolution blocks; the first input_dim×hidden linear transformation layer and multiple hidden×hidden graph convolution blocks are sequentially connected, and the input of the graph convolution module is the preprocessed graph structure data, and the output is the node representation of each graph convolution layer; The node feature aggregation module includes a node feature aggregation layer and a second hidden×output_dim linear transformation layer; The node feature aggregation layer and the second hidden×output_dim linear transformation layer are connected in sequence; the node representations of the above-mentioned graph convolutional layers are input, and the final node representation is obtained by aggregation through the node feature aggregation layer as the input of the second hidden×output_dim linear transformation layer; The method for constructing a graph neural network model based on Markov diffusion kernel comprises the following steps: First, define the graph structure data; For a graph structure data with n nodes and m edges, it is recorded as G = (V, E), where V is the initial node set and E is the initial edge set; A is used to represent the adjacency matrix of G, and D is the degree information diagonal matrix of G; for each node, it has corresponding features, To express, where q 0 is the feature dimension of the nodes in G; Next, a basic definition of graph neural network model GNN is given; In each propagation step, each node i in V aggregates messages from its neighbors e∈E and passes the incoming message in an aggregated manner, comparing it to its previous representation h i Combine to update its representation; in form, each node has its initial features, recorded as In a single-step iteration, the features of each node are updated from its immediate neighborhood, and generated through k steps. A k-layer graph neural network model is represented as: Among them, f k is an aggregation function that acts on each node through its neighborhood; N i represents the first-order neighborhood corresponding to the node; θ k is the weight matrix of the kth layer, which is composed of learnable parameters; j refers to the neighboring node of node i; k≦K, K is the total number of layers of the graph neural network model, and K is 15 to 25; Next, define the Markov diffusion distance; At time T, the Markov diffusion distance between node i and node j is defined as: Among them, d ij (T) is the Markov diffusion distance between node i and node j at time T; x j (T) is the average access probability of node j at time T; x i (T) is the average access probability of node i at time T, which is calculated as: Among them, Trans represents the transition probability matrix of node i in this Markov process, x i (0) is the initial state of the node transfer probability matrix; then by defining Rewrite formula (2) into the following form: in, It is regarded as the Euclidean distance between two nodes and mapped into a high-dimensional space through Filter(T); Based on the kernel method and its derived graph filter, a graph neural network model based on Markov diffusion kernel is obtained. The node representation obtained by this model at the k layer It is expressed as: in, represents the standardized transition probability matrix, which is generally calculated by the Laplace matrix of the graph. W represents the weight matrix. It can be regarded as the representation of the node in the kth layer of the graph neural network model; It refers to the node feature of node i at layer 0, that is, the initial node representation obtained after its initial feature passes through the first linear transformation layer; The method for strengthening the self-information of the nodes in the Markov diffusion kernel-based graph neural network model MDKNet is as follows: First, in the information aggregation stage, the initial representation of the nodes is added to each layer of the Markov diffusion kernel-based graph neural network model MDKNet through the attention mechanism; the information aggregation mode of MDKNet is expressed as: Among them, Attn represents the basic graph attention mechanism; f σ represents an addition calculation; Then, in the result output stage, on the basis of maintaining the original sum calculation, the k=0 item is added to the output representation as an additional item, and a parameter α is used to dynamically control the proportion of the node's own information and the node's neighborhood information. Finally, in MDKNet, the node representation obtained after multiple layers of iteration is It is expressed as: The application in the water supply network comprises the following method steps: Step 1: Obtain water supply network data, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges, and perform data preprocessing on the water supply network graph data; Step 2: Train the graph neural network model based on the Markov diffusion kernel, and serialize the trained graph neural network model and store it permanently on the hard disk; Step 3: Input the graph structure data preprocessed in step 1 into the graph neural network model trained in step 2 to complete the pressure value prediction of the facility node in the water supply network.
2. Application of the Markov diffusion kernel-based graph neural network model in a water supply network according to claim 1, Features: The hidden×hidden graph convolution block includes a hidden×hidden graph convolution layer, a graph attention mechanism module, a residual connection mechanism module, and a relu activation function; the hidden×hidden graph convolution layer is connected to the attention mechanism module, the residual connection mechanism module, and the relu activation function respectively.
3. Application of the Markov diffusion kernel-based graph neural network model in a water supply network according to claim 1, Features: In step 1, data preprocessing is performed on the water supply network graph data, including variable derivation, data cleaning, data conversion, feature standardization, and installation of facility node sensors in the water supply network; wherein: Variable derivation, the specific implementation includes one or a combination of the following processing: For data sets that originally have no node features, the degree of each node is OneHot encoded according to the connectivity of the nodes in the graph to form its features; For graphs with node degrees greater than a preset value, orthogonal transformation is performed on each node degree to use this as their feature; According to the importance of the attributes in the diagram, a series of weights reflecting these attributes are added, and the variables are added, connected, or one or more calculation methods of Cartesian product are used to integrate multiple attributes together to obtain new characteristic variables that better reflect the properties of the water supply network diagram; Data cleaning is to remove isolated nodes and obtain a maximum connected subgraph; Data conversion is to process graph data of different data types into a unified format; Feature normalization is to perform a linear transformation on the node features in the original graph data so that the resulting values are mapped to the range [0, 1].
4. Application of the Markov diffusion kernel-based graph neural network model in a water supply network according to claim 3, Features: The method for installing facility node sensors in a water supply network includes the following steps: According to the installation mode and network visibility parameters selected in the configuration file with sensor nodes, sensors are installed for several fixed facility nodes in the water supply network, and a binary mask matrix is returned, denoted as Mask, whose value form is: The matrix value corresponding to the node with the sensor installed is 1, and the matrix value corresponding to the node without the sensor installed is 0.
5. Application of the Markov diffusion kernel-based graph neural network model in a water supply network according to claim 4, Features: In step 2, the training process of the graph neural network model based on the Markov diffusion kernel is: (1) First, some relevant information / data in the water supply network dataset is obtained, including the total number of facility nodes, the number of edges, the radius of the water supply network graph, and the average number of edges. The water supply network data is preprocessed to obtain a dataset; and the dataset is divided into a training set, a test set, and a validation set. The preprocessing methods include variable derivation, data cleaning, data conversion, feature standardization, and installation of facility node sensors in the water supply network. (2) Then, the graph structure of the sample image selected from the training set is input into the graph neural network model MDKNet based on the Markov diffusion kernel, and the loss value of the model during the training process is calculated; (3) Finally, based on the loss value and the complete graph neural network model MDKNet, after multiple iterations of training, the loss values of the training set and the validation set are used to monitor whether the MDKNet in training meets the training completion conditions; If the training completion conditions are met, the training is terminated and used in the task of predicting the pressure values of facility nodes in different types of water supply networks; If MDKNet does not meet the training completion conditions, adjust the relevant parameters in MDKNet to make the loss value of MDKNet converge. After multiple iterations of training based on the adjusted MDKNet and the loss value of the adjusted MDKNet, monitor whether the MDKNet in training meets the training completion conditions through the loss values of the training set and the validation set. Among them, the training completion conditions include: the number of training iterations reaches a predetermined iteration threshold, and / or the loss value of MDKNet is less than a predetermined loss value threshold.
6. Application of the Markov diffusion kernel-based graph neural network model in a water supply network according to claim 5, Features: In the above step (2), the loss value is calculated as: Through the preset network visibility, the pressure values and mask matrices of some facility nodes are taken as input. After passing through the graph neural network model MDKNet, the model MDKNet outputs the complete pressure values of the facility nodes. By comparing the gap between the predicted value of the facility node and the actual value monitored by the sensor of the facility node, the loss value of the model MDKNet is calculated; since the facility nodes are divided into two types: nodes with installed sensors and nodes without installed sensors, the loss values in the training process include the loss values of the sensor nodes, the loss values of the sensor nodes without installed sensors, and the loss values of the water supply network as a whole. The parameter β is used to dynamically balance the ratio between the loss values of these two types of nodes. The loss value is expressed as: Loss=β·LOss obs +(1-β)·Loss hid +Loss all (9) Among them, Loss obs Represents the loss value of the observable facility node, Loss hid Represents the loss value of the unobserved facility node, Loss all Represents the loss value of all nodes in the entire water supply network.
7. Framework extension of graph neural network model based on Markov diffusion kernel, Features: Including the Markov diffusion kernel-based graph neural network model as described in any one of claims 1-2, the framework expansion includes the following method steps: The graph convolution module in the graph neural network model based on the Markov diffusion kernel is replaced with the graph convolution module of other graph neural network models, while retaining the node feature aggregation module in the graph neural network model based on the Markov diffusion kernel, thereby forming a new graph neural network model.
