A method for analyzing the status of hydroelectric turbine runner based on multi-index graph attention network

Through the multi-index chart attention network, the problem of low fault diagnosis efficiency and false alarms and false alarms in the existing technology is solved, and more accurate fault prediction and diagnosis is achieved, and maintenance costs and downtime are reduced.

CN117520779BActive Publication Date: 2024-12-20HOHAI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311539378.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2024-12-20
Estimated Expiration
2043-11-17

AI Technical Summary

Technical Problem

The prior art has problems of safety risks, inefficiency and false alarms in the diagnosis of water motor faults. It is impossible to accurately judge the operating status of the water motor wheel, resulting in unnecessary shutdown and maintenance costs.

Method used

Using a multi-index graph attention network method, the association relationship between the water motor runner is extracted and analyzed through explicit modeling of graph structure, graph diffusion convolution, graph attention network and fastDTW pre-training combined with dual contrast loss learning. , optimize fault prediction and diagnostic results.

Benefits of technology

It improves the production efficiency of water motors, reduces downtime and maintenance costs, provides more accurate status diagnosis and fault prediction, and can more clearly show the impact of different indicators on water motor status and faults.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520779B_ABST
    Figure CN117520779B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for analyzing the state correlation of a hydroelectric motor wheel based on a multi-index graph attention network, comprising: 1) using a graph structure to explicitly model the multivariate time series generated by the operation of the hydroelectric motor wheel; 2) using graph diffusion convolution to reconstruct the connection relationship between nodes to achieve feature transfer and fusion; 3) merging weighted graphs and using a graph attention network to learn the attention weights between nodes; 4) introducing fastDTW pre-training and combining dual contrast loss learning to update model parameters and optimize the hydroelectric motor wheel state correlation measurement results. The present invention is used to discover the correlation relationship between the states of the hydroelectric motor wheel, and provides relevant basis for hydroelectric motor wheel fault diagnosis based on the correlation relationship, which can help formulate effective operation optimization, performance optimization strategies and maintenance plans, and improve the reliability, efficiency and maintenance effect of the hydroelectric motor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for analyzing the running status of a hydroelectric motor wheel, and in particular to a method and system for analyzing the running status of a hydroelectric motor wheel based on a multi-index graph attention network, and belongs to the field of fault diagnosis of electric power engineering. Background Art

[0002] As the core component of the hydroelectric generator, the runner converts the kinetic energy in the water flow into mechanical energy of the runner and generates electrical energy through the principle of electromagnetic induction. Its operating status affects the power generation efficiency and reliability of the hydroelectric generator. The failure of the hydroelectric generator runner will have an adverse impact on the power generation, power stability, energy efficiency and economic operation of the hydropower generation system. Therefore, timely detection and repair of runner failures are important measures to ensure the normal operation and reliability of hydropower generation.

[0003] In industrial production, the most common practice for fault diagnosis of hydroelectric motors is to stop the machine and inspect its appearance, looking for visible abnormalities or damaged parts. This diagnostic method has certain safety risks and is inefficient, and it is unable to judge abnormalities that have not yet formed a fault. In addition, inspections based solely on appearance are susceptible to subjective judgment and individual experience, which may lead to incorrect diagnosis and repair plans, affecting production efficiency and costs. In recent years, there have been some advanced fault diagnosis methods that can provide more accurate fault prediction and diagnosis, but in some cases, there may still be false alarms and false positives, that is, the normally operating hydroelectric motor is mistakenly judged to be faulty. This may lead to unnecessary downtime and maintenance work, adding additional costs and time expenses. Summary of the invention

[0004] Purpose of the invention: In view of the problems and deficiencies in the prior art, the present invention provides a method and system for analyzing the state association of a hydroelectric motor wheel based on a multi-index graph attention network, aiming to use the graph attention network to extract and analyze the association relationship between the hydroelectric motor wheels. For the hydroelectric motor wheel state association analysis task, by using the attention mechanism, the attention weights between nodes are effectively learned and multiple indicators are combined for association analysis, which helps to improve the production efficiency of the hydroelectric motor, reduce downtime, reduce maintenance costs, and prevent possible future failures in advance.

[0005] Technical solution: A method for analyzing the state association of a hydroelectric turbine runner based on a multi-index graph attention network, which is suitable for predicting and diagnosing faults of a hydroelectric turbine runner, comprises the following steps:

