Hydropower station risk real-time prediction method based on causal attention mechanism and graph learning
Through causal attention mechanism and graph learning, combined with ConvLSTM network and transmission entropy quantification, the data set limitations and attention mechanism limitations in hydropower station risk prediction are solved, and high-precision real-time monitoring and prediction of hydropower station risks are achieved, and prediction is improved. The accuracy of the path provides advanced technical support for the risk management of hydropower stations.
Patent Information
- Application Number
- CN202411151904.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing hydropower station risk prediction methods face the limitations of the data set, the limitations of the attention mechanism model, and the excessive data dependence of artificial intelligence prediction, resulting in the incompleteness, inaccuracy and prediction accuracy of risk analysis.
Using the method of causal attention mechanism and graph learning, we can capture the interaction between risks by constructing interactive graphs, build a risk causal relationship embedded in the ConvLSTM network, quantify the spatiotemporal causal relationship using transfer entropy, and build a prediction module based on joint feature guidance to enhance Spatial and location attributes of risk prediction of hydropower stations.
It realizes high-precision real-time monitoring and prediction of hydropower station risks, improves the accuracy of prediction paths, and provides advanced risk management decision-making basis.
Smart Images

Figure CN119130127A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hydropower engineering, and specifically is a real-time prediction method for hydropower station risks by using a causal attention mechanism and graph learning. Background Art
[0002] The safe and stable operation of large-scale hydropower projects is the prerequisite for ensuring water and energy security in the basin. Generally speaking, large-scale hydropower projects have a huge construction scale and complex functional units. The risks between different main buildings and equipment facilities are mutually influential and coupled, and they evolve dynamically during operation. Real-time dynamic identification and intelligent prediction of hydropower project operation risks are crucial to the safe operation of hydropower stations and are also at the forefront of current technological development.
[0003] Current hydropower project risk prediction methods face several challenges and limitations, which are specifically reflected in the following three aspects:
[0004] 1. Dataset limitations and insufficient information integration: The existing risk prevention and control strategies used in hydropower stations rely on relatively narrow data sets, making it difficult to effectively cope with the state variable information processing requirements under large data volumes. This limitation not only limits the model's ability to fully understand the complex system of hydropower stations, but also leads to fragmented data used in risk analysis and lack of effective cross-source integration, affecting the comprehensiveness and accuracy of risk assessment.
[0005] 2. Limitations of the attention mechanism model and neglect of risk interactions: Models based on the attention mechanism have potential defects when dealing with highly coupled risk scenarios, that is, they may mistakenly emphasize certain non-critical information, thereby introducing bias and making the predicted output inconsistent with the actual situation. In addition, such models tend to analyze each risk (agent) independently, ignoring the complex interactions and possible co-evolutionary effects between hydropower station risks. This isolated perspective limits the model's accurate grasp of the system-level risk dynamics.
[0006] 3. Excessive reliance on data and lack of path analysis in AI predictions: Although data-driven methods play an important role, they overemphasize data features and ignore the necessity of systematic analysis and adjustment of risk transmission paths. This bias not only increases the uncertainty of prediction results, resulting in limited prediction accuracy, but also makes the prediction results tend to areas where data features are significant, ignoring risk paths and transmission mechanisms that are not prominent at the data level but are actually critical to system security. Summary of the invention
[0007] In view of the above problems, the present invention is proposed to provide a real-time prediction method for hydropower station risks using a causal attention mechanism and graph learning that overcomes the above problems or at least partially solves the above problems.
[0008] To achieve the above object, the present invention adopts the following technical solutions:
[0009] A real-time prediction method for hydropower station risk based on causal attention mechanism and graph learning, the method comprising:
[0010] Collect real-time data related to risks at target hydropower stations;
[0011] Construct interaction diagrams to capture the interactions of coupled risks and the characteristics of risks in their evolution;
[0012] Use online gradient to update weights to reduce the impact of loss function on model prediction accuracy;
[0013] Build a ConvLSTM network embedded with a risk causality module;
[0014] Transfer entropy TE is used to quantify the spatiotemporal causal relationship between all grids in the risk feature map;
[0015] Construct a prediction module based on joint feature guidance to enhance the spatial and location attributes of the occurrence and transmission of different risks of hydropower stations in the ConvLSTM network prediction layer;
[0016] Obtain risk prediction results for hydropower stations.
[0017] Optionally, the target hydropower station risk-related real-time data includes risk event reports, emergency plans, implementation scheduling monitoring data text data, monitoring image data and monitoring videos.
[0018] Optionally, the interaction graph is used to build a real-time prediction risk transfer path. The core part of the interaction graph is the collaborative prediction unit. The collaborative prediction unit automatically constructs a trainable collaborative graph, which includes two types of nodes: agents and collaborative pairs.
[0019] Optionally, the collaboration pair represents the interaction between two intelligent agents, and through the collaboration pair, a collaboration predictor is established in the collaboration prediction unit to predict the state of each hydropower station under the influence of the interaction.
[0020] Optionally, the construction of the interaction diagram includes:
[0021] Collaborative pair-based prediction, where multiple agents capture time series data in real time, and online multi-agents predict the future state of each agent at each online timestamp based on the corresponding historical state;
[0022] For the p-th agent v (p) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (p)The state within the time interval (t-δ,t], is the measurement value corresponding to the future real sample, indicating v (p) In the state of (t,t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t];
[0023] In order to explicitly form an interaction pair to represent the interaction status of each entity of the two hydropower stations in history, the combination function is used to directly combine the measurements of the two agents, which groups the two agents to feedback the influence of a single agent on another agent in the multi-agent system, that is, the p-th agent v (p) and the q-th agent v (q) Forming an interaction pair, indicating that from v (p) to v (q) The directional effect of Then the historical collaborative status of the interaction pair is:
[0024]
[0025] In the formula, f cb (·,·) represents the combination function, which is used to directly combine the measurements of two agents and the interaction state Carry direct effects from proxy v (p) to v (q) ;v (p) represents the p-th agent; represents the measured value in the observation sample interval with length δ and characteristic dimension d at time t, and v (p) The state within the time interval (t-δ,t], Represents the measurement value corresponding to the future real sample, which is v (p) In the state of (t,t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t];
[0026] According to the interaction pairs and their states, an interaction predictor is introduced. The interaction predictor can be embedded in any interaction pair to predict the future state of the agent under the corresponding response. Let the interaction predictor be where θ tis the online training parameter at time t, then based on v (q) Under interaction v (p) The state prediction results are:
[0027]
[0028] Indicates comprehensive v (q) The v obtained under the influence of (p) A trajectory in a future period;
[0029] Based on the aggregation of collaborative pairs, different weight aggregations are adopted on the edges of the interaction graph, where the edge weights can be updated online and reflect the influence level between agents; assuming that the graph adjacency matrix at point t in iteration step is W t , where the (p,q)th element is Then, considering the impact of all related interactions, v (q) The final prediction of can be formulated as:
[0030]
[0031] In the formula, for any agent v (p) Edge weight normalization is performed.
[0032] Optionally, it is characterized in that an update mechanism is used to update the normalized interaction edge weights With θ t To minimize the impact of the loss function on the model prediction accuracy, Specifically, at time t, the online gradient face is used to train θ t ,Right now:
[0033]
[0034] Where, L t represents a fixed convex loss function evaluated at time t, expressed here as Convex function, η∈(0,1) represents the learning rate, and multiplication exponential update is adopted And superimpose the optimized boundary weight ω (p,q) ∈[0,1], then Update via:
[0035]
[0036] In the formula, represents the optimized ω (p,q) and the KL divergence between the collaboration weights at the last iteration step.
[0037] Optionally, the embedded risk causal relationship module includes an attention structure and a causal structure, and the embedded risk causal relationship module performs inference quantification on image, signal and video data to obtain correlation features of risk development and transmission in a spatiotemporal sequence.
[0038] Optionally, the mathematical and physical steps for the spatiotemporal series prediction problem include:
[0039] The problem of spatiotemporal series prediction of risk can be viewed as using a moment or historical λ sequence data x t:1 Predict the true observed value x of risk at the next time step t+1 , the mathematical expression of its predicted value is as follows:
[0040]
[0041] In the formula, represents the prediction result at the next time t, and Υ(·) represents the prediction system; the prediction result is input through the right side of the equation and iterated multiple times to obtain the prediction sequence The optimization objective of spatiotemporal prediction is shown in formula (7):
[0042]
[0043] In the formula, Ψ represents the selected quality assessment index, such as the structural similarity index or the mean square error. In this part, deep learning is a reliable tool for building a prediction system, which can be broken down into three parts. The mathematical expressions of each part are as follows:
[0044]
[0045] In the formula, ε is used to capture the current spatiotemporal feature a t The encoder, a t It is usually obtained through the output of the previous layer; Γ represents a publisher that uses hidden memory to infer the hidden state in the next continuous time step, and its hidden memory is β t ,a t ; E represents assigning features to predicted values
[0046] The mathematical expressions of the attention module and causal module contained in the proposed causal attention unit are as follows:
[0047]
[0048] Where Θ and κ are the attention module and causal module respectively, and k is the number of module layers; the attention module generates the future ρv according to the potential correlation t+1 The causal module generates future causal relationships ρσ by mining the causal relationships hidden in the historical sequence. t+1 .
[0049] Optionally, the strategy of using transfer entropy TE to quantify the spatiotemporal causal relationship between all grids in the risk feature map is as follows:
[0050] TE is rewritten as conditional interaction information and expressed in a combined form in the following formula:
[0051]
[0052] In the formula, I(·;·|·) represents the conditional interaction information. After nested traversal of i and j, the causal matrix can be obtained, that is, by independent learning and mining the future ρv related to the hydropower station t+1 With the previous memory information t the spatiotemporal causal relationships between the various grids; represents the historical features on grid i; represents the historical characteristics on the target research grid j; Indicates the features that need to be predicted in the future;
[0053] In calculating TE j→i When setting two transformation weights W p ,W f ∈R to accurately evaluate the joint entropy of the normalized historical state and the related future state in [0,1]; at the same time, asymmetry is used to determine the strength and direction of the causal relationship of risk development, TE j→i The larger the value, the higher the reliability of the causal relationship; on the other hand, if TE j→i >TE i→j , the feature of grid j is the result, and the feature of grid i is the inducement. Then, the result is deleted using formula (11), and the inducement is retained to generate a new transfer entropy;
[0054]
[0055] In the formula, T represents transpose, and diag(·) represents the diagonal.
[0056] Optionally, constructing a prediction module based on joint feature guidance includes:
[0057] Construct the GAP embedding layer. GAP runs input data with various structures to calculate the similarity between risk nodes under the premise of unknown risk transmission path structure.
[0058] The joint feature-guided prediction module enhances the spatial and location attributes of some hydropower stations in the prediction layer.
[0059] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0060] 1. The present invention can realize the risk prediction of hydropower stations based on real-time online monitoring data through the causal relationship module and the constructed ConvLSTM model, and can access multimodal data. Compared with the traditional offline prediction model based on a single data source, it has significant timeliness, comprehensiveness and accuracy.
[0061] 2. The algorithm adopted by the present invention effectively improves the model's focus on capturing risk characteristics, and provides a new idea for online real-time monitoring, prediction and updating of hydropower station risks.
[0062] 3. The present invention realizes high-precision real-time monitoring of the risk status of hydropower stations, further improves the accuracy of the prediction path, and provides advanced technical support and decision-making basis for risk management of hydropower stations. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 A flow chart of a method for real-time risk prediction of a hydropower station using a causal attention mechanism and graph learning provided in an embodiment of the present application;
[0064] Figure 2 A schematic diagram for constructing an interactive diagram of an embodiment of the present application;
[0065] Figure 3 The architecture of interactive prediction for the embodiment of the present application;
[0066] Figure 4 The serial structure of the causal module and the attention module of the embodiment of the present application;
[0067] Figure 5 The calculation process of the causal module and the attention module of the embodiment of the present application;
[0068] Figure 6 This is a structural diagram of the encoder and decoder under the conversion block and the stage block in the embodiment of the present application;
[0069] Figure 7 This is a diagram of the architecture of the causal relationship and ConvLSTM model of the embodiment of the present application;
[0070] Figure 8 This is a schematic diagram of an embedded joint feature guided prediction module according to an embodiment of the present application. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0072] See also Figure 1 This embodiment provides a real-time prediction method for hydropower station risk using a causal attention mechanism and graph learning, the method comprising:
[0073] S1. Collect real-time data related to the risks of the target hydropower station. The data format can be prepared as text, image, video, etc. as input data.
[0074] Relevant real-time data include risk event reports, emergency plans, implementation and scheduling monitoring data text data, monitoring image data and monitoring videos, etc.
[0075] S2. Construct an interaction diagram to capture the interactions of coupled risks and the characteristics of risks in their development and evolution.
[0076] The interaction diagram explicitly simulates the information interaction and pairwise relationships between entities in each hydropower station, which is consistent with the risk development and transmission characteristics of hydropower stations.
[0077] The expressive power of deep learning graphs has been widely used in various scenarios, such as social networks, bioinformatics, disease transmission, human behavior, etc., and has been deeply extended to non-Euclidean domains. Graph neural networks (GNNs) can be divided into spectral domain-based and fixed-point domain-based, which learn patterns from the Fourier representation and original topology of the graph respectively.
[0078] The interaction graph can capture the dynamic interaction between the status warning response and dispatching measures of cascade hydropower stations. The interaction graph is used to build a real-time prediction of risk transfer paths. The core part of the interaction graph is the collaborative prediction unit, which automatically constructs a trainable collaborative graph. The collaborative graph includes two types of nodes: agents and collaborative pairs.
[0079] The essence of a collaboration pair is a pair of intelligent agents. The collaboration pair represents the interaction between two intelligent agents, that is, any coupled risk in a hydropower station can be decomposed into the relationship between two risks. Through the collaboration pair, a collaborative predictor is established in the collaborative prediction unit to predict the state of each hydropower station entity under the influence of interaction. Then, multiple possible metrics are calculated for each hydropower station entity affected by other hydropower station entities. Through the above method, a hydropower station entity can share risk status and emergency operation information with each adjacent hydropower station entity through a collaboration pair.
[0080] The model learns the edge weights of the collaboration graph, aggregates all the collaborative predictors to obtain the next prediction result, and the edge weights show the degree of influence of each collaboration pair. In the collaborative prediction unit, the collaborative predictor gradually adjusts the edge weights through online multiplication updates to reflect the dynamic topology of risk development. The edge weights of the interaction graph are obtained by solving explicit optimization. The online multiplication update algorithm is used to dynamically learn the edge weights of the collaboration graph to solve the explicit objective function. The graph that is tuned and tested simultaneously in an online environment by this method can effectively adapt to the changes in the dynamic data flow state and simulate the information interaction and relationship between the entities of each hydropower station. It can elaborate on the development and transmission trend of single or coupled risks of hydropower stations. The ideas and steps for constructing the interaction graph are as follows:
[0081] set up is an interaction graph, where v = {v (1) ,v (2) ,v (3) …,v (N)} is the risk event proxy set, v (p) is the model of the p-th agent. represents the set of cooperative pairs, where (v (p) ,v (q) ) is a model of (p,q) interacting and cooperating pairs; is the adjacency matrix of the interaction graph trained online.
[0082] The interaction graph is asymmetric and dynamic, that is, the adjacency matrix of each interaction graph is also asymmetric and dynamic, and each interaction edge represents the directional relationship between the entities of each hydropower station, and the weight of each interaction edge changes with time during the online training process. During the training process, the interaction weight changes dynamically with time and event evolution. In order to predict the future state of each risk agent, the present invention uses collaboration to obtain the prediction results of the future state of the agent, and generates all possible predictions with interaction effects between agents and aggregation based on weighted interaction graphs to obtain the final prediction results. Figure 2 Shows the modeling idea of interaction diagram.
[0083] The construction of the interaction diagram includes:
[0084] Based on the prediction of collaborative pairs, through the time series data captured by multiple agents in real time, the task of online multi-agent prediction is essentially to predict the future state of each agent at each online timestamp based on the corresponding historical state;
[0085] For the p-th agent v (p) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (p) The state within the time interval (t-δ,t], is the measurement value corresponding to the future real sample, indicating v (p) In the state of (t,t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t];
[0086] In order to explicitly form an interaction pair to represent the interaction status of each entity of the two hydropower stations in history, the combination function is used to directly combine the measurements of the two agents, which groups the two agents to feedback the influence of a single agent on another agent in the multi-agent system, that is, the p-th agent v (p) and the q-th agent v (q) Forming an interaction pair, indicating that from v (p) to v (q) The directional effect of Then the historical collaborative status of the interaction pair is:
[0087]
[0088] In the formula, f cb (··,·) represents the combination function, which is used to directly combine the measurements of two agents and the interaction state Carry direct effects from proxy v (p) to v (q) ;v (p) represents the p-th agent; represents the measured value in the observation sample interval with length δ and characteristic dimension d at time t, and v (p) The state within the time interval (t-δ,t], Represents the measurement value corresponding to the future real sample, which is v (p) In the state of (t,t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t].
[0089] According to the interaction pairs and their states, an interaction predictor is introduced. The interaction predictor can be embedded in any interaction pair to predict the future state of the agent under the corresponding response. Let the interaction predictor be where θ t is the online training parameter at time t, then based on v (q)Under interaction v (p) The state prediction results are:
[0090]
[0091] Indicates the combination of v (q) The impact of obtaining v (p) A trajectory in the future.
[0092] Based on the aggregation of collaborative pairs, different weight aggregations are adopted on the edges of the interaction graph, where the edge weights can be updated online and reflect the influence level between agents; assuming that the graph adjacency matrix at point t in iteration step is W t , where the (p,q)th element is Then, considering the impact of all related interactions, v (q) The final prediction of can be formulated as:
[0093]
[0094] In the formula, for any agent v (p) Edge weight normalization is performed. Compared with most graph models, the graph model adopted by the present invention uses scalar edge weights to bridge nodes of the same type, and takes into account the heterogeneous nodes of each entity and interaction pair of each hydropower station, carrying the individual dynamics and interaction effects of risk points in a hybrid manner. This method essentially aggregates the comprehensive information of interaction pairs with different importance. Its framework is similar to the expert hybrid algorithm, but each interaction predictor explicitly uses customized information associated with each entity of each hydropower station based on the corresponding interaction pair, replacing most expert hybrid methods to independently perform non-targeted predictions.
[0095] Figure 3 The CoGNN architecture proposed in this embodiment is given, and three collaborative prediction units are cascaded, and then each graph spatiotemporal prediction unit in the graph neural network (GNN) gradually fine-tunes the prediction and approaches the target value. The first and second collaborative prediction units generate instant prediction results for all agent agents from the input fragment or the first collaborative prediction unit The last collaborative prediction unit generates a final prediction based on the results of the second collaborative prediction unit. For each collaborative prediction unit, a residual connection is applied between the input and output to reflect the deviation of the internal module estimate from the input data to the target.
[0096] S3, using online ladder gradient to update weights and reduce the impact of loss function on model prediction accuracy;
[0097] In order to minimize the impact of the loss function on the model prediction accuracy, an update mechanism is used to update the normalized interaction edge weights. With θ tTo minimize the impact of the loss function on the model prediction accuracy, specifically including:
[0098] At time t, the online gradient descent is used to train θ t ,Right now
[0099]
[0100] Where, L t represents the loss function, η∈(0,1) represents the learning rate, and multiplication exponential update is adopted And superimpose the optimized boundary weight ω (p,q) ∈[0,1], then Update via:
[0101]
[0102] In the formula, represents the optimized ω (p,q) and the KL divergence between the collaboration weights at the last iteration step; where Then, μ is adjusted based on two factors (p,q) The predicted loss and the edge weights of the last iteration. To train the network, the same form of loss function is applied on each CoPU, which can be trained directly since each CoPU handles a complete prediction task. In addition, by learning the collaborative edge weights in each CoPU, the explicit objective function (5) can be directly optimized using exponential updates.
[0103] S4. Build a ConvLSTM network embedded with risk causality module;
[0104] The embedded risk causal relationship module includes an attention structure and a causal structure. The embedded risk causal relationship module performs reasoning and quantification on image, signal and video data to obtain the correlation characteristics of risk development and transmission in a spatiotemporal sequence.
[0105] The mathematical and physical steps for spatiotemporal series prediction problems include:
[0106] The problem of spatiotemporal series prediction of risk can be viewed as using a moment or historical λ sequence data x t:1 Predict the true observed value x of risk at the next time step t+1 , its mathematical expression is as follows:
[0107]
[0108] In the formula, represents the prediction result at the next time t, and Υ(·) represents the prediction system; the prediction result is input through the right side of the equation and iterated multiple times to obtain the prediction sequence The optimization objective of spatiotemporal prediction is shown in formula (7):
[0109]
[0110] In the formula, Ψ represents the selected quality assessment indicator; in this part, deep learning is a reliable tool for building a prediction system, which can be broken down into three parts, and the mathematical expressions of each part are as follows:
[0111]
[0112] In the formula, ε is used to capture the current spatiotemporal feature a t The encoder, a t It is usually obtained through the output of the previous layer; Γ represents a publisher that uses hidden memory to infer the hidden state in the next continuous time step, and its hidden memory is β t ,a t ; E represents assigning features to predicted values
[0113] The mathematical expressions of the attention module and causal module contained in the proposed causal attention unit are as follows:
[0114]
[0115] Where Θ and κ are the attention module and causal module respectively, and k is the number of module layers; the attention module generates the future ρv according to the potential correlation t+1 The causal module generates future causal relationships ρσ by mining the causal relationships hidden in the historical sequence. t+1 .
[0116] First, and Before being input to the model, connections are made to ensure that all data memories are connected in series. The input is then passed between the two modules and obtained by summing And input it into the decoder or the next layer. The two modules inside the causal relationship module are connected in sequence, and its architecture diagram is as follows Figure 4 As shown, Figure 5 The detailed calculation process of the two modules is given. Figure 6 Then the detailed structure of the causal module and the attention module is given. Figure 7 An architecture based on the causal attention module and the ConvLSTM model is given. This part can not only be embedded in parallel with the ConvLSTM, but also embedded in the GNN or built into a parallel architecture to enhance the logic of the prediction results.
[0117] like Figure 6As shown in the figure, this part consists of an encoder and a decoder to parse and recover the spatiotemporal features hidden in the input sequence. Between the encoder and the decoder, stacked causal modules and ConvLSTM units are built in parallel. Similar to ConvLSTM, each layer of the causal module receives the output of the previous layer and maintains a single historical memory. The output of the causal module is added to the output of ConvLSTM and then fed to the decoder for end-to-end prediction. The causal module can be efficiently combined with existing ConvLSTM units. CAU can mine potential causal relationships from a mathematical level through TE, and quickly calculate and combine with existing ConvLSTM in a plug-and-play manner through a spatiotemporal exchange strategy. In this model, the causal module assists in supplementing causal reasoning capabilities, and ConvLSTM performs memory updates. The encoder and decoder are built based on a fully convolutional network, which consists of two complete blocks, namely the stage block and the transition block. The stage block consists of two CNRs with different convolution kernel sizes, which parse spatial information by expanding or shrinking the channel. The transition block is also composed of CNR or TCNR, but its convolutional layer stride is set to 2. It compresses redundant information by reducing the feature map and expands the feature map in a trainable way to restore the details of the observed data end-to-end.
[0118] S5. Use transfer entropy TE to quantify the spatiotemporal causal relationship between all grids in the risk feature map;
[0119] As an information-theoretic measure of causality, TE's calculation depends on both historical information and predicted future information. It does not require the assumption of the form of causal relationships between grids and is suitable for long-term series analysis of nonlinear systems.
[0120] The strategy of using transfer entropy TE to quantify the spatiotemporal causal relationship between all grids in the risk feature graph is as follows:
[0121] In order to avoid the error propagation caused by probability calculation in neural networks, TE is rewritten as conditional interaction information and expressed in a combined form in the following formula:
[0122]
[0123] In the formula, I(·;·|·) represents conditional interaction information, and the causal matrix can be obtained by nesting i and j. That is, by independently learning and mining the future ρv related to the hydropower station t+1 With the previous memory information t the spatiotemporal causal relationships between the various grids; represents the historical features on grid i; represents the historical characteristics on the target research grid j; Indicates the features that need to be predicted in the future.
[0124] In calculating TE j→i When setting two transformation weights W p ,W f ∈R to accurately evaluate the joint entropy of the normalized historical state and the related future state in [0,1]; at the same time, asymmetry is used to determine the strength and direction of the causal relationship of risk development, TE j→i The larger the value, the higher the reliability of the causal relationship. j→i >TE i→j , the feature of grid j is the result, and the feature of grid i is the inducement, then use formula (11) to delete the result and keep the inducement;
[0125]
[0126] In the formula, T represents transpose, and diag(·) represents the diagonal.
[0127] S6. Construct a prediction module based on joint feature guidance to enhance the spatial and location attributes of the occurrence and transmission of different risks in the hydropower station in the ConvLSTM network prediction layer; by continuously aligning the attributes in each prediction step, effectively re-coordinate the transmission attributes of the risk points to improve the accuracy.
[0128] The prediction module based on joint feature guidance includes:
[0129] First, the GAP embedding layer is constructed. GAP operates on input data with various structures and automatically learns without considering dimensional consistency. Second, it calculates the similarity between risk nodes under the premise of unknown risk transmission path structure. Finally, GAP's self-attention operation can be parallelized across time embedding layers, and the calculation of output features can also be parallelized across all timestamps, improving computational efficiency while enhancing prediction performance. The joint feature guided prediction module is as follows Figure 8 .
[0130] The joint feature guided prediction module enhances the spatial and location attributes of some hydropower stations in the prediction layer. By continuously aligning the attributes in each prediction step, the risk point transmission attributes can be effectively re-coordinated to improve the accuracy. In the prediction module, a 3-layer MLP is used to map the connected features to the conditional categories. Re-coordinating the features at each node can effectively enhance the conditional relevance and weaken the impact of the prediction step. The model continuously connects 6 sequential decoders in series at each connection of the sequential decoder, focusing on the transmission development of a specific category of risks, and then inputs it into the MLP to obtain the final output. After the feedforward layer of the MLP, the softmax function is used to activate the probability of each condition. The joint feature folding formula is as follows:
[0131]
[0132] In the formula, Represents the connection between the sequence embedding vector and the geographic (point) feature vector.
[0133] S7. Obtain risk prediction results of the hydropower station.
[0134] This embodiment can realize the risk prediction of hydropower stations based on real-time online monitoring data through the causal relationship module and the constructed ConvLSTM model, and can access multimodal data. Compared with the traditional offline prediction model based on a single data source, it has significant timeliness, comprehensiveness and accuracy.
[0135] The algorithm adopted in this embodiment effectively improves the model's focus on capturing risk characteristics, and provides a new idea for online real-time monitoring, prediction and updating of hydropower station risks.
[0136] This embodiment achieves high-precision real-time monitoring of the risk status of a hydropower station, further improves the accuracy of the prediction path, and provides advanced technical support and decision-making basis for risk management of hydropower stations.
[0137] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A real-time prediction method for hydropower station risk based on causal attention mechanism and graph learning, characterized in that: The method comprises: Collect real-time data related to risks at target hydropower stations; Construct interaction diagrams to capture the interactions of coupled risks and the characteristics of risks in their evolution; Use online gradient to update weights to reduce the impact of loss function on model prediction accuracy; Build a ConvLSTM network embedded with a risk causality module; Transfer entropy TE is used to quantify the spatiotemporal causal relationship between all grids in the risk feature map; Construct a prediction module based on joint feature guidance to enhance the spatial and location attributes of the occurrence and transmission of different risks of hydropower stations in the ConvLSTM network prediction layer; Obtain risk prediction results for hydropower stations.
2. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 1, characterized in that: The target hydropower station risk-related real-time data includes risk event reports, emergency plans, implementation scheduling monitoring data text data, monitoring image data and monitoring videos.
3. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 1, characterized in that: The interaction graph is used to build a real-time prediction risk transfer path. The core part of the interaction graph is the collaborative prediction unit. The collaborative prediction unit automatically constructs a trainable collaborative graph, which includes two types of nodes: agents and collaborative pairs.
4. A real-time prediction method for hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 3, characterized in that: The collaborative pair represents the interaction between two intelligent agents. Through the collaborative pair, a collaborative predictor is established in the collaborative prediction unit to predict the state of each hydropower station under the influence of the interaction.
5. A real-time prediction method for hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 4, characterized in that: The construction of the interaction diagram includes: Collaborative pair-based prediction, where multiple agents capture time series data in real time, and online multi-agents predict the future state of each agent at each online timestamp based on the corresponding historical state; For the p-th agent v (p) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (p) The state within the time interval (t-δ,t], is the measurement value corresponding to the future real sample, indicating v (p) In the state of (t, t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t]; In order to explicitly form an interaction pair to represent the interaction status of each entity of the two hydropower stations in history, the combination function is used to directly combine the measurements of the two agents, which groups the two agents to feedback the influence of a single agent on another agent in the multi-agent system, that is, the p-th agent v (p) and the q-th agent v (q) Forming an interaction pair, indicating that from v (p) to v (q) The directional effect of Then the historical collaborative status of the interaction pair is: In the formula, f cb (·,·) represents the combination function, which is used to directly combine the measurements of two agents and the interaction state Carry direct effects from proxy v (p) to v (q) ;v (p) represents the p-th agent; represents the measured value in the observation sample interval with length δ and characteristic dimension d at time t, and v (p) The state within the time interval (t-δ,t], Represents the measurement value corresponding to the future real sample, which is v (p) In the state of (t,t+δ]; similarly, represents the q-th agent v (q) , at time t, let is the measured value in the observation sample interval with length δ and characteristic dimension d, and records v (q The state within the time interval (t-δ,t]; According to the interaction pairs and their states, an interaction predictor is introduced. The interaction predictor can be embedded in any interaction pair to predict the future state of the agent under the corresponding response. Let the interaction predictor be where θ t is the online training parameter at time t, then based on v (q) Under interaction v (p) The state prediction results are: Indicates comprehensive v (q) The v obtained under the influence of (p) A trajectory in a future period; Based on the aggregation of collaborative pairs, different weight aggregations are adopted on the edges of the interaction graph, where the edge weights can be updated online and reflect the influence level between agents; assuming that the graph adjacency matrix at point t in iteration step is W t , where the (p,q)th element is Then, considering the impact of all related interactions, v (q) The final prediction of can be formulated as: In the formula, for any agent v (p) Edge weight normalization is performed.
6. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 1, characterized in that: Adopt an update mechanism to update the normalized interaction edge weights With θ t To minimize the impact of the loss function on the model prediction accuracy, Specifically, at time t, the online gradient face is used to train θ t ,Right now: Where, L t represents a fixed convex loss function evaluated at time t, here expressed as Convex function, η∈(0,1) represents the learning rate, and multiplication exponential update is adopted And superimpose the optimized boundary weight ω (p,q) ∈[0,1], then Update via: In the formula, represents the optimized ω (p,q) and the KL divergence between the collaboration weights at the last iteration step.
7. The method for real-time risk prediction of a hydropower station using a causal attention mechanism and graph learning as claimed in claim 1, characterized in that: The embedded risk causal relationship module includes an attention structure and a causal structure. The embedded risk causal relationship module performs reasoning and quantification on image, signal and video data to obtain the correlation characteristics of risk development and transmission in a spatiotemporal sequence.
8. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 7, characterized in that: The mathematical and physical steps for spatiotemporal series prediction problems include: The problem of spatiotemporal series prediction of risk can be viewed as using a moment or historical λ sequence data x t:1 Predict the true observed value x of risk at the next time step t+1 , the mathematical expression of its predicted value is as follows: In the formula, represents the prediction result at the next time t, γ(·) represents the prediction system; the prediction result is input through the right side of the equation and iterated multiple times to obtain the prediction sequence The optimization objective of spatiotemporal prediction is shown in formula (7): In the formula, Ψ represents the selected quality assessment index, such as the structural similarity index or the mean square error. In this part, deep learning is a reliable tool for building a prediction system, which can be broken down into three parts. The mathematical expressions of each part are as follows: In the formula, ε is used to capture the current spatiotemporal feature a t The encoder, a t It is usually obtained through the output of the previous layer; Γ represents a publisher that uses hidden memory to infer the hidden state in the next continuous time step, and its hidden memory is β t ,a t ; E represents assigning features to predicted values The mathematical expressions of the attention module and causal module contained in the proposed causal attention unit are as follows: Where Θ and κ are the attention module and causal module respectively, and k is the number of module layers; the attention module generates the future ρv according to the potential correlation t+1 The causal module generates future causal relationships ρσ by mining the causal relationships hidden in the historical sequence. t+1 .
9. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 1, characterized in that: The strategy of using transfer entropy TE to quantify the spatiotemporal causal relationship between all grids in the risk feature graph is as follows: TE is rewritten as conditional interaction information and expressed in a combined form in the following formula: In the formula, I(·;·|·) represents the conditional interaction information. After nested traversal of i and j, the causal matrix can be obtained, that is, by independent learning and mining the future ρv related to the hydropower station t+1 With the previous memory information t the spatiotemporal causal relationships between the various grids; represents the historical features on grid i; represents the historical characteristics on the target research grid j; Indicates the features that need to be predicted in the future; In calculating TE j→i When setting two transformation weights W p ,W f ∈R to accurately evaluate the joint entropy of the normalized historical state and the related future state in [0,1]; at the same time, asymmetry is used to determine the strength and direction of the causal relationship of risk development, TE j→i The larger the value, the higher the reliability of the causal relationship; on the other hand, if TE j→i >TE i→j , the feature of grid j is the result, and the feature of grid i is the inducement. Then, the result is deleted using formula (11), and the inducement is retained to generate a new transfer entropy; In the formula, T represents transpose, and diag(·) represents the diagonal.
10. The method for real-time prediction of hydropower station risk based on causal attention mechanism and graph learning as claimed in claim 1, characterized in that: The prediction module based on joint feature guidance includes: Construct the GAP embedding layer. GAP runs input data with various structures to calculate the similarity between risk nodes under the premise of unknown risk transmission path structure. The joint feature-guided prediction module enhances the spatial and location attributes of some hydropower stations in the prediction layer.
Citation Information
Patent Citations
Heterogeneous agent trajectory prediction method, system, device and medium
CN113568410A
Vehicle track prediction method based on dynamic interaction graph convolution
CN114802296A
Pedestrian trajectory prediction method based on three-scale spatio-temporal information
CN115018134A
Construction method of pedestrian trajectory prediction model
CN115527272A
Urban spatio-temporal data prediction method based on hybrid perception and causal depolarization
CN116307293A
Cited By
Aluminum product quality multi-scale detection method and system
CN120489987A
Multi-scale detection method and system for aluminum product quality
CN120489987B
Hydroelectric power generation power prediction method and system
CN122508109A
A method and system for hydroelectric power prediction
CN122508109B