[0006] (1) Use graph structures to explicitly model the multivariate time series generated by the operation of the hydropower turbine runner;

[0007] (2) Use graph diffusion convolution to reconstruct the connection relationship between nodes to achieve feature transfer and fusion;

[0008] (3) Merge weighted graphs and use graph attention networks to learn attention weights between nodes;

[0009] (4) FastDTW pre-training is introduced and combined with dual contrast loss learning to update the model parameters and optimize the correlation measurement results of the hydropower turbine wheel state.

[0010] Furthermore, the specific implementation process of using the graph structure in step (1) to explicitly model the multivariate time series generated by the operation of the hydroelectric motor rotor is as follows:

[0011] Multivariate time series and Set an embedding vector for each time point of , where I represents the time step of time series A, J represents the time step of time series B, and D represents the variable dimension of the time series;

[0012] The embedding vector of time point i in time series A is Where d represents the dimension of the embedding vector; the similarity between the embedding vectors at different time points is calculated to learn the graph structure. The similarity calculation formula is as follows:

[0013]

[0014] Among them, f(a i , a k ) is represented by the cosine similarity method; the similarity between the embedding vectors at different time points is e (k,i) Indicates the similarity between different time points. For any time point, the embedding vector a i , select the K neighbor time points with the greatest similarity (TopK), and transform the vector a i and neighbor vector a k Connect with edges, a k ∈TopK, corresponding to a in the adjacency matrix A′ i The value of the column can be expressed by the following formula:

[0015]

[0016] The embedding vector of time point j in time series B is Where d represents the dimension of the embedding vector; the similarity calculation formula between embedding vectors at different time points is as follows:

[0017]

[0018] Among them, f(b j , b k ) is expressed as the cosine similarity method; the similarity e′ between the embedding vectors at different time points (k,j)Indicates the similarity between different time points, and the embedding vector b for each time point j , select the K neighboring time points with the greatest similarity (TopK), connect them with edges, and correspond to b in the adjacency matrix B′ j The value of the column can be expressed by the following formula:

[0019]

[0020] Furthermore, in step (2), the connection relationship between nodes is reconstructed by using graph diffusion convolution to realize the specific steps of feature transfer and fusion are as follows:

[0021] In graph diffusion, we first focus all attention on the first node in the graph, then transfer part of the attention to the node's neighbors, disperse the attention from the starting node, and spread the features to more distant nodes through iterative propagation; after dispersing the attention of all nodes in the graph, we get a new adjacency matrix. Graph diffusion is defined as:

[0022]

[0023] where θ k is the weight coefficient, θ k ∈α(1-α) k , α∈(0,1); T is the transfer matrix, T=A′D -1 , A′ represents the adjacency matrix, and D is the diagonal matrix; in this case, each node in the obtained adjacency matrix S is connected to other nodes. In order to simplify the matrix, the values ​​below the threshold ε in the adjacency matrix S are set to 0, thereby obtaining a relatively sparse adjacency matrix S′; for the original adjacency matrices A′ and B′, the above graph diffusion formula is used to calculate two sparse weighted adjacency matrices S A and S B .

[0024] Furthermore, the specific steps of merging the weighted graph and using the graph attention network to learn the attention weights between nodes in step (3) are as follows:

[0025] (3.1) Merge weighted graph: traverse the weighted graph S A and S B , copy the original nodes and edges to the new graph structure, retain the original edge connection relationship, and obtain the adjacency matrix G of the new graph with a dimension of N×N, where N=I+J;

[0026]

[0027] (3.2) Take the graph G as the input of the graph attention network and combine it with the learnable position encoding W p, using the multi-head attention module, aggregate the information of neighbor nodes to update the feature representation of each time point. The calculation formula is as follows:

[0028]

[0029] in, is the feature representation of node i at the l+1th layer, || is the concatenation operation, H represents the number of attention heads, is the set of neighbor nodes of node i in the adjacency matrix G, is the attention score of nodes i and j at the hth attention head in layer l, is the weight matrix of the h-th attention head in the l-th layer, is the feature representation of node j at layer l;

[0030] In order to obtain the attention weight matrix between each node in the graph, in the last attention layer, the attention mechanism is used to calculate the attention weights between nodes, and the formula is:

[0031]

[0032] Among them, X represents the feature matrix of the node, W Q , W K and W V is a learnable weight matrix, represents the concatenation operation; softmax(·) is the normalization function, LeakyReLU(·) and ReLU(·) are the activation functions;

[0033] The attention score between node i and node j is Score ij =Att(X) i Att(X) j , the attention weight matrix between all nodes can be expressed as P = softmax(Score); in subsequent calculations, it is necessary to obtain the attention weight matrix between the first I nodes and the last J nodes, split this matrix from P and name it P s .

[0034] Furthermore, in step (4), the fastDTW pre-training is introduced and combined with the dual contrast loss learning, the model parameters are updated, and the specific steps of optimizing the hydroelectric motor rotor state correlation measurement result are as follows:

[0035] (4.1) In the pre-training stage, fastDTW is introduced to impose constraints to control the distortion path of the model; first, the fastDTW path between time series A and B is calculated and converted into a binary matrix P DTW ; Then pre-train the model to minimize the loss function:

[0036]

[0037] (4.2) In order to achieve time warping with sufficient time warp invariance and task-specific discriminability, a dual contrast loss learning model is used, and the loss function formula is as follows:

[0038]

[0039] in and All represent contrast loss. Specifically, It is expressed as:

[0040]

[0041] where τ is a hyperparameter of the margin, ||·|| F represents the Frobenius norm; if A and B belong to the same class, then the input A and the distorted input P s The distance between B is minimized; if they are not of the same class, the distance between them will be optimized to be greater than τ; the loss By using ||BP t A|| F and the length J of B, where P t Represents the attention weight matrix of the time point in B to the time point in A, represented by P s Transposed;

[0042] (4.3) Through this two-step training scheme, the model can avoid excessive distortion flexibility while maintaining greater flexibility than fastDTW; the distance between time series A and B is calculated by the following formula:

[0043]

[0044] After calculating the distances between all time series, the nearest neighbor algorithm can be used to determine the specific classification between the time series, thereby optimizing the measurement results of the correlation between the states of the hydroelectric turbine runners.

[0045] A hydroelectric turbine runner state correlation analysis system based on a multi-index graph attention network, including five modules: pre-training, graph structure learning, graph diffusion convolution, attention weight matrix calculation and contrast loss learning;

[0046] The pre-training module introduces the fastDTW algorithm for the multivariate time series of the hydroelectric turbine runner operation, calculates the distortion path between the two time series, and is used to constrain the distortion degree of the model training time series;

[0047] The graph structure learning module sets an embedding vector for each time point of the time series, calculates the similarity between the embedding vectors of different time points, and then selects the top K neighboring time points with the greatest similarity to the data at any time point, and connects them with edges to build a graph structure;

[0048] The graph diffusion convolution module uses graph diffusion convolution to reconstruct the connection relationship between nodes in the graph, and iteratively propagates the diffusion features to more distant nodes to achieve the transmission and fusion of node features;

[0049] The attention weight matrix calculation module establishes a graph attention network, merges two graphs and uses the merged graph as the input of the graph attention network, learns the similarity between nodes through a multi-head attention mechanism, and obtains the attention weight matrix of each head;

[0050] The contrast loss learning module performs contrast loss learning on the attention weight matrix and the original time series to calculate the similarity between the two time series; then, the model parameters are updated through the back propagation algorithm and the optimizer to optimize the hydroelectric motor runner state correlation measurement result.

[0051] The implementation process and method of the hydropower turbine wheel state association analysis system based on the multi-index graph attention network are the same and will not be repeated here.

[0052] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the hydroelectric motor runner state association analysis method based on a multi-index graph attention network as described above is implemented.

[0053] A computer-readable storage medium stores a computer program for executing the above-mentioned method for analyzing the state association of a hydroelectric motor wheel based on a multi-index graph attention network.

[0054] Beneficial effects: Compared with the prior art, the hydroelectric motor impeller state correlation analysis method and system based on the multi-indicator graph attention network provided by the present invention has the following advantages: the multi-indicator graph attention network can comprehensively analyze and correlate multiple performance indicators of the hydroelectric motor, and automatically learn and discover important correlations and patterns between different indicators through the attention mechanism, thereby providing more accurate state diagnosis and fault prediction. In addition, according to the size of the attention weight, the focus is on the most relevant indicators. This makes the results more interpretable and can clearly show the degree of influence of different indicators on the status and faults of the hydroelectric motor. By understanding the allocation of attention weights, users and maintenance personnel can better understand the reasons for changes in the status of the hydroelectric motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] Figure 1It is a framework diagram of a method for analyzing the state association of a hydroelectric turbine runner based on a multi-index graph attention network according to an embodiment of the present invention;

[0056] Figure 2 This is an example of the clustering result of the hydroelectric motor impeller state according to an embodiment of the present invention, wherein (a) is the visualization of the water pressure of the hydroelectric motor impeller blades, and (b) is the clustering result of the water pressure of the hydroelectric motor impeller blades. DETAILED DESCRIPTION

[0057] The present invention is further explained below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0058] Figure 1 This is the overall framework diagram of the hydroelectric turbine rotor state association analysis method based on the multi-index graph attention network, which is divided into 5 parts, including pre-training, graph structure learning, graph diffusion convolution, attention weight matrix calculation and contrast loss learning. First, a multivariate time series is formed according to the monitoring data (D univariate time series) of the hydroelectric turbine rotor state monitoring sensor. In order to analyze the correlation between the rotor operation states, time series A and B are used as specific embodiments. The fastDTW algorithm is used to calculate the time distortion degree between A and B, and the obtained binary matrix is ​​used for the pre-training learning of the subsequent model. Then, the time points in A and B are used as nodes in the graph, and the edge relationship of the graph is established using node similarity. Further, the learned graph structure is used to use graph diffusion convolution to reconstruct the connection relationship between nodes, and the features of the current node are diffused to more distant nodes to achieve feature transfer. After that, the weighted graph formed by the two time series is merged, and the relationship between the nodes is captured using the multi-head attention mechanism, and the attention weight matrix between the nodes is calculated. Finally, the obtained attention weight is applied to contrast loss learning to calculate the distance between the two time series to judge the correlation between the two.

[0059] There are multiple sensors on the impeller blades of a hydroelectric generator, which can collect multiple indicators such as water flow velocity and water pressure distribution. Figure 2 (a) is the visualization of the water pressure distribution on the blades of a hydroelectric turbine. Figure 2 (b) is an example of clustering results of water pressure on the turbine runner blades. The distance between the time series of water pressure data collected by the sensors on the turbine runner blades is calculated using the hydroelectric turbine runner state association analysis method based on the multi-index graph attention network. Clustering is performed using the nearest neighbor algorithm. It can be found that the water pressure data on the turbine runner blades can be divided into five categories. There are large differences between different categories, and the clustering results are consistent with the Figure 2The visualization in (a) is quite similar, indicating that the clustering accuracy of this method based on the correlation of the hydropower turbine runner status is relatively high.

[0060] The hydropower turbine runner state association analysis method based on multi-index graph attention network is used to conduct experiments on the hydropower turbine runner operation state data, including the following steps:

[0061] (1) The specific steps of using the graph structure to explicitly model the multivariate time series generated by the operation of the hydropower turbine runner are as follows:

[0062] Multivariate time series and Set an embedding vector for each time point of , where I represents the time step of time series A, J represents the time step of time series B, and D represents the variable dimension of the time series;

[0063] The embedding vector of time point i in time series A is Where d represents the dimension of the embedding vector, which is set to 64. The similarity learning graph structure between the embedding vectors at different time points is calculated. The similarity calculation formula is as follows:

[0064]

[0065] Among them, f(a i , a k ) is represented by the cosine similarity method; the similarity between the embedding vectors at different time points is e (k,i) Indicates the similarity between different time points. For any time point, the embedding vector a i , select the K neighbor time points with the greatest similarity (TopK), set the K value to 30, and transform the vector a i and neighbor vector a k Connect with edges, a k ∈TopK, corresponding to a in the adjacency matrix A′ i The value of the column can be expressed by the following formula:

[0066]

[0067] The embedding vector of time point j in time series B is Where d represents the dimension of the embedding vector, which is set to 64; the similarity calculation formula between embedding vectors at different time points is as follows:

[0068]

[0069] Among them, f(b j , b k ) is expressed as the cosine similarity method; the similarity e′ between the embedding vectors at different time points (k,j)The similarity between different time points, the embedding vector b of each time point j , select the K neighbor time points with the greatest similarity (TopK), set the K value to 30, connect them with edges, corresponding to b in the adjacency matrix B′ j The value of the column can be expressed by the following formula:

[0070]

[0071] (2) Using graph diffusion convolution to reconstruct the connection relationship between nodes, the specific steps of realizing feature transfer and fusion are as follows:

[0072] In graph diffusion, we first focus all attention on the current node, then pass some attention to the node's neighbors, disperse the attention from the starting node, and spread the features to more distant nodes through iterative propagation; after dispersing attention to all nodes in the graph, we get a new adjacency matrix. Graph diffusion is defined as:

[0073]

[0074] where θ k is the weight coefficient, θ k ∈α(1-α) k , α∈(0,1), set α=0.1; T is the transfer matrix, T=A′D -1 , A′ represents the adjacency matrix, and D is the diagonal matrix; in this case, each node in the obtained adjacency matrix S is connected to other nodes. In order to simplify the matrix, the values ​​below the threshold ε in the adjacency matrix S are set to 0, and the threshold ε is set to 10 -3 , thus obtaining a relatively sparse adjacency matrix S′; for the original adjacency matrices A′ and B′, the above graph diffusion formula is used to calculate two sparse weighted adjacency matrices S A and S B .

[0075] (3) The specific steps of merging weighted graphs and using graph attention networks to learn the attention weights between nodes are as follows:

[0076] (3.1) Merge weighted graph: traverse the weighted graph S A and S B , copy the original nodes and edges to the new graph structure, retain the original edge connection relationship, and obtain the adjacency matrix G of the new graph with a dimension of N×N, where N=I+J;

[0077]

[0078] (3.2) Take the graph G as the input of the graph attention network and combine it with the learnable position encoding W p, using the multi-head attention module, aggregate the information of neighbor nodes to update the feature representation of each time point. The calculation formula is as follows:

[0079]

[0080] in, is the feature representation of node i at the l+1th layer, || is the concatenation operation, H represents the number of attention heads, is the set of neighbor nodes of node i in the adjacency matrix G, is the attention score of nodes i and j at the hth attention head in layer l, is the weight matrix of the h-th attention head in the l-th layer, is the feature representation of node j at layer l;

[0081] In order to obtain the attention weight matrix between each node in the graph, in the last attention layer, the attention mechanism is used to calculate the attention weights between nodes, and the formula is:

[0082]

[0083] Among them, X represents the feature matrix of the node, W Q , W K and W V is a learnable weight matrix, represents the concatenation operation; softmax(·) is the normalization function, LeakyReLU(·) and ReLU(·) are the activation functions;

[0084] The attention score between node i and node j is Score ij =Att(X) i Att(X) j , the attention weight matrix between all nodes can be expressed as P = softmax(Score); in subsequent calculations, it is necessary to obtain the attention weight matrix between the first I nodes and the last J nodes, split this matrix from P and name it P s .

[0085] (4) The specific steps of introducing fastDTW pre-training and combining dual contrast loss learning, updating model parameters, and optimizing the measurement results of the correlation between the status of the hydropower turbine runner are as follows:

[0086] (4.1) In the pre-training stage, fastDTW is introduced to impose constraints to control the distortion path of the model; first, the fastDTW path between time series A and B is calculated and converted into a binary matrix P DTW ; Then pre-train the model to minimize the loss function:

[0087]

[0088] (4.2) In order to achieve time warping with sufficient time warp invariance and task-specific discriminability, a dual contrast loss learning model is used, and the loss function formula is as follows:

[0089]

[0090] in and All represent contrast loss. Specifically, It is expressed as:

[0091]

[0092] where τ is a hyperparameter of the margin, set to 1, ||·|| F represents the Frobenius norm; if A and B belong to the same class, then the input A and the distorted input P s The distance between B is minimized; if they are not of the same class, the distance between them will be optimized to be greater than τ; the loss By using ||BP t A|| F and the length J of B, where P t Represents the attention weight matrix of the time point in B to the time point in A, represented by P s Transposed;

[0093] (4.3) Through this two-step training scheme, the model can avoid excessive distortion flexibility while maintaining greater flexibility than fastDTW; the distance between time series A and B is calculated by the following formula:

[0094]

[0095] After calculating the distances between all time series, the nearest neighbor algorithm can be used to determine the specific classification between the time series.

[0096] The hydroelectric motor wheel state correlation analysis system based on multi-index graph attention network includes five modules: pre-training, graph structure learning, graph diffusion convolution, attention weight matrix calculation and contrast loss learning;

[0097] The pre-training module introduces the fastDTW algorithm for the multivariate time series of the hydroelectric turbine runner operation, calculates the distortion path between two time series, and is used to constrain the distortion degree of the model training time series;

[0098] The graph structure learning module sets an embedding vector for each time point in the time series, calculates the similarity between the embedding vectors at different time points, and then selects the top K neighboring time points with the greatest similarity to the data at any time point, and connects them with edges to build a graph structure;

[0099] The graph diffusion convolution module uses graph diffusion convolution to reconstruct the connection relationship between nodes in the graph, and iteratively propagates the diffusion features to more distant nodes to achieve the transmission and fusion of node features;

[0100] The attention weight matrix calculation module builds a graph attention network, merges two graphs and uses the merged graph as the input of the graph attention network. It learns the similarity between nodes through the multi-head attention mechanism and obtains the attention weight matrix of each head.

[0101] The contrastive loss learning module performs contrastive loss learning on the attention weight matrix and the original time series to calculate the similarity between the two time series; then, the model parameters are updated through the back propagation algorithm and optimizer to optimize the hydropower motor impeller state correlation measurement results.

[0102] Obviously, those skilled in the art should understand that the various steps of the hydroelectric motor wheel state association analysis method based on the multi-index graph attention network or the various modules of the hydroelectric motor wheel state association analysis method system based on the multi-index graph attention network of the above-mentioned embodiment of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented with executable program codes of the computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0103] The parameter settings and experimental evaluation indicators are as follows:

[0104] AParameter Settings

[0105] The following are the parameters that affect the model performance: the number of neighbor nodes K in the graph structure, the dimension d of the dataset embedding vector, and the weight coefficient θ k , threshold ε, hyperparameter τ, Adam optimizer learning rate, iteration rounds and model batch size.

[0106] When constructing the graph structure, the number of neighbor nodes K is set to 30; the dimension d of the embedding vector is set to 64; the weight coefficient θ k Select θ k ∈α(1-α)k ,α=0.1;threshold ε=10 -3 ; Hyperparameter τ = 1; The initial learning rate of the Adam optimizer is 0.001; The entire model is trained using a batch size of 64 and 300 epochs.

[0107] B Experimental evaluation index

[0108] The following are specific evaluation indicators of the embodiment of the present invention: the nearest neighbor algorithm is used for classification, and the McNemar test is used to compare the accuracy of the method proposed by the present invention and other algorithms in classifying the data set.

[0109] According to the above embodiments, the method of the present invention uses a graph structure to explicitly model the multivariate time series of the operation of the hydroelectric motor wheel, and uses graph diffusion convolution to reconstruct the connection relationship between nodes, and uses a multi-head attention mechanism to learn the attention weights between nodes, and effectively learns the degree of similarity between different nodes. Afterwards, by introducing fastDTW pre-training and using contrast loss learning for model training, the trade-off between model robustness and time distortion and classification discrimination capabilities is improved. The method of the present invention can calculate the distance between time series, judge the similarity and classify it, and use this as the basis for the association of the hydroelectric motor wheel state, providing more detailed and reliable hydroelectric motor state diagnosis and fault prediction, helping to improve production efficiency, reduce downtime, and reduce maintenance costs.

Claims

1. A method for analyzing the state association of a hydroelectric turbine wheel based on a multi-index graph attention network, characterized in that: The steps include: (1) Use graph structures to explicitly model the multivariate time series generated by the operation of the hydropower turbine runner; (2) Use graph diffusion convolution to reconstruct the connection relationship between nodes and obtain two sparse weighted graphs S A and S B , realize the transmission and fusion of features; (3) Merge weighted graphs and use graph attention networks to learn attention weights between nodes; (4) Introducing fastDTW pre-training and combining it with dual contrast loss learning, updating model parameters, and optimizing the hydropower turbine runner state correlation measurement results; The specific steps of merging the weighted graph and using the graph attention network to learn the attention weights between nodes in step (3) are as follows, wherein each node in the graph corresponds to a time point of the time series one by one: (3.1) Merge weighted graph: traverse the weighted graph S A and S B , copy the original nodes and edges to the new graph structure, retain the original edge connection relationship, and obtain the adjacency matrix G of the new graph; (3.2) Take the adjacency matrix G as the input of the graph attention network and combine it with the learnable position encoding W p ,Using a multi-head attention module, the information of neighbor nodes is aggregated to update the feature representation at each time point; In order to obtain the attention weight matrix between each time point in the graph, in the last attention layer, the attention weight between the time points is calculated using the attention mechanism to obtain the attention weight matrix P between all time points; in subsequent calculations, the attention weight matrix between the first I time points and the last J time points needs to be obtained, and this matrix is ​​split from P and named P s ; The specific steps of introducing fastDTW pre-training and combining dual contrast loss learning in step (4), updating model parameters, and optimizing the measurement results of the correlation of the state of the hydroelectric motor wheel are as follows: (4.1) In the pre-training stage, fastDTW is introduced to impose constraints to control the distortion path of the model; first, the fastDTW path between time series A and B is calculated and converted into a binary matrix P DTW ;Then pre-train the model to minimize the loss function; (4.2) In order to achieve time warping with sufficient time warping invariance and task-specific discriminability, a dual contrast loss learning model is used; (4.3) After calculating the distances between all time series, the nearest neighbor algorithm is used to determine the specific classification between the time series.

2. The method for analyzing the state of a hydroelectric turbine runner based on a multi-index graph attention network according to claim 1 is characterized in that: The specific implementation process of using the graph structure to explicitly model the multivariate time series generated by the operation of the hydroelectric motor runner in step (1) is as follows: Multivariate time series and Set an embedding vector for each time point of , where I represents the number of time points in time series A, J represents the number of time points in time series B, and D represents the variable dimension of the time series; The embedding vector of time point i in time series A is Where d represents the dimension of the embedding vector; the similarity between the embedding vectors at different time points is calculated to learn the graph structure. The similarity calculation formula is as follows: Among them, f(a i , a k ) is represented by the cosine similarity method; the similarity between the embedding vectors at different time points is e (k,i) Indicates the similarity between different time points. For any time point, the embedding vector a i , select the K neighbor time points with the greatest similarity, and transform the vector a i and neighbor vector a k Connect with edges, a k ∈TopK, corresponding to a in the adjacency matrix A′ i The value of the column is expressed by the following formula: The embedding vector of time point j in time series B is Where d represents the dimension of the embedding vector; the similarity calculation formula between embedding vectors at different time points is as follows: Among them, f(b j , b k ) is expressed as the cosine similarity method; the similarity e′ between the embedding vectors at different time points (k,j) Indicates the similarity between different time points, and the embedding vector b for each time point j , select the K neighboring time points with the greatest similarity, connect them with edges, and correspond to b in the adjacency matrix B′ j The value of the column is expressed by the following formula:

3. The method for analyzing the state association of a hydroelectric turbine wheel based on a multi-index graph attention network according to claim 2 is characterized in that: In step (2), the connection relationship between nodes is reconstructed by using graph diffusion convolution to realize the specific steps of feature transfer and fusion are as follows: In graph diffusion, we first focus all attention on the first node in the graph, then transfer part of the attention to the neighbors of the node, disperse the attention from the starting node, and spread the features to more distant nodes through iterative propagation; after dispersing the attention of all nodes in the graph, we get a new adjacency matrix; graph diffusion is defined as: where θ k is the weight coefficient, θ k ∈α(1-α) k , α∈(0,1); T is the transfer matrix, T=A′D -1 , A′ represents the adjacency matrix, and D is the diagonal matrix; in this case, each node in the obtained adjacency matrix S is connected to other nodes. In order to simplify the matrix, the values ​​below the threshold ε in the adjacency matrix S are set to 0, thereby obtaining a relatively sparse adjacency matrix S′; for the original adjacency matrices A′ and B′, the graph diffusion formula is used to calculate two sparse weighted adjacency matrices S A and S B .

4. The method for analyzing the state association of a hydroelectric turbine wheel based on a multi-index graph attention network according to claim 3 is characterized in that: The specific steps of merging the weighted graph and using the graph attention network to learn the attention weights between nodes in step (3) are as follows: (3.1) Merge weighted graph: traverse the weighted graph S A and S B , copy the original nodes and edges to the new graph structure, retain the original edge connection relationship, and obtain the adjacency matrix G of the new graph with a dimension of N×N, where N=I+J; (3.2) Take the adjacency matrix G as the input of the graph attention network and combine it with the learnable position encoding W p , using the multi-head attention module, aggregate the information of neighbor nodes to update the feature representation of each time point. The calculation formula is as follows: in, is the feature representation of node i at the l+1th layer, || is the concatenation operation, H represents the number of attention heads, is the set of neighbor nodes of node i in the adjacency matrix G, is the attention score of nodes i and j at the hth attention head in layer l, is the weight matrix of the h-th attention head in the l-th layer, is the feature representation of node j at layer l; In order to obtain the attention weight matrix between each node in the graph, in the last attention layer, the attention mechanism is used to calculate the attention weights between nodes, and the formula is: Among them, X represents the feature matrix of the node, W Q , W K and W V is a learnable weight matrix, represents the concatenation operation; softmax(·) is the normalization function, LeakyReLU(·) and ReLU(·) are the activation functions; The attention score between node i and node j is Score ij =Att(X) i Att(X) j , the attention weight matrix between all nodes can be expressed as P = softmax(Score); in subsequent calculations, it is necessary to obtain the attention weight matrix between the first I nodes and the last J nodes, split this matrix from P and name it P s .

5. The method for analyzing the state association of a hydroelectric turbine wheel based on a multi-index graph attention network according to claim 4 is characterized in that: The specific steps of introducing fastDTW pre-training and combining dual contrast loss learning in step (4), updating model parameters, and optimizing the measurement results of the correlation of the state of the hydroelectric motor wheel are as follows: (4.1) In the pre-training stage, fastDTW is introduced to impose constraints to control the distortion path of the model; first, the fastDTW path between time series A and B is calculated and converted into a binary matrix P DTW ; Then pre-train the model to minimize the loss function: (4.2) In order to achieve time warping with sufficient time warp invariance and task-specific discriminability, a dual contrast loss learning model is used, and the loss function formula is as follows: in and All represent contrast loss. Specifically, It is expressed as: where τ is a hyperparameter of the margin, ||·|| F represents the Frobenius norm; if A and B belong to the same class, then the input A and the distorted input P s The distance between B is minimized; if they are not of the same class, the distance between them will be optimized to be greater than τ; the loss By using ||BP t A|| F and the length J of B, where P t Represents the attention weight matrix of the time point in B to the time point in A, represented by P s Transposed; (4.3) Through this two-step training scheme, the model can avoid excessive distortion flexibility while maintaining greater flexibility than fastDTW; the distance between time series A and B is calculated by the following formula: After calculating the distances between all time series, the nearest neighbor algorithm is used to determine the specific classification between the time series.

6. A hydroelectric turbine runner state correlation analysis system based on a multi-index graph attention network for implementing the method described in claim 1, characterized in that: include: Five modules: pre-training, graph structure learning, graph diffusion convolution, attention weight matrix calculation, and contrast loss learning; The pre-training module introduces the fastDTW algorithm for the multivariate time series of the hydroelectric turbine runner operation, calculates the distortion path between the two time series, and is used to constrain the distortion degree of the model training time series; The graph structure learning module sets an embedding vector for each time point of the time series, calculates the similarity between the embedding vectors of different time points, and then selects the top K neighboring time points with the greatest similarity to the data at any time point, and connects them with edges to build a graph structure; The graph diffusion convolution module uses graph diffusion convolution to reconstruct the connection relationship between nodes in the graph and obtain two sparse weighted graphs S A and S B ,Through iterative propagation, the features are diffused to more distant nodes, thus realizing the transmission and fusion of node features; The attention weight matrix calculation module establishes a graph attention network, merges two weighted graphs and uses the merged graph as the input of the graph attention network, learns the similarity between nodes through a multi-head attention mechanism, and obtains the attention weight matrix of each head; The contrast loss learning module performs contrast loss learning on the attention weight matrix and the original time series to calculate the similarity between the two time series; then, the model parameters are updated through the back propagation algorithm and the optimizer to optimize the hydroelectric motor runner state correlation measurement result.

7. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for analyzing the state association of a hydroelectric motor wheel based on a multi-index graph attention network as described in any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the method for analyzing the state association of a hydroelectric motor wheel based on a multi-index graph attention network as described in any one of claims 1 to 5.