Graph neural network based coordinated control method for grid connection of small hydropower groups
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-09
- Publication Date
- 2026-08-11
AI Technical Summary
绝大多数决策模块无法动态识别图结构中对整体性能具有关键影响的节点,仅依靠电气参数的瞬时加权或邻域聚合,导致系统全局优化效率和物理可解释性不理想
(1)针对现有小水电群并网系统中节点重要性识别普遍依赖静态图指标或复杂多目标优化建模,导致对动态运行工况响应滞后、难以适应频繁拓扑变化的问题,本方案通过构建双通道输入编码器与轻量级拓扑演化感知器,实现了对节点语义贡献度的实时动态捕捉。该路径摒弃传统基于中心性、介数等离线计算方式,转而从连续时间窗口内的结构演变与运行状态耦合角度出发,利用边权重动态衰减机制表征连接可靠性,并结合滑动窗口归一化处理多维运行参数,形成兼具时序连续性与物理意义明确性的节点级语义向量;同时,通过局部邻域子图匹配算法提取拓扑微变模式并生成二元扰动掩码,作为门控信号引导后续信息流动,有效避免了冗余特征聚合带来的计算开销与响应延迟。这一设计显著提升了系统在联络线退运、机组随机启停等典型扰动工况下的感知灵敏度,使关键节点识别结果能够紧随电网实际运行态势演进而同步更新,从而为协同控制提供更具时效性与场景适配性的决策依据。
Smart Images

Figure CN122553329A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distributed small hydropower group grid-connected regulation and dynamic graph neural network collaborative optimization technology, and in particular to a small hydropower group grid-connected coordinated control method based on graph neural networks. Background Technology
[0002] In the current field of grid-connected coordinated control and collaborative optimization computation for distributed small hydropower groups, with the continuous increase in the proportion of new energy integration, the operation mode of power systems is becoming more distributed and dynamic, significantly enhancing the demand for intelligent collaborative scheduling. Currently, mainstream advanced control schemes in the industry mostly employ multi-objective optimization models, node weight settings based on traditional topological centrality or static scoring indicators, and federated hierarchical communication mechanisms or reinforcement learning exploration frameworks to achieve coordinated decision-making among various sites. These technical approaches emphasize leveraging external expert knowledge, static indicators, or complex model integration to avoid information distortion or unreasonable resource allocation caused by internal topology evolution.
[0003] Specifically, existing technologies generally abstract the collaborative optimization structure of small hydropower clusters into a static graph network model. Key nodes are roughly determined using centrality metrics (such as degree centrality, betweenness centrality, and eigenvector centrality), and resource allocation and control priorities are adjusted based on node scores. For example, some domains employ Graph Convolutional Neural Networks (GCNs) and Graph Attention Networks (GATs) to aggregate global information based on a static graph structure. These methods use fixed scoring mechanisms or manually set thresholds for node importance, making it difficult to reflect the true dynamic operating state. Another type of technology, such as multi-objective distributed reinforcement learning methods, often relies on extensive scenario simulations and reward function backfilling. This has limitations such as high computational resource consumption, slow convergence speed, and poor interpretability, making it difficult to adapt to the high real-time, low-power application scenarios of small hydropower clusters, where peripheral equipment requires significant power consumption. Some solutions distribute communication load through federated learning or hierarchical collaborative scheduling, but their adaptive perception capabilities for abnormal events such as dynamic topology changes and neighborhood subgraph reconstruction are insufficient, easily leading to information silos or misallocation of resources at key nodes.
[0004] Current graph neural network technology applied to collaborative optimization is limited by the static characteristics of node importance evaluation, lacking deep semantic perception of topology evolution and operational state changes within a continuous operating window. Most decision-making modules cannot dynamically identify nodes in the graph structure that have a critical impact on overall performance, relying solely on instantaneous weighting of electrical parameters or neighborhood aggregation, resulting in unsatisfactory global optimization efficiency and physical interpretability. Compensation mechanisms are mostly implemented through external scoring indicators or preset centrality priors, leading to a disconnect between simulation scenarios and actual operating states, and an inability to respond promptly to real-world conditions such as equipment start-up / stop, disconnected tie lines, and regional topology reconfiguration.
[0005] While industry technological advancements have made efforts to improve grid connection stability, power flow balance robustness, and scheduling response consistency, the insufficient ability to identify and prioritize key nodes in dynamic environments still makes it difficult to completely overcome the bottlenecks in collaborative optimization caused by semantic ambiguity of nodes and unreasonable resource allocation. For example, when grid disturbances occur, the system often cannot accurately locate inertial support or power flow adjustment anchor nodes, and the priority configuration of core information transmission lags behind the actual topology changes, seriously affecting the timing stability and scheduling response efficiency of the global control closed loop.
[0006] In summary, existing technologies suffer from the following prominent problems: node importance evaluation remains at the level of static topology and short-term electrical parameter weighting, lacking a dynamic identification paradigm based on semantic contribution within a continuous operating window; the information priority configuration of key nodes cannot be adjusted in real time according to system status and topology evolution, resulting in limited efficiency of grid-connected collaborative optimization; some technologies rely on external scoring, hierarchical communication frameworks, or reinforcement learning strategies, which cannot take into account the low bandwidth, low power consumption, and high real-time requirements of edge devices; once the system topology is reconstructed or a tie-line anomaly occurs, the traditional model feedback mechanism reacts sluggishly, making it difficult to achieve closed-loop dynamic optimization through collaborative decision-making.
[0007] Therefore, there is an urgent need for a dynamic node importance identification technology that does not rely on traditional graph index calculation, external scoring, or multi-objective optimization modeling. Based on a graph neural network collaborative decision-making module, it can autonomously extract node semantic features that have an implicit dominant role in grid connection stability, power balance robustness, and scheduling response consistency within a continuous operating window, and generate a dynamic priority sequence with temporal consistency and physical interpretability. This will significantly improve the intelligent decision-making capability and global resource allocation rationality of multi-site collaborative grid connection in small hydropower groups, laying a solid foundation for subsequent efficient, accurate, and real-time collaborative optimization control. Summary of the Invention
[0008] This application provides a graph neural network-based coordinated control method for small hydropower group grid connection, which aims to solve one of the problems or issues of the prior art mentioned in the background.
[0009] The graph neural network-based coordinated control method for small hydropower group grid connection provided in this application specifically includes: S1: Obtain the original graph structure snapshot sequence and synchronous multidimensional operation state flow of the small hydropower group within the continuous operation window; S2: Perform sliding window normalization on the synchronous multidimensional running state stream, and map the processed state data into a node-level temporal semantic vector. At the same time, generate a binary topological perturbation mask based on the topological micro-change pattern between multiple consecutive snapshots in the original graph structure snapshot sequence. S3: Based on the node-level temporal semantic vector and the historical semantic vector of the current node and its K-hop neighbors, a self-supervised comparison mechanism is constructed. The binary topological perturbation mask is used as a filtering condition to narrow the semantic representation distance of the same node at different time steps and widen the semantic similarity with non-key neighbor nodes, generating node semantic distillation features. S4: Input the semantic distillation features of each node in the past several time steps into the cross-time step attention distillation mechanism, and perform weighted fusion through a learnable time decay function to generate dynamic importance confidence. S5: Calculate the edge weight scaling factor in the message passing process of the graph neural network based on the dynamic importance confidence, set the edge weight scaling factor corresponding to the high confidence node to be greater than the preset value to form an information enhancement region, and generate enhanced graph structure data. S6: Input the enhanced graph structure data into the graph neural network collaborative decision-making module to perform message aggregation operation, and use the edge weight scaling factor to guide the high-priority aggregation of neighbor information to generate a collaborative optimization control strategy sequence.
[0010] S7: Based on the aforementioned collaborative optimization control strategy sequence, perform real-time adjustment actions on the governor commands and excitation parameters of each station in the small hydropower group, and output an updated snapshot of the diagram structure. S8: Collect the new synchronous multidimensional running state stream after the adjustment action is executed and compare it with the updated graph structure snapshot. If the topological perturbation mask indicates a new neighborhood reconstruction event, trigger the next round of node semantic distillation feature update; otherwise, maintain the current dynamic importance confidence.
[0011] The graph neural network-based coordinated control method for small hydropower plant clusters provided in this application has the following beneficial effects: (1) In response to the problem that the identification of node importance in existing small hydropower group grid-connected systems generally relies on static graph indicators or complex multi-objective optimization modeling, which leads to a lag in response to dynamic operating conditions and difficulty in adapting to frequent topology changes, this solution realizes real-time dynamic capture of node semantic contribution by constructing a dual-channel input encoder and a lightweight topology evolution perceptron. This approach abandons the traditional offline calculation method based on centrality, betweenness, etc., and instead starts from the perspective of the coupling between structural evolution and operating state within a continuous time window. It uses the dynamic decay mechanism of edge weights to characterize connection reliability and combines sliding window normalization to process multi-dimensional operating parameters, forming a node-level semantic vector that has both temporal continuity and clear physical meaning. At the same time, the topology micro-change pattern is extracted by the local neighborhood subgraph matching algorithm and a binary perturbation mask is generated as a gating signal to guide the subsequent information flow, effectively avoiding the computational overhead and response delay caused by redundant feature aggregation. This design significantly improves the system's sensing sensitivity under typical disturbance conditions such as tie line outages and random unit start-ups and shutdowns, enabling the key node identification results to be updated synchronously with the actual operating status of the power grid, thereby providing more timely and scenario-adaptive decision-making basis for collaborative control.
[0012] (2) To further enhance the model's ability to focus on key functional nodes, this scheme innovatively introduces a node semantic distillation layer and a cross-time step attention distillation mechanism. Without relying on external labels and reinforcement learning exploration, a self-supervised dynamic confidence generation system is constructed. The semantic distillation layer uses a contrastive learning strategy to shorten the semantic trajectory distance of the same node across time periods, while widening its similarity with non-key neighbors, forcing the network to focus on nodes that maintain semantic consistency in perturbation environments—such nodes often play a role in supporting system inertia or anchoring the flow of power, and have substantial control value. The cross-time step attention mechanism, by performing temporal alignment and learnable decay weighted fusion on historical distillation outputs, gives importance assessment memory retention characteristics, enabling it to not only reflect the current transient state but also inherit previous operating experience, forming a stable and reliable dynamic confidence sequence. This confidence does not directly participate in the scoring and ranking but serves as a soft constraint to guide the resource allocation strategy in the collaborative optimization process, further mapped to the edge weight scaling factor in GNN message passing, so that high-confidence nodes obtain higher sampling priority and longer propagation paths in information aggregation, naturally forming an information enhancement region centered on key nodes. This closed-loop feedback structure significantly improves the overall optimization convergence speed and perturbation resistance without changing the original graph neural network architecture.
[0013] The aforementioned technical approaches collectively construct a new paradigm for node importance identification based on operational semantics rather than topological morphology, overcoming multiple limitations of traditional methods in terms of dynamic adaptability, computational efficiency, and engineering deployment feasibility. The entire process completely avoids explicit multi-objective modeling, federated architecture dependencies, and reinforcement learning training. All modules support lightweight deployment on edge devices, meeting the stringent constraints of low power consumption, low bandwidth, and high real-time performance in green construction scenarios. This achieves a leap from "passive response" to "active perception—adaptive focusing—closed-loop enhancement," providing reliable, efficient, and scalable technical support for the safe and stable operation of small hydropower cluster grid-connected systems. Attached Figure Description
[0014] Figure 1 This is the main flowchart of a graph neural network-based coordinated control method for small hydropower group grid connection. Figure 2 This is a sub-flowchart of a graph neural network-based coordinated control method for small hydropower group grid connection. Figure 3 This is another sub-flowchart of the grid-connected coordinated control method for small hydropower groups based on graph neural networks. Detailed Implementation
[0015] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0016] The following disclosure provides many different embodiments or examples for implementing different structures of the invention. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the invention. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0017] like Figure 1 As shown, this application provides a graph neural network-based coordinated control method for small hydropower group grid connection, specifically including: S1: Obtain the original graph structure snapshot sequence and synchronous multidimensional operating state flow of the small hydropower group within a continuous operating window. The original graph structure snapshot sequence includes tie-line connection reliability data characterized by dynamic decay of edge weights, and the synchronous multidimensional operating state flow includes head fluctuation rate, unit start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset data.
[0018] S2: Perform sliding window normalization on the synchronous multidimensional running state stream, and map the processed state data into node-level temporal semantic vectors. At the same time, generate a binary topological perturbation mask based on the topological micro-change pattern between multiple consecutive snapshots in the original graph structure snapshot sequence. The binary topological perturbation mask serves as a gating switch signal characterizing local neighborhood subgraph reconstruction events.
[0019] S3: Based on the node-level temporal semantic vector and the historical semantic vector of the current node and its K-hop neighbors, a self-supervised comparison mechanism is constructed. The binary topological perturbation mask is used as a filtering condition to narrow the semantic representation distance of the same node at different time steps and widen the semantic similarity with non-critical neighbor nodes, thereby generating node semantic distillation features that focus on the function of system inertial support or power flow regulation anchor point.
[0020] S4: Input the node semantic distillation features of each node in the past several time steps into the cross-time step attention distillation mechanism, and perform weighted fusion through a learnable time decay function to generate a dynamic importance confidence that has memory retention characteristics and represents the semantic contribution of nodes to the stability of the global control loop.
[0021] S5: Based on the dynamic importance confidence calculation of the edge weight scaling factor in the message passing process of the graph neural network, the edge weight scaling factor corresponding to the high confidence node is set to be greater than a preset value to form an information enhancement region, generating enhanced graph structure data. The enhanced graph structure data includes: priority sampling priority and parameters for extending the information propagation path.
[0022] S6: Input the enhanced graph structure data into the graph neural network collaborative decision-making module to perform message aggregation operation, and use the edge weight scaling factor to guide the high-priority aggregation of neighbor information to generate a collaborative optimization control strategy sequence for the grid connection stability, power balance robustness and scheduling response consistency of small hydropower groups.
[0023] S7: Based on the collaborative optimization control strategy sequence, the governor commands and excitation parameters of each station in the small hydropower group are adjusted in real time to achieve soft constraint guidance of resource allocation under the leadership of key nodes, and output an updated graph structure snapshot reflecting the current grid-connected operation status.
[0024] S8: Collect the new synchronous multidimensional running state stream after the adjustment action is executed and compare it with the updated graph structure snapshot. If the topological perturbation mask indicates a new neighborhood reconstruction event, trigger the next round of node semantic distillation feature update. Otherwise, maintain the current dynamic importance confidence to complete the closed-loop feedback optimization.
[0025] Step S1: Obtain the original graph structure snapshot sequence and synchronous multidimensional operating state stream of the small hydropower group within a continuous operating window. The original graph structure snapshot sequence includes tie-line connection reliability data characterized by dynamic decay of edge weights, and the synchronous multidimensional operating state stream includes head fluctuation rate, unit start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset data. Specifically, this includes: S1.1: Obtain the real-time electrical parameters and historical on / off records of each tie line in the small hydropower group topology network, quantitatively evaluate the connection stability of the tie lines based on the time sliding window mechanism, and generate an initial topology connection dataset containing connection reliability indicators to establish a static benchmark for graph structure evolution.
[0026] It receives real-time electrical parameter inputs from each tie line in the small hydropower group topology network, including current amplitude, line voltage and power factor, and simultaneously accesses the historical on / off record dataset to characterize the working status of the tie lines in past operating cycles.
[0027] Based on the time sliding window mechanism, the above real-time electrical parameters and historical on / off records are segmented and integrated. The tie line operation data within each window period are collected into a unified analysis unit to ensure that the data within the window has strict time continuity.
[0028] Within each sliding window period, the connection stability score of the tie line is calculated. Reliability is quantified using a fusion method of signal statistical characteristics and on / off event frequencies. The specific formula is as follows:
[0029] in, , , These are the weighting coefficients, Let be the current stability coefficient at time step t. Let be the voltage stability coefficient at time step t. Let be the power factor stability coefficient at time step t. This is the window length.
[0030] Normalization was performed on each scoring indicator to map electrical indicators of different dimensions to a unified numerical range, which facilitates subsequent comparative analysis across tie lines.
[0031] Based on the normalized scoring index, the reliability index is calculated. Combining the proportion of interruption time in the connection and disconnection records with the number of repeated interruptions, the score value is corrected through a non-linear penalty function to improve the sensitivity of the index to frequent connection failures.
[0032] The calculated reliability indices of each tie line are encapsulated into an initial topology connection dataset based on the original topology node and edge mapping relationship, which serves as the input benchmark for the subsequent dynamic decay processing of edge weights in S1.2.
[0033] By using reliability evaluation and structured encapsulation, the real-time and historical electrical data from the previous step are transformed into quantitative stability indicators, achieving the expected technical effect of establishing a static benchmark for graph structure evolution.
[0034] S1.2: Perform dynamic decay processing on the edge weights of the initial topology connection dataset. Use the exponential forgetting factor algorithm to reduce the weight values of tie lines that have not had power interaction for a long time over time, and generate tie line connection reliability data characterized by dynamic decay of edge weights to reflect the time-varying vulnerability characteristics of the topology.
[0035] An edge-by-edge historical power interaction record index is established on the initial topology connection dataset generated in the previous steps, and the power exchange event counts of each tie line within a continuous sliding time window are extracted.
[0036] An initial value matrix of edge weights is constructed based on the event count index. The weight value of a single tie line is calculated as a weighted average of the historical on / off frequency and the stability index of real-time electrical parameters.
[0037] An exponential forgetting factor algorithm is used to perform time-decreasing processing on the initial value matrix of edge weights. The decrease factor is dynamically calculated based on the time interval of historical power interactions, as shown in the following formula:
[0038] Where w(t) is the edge weight value at the current time, w(0) is the initial edge weight value, λ is the forgetting factor, and Δt is the time interval since the most recent power interaction.
[0039] For tie lines that have not experienced power interaction for a long time, the reduction factor λ is increased according to the threshold segmentation rule to accelerate the decay of weight values and enhance the response to topology vulnerability.
[0040] The processed edge weight matrix is fused element-wise with the corresponding connection stability index in the initial topology connection dataset to obtain an update matrix that includes the dynamic decay characteristics of edge weights and the real-time connection status.
[0041] Through the above processing method, the static benchmark data of the previous step is transformed into dynamic weight data that characterizes the time-varying vulnerability of the reliability of the tie line connection, so as to realize the synchronous characterization of the connection strength and the evolution of the operating state between nodes.
[0042] S1.3: Collect raw signals from local sensors at each small hydropower station, extract four key operating indicators: head fluctuation rate, generator start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset, and generate a multi-source heterogeneous set of operating parameters to construct an underlying data source that reflects the dynamic behavior of individual stations.
[0043] The data collection targets are the raw signals from local sensors at small hydropower stations. These raw signals include the real-time head height sequence output by the water level sensor, the start-stop event sequence recorded in the unit operation log, the response delay sequence output by the governor position sensor, and the phase angle offset sequence output by the grid connection point voltage phase angle sampler.
[0044] The real-time head height sequence output by the water level sensor is processed to calculate the volatility. The head volatility is calculated using the formula for the ratio of the standard deviation to the mean within a time window, as follows:
[0045] in, The standard deviation of the water head height within the time window. This is the arithmetic mean of the water head height within the time window.
[0046] Frequency statistics processing is performed on the start-stop event sequences in the unit operation log. The number of start-up and stop events is accumulated based on a fixed-length time window, and the start-stop frequency value of the unit is output as an operating status indicator.
[0047] Delay time extraction is performed on the response delay sequence of the speed controller position sensor. The speed controller response delay parameter is obtained by using the difference between the trigger command time and the actual opening change time. The average delay is calculated according to the time window.
[0048] Phase angle offset is extracted from the voltage phase angle sampling data at the grid connection point. The offset is calculated using the difference between the reference phase angle and the measured phase angle to ensure that the value range and sign conform to the power system phase angle definition.
[0049] Four key operating indicators—head fluctuation rate, unit start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset—are encapsulated into a multi-source heterogeneous set of operating parameters and bound to a unique site identifier to construct an underlying data source that reflects the dynamic behavior of individual sites.
[0050] Through the above processing method, the raw sensor signal data from the previous step is transformed into quantitative operational indicators that can be used for topology-state fusion, thereby achieving an accurate characterization of the operational status of each site.
[0051] S1.4: Based on a unified timestamp alignment mechanism, the multi-source heterogeneous operating parameter set is spatiotemporally registered to eliminate data misalignment caused by differences in sampling frequencies of different sensors, and to generate a multi-dimensional operating state raw stream with strict time synchronization characteristics to ensure time consistency in subsequent analysis.
[0052] S1.5: The connection reliability data of the contact line is structurally encapsulated and mapped with the original multi-dimensional operating status stream, and fused into a unified data object according to the preset graph node attribute binding rules. This generates an original graph structure snapshot sequence and a synchronous multi-dimensional operating status stream containing complete topology evolution information and site operating characteristics, which serve as the direct input basis for the collaborative decision-making module.
[0053] Step S2: Perform sliding window normalization on the synchronous multidimensional running state stream, and map the processed state data into node-level temporal semantic vectors. Simultaneously, generate a binary topological perturbation mask based on the topological micro-change patterns among multiple consecutive snapshots in the original graph structure snapshot sequence. This binary topological perturbation mask serves as a gating switch signal characterizing local neighborhood subgraph reconstruction events. Specifically, this includes: S2.1: Perform a sliding window truncation operation on the head fluctuation rate, unit start-up and shutdown frequency, governor response delay and grid connection point voltage phase angle offset data in the synchronous multidimensional operating state stream to obtain raw state data fragments containing time series characteristics, which serve as the input basis for subsequent normalization processing.
[0054] For the head fluctuation rate, unit start-up and shutdown frequency, governor response delay and grid connection point voltage phase angle offset data in the synchronous multidimensional operation state stream, based on the strictly synchronous data input that has completed spatiotemporal registration processing, the time span parameter and step size parameter for the interception window are selected, and the number of data points in the window is determined according to the sampling resolution of different physical quantities, forming an interception boundary that can cover continuous operation dynamics.
[0055] For the data sequence within the captured window, a multi-index hierarchical caching mechanism is adopted. The head fluctuation rate and the frequency of unit start-up and shutdown are included in the flow and power fluctuation layer, and the governor response delay and the voltage phase angle offset at the grid connection point are included in the power quality layer to ensure that the physical properties are not confused during subsequent normalization.
[0056] The application uses a window sliding mechanism to advance the window by a set step size at each time step position, and dynamically discards historical data that exceeds the window range, while retaining the data within the window to generate time series segments, ensuring that the captured state data segments can reflect the short-term change trend of the operating state.
[0057] For each time series segment, an index synchronization check is performed to eliminate alignment deviations within the segment caused by asynchronous sampling from different sensors. This ensures that the time position indices of various parameters within the window are consistent, providing a strictly synchronized input basis for subsequent numerical normalization.
[0058] Through the sliding window extraction and hierarchical caching process described above, the multidimensional running state stream generated in the previous step is transformed into raw state data fragments containing time series features and satisfying the hierarchical nature of physical attributes, thus laying an accurate and stable data foundation for the next step of dimensionless normalization processing.
[0059] S2.2: Based on the original state data fragment, the range normalization algorithm is used to perform dimensionless processing to eliminate the influence of different physical dimensions on model convergence, generate standardized state feature vectors with uniform numerical distribution characteristics, and ensure the comparability of data in each dimension in the semantic space.
[0060] S2.3: Utilize a pre-trained temporal coding network to perform a nonlinear mapping transformation on the standardized state feature vector to extract the deep operational patterns hidden in multi-source heterogeneous data, generate node-level temporal semantic vectors representing the single-point operational status of small hydropower groups, and complete the conversion from physical parameters to semantic space.
[0061] The system receives the standardized state feature vector output from the preceding step S2.2 as input. This vector encompasses multi-dimensional dimensionless data such as head fluctuation rate, unit start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset. Pre-trained time-series coding network model weight parameters are loaded. This model includes multi-layer bidirectional recurrent units and residual connection modules to ensure the ability to capture dependencies across time steps when processing multi-source heterogeneous data. A time-step recursive update operation is performed on the standardized state feature vector, mapping the input sequence to a high-dimensional latent space. This transforms the combination patterns of different physical quantities into latent features strongly correlated with the operational status. A gating mechanism is used to inject dynamic adjustment coefficients into the recursive units. By adjusting the information retention ratio based on the state change rate at each time step, the system focuses on amplifying abnormal fluctuation segments. Multi-scale convolutional kernels are used to perform time-domain convolution operations on the latent space features, extracting operational status information from both short-term local trends and long-term global trends, forming an intermediate feature matrix containing multi-level time-series patterns. The intermediate feature matrix is input into a multi-head attention mechanism, and the correlation scores between time steps are calculated according to different head weights. Weighted aggregation is then used to form a final node-level temporal semantic vector with context awareness. Through nonlinear mapping, the results of the previous step are transformed into high-dimensional semantic data representing the single-point operation status of the small hydropower group, realizing the transformation from physical parameters to semantic space and providing a temporal feature foundation for the subsequent topological micro-change detection in S2.4.
[0062] S2.4: Based on the dynamic decay data of edge weights from multiple consecutive snapshots in the original graph structure snapshot sequence, a local neighborhood subgraph matching algorithm is executed to detect micro-change patterns where the reliability of the connection line is consistently below the threshold or the neighbor set is frequently reconstructed, and a binary topological perturbation mask representing topological instability events is generated.
[0063] The dynamic decay data of edge weights from multiple consecutive snapshots in the original graph structure snapshot sequence are loaded to construct a time-series edge weight matrix covering both global and local topologies. In a preferred embodiment of the invention, the multiple consecutive snapshots specifically refer to the first five snapshots in the sequence. By analyzing the topological changes between these five consecutive snapshots, a binary topological perturbation mask is generated. Based on this time-series edge weight matrix, the local subgraph structure of each node is extracted according to a preset neighborhood radius, forming a local neighborhood snapshot set containing the node and its neighbor set. A neighbor set matching operation is performed on the local neighborhood snapshot set to compare the differences between neighbor sets in consecutive snapshots, calculate the number of neighbor set reconstructions, and record the change trajectory. Based on the change trajectory, a threshold determination is made for the reliability of each link connection, using a formula...
[0064] Where R is the reliability evaluation value, w is the edge weight at the current time step, τ is the reliability threshold, and σ is the standard deviation of weight decay. Detection is performed when the reliability is continuously lower than the threshold. The number of neighbor set reconstructions is logically combined with the reliability judgment result. When the reliability of the link corresponding to a node is lower than τ for K consecutive time steps and the number of neighbor set reconstructions exceeds a preset threshold within that time window, the node is marked as an unstable node. A binary topological perturbation mask composed of 0 and 1 is generated based on the unstable node marking, where 1 indicates a detected topological instability event and 0 indicates a stable state. Through a combination strategy of neighborhood subgraph matching and reliability judgment, the result of the previous step is transformed into a binary topological perturbation mask that can directly drive the subsequent key node identification process, achieving accurate screening and marking of local neighborhood subgraph reconstruction events.
[0065] S2.5: Logically associate and encapsulate the node-level temporal semantic vector with the binary topological perturbation mask to form a composite data structure with dynamic gating switch signals, which serves as the input condition for the self-supervised comparison mechanism, thereby achieving precise triggering and filtering control of the semantic feature extraction process of key nodes.
[0066] like Figure 2As shown, step S3: Based on the node-level temporal semantic vector and the historical semantic vectors of the current node and its K-hop neighbors, a self-supervised comparison mechanism is constructed. The binary topological perturbation mask is used as a filtering condition to narrow the semantic representation distance of the same node at different time steps and widen the semantic similarity with non-critical neighbor nodes, thereby generating node semantic distillation features focusing on the system's inertial support or power flow regulation anchor point function. Specifically, this includes: S3.1: Obtain the node-level temporal semantic vector of the current time step and the set of historical semantic vectors of the current node and its K-hop neighbors in the previous time step. Extract time segments containing features of head fluctuation rate and governor response delay based on the sliding window truncation strategy, and generate positive and negative sample pairs as the initial data source for self-supervised contrastive learning.
[0067] The system receives the node-level temporal semantic vector of the current time step and the historical semantic vector set of the corresponding node and its K-hop neighbors in the previous time step. Using the sliding window truncation strategy as the execution framework, it locates continuous sample segments containing the head fluctuation characteristic components from the time series.
[0068] The truncation operation is performed according to the span parameter of the sliding window, so that each window covers the same length of the governor response delay feature segment, and the time index of each sample in the window is bound to the node identifier to form a windowed data unit containing dual labels of physical quantity dimension and time position.
[0069] For the head fluctuation rate and governor response delay features in the windowed data unit, bivariate coupled coding is performed. The head fluctuation rate sequence is mapped to the numerically stable region by mean centering and variance standardization. The governor response delay sequence is subjected to extreme value scaling transformation to improve feature contrast, forming a unified feature vector that is comparable in both the numerical and physical domains.
[0070] The unified feature vector is processed to construct positive and negative sample pairs. The windowed feature vectors of the same node at different time steps are paired and classified as positive sample pairs, and the windowed feature vectors of the current node and non-critical neighbor nodes are paired and classified as negative sample pairs. The node identifier, time step index and physical quantity dimension of each sample pair are clearly recorded in the pairing table.
[0071] The following formula is used to calculate the feature Euclidean distance between positive sample pairs to evaluate the initial similarity. The above distance is used as the distance benchmark input for the self-supervised comparison mechanism, laying a numerical foundation for subsequent filtering and optimization.
[0072] Through the above processing method, the node-level temporal semantic vectors and historical neighbor semantic vector sets extracted in the previous step are transformed into positive sample pairs and negative sample pairs as initial data sources with positive and negative labels, consistency of physical quantity mapping and comparability of numerical features, so as to realize the accurate construction of input conditions for self-supervised contrastive learning.
[0073] S3.2: Perform a binary topological perturbation mask filtering operation on the initial data source of the positive sample pairs and negative sample pairs. Use the binary topological perturbation mask to remove abnormal neighbor node data that are affected by topological micro-changes, and generate a clean semantic comparison sample set that has passed the topological consistency check.
[0074] When performing a binary topological perturbation mask filtering operation on the initial data source of positive and negative sample pairs, the input conditions are the set of positive and negative sample pairs generated by the previous steps and the binary topological perturbation mask representing the reconstruction event of the local neighborhood subgraph. Based on the element-wise matching and comparison between the mask matrix and the sample pair data matrix, the binary state value of the mask is used to determine whether the neighbor node data is affected by topological micro-changes, and nodes with a state value of 1 are marked as interfering nodes. A neighbor node removal vector is constructed, and logical removal processing is performed on the sample pairs marked as interfering nodes, deleting the associated data records of positive and negative samples to prevent abnormal topological states from entering the comparison mechanism. During the removal process, a topological consistency verification algorithm is used to map the node connection relationships of the remaining samples to the reference topology of the previous N time steps, verifying the consistency of the node set in the neighborhood structure, and removing sample entries that violate the consistency requirements. A clean semantic comparison sample matrix is generated using the filtered sample set, maintaining the feature dimension consistent with the original samples, and the continuity of sample positions during subsequent projection mapping is ensured through data index reconstruction. By using masking filtering and consistency verification, the sample pair set from the previous step is transformed into a topologically stable and clean semantic comparison sample set free from abnormal node interference, thus achieving the expected technical effect of high signal-to-noise ratio input conditions.
[0075] S3.3: Based on the pure semantic comparison sample set, construct a multi-view self-supervised comparison loss function, map the semantic representation of the same node at different time steps to a unified latent space, calculate the cosine similarity distance between positive sample pairs and perform minimization optimization processing to generate node semantic anchor features with time invariance.
[0076] This embodiment constructs and optimizes a multi-view self-supervised contrastive loss function. The specific process is as follows: First, based on the clean semantic contrastive sample set filtered by the binary topological perturbation mask, a normalization preprocessing operation is performed on each positive sample pair before latent space mapping. In the preprocessing process, a numerical standardization strategy combining mean centering and variance scaling is adopted to unify the semantic vectors from different time steps to a numerical distribution range with zero mean and unit variance, so as to eliminate the interference effect of time difference and sampling noise on subsequent similarity calculation.
[0077] A projection head mapping network is constructed on the normalized semantic vector. This network consists of a set of fully connected layers with nonlinear activation and batch normalization layers, which ensures that the input vector can be generated into an embedded representation in a unified latent space coordinate system through parameterized mapping, and the mapping process maintains semantic consistency for the same node at different time steps.
[0078] Next, after completing the latent space mapping, cosine similarity is calculated for the embedding representations of each positive sample pair, using the following formula:
[0079] in, and These represent the latent space vectors at two time steps in a positive sample pair. The numerator is the vector dot product, and the denominator is the product of their magnitudes. This similarity value is used to measure the consistency of the semantic representation of the same node at different time steps.
[0080] The cosine similarity results are input into the positive sample component of the multi-view self-supervised contrastive loss function, thus defining the positive sample loss component as L. pos =1-S. By minimizing the positive sample loss component through backpropagation, the objective achieves temporal table convergence, making the positive samples approach a consistent position in the latent space.
[0081] Then, for the embedded representations generated from different views, cross-view fusion constraints are constructed, jointly incorporating the similarity of positive sample pairs across views into the contrastive loss function, or by constructing a cross-view attention module to aggregate the responses from each view, thereby forming a cross-view fusion. Figure 1 Consistency constraint term L view This ensures that the model maintains consistency across different projection channels, enhancing the robustness of semantic anchor features.
[0082] Finally, joint optimization and training of the loss function are performed. The positive sample loss component L constructed above is then applied... pos With cross vision Figure 1 Consistency constraint term L view Weighted summation is performed to form the final multi-view self-supervised contrastive loss function: L total=L pos +λL view λ is a balancing hyperparameter. During the training phase, the parameters of the entire network (including the projector and front-end feature extractor) are jointly optimized end-to-end using the backpropagation algorithm with the loss function Ltotal. After sufficient training, the node semantic anchor features output by the model will possess high time invariance and cross-viewability. Figure 1 Consistency ensures high-quality input for subsequent stability assessments.
[0083] Through the above processing method, the pure semantic comparison sample set of the previous step is transformed into node semantic anchor features with temporal invariance constraints, so as to realize the model's ability to focus on the temporal semantic consistency of key nodes in the context of topological perturbation.
[0084] S3.4: Utilize the semantic anchor features of the nodes and the semantic representations of non-critical neighbor nodes to perform repulsion calculation. Maximize the Euclidean distance between negative sample pairs in the latent space to push away the semantic similarity of unrelated nodes, thereby generating node semantic separation boundary parameters with high discriminative power.
[0085] The input conditions include a set of temporally invariant node semantic anchor features generated by the preceding sub-step S3.3, and a semantic representation data matrix of non-critical neighbor nodes that has undergone topological consistency verification. For the above input data, a Euclidean distance calculation model for the semantic representations of nodes and their neighbors is first constructed in the latent space, and a high-dimensional vector difference metric formula is used to quantify the distance.
[0086] Where v represents the semantic anchor feature vector of a node, and u represents the semantic representation vector of a non-critical neighbor node. Let L2 norm represent the L2 norm of the vector. This formula reflects the degree of heterogeneity between two types of nodes in the semantic space by calculating the norm of the vector difference.
[0087] Based on the distance calculation results above, element-wise distance thresholding is performed on all negative sample pairs. Sample pairs with distances less than a preset separation threshold are marked as the target set requiring repulsion enhancement processing to strengthen the model's ability to identify highly similar but unrelated nodes. For each pair of samples in the target set, a repulsion optimization function is applied to maximize the distance. The direction and length of the semantic anchor feature vector of the node are adjusted through gradient backpropagation to make it far away from the semantic representation of non-critical neighbor nodes in the latent space.
[0088]
[0089] Where d(v,u) represents the Euclidean distance calculation result, the negative sign is used to maximize the distance in reverse to increase the semantic separation, and B represents the current training batch or sample pair set.
[0090] Based on the distance change trajectory generated during the optimization process, the distance growth rate and the final distance value are extracted as separation strength indicators and mapped to node semantic separation boundary parameters to achieve a highly discriminative semantic boundary quantification output. Through the above processing method, the node semantic anchor features from the previous step are transformed into highly discriminative semantic separation boundary parameters, achieving strict separation of key nodes and non-key neighbor nodes in the latent space.
[0091] S3.5: Based on the node semantic separation boundary parameters, the original node-level temporal semantic vector is weighted and reconstructed, and the temporal invariance constraint and semantic separation constraint are integrated to output node semantic distillation features that focus on the system inertial support or power flow regulation anchor point function and enhance the resistance to topological disturbances.
[0092] The semantic reconstruction processing chain is established by receiving the node semantic separation boundary parameters generated in the preceding sub-step S3.4 and the original node-level temporal semantic vector as input. In the first processing action, a boundary weight coefficient matrix is constructed, mapping the separation boundary parameters to the weight values of each dimension of the corresponding node vector to quantify the modulation intensity of temporal invariance constraints and semantic separation constraints on different feature components. In the second processing action, an element-wise multiplication fusion mechanism is used to combine the boundary weight coefficient matrix with the original node-level temporal semantic vector to form an intermediate vector set adjusted by boundary constraints. In the third processing action, temporal invariance constraint gain processing is performed on the intermediate vector set. The cosine similarity score of historical anchor features is used as the gain coefficient, and weighted superposition is performed on the feature components to strengthen components with significant consistency across time steps. In the fourth processing action, a repulsive force function of semantic separation constraints is introduced. By maximizing the difference in Euclidean distance between features of negative sample pairs, some components of the intermediate vector set are adjusted to further widen the feature boundaries between key nodes and non-key neighbors. In the fifth processing step, a nonlinear normalization operator is used to map the weighted reconstructed vector to a unified numerical range to ensure the comparability of cross-node features. The output is a node semantic distillation feature that focuses on the system's inertial support or power flow regulation anchor point function and enhances the resistance to topological disturbances.
[0093] Through the above-mentioned multi-stage weighted reconstruction and constraint fusion processing method, the separation boundary parameters and original temporal semantic vectors of the previous step are transformed into distilled features with dual constraint characteristics and enhanced robustness, thereby achieving a simultaneous improvement in the stability and discriminability of key node features.
[0094] like Figure 3As shown, step S4: Input the node semantic distillation features of each node in the past several time steps into the cross-time step attention distillation mechanism, and perform weighted fusion through a learnable time decay function to generate a dynamic importance confidence that has memory retention characteristics and represents the semantic contribution of nodes to the stability of the global control loop.
[0095] The cross-timestep attention distillation mechanism is essentially a process of temporal feature alignment and compression. The workflow of the cross-timestep attention distillation mechanism is S4.1-S4.3, specifically including: S4.1: Obtain the node semantic distillation features of each node within a certain number of past time steps, and perform temporal position calibration processing on the node semantic distillation features based on the sliding time window alignment algorithm to eliminate the time step misalignment caused by asynchronous data acquisition or transmission delay, and generate a temporally aligned node semantic feature matrix.
[0096] It receives the semantic distillation features of all nodes in the past several time steps as input conditions. The sequence data comes from the output of the self-supervised comparison mechanism of the previous step. It has the characteristics of time invariance constraint and semantic separation constraint, ensuring that the feature sequence can be effectively compared and aligned in different time steps.
[0097] The sliding time window alignment algorithm is invoked on the semantic distillation features of the nodes, with the window length set to M and the window step size matched according to the sampling period of the collaborative decision module, in order to capture the feature change trajectory within a long time range.
[0098] Within the sliding window, timestamp parsing is performed on the feature sequence of each node to extract the original acquisition timestamp, and the time interval deviation between adjacent sampling points is calculated. The acquisition asynchronous or transmission delay events are detected by the deviation value.
[0099] A delay correction matrix is constructed using time deviation values. The delay patterns of each node are used as grouping units. Linear interpolation or cubic spline interpolation methods are used to fill in the feature values of missing time points, thus mapping the non-uniform sampling distribution into a continuous feature sequence on a uniform time axis.
[0100] The delayed feature sequences are synchronized according to their time axis positions to establish a unified time step index system, ensuring that all nodes are in completely consistent positions at each time step.
[0101] The synchronized calibrated feature values are encapsulated into a matrix form, where the matrix rows represent node indices, the matrix columns represent time step indices, and the matrix elements are the semantic distillation feature vectors of the nodes at the corresponding time steps.
[0102] Through the above processing method, the node semantic distillation features generated in the previous step are transformed into a node semantic feature matrix with strict temporal synchronization characteristics, achieving complete alignment across nodes and time steps, and providing a high-precision input foundation for subsequent time decay weight calculation and long sequence fusion.
[0103] For example, in a scenario with 12 small hydropower stations and a sampling period of 5 seconds, M=48 is chosen, corresponding to a time window covering 4 minutes of operational data. Semantic distillation features for each node are processed using a sliding window of length 48. Timestamp parsing reveals a 0.2-second transmission delay in some nodes. The delay correction matrix is calculated using cubic spline interpolation. In the interpolation algorithm, the interpolated value for the time axis t of the delayed nodes is calculated using the following formula:
[0104] Where a, b, c, and d are interpolation coefficients obtained from the feature values of adjacent time steps. After interpolation calibration, the feature sequences of each node are aligned in the unified time step indexing system, forming a semantic feature matrix of size 12×48. This matrix can be directly used as input in subsequent time decay calculations, significantly improving the stability and accuracy of dynamic importance confidence calculation.
[0105] S4.2: Based on the temporally aligned node semantic feature matrix, a time weight calculation model is constructed using a parameterizable exponential decay kernel function. Time sensitivity mapping processing is performed on the feature vectors of different historical moments in the temporally aligned node semantic feature matrix to quantify the diminishing influence of historical states on the current decision and generate a time weight vector containing a time decay coefficient.
[0106] Based on the temporally aligned node semantic feature matrix, each historical time step feature vector in the matrix is used as the input object for the time sensitivity mapping. For the input object, an exponential decay kernel function model with parameterizable adjustment capabilities is constructed. The time weight calculation structure is flexibly adjusted by introducing learnable temporal position parameters and decay rate parameters into the kernel function. The temporal position parameter is defined as the time step difference between the historical feature vector and the current decision moment, serving as the independent variable for decay calculation. The decay rate parameter is bound to the model's trainable weight set to adaptively optimize the rate in the cross-time step attention distillation mechanism. The exponential decay model of the following form is used for time weight calculation:
[0107] Where w represents the time weight coefficient, α is the initial weight magnitude, β is the decay rate (updated via backpropagation), and Δt is the difference between the current time step and a historical time step. The exponential decay model is the specific mathematical representation of the time decay function. The above weight calculation is performed for each historical time step, and the results are summarized to form a time weight vector. Regularization constraints are applied during the weight calculation process to ensure the stability and physical interpretability of the time weight vector within the numerical domain. The time weight vector is dimensionally bound to the temporally aligned node semantic feature matrix, constructing a paired data structure for subsequent weighted fusion operations. Through this parameterizable exponential decay kernel function processing method, the temporal feature matrix from the previous step is transformed into a time weight vector containing time decay coefficients, achieving a quantitative expression of the influence of historical states on the current decision.
[0108] S4.3: Based on the time weight vector and the node semantic feature matrix after time alignment, perform element-wise weighted aggregation operation to fuse the discrete historical node semantic distillation features into a continuous time cumulative semantic representation, so as to extract the evolution trend information of the node within a long time window and generate a time fusion semantic vector with memory retention characteristics.
[0109] The time weight vector generated by the preceding sub-step S4.2 and the time-aligned node semantic feature matrix are received as input conditions for calculation. Each element in the time weight vector represents the attenuation sensitivity of the node semantic features at the corresponding historical moment to the current decision. Based on the matrix multiplication fusion mechanism, the time weight vector is mapped along the time dimension to the same dimensional structure as the node semantic feature matrix to form a weight matrix that can directly participate in element-level operations. Element-wise weighting is used to multiply each element of the time-aligned node semantic feature matrix, multiplying the time weight coefficients by the semantic feature values at the corresponding historical moments to obtain a weighted semantic matrix with attenuation characteristics. Accumulation and summation are performed on the weighted semantic matrix along the time dimension, and the weighted semantic feature vectors of each time step are synthesized into a continuous time-cumulative semantic representation vector using a fusion algorithm. The accumulation and aggregation operation formula is as follows:
[0110] in, For temporal fusion semantic vectors, For the number of steps in the time window, For the first The time weighting coefficient of the step. For the first The node semantic feature vectors of the first step are then processed. The cumulative summation result is normalized to eliminate numerical scale differences between different nodes, generating a temporal fusion semantic vector with memory retention properties. Through the above cumulative weighting and normalization processing, the time decay weights and historical semantic feature matrix of the previous step are transformed into information vectors that can reflect the long-term temporal evolution trend of nodes, achieving a highly relevant semantic integration effect before dynamic importance confidence calculation.
[0111] S4.4: Based on the aforementioned temporal fusion semantic vector, perform semantic contribution evaluation processing to map the high-dimensional temporal fusion semantic vector into a scalar form of stability contribution score, so as to characterize the implicit dominant role of a single node in the stability of the global control loop and generate node-level stability contribution score data.
[0112] Based on the temporal fusion semantic vector with memory retention properties, the high-dimensional vector is decomposed into several sub-feature blocks according to a preset dimension to ensure that the semantic components under different time decay weights can be processed separately to retain time-sensitive information.
[0113] By applying a linear transformation to the weight matrix and bias vector in the first hidden layer, and introducing a ReLU or Leaky ReLU activation function at the output of the transformation, an initial feature response matrix with nonlinear discriminative ability is formed. The response matrix is then used as the input to the next hidden layer to capture higher-order feature interaction patterns.
[0114] In the second hidden layer, batch normalization is performed on the input matrix to eliminate semantic numerical scale differences between different nodes. The batch normalized data is then processed by weight matrix multiplication and mapped by the Sigmoid activation function to obtain an intermediate feature vector that represents the semantic contribution of the nodes. This vector can reflect the potential amplification effect of local perturbations on global stability.
[0115] A single-channel fully connected mapper is constructed in the output layer. The intermediate feature vector is mapped to a scalar form of stability contribution score by summing the element-wise weights. The weights of each layer are optimized during the backpropagation of the accumulated error to meet the global control loop stability evaluation objective.
[0116] The mean squared error loss function is used to optimize the predicted score and the target score. The accuracy of the score is improved by minimizing the loss function.
[0117] Through the aforementioned nonlinear mapping and backpropagation optimization process, the temporal fusion semantic vector of the previous sub-step is transformed into node-level stability contribution score data, thereby realizing the quantitative characterization of the implicit dominant role of nodes in the stability of the global control closed loop.
[0118] S4.5: Normalize the probability distribution of the node-level stability contribution score data, and use a soft maximum function to transform the discrete node-level stability contribution score data into relative probability values to form a scaling factor that can be directly used for scaling the edge weights of the graph neural network, thereby generating a dynamic importance confidence score that represents the semantic contribution of a node to the stability of the global control loop.
[0119] Step S5: Calculate the edge weight scaling factor in the message passing process of the graph neural network based on the dynamic importance confidence score. Set the edge weight scaling factor corresponding to the high-confidence node to a value greater than a preset value to form an information enhancement region, generating enhanced graph structure data. The enhanced graph structure data includes: priority sampling and parameters for extending the information propagation path. Specifically, it includes: S5.1: Obtain the dynamic importance confidence score with memory retention characteristics generated by the previous steps, construct a piecewise linear activation function mapper based on the grid connection stability constraints of the small hydropower group, and perform threshold truncation and interval mapping processing on the dynamic importance confidence score to generate a normalized importance coefficient vector representing the relative importance of nodes.
[0120] In this embodiment, the grid connection stability constraint condition for small hydropower groups refers to the physical or operational boundary restrictions that must be met to ensure the safe and stable operation of the power system after the integration of distributed small hydropower resources. This technical feature is specifically manifested in a set of dynamic threshold ranges (i.e., lower limit L and upper limit U) set for the quantification of node importance. It not only reflects the grid's tolerance limit to power fluctuations but also serves as a rigid control mechanism embedded in the subsequent weight calculation process. This distinguishes the control priority of nodes under different stable states such as normal load, overload risk, and severe limit exceedance, thereby providing a physically meaningful constraint benchmark for the normalization of node importance coefficients.
[0121] The dynamic importance confidence scores, generated by previous steps and possessing memory retention properties, are used as the input data source. The correspondence between their data dimensions and node indices is determined to ensure the accuracy of subsequent mapping. Based on the stability constraints of small hydropower group grid connection, a piecewise linear activation function mapper is established. Its function shape consists of multiple continuous linear segments, and the continuity of function values and derivatives is ensured at preset inflection points to avoid gradient abrupt changes. The dynamic importance confidence scores are input into the mapper and subjected to threshold truncation. Confidence scores below the lower limit of the stability constraint are directly assigned zero, while confidence scores above the upper threshold are subjected to saturation mapping to limit the gain of their edge weights. An interval mapping mechanism is used to perform a linear scaling transformation on the remaining confidence scores within the threshold interval, converting them into uniform coefficients in the [0,1] interval. This process can be described by the following formula:
[0122] Where x is the input confidence value, L is the lower limit of the stability constraint, U is the upper limit of the stability constraint, and y is the normalized importance coefficient. The above mapping calculation is performed on all nodes, ensuring a one-to-one correspondence between the normalized coefficient vector and the original node index. Through a piecewise linear mapper and threshold truncation, the dynamic importance confidence from the previous step is transformed into a normalized importance coefficient vector representing the relative importance of nodes, achieving accurate input for key node priority quantification and subsequent edge weight scaling factor calculation.
[0123] S5.2: Receive the normalized importance coefficient vector and the original graph structure adjacency matrix at the current time, and use the neighbor node pairing broadcast mechanism to expand the normalized importance coefficient vector into an edge-level importance matching matrix to generate an initial edge weight candidate dataset covering all connection relationships.
[0124] The original graph structure adjacency matrix refers to a fundamental binary matrix representing the current power system or network topology connections, with its dimension determined by the total number of nodes in the system. This matrix serves as the benchmark for topological relationships, directly reflecting the existence of physical connections (such as transmission lines, bus connections, etc.) between nodes through the numerical values of its elements (usually 0 or 1, or weighted real numbers). It acts as the geometric and logical benchmark for subsequent node importance coefficient broadcasting, edge weight matching matrix construction, and topology consistency verification.
[0125] The neighbor node pairing broadcast mechanism is a graph-based topology relationship mechanism. This mechanism first determines the physical connections between nodes based on the adjacency matrix of the original graph. Then, it traverses each node and all its neighbors, using index-aligned broadcast operations to copy and map normalized importance coefficients from the node dimension to the corresponding edge connection dimension. This achieves a topologically consistent transformation from node features to edge features, thus providing a structured candidate data foundation for subsequent dynamic scaling of edge weights.
[0126] It receives the normalized importance coefficient vector generated by the previous steps as the node-level weight input, and loads the original graph structure adjacency matrix at the current time as the topological relation benchmark.
[0127] Based on the node index order, a node pairing table is constructed, and the importance coefficient of each node in the normalized importance coefficient vector is paired with all its neighboring nodes in the adjacency matrix.
[0128] Perform neighbor node pairing broadcast operation to extend the importance coefficient of a single node to all edge relationships directly connected to that node through the broadcast mechanism, and maintain consistency with the adjacency matrix index during the broadcast process to avoid pairing misalignment.
[0129] By using the element-by-element copying and expansion method, the normalized importance coefficient vector is mapped into row vector and column vector forms, and the two forms are combined bidirectionally to form candidate values for the edge-level importance matching matrix.
[0130] The bidirectional combination results are synthesized using edge weight generation rules, and an initial edge weight candidate dataset covering all connection relationships is generated using a weighted average formula.
[0131] By using the above processing method, the normalized importance coefficient vector from the previous step is transformed into a matching matrix for the edge level, achieving comprehensive coverage of edge weight candidate data and preservation of topological consistency.
[0132] S5.3: Based on the initial candidate edge weight dataset and the preset grid-connected power balance robustness gain base value, an adaptive nonlinear scaling operation is performed to increase the initial candidate edge weight dataset of the edges associated with high-confidence nodes to a range greater than a preset value, thereby generating a preliminary edge weight scaling factor matrix representing the range of the information enhancement region. In this embodiment, the preset value is 1. Of course, in other embodiments, the preset value can be adaptively adjusted.
[0133] The preset grid-connected power balance robustness gain base value refers to the minimum robustness gain threshold required to characterize the system to maintain grid-connected power balance. It can be dynamically set according to the grid operating status or preset as a constant, and is used to apply the base gain offset to the associated edge of the high confidence node in nonlinear scaling calculation.
[0134] The scaling calculation input pair is constructed based on the initial candidate edge weight dataset and the baseline value of the grid-connected power balance robustness gain. The input objects include an edge-level importance matching matrix covering all tie-line connections and physical balance constraint coefficients. An importance screening operation is performed on edges associated with high-confidence nodes. The screening condition is that if the node's normalized importance coefficient is greater than a preset threshold, the edge enters the gain calculation process. The screening results form a high-sensitivity edge index set. The initial weight values of the high-sensitivity edges are then combined with the baseline value of the grid-connected power balance robustness gain, and an adaptive nonlinear scaling function is used to enhance the weights. This function has the following form:
[0135] Where w is the initial edge weight value, G is the baseline value of the grid-connected power balance robustness gain, c is the normalized importance coefficient of the edge-related nodes, T is the threshold, and the exponential function is used to amplify the contribution of high confidence to the scaling value. Non-highly sensitive edges are maintained or fine-tuned to keep the weight values stable and prevent global topological connectivity imbalance. All scaling results are arranged and combined into a matrix to generate a preliminary edge weight scaling factor matrix representing the information enhancement region, with matrix elements corresponding to the scaled weight coefficients of the connection lines. Through an adaptive nonlinear scaling process, the edge-level importance matching matrix from the previous step is transformed into a preliminary edge weight scaling factor matrix that prioritizes sampling high-confidence nodes and extends the information propagation path in collaborative optimization, achieving the expected technical effect of enhancing the information influence of key nodes.
[0136] S5.4: Perform smoothing filtering on the preliminary edge weight scaling factor matrix to eliminate edge weight oscillation noise caused by sudden changes in local node confidence, so as to generate an optimized edge weight scaling factor matrix with spatial continuity and temporal stability.
[0137] S5.5: Using the optimized edge weight scaling factor matrix, perform element-wise multiplication and fusion operations on the edge weight parameters in the original graph structure adjacency matrix to reconstruct the graph topology connection strength distribution, so as to generate enhanced graph structure data containing priority sampling priority and extended information propagation path parameters.
[0138] The algorithm receives the edge weight scaling factor matrix (after smoothing and filtering optimization) and the original graph structure adjacency matrix as input conditions. An element-wise multiplication fusion operator is established to achieve direct multiplication of corresponding elements of the two matrices. Each edge-level scaling factor in the edge weight scaling factor matrix is paired with the corresponding connection weight in the original adjacency matrix to maintain consistency in index positions during the fusion process, ensuring the accuracy of the topology mapping. Multiplication is then performed on the paired elements in the following form:
[0139] in These are the original edge weights. Scaling factor This is the enhanced edge weight after fusion. The generated new edge weight matrix replaces the weight parameters in the original adjacency matrix, reconstructing the graph topology connection strength distribution so that the edge weights associated with high-confidence nodes are significantly higher than ordinary edge weights. Priority sampling indicator parameters are embedded into the reconstructed matrix, marking high-weight edge regions as information enhancement regions so they are prioritized for access in subsequent message passing processes. Parameters for extending information propagation paths are generated using the combination of edge length and weight values, enabling message flow across more hops within the information enhancement regions, ensuring a key node-driven information diffusion effect in the graph neural network. Through element-wise multiplication fusion and parameter embedding, the result of the previous step is transformed into enhanced graph structure data with priority sampling and extended information propagation characteristics, achieving targeted acceleration of information flow at key nodes and suppression of network disturbances.
[0140] Step S6: Input the enhanced graph structure data into the graph neural network collaborative decision-making module to perform message aggregation operation. Utilize the edge weight scaling factor to guide the high-priority aggregation of neighbor information, generating a sequence of collaborative optimization control strategies for the grid connection stability, power balance robustness, and scheduling response consistency of small hydropower groups. Specifically, this includes: S6.1: Obtain enhanced graph structure data containing priority sampling and extended information propagation path parameters, and perform initial loading processing on the node feature vectors and adjacency relationships in the enhanced graph structure data based on the message passing mechanism of graph neural network to generate an initial node hidden state matrix with topology awareness, providing a basic data carrier for subsequent feature aggregation operations.
[0141] The system receives enhanced graph structure data, including priority sampling parameters and extended information propagation path parameters, as input. It then calls the message passing initialization module of the graph neural network to preprocess and load node feature vectors and adjacency relationships. The node feature vectors from the enhanced graph structure data are written into the feature matrix storage structure according to a preset dimension mapping rule, and the adjacency relationship data is converted into a sparse adjacency matrix format to optimize subsequent access efficiency. Based on this sparse adjacency matrix, an edge weight scaling factor embedding operation is performed, integrating the optimized edge weight scaling factor matrix generated in the previous step element-by-element into the weight domain of the adjacency matrix, thus binding the structure data with the weight parameters. A topology-aware index generation algorithm is applied to the bound adjacency matrix to construct a fast index table from nodes to neighbors. Simultaneously, the scaling weight and sampling priority parameters of each connection are recorded in the index table to ensure that high-weight information is prioritized during subsequent aggregation. Using the initialization loading process, the node feature matrix and the topology index table are input into the hidden state generation unit. A single-layer nonlinear transformation network performs linear mapping and activation function processing on the node features to generate a node hidden state matrix with initial topology awareness capabilities, providing a carrier for feature aggregation. Through the above processing method, the enhanced graph structure data of the previous step is transformed into an initial node hidden state matrix with edge weight scaling information and topology awareness, so that the collaborative decision-making module has the ability to prioritize key nodes and guide information in the initial stage of message transmission.
[0142] S6.2: Receive the initial node hidden state matrix and the optimized edge weight scaling factor matrix generated in the previous steps, and use the weighted attention aggregation algorithm to perform differential fusion processing on the hidden states of the current node and its neighboring nodes, so that the edge weights associated with high confidence nodes obtain a larger attention coefficient during the aggregation process, so as to generate an intermediate layer aggregation feature vector that represents the information flow dominated by key nodes.
[0143] The system receives the initial node hidden state matrix and the optimized edge weight scaling factor matrix generated in the previous steps as input conditions. These are loaded into a weighted neighborhood relation mapper to establish a mapping index between node features and edge weights. Paired index localization is performed on the hidden state vectors of the current node and all its neighbors. Based on the corresponding coefficients in the edge weight scaling factor matrix, weighted coefficient labels are added to the features of the neighboring nodes. A neighborhood information fusion model is constructed using a weighted attention aggregation operator. This operator introduces a scaling factor as a multiplication term when calculating attention weights to adjust the aggregation contribution of neighboring features to the target node. The attention weight is calculated for each connection relationship using the following formula:
[0144] in Let be the attention coefficient for node i. This is the feature transformation matrix of the current node. and Let be the hidden state vector of the current node and the hidden state vector of its neighbor node i, respectively. For attention parameter vectors, Let i be the set of neighboring nodes. This is the edge weight scaling factor, representing the importance weight of the edge between node i and node j. and Let be the feature transformation matrices of neighbor node i and neighbor node j, respectively. Let be the hidden state vector of neighbor node j.
[0145] The edge weight scaling factor is incorporated into the calculation process as... The multiplication enhancement term of the coefficients allows the edge weights associated with high-confidence nodes to obtain larger attention coefficients during the aggregation process. Linear combination and nonlinear activation are then applied to the weighted neighbor features, and the aggregation result is stored in the intermediate layer feature buffer, forming an intermediate layer aggregated feature vector representing the dominant information flow of key nodes. Through the above processing, the enhanced graph structure data from the previous step is transformed into an intermediate layer aggregated feature vector that combines neighborhood-differentiated information weights with the priority control characteristics of key nodes, thus providing a high-discrimination feature foundation required for subsequent deep semantic extraction.
[0146] S6.3: Based on the aggregated feature vector of the intermediate layer, deep semantic extraction processing is performed through a multi-layer nonlinear transformation network to map the electrical quantity fluctuation features and topological evolution trends in the local neighborhood into a high-dimensional latent space representation, so as to generate a deep graph embedding representation vector containing global operating status information of small hydropower groups, thus completing the feature dimensionality upgrade from local interaction to global perception.
[0147] The intermediate-layer aggregated feature vector generated by the preceding sub-step S6.2 is received as the input data carrier. This intermediate-layer aggregated feature vector contains node local electrical quantity fluctuation information and topological evolution characteristic identifiers fused through a weighted attention mechanism. In the first processing action of the feature extraction network, the intermediate-layer aggregated feature vector is projected into a high-dimensional latent space using an initial fully connected mapping layer in a multi-layer nonlinear transformation network. A nonlinear response is introduced through an activation function to amplify the separation between node electrical quantity changes and topological perturbation patterns in the feature space. In the second processing action, batch normalization is performed based on the projection result to eliminate the offset of different nodes on the numerical scale and maintain the stability of gradient propagation, ensuring that the features extracted by subsequent layers are comparable across nodes. In the third processing action, the normalized high-dimensional features are element-wise superimposed with the input features using a residual connection structure to form a multi-scale feature fusion matrix, simultaneously preserving local interaction signals and globally perceived signals after dimensionality upscaling. In the fourth processing step, a graph convolution operation unit with an adjustable kernel size is constructed to perform cross-neighborhood feature convolution on the multi-scale feature fusion matrix. This captures the temporal morphology and spatial pattern of topological evolution of electrical quantity fluctuations within the local neighborhood and embeds them into the global latent representation. In the fifth processing step, a multi-head attention mechanism is used to perform multi-view weighted aggregation of the convolution output features. Different attention heads focus on specific voltage phase angle shift trends, head fluctuation rate change patterns, and power interaction frequency characteristics, achieving synchronous perception of multiple dynamic operating features in the high-dimensional latent space. Through the above processing methods, the intermediate layer aggregated feature vector from the previous step is transformed into a deep graph embedding representation vector containing global operating status information of the small hydropower group, achieving feature dimensionality upgrade from local interaction to global perception.
[0148] S6.4: Perform multi-task decoding and mapping processing on the deep graph embedding representation vector, and use the fully connected output layer to predict the power regulation demand, voltage support strength index and frequency response speed parameters of each site to generate an original collaborative optimization decision vector set containing multi-dimensional control target components, thereby realizing the reverse mapping from implicit feature space to explicit physical control quantity.
[0149] The system receives the deep graph embedding representation vector generated in the previous steps as the input reference, loads a high-dimensional latent space feature matrix containing global operational status information of the small hydropower group, and establishes the index mapping relationship for each node to ensure one-to-one alignment of features with physical sites during the decoding process. A parameterized structure for the multi-task decoding module is constructed, defining independent output branches for three control objectives: power regulation demand, voltage support strength index, and frequency response speed parameter. The deep graph embedding feature vector is mapped to the predetermined output dimension corresponding to each branch using the weight matrix of the fully connected layer, ensuring that each dimension can capture the combination of local and global features related to the target control quantity. Linear transformation and bias injection operations are performed on the power regulation demand branch. Power prediction values are generated through matrix multiplication of the weight matrix and the deep embedding vector, and a physical quantity normalization inverse transformation is introduced before the prediction value output to restore the original physical quantity scale. Nonlinear activation processing is performed on the voltage support strength branch, employing hyperbolic tangent or modified linear unit functions to enhance the response sensitivity to small fluctuations, and the voltage support strength index is generated through output layer weight mapping. Time-sensitive mapping is performed on the frequency response speed parameter branch, introducing a time decay coefficient as an additional input feature. A fully connected layer is used to calculate the predicted frequency response speed to characterize the dynamic response capability of nodes under short-term disturbances. The predicted values output from each branch are combined by node index to form an original collaborative optimization decision vector set, which simultaneously includes three target components: power regulation demand, voltage support strength, and frequency response speed. Through the aforementioned multi-task decoding process, the deep graph embedding representation vector from the previous step is inversely mapped into multi-dimensional original collaborative optimization decision data that can be directly used for physical control, thus enabling the explicit and executable control strategies for each site.
[0150] S6.5: Based on the original collaborative optimization decision vector set, and combined with the preset grid connection safety constraints, perform feasibility verification and smoothing filtering to eliminate abnormal commands that exceed the physical limits of the equipment and eliminate high-frequency oscillation components, so as to generate a final collaborative optimization control strategy sequence for the grid connection stability, power balance robustness and scheduling response consistency of small hydropower groups, which serves as the direct action basis for downstream actuators.
[0151] Step S7: Based on the aforementioned collaborative optimization control strategy sequence, real-time adjustment actions are performed on the governor commands and excitation parameters of each station in the small hydropower group to achieve soft constraint guidance for resource allocation under the leadership of key nodes, and to output an updated snapshot of the grid-connected operation status. Specifically, this includes: S7.1: Perform protocol parsing processing on the collaborative optimization control strategy sequence to extract a structured control instruction set containing target site identifiers, key node confidence weights, and expected adjustment amplitudes, thereby generating a list of discrete site control tasks to be executed.
[0152] S7.2: Based on the confidence weights of key nodes in the discretized station control task list, a dynamic gain allocation algorithm is used to perform nonlinear mapping calculations on the governor opening benchmark values of each station to generate a governor target opening command sequence with priority differences.
[0153] Receive the discretized site control task list generated by the preceding sub-step S7.1, which includes structured parameter data such as target site identifier, key node confidence weight, and expected control amplitude.
[0154] Read the confidence weight vector of key nodes, construct the input matrix of dynamic gain allocation algorithm based on the current grid connection conditions of small hydropower groups, and ensure that the governor opening benchmark value of each station can be associated with the corresponding confidence weight.
[0155] In the dynamic gain allocation algorithm, a nonlinear mapping calculation model is established. Its core is to transform the confidence weight into an opening correction coefficient through an adjustable gain function. The gain function adopts a parameterizable logarithmic or power curve to enhance the adjustment range of high confidence nodes.
[0156] The formula is expressed as follows:
[0157] in, The target opening command value, Let i be the baseline value for the opening degree of the i-th station. Let the confidence weight of the key node at site i be denoted as . This is a nonlinear gain function. In this embodiment, k is a gain coefficient used to control the adjustment strength of the confidence weight w on the opening command. As a preset lower limit, ∈[0,1].
[0158] By performing piecewise function mapping on the confidence weights, the opening coefficients corresponding to weights below the preset lower limit remain unchanged, while the opening coefficients corresponding to weights above the preset upper limit are exponentially amplified, ensuring that high-priority nodes can obtain greater operational adjustment space.
[0159] The opening correction coefficient obtained by nonlinear mapping is multiplied element by element with the station opening reference value to form a governor target opening command sequence with priority differences.
[0160] By using a dynamic gain allocation algorithm and a nonlinear mapping processing method, the discretized site control task list from the previous step is transformed into governor target opening instruction data that can highlight the priority of key nodes, thereby achieving the expected technical effect of resource regulation biasing towards key nodes during grid-connected operation.
[0161] S7.3: Based on the target opening command sequence of the speed governor and the grid voltage stability requirements, a multivariable decoupling control strategy is adopted to perform collaborative correction calculations on the reference voltage of the excitation system of the corresponding station, so as to generate a set of excitation parameter adjustment commands that match the current operating conditions.
[0162] Receive the governor target opening command sequence and grid voltage stability requirement parameters output from the preceding sub-step S7.2, and establish the initial conditions for calculating the excitation system reference voltage, including the target opening vector, real-time bus voltage data and preset voltage support safety threshold.
[0163] The governor target opening command sequence is normalized to map the opening value of each station to a unified control scale, so as to eliminate the difference in opening amplitude between units with different rated power and form a normalized opening matrix that can directly participate in multivariable decoupling control.
[0164] The normalized opening matrix and the grid-connected voltage stability requirement parameters are concatenated to construct a dual-input control feature matrix that includes mechanical power input and electrical voltage state, which serves as the input basis vector for the multivariable decoupling strategy.
[0165] An orthogonal decomposition operator is introduced into the excitation control model to perform principal component decomposition on the dual-input control feature matrix, projecting the mechanical and electrical features to an orthogonal subspace that does not interfere with each other, thereby decoupling the governor opening degree from the excitation reference voltage.
[0166] A correction algorithm based on the sensitivity coefficient is used to correct the decoupled electrical characteristic vector using a reference voltage. The sensitivity coefficient is calculated according to the following formula:
[0167] in Let be the difference in the grid-connected voltage amplitude at node i within the time interval Δt. The difference in mechanical power input at node j within the time interval Δt. These are the elements of the sensitivity coefficient matrix. The sampling period or the time difference between adjacent moments. Let be the grid-connected voltage amplitude at node i at the current sampling time t. The grid-connected voltage amplitude at node i at the previous sampling time (t-Δt) is... The input mechanical power at node j at the current sampling time t. The input mechanical power of node j at the previous sampling time (t-Δt).
[0168] Based on the correction coefficients output by the sensitivity model and combined with the real-time deviation of the bus voltage, the excitation reference voltage is adjusted element by element to generate a set of excitation parameter adjustment commands that include the target reference voltage of the excitation system at each site.
[0169] By using a multivariable decoupling control strategy, the control quantities of the speed governor and the excitation system are processed separately. The output excitation parameter adjustment command set has high accuracy in matching the current working condition and can be directly used as a downlink control signal.
[0170] By employing multivariate decoupling and sensitivity correction processing, the results of the previous step are transformed into a set of excitation parameter adjustment commands that meet the requirements of grid-connected voltage stability, thereby achieving the technical effect of improving the voltage support capability of key nodes and enhancing overall stability.
[0171] S7.4: The governor target opening command sequence and the excitation parameter adjustment command set are sent to the bottom controller of each station in the small hydropower group to drive the governor actuator and the excitation adjustment unit to complete real-time physical actions, so as to realize the soft constraint guidance of resource allocation under the key node and obtain the real-time electrical quantity feedback data after execution.
[0172] The governor target opening command sequence generated by the dynamic gain allocation algorithm and the excitation parameter adjustment command set generated by the multivariate decoupled control strategy are used as unified control issuance objects. A command mapping table based on the station identifier index is constructed to ensure that the node binding relationship of the commands is consistent with the confidence weight of key nodes in the collaborative optimization control strategy sequence. The command mapping table is encapsulated using a communication protocol, employing CRC checksums and frame header / tail identifiers to ensure the anti-interference and integrity of the commands during transmission, and is converted into binary data frames that the underlying controller can parse. These binary data frames are sequentially sent to the governor actuator and excitation regulation unit of the corresponding small hydropower station via a dedicated station communication link. Synchronous trigger signals are used to achieve simultaneous operation of the two types of physical actuators, reducing grid connection state adjustment delay. The opening sensor built into the governor actuator and the current and voltage sensors on the excitation regulation unit are sampled in real time to obtain key electrical quantity changes during execution. The sampled data undergoes filtering and zero-drift correction to ensure the stability and accuracy of the feedback data. Through the above processing method, the instruction data of the previous step is transformed into real-time physical execution actions and high-precision electrical quantity feedback data is generated, so as to realize the soft constraint guidance of resource allocation under the leadership of key nodes and the real-time assessment of grid-connected operation status.
[0173] S7.5: Based on the real-time electrical quantity feedback data and the original graph structure snapshot sequence, the tie-line connection reliability index and node operation status vector are recalculated using the topology state update mechanism to generate an updated graph structure snapshot that reflects the current grid-connected operation status.
[0174] The system receives real-time electrical quantity feedback data and original graph structure snapshot sequence generated by the preceding sub-step S7.4 as input conditions, including parameters such as voltage phase angle difference of each tie line, power flow direction data, head fluctuation rate, and unit start-up and shutdown status, and processes them in a way that is precisely synchronized with timestamps.
[0175] The topology state update mechanism is used to call the tie-line connection reliability calculation module to perform a fusion analysis on the recent power interaction records and real-time electrical quantities of each tie-line. By statistically analyzing the persistence and stability of power interaction over the past T time steps, a basic data table for reliability assessment is formed.
[0176] For connection stability that needs to be quantified in reliability assessment, an exponential decay weighted average calculation method is adopted, which integrates recent interaction frequency and current power transmission amplitude into a single reliability index. The calculation formula is as follows:
[0177] Where R is the reliability index of the tie line connection. The time decay weight at time t, This represents the power interaction amplitude at the corresponding time step. This is the sum of weights.
[0178] The reliability indicators are associated with and stored with the corresponding edges in the topology to form an updated edge weight dataset, which is then input into the node state update module.
[0179] In the node status update module, based on the real-time electrical quantity feedback and the response characteristics after the execution of control commands, a state vector reconstruction algorithm is used to map the head fluctuation rate, voltage phase angle offset, and frequency response speed parameters into a new node operating state vector.
[0180] The updated edge weight dataset and node running state vectors are structurally fused and bound to a unified graph data object to output an updated graph structure snapshot with complete electrical and topological state information at the current time series.
[0181] By using structured fusion and reliability index recalculation, the real-time feedback data from the previous step is transformed into graph structure snapshot data that can be used for subsequent topology evolution comparison and dynamic disturbance detection, thereby enabling real-time perception and accurate reflection of the grid-connected operation status.
[0182] Step S8: Collect the new synchronous multidimensional running state stream after the adjustment action and compare it with the updated graph structure snapshot. If a topological perturbation mask indicates a new neighborhood reconstruction event, trigger the next round of node semantic distillation feature update; otherwise, maintain the current dynamic importance confidence to complete closed-loop feedback optimization. Specifically, this includes: S8.1: Obtain feedback data from the bottom-level controller of the small hydropower group after executing real-time adjustment actions, and use a multi-source heterogeneous data spatiotemporal registration algorithm to perform timestamp alignment processing on the governor opening feedback value, the measured value of excitation current and the measured value of grid connection point voltage phase angle, so as to eliminate the timing misalignment caused by asynchronous sensor sampling and generate a new synchronous multidimensional operating state stream with strict timing synchronization characteristics.
[0183] S8.2: Receive the new synchronous multidimensional running state stream and the updated graph structure snapshot generated by the previous steps, extract the current tie line connection reliability index and node running state vector based on the graph topology consistency verification mechanism, and map the real-time electrical quantity feedback data into a graph node attribute update set to construct real-time graph structure benchmark data for topology evolution comparison.
[0184] S8.3: Based on the real-time graph structure baseline data and the original graph structure snapshot sequence of the previous N historical moments, execute the local neighborhood subgraph matching algorithm to calculate the rate of change of the dynamic decay trajectory of edge weights, identify the micro-change pattern of the connection reliability of the link line continuously being lower than the threshold or the frequent reconstruction of the neighbor set, and generate a binary topological perturbation mask characterizing the local neighborhood subgraph reconstruction event.
[0185] Based on the real-time graph structure baseline data and the original graph structure snapshot sequence of the previous N historical moments, the dynamic decay trajectory of each link edge weight is extracted serially to form a historical edge weight matrix arranged by time step, which serves as the input object for calculating the trajectory change rate.
[0186] Trajectory differencing is performed on the weight history matrix of this side. The normalized rate of change sequence is obtained by dividing the weight difference between two adjacent time steps by the time step size. The rate of change of each side is calculated using the following formula:
[0187] in The edge weights are for the current time step. The edge weights are the weights of the previous time step. For time intervals.
[0188] The rate of change sequence is compared with a preset connection reliability threshold, and edges whose absolute rate of change exceeds the threshold and whose connection reliability value is less than the preset stability lower limit are marked as potentially unstable edges.
[0189] For a potentially unstable edge set, perform a local neighborhood subgraph matching algorithm to extract the subgraph formed by the edge and its direct neighbors, and calculate the reconstruction frequency of the neighbor set in the past N steps using the following formula:
[0190] in The number of times the neighbor set has changed. This represents the number of time steps.
[0191] Subgraphs whose connection reliability is consistently below the lower limit or whose neighbor set reconstruction frequency is greater than a set value are marked as reconstruction event subgraphs.
[0192] Map all nodes and edges corresponding to the reconstructed event subgraphs to a binary topological perturbation mask matrix. A value of 1 in the matrix element indicates the presence of a perturbation, and a value of 0 indicates the absence of a perturbation.
[0193] By using the rate of change calculation and local neighborhood matching association processing, the result of the previous step is transformed into a binary topological perturbation mask that represents the reconstruction event of the local neighborhood subgraph, thereby achieving accurate identification of topologically unstable events and subsequent determination of triggering conditions.
[0194] S8.4: Perform logical state discrimination processing on the binary topological perturbation mask. If a new neighborhood reconstruction event is detected indicated by the mask, trigger the node semantic distillation feature update instruction, and re-call the self-supervised comparison mechanism and the cross-time step attention distillation mechanism to iteratively calculate the dynamic importance confidence with memory retention characteristics, so as to generate enhanced graph structure data adapted to the new topological structure.
[0195] The neighborhood reconstruction event refers to a triggering condition detected by the binary topology perturbation mask during system operation, indicating a substantial change in the local network topology. Specifically, this event is determined to have occurred when an element with a value of 1 appears in the mask vector, and the connection relationship between the corresponding node and its set of neighboring nodes (i.e., the local neighborhood subgraph) changes (such as line switching, node state inversion, etc.). This event is a key indicator for initiating the adaptive optimization process. Once triggered, the system will pause the regular weight scaling process and instead invoke semantic distillation and feature update mechanisms to recalculate the dynamic importance confidence of nodes, thereby generating enhanced graph data adapted to the new topology to ensure that the model always performs stability assessments and control decisions based on the latest network morphology.
[0196] The system receives a binary topological perturbation mask generated in the preceding steps as input. A logical state discrimination unit parses the binary value sequence of the mask element by element, forming a state vector reflecting whether a topological reconstruction event has occurred. Based on the positions of elements with a value of 1 in the state vector, the corresponding node and its neighbor subgraph index are extracted to construct an affected node set. For this affected node set, a self-supervised comparison mechanism is invoked. The current time-step node-level temporal semantic vector is paired with the semantic vectors of the nodes in the historical window to form positive and negative sample pairs. These pairs are mapped to a unified latent space via a projection head, and cosine similarity is calculated. Semantic anchor reconstruction is achieved by minimizing the distance between positive and negative sample pairs and maximizing the distance between negative sample pairs. The reconstructed semantic anchor features are input into a cross-time-step attention distillation mechanism. Historical sequence position calibration is performed in the time alignment module, and time weights are calculated based on a learnable exponential decay kernel function. Weighted aggregation is then performed to form a temporal fusion semantic vector. A multilayer perceptron is used to perform a nonlinear mapping on the temporal fusion semantic vector to obtain a node stability contribution score. This score is then normalized using a soft-maximum function to generate a dynamic importance confidence score. In the process of improving adaptability, the dynamic importance confidence is mapped to the edge weight scaling factor matrix. By fusing it with the original graph adjacency matrix, an enhanced graph structure data adapted to the new topology is generated, thereby achieving priority diffusion and optimization of information flow at key nodes.
[0197] By using logical state discrimination and semantic distillation iterative calculation, the topological perturbation detection results from the previous step are transformed into new dynamic importance confidence and enhanced graph structure data, enabling rapid adaptation to new topological forms and improved global optimization performance.
[0198] S8.5: If the binary topology perturbation mask does not indicate a new neighborhood reconstruction event, the current dynamic importance confidence remains unchanged, the optimized edge weight scaling factor matrix generated in the previous round is directly reused to guide the graph neural network message passing process, complete the closed-loop feedback optimization loop, and output the final small hydropower group grid-connected collaborative control stability assessment report.
[0199] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this invention.
[0200] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The “multiple” mentioned in the embodiments of this application refers to two or more. A and / or B indicate three possibilities: A; B; and A and B.
[0201] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for coordinated control of small hydropower plant clusters based on graph neural networks, characterized in that, Specifically, it includes: S1: Obtain the original graph structure snapshot sequence and synchronous multidimensional operation state flow of the small hydropower group within the continuous operation window; S2: Perform sliding window normalization on the synchronous multidimensional running state stream, and map the processed state data into a node-level temporal semantic vector. At the same time, generate a binary topological perturbation mask based on the topological micro-change pattern between multiple consecutive snapshots in the original graph structure snapshot sequence. S3: Based on the node-level temporal semantic vector and the historical semantic vector of the current node and its K-hop neighbors, a self-supervised comparison mechanism is constructed. The binary topological perturbation mask is used as a filtering condition to narrow the semantic representation distance of the same node at different time steps and widen the semantic similarity with non-key neighbor nodes, generating node semantic distillation features. S4: Input the semantic distillation features of each node in the past several time steps into the cross-time step attention distillation mechanism, and perform weighted fusion through a learnable time decay function to generate dynamic importance confidence. S5: Calculate the edge weight scaling factor in the message passing process of the graph neural network based on the dynamic importance confidence, set the edge weight scaling factor corresponding to the high confidence node to be greater than the preset value to form an information enhancement region, and generate enhanced graph structure data. S6: Input the enhanced graph structure data into the graph neural network collaborative decision-making module to perform message aggregation operation, and use the edge weight scaling factor to guide the high-priority aggregation of neighbor information to generate a collaborative optimization control strategy sequence.
2. The method for coordinated control of small hydropower plant clusters based on graph neural networks according to claim 1, characterized in that, The synchronous multidimensional operating status stream includes data on head fluctuation rate, unit start-up and shutdown frequency, governor response delay, and grid connection point voltage phase angle offset.
3. The graph neural network-based small hydropower group grid-connected coordinated control method according to claim 2, characterized in that, Step S3 specifically includes: Obtain the node-level temporal semantic vector of the current time step and the historical semantic vector set of the current node and its K-hop neighbors in the previous time step. Extract the time segment containing the head fluctuation rate and governor response delay features based on the sliding window truncation strategy, and generate positive sample pairs and negative sample pairs as the initial data source. A binary topological perturbation mask filtering operation is performed on the initial data source of the positive sample pairs and negative sample pairs. The binary topological perturbation mask is used to remove abnormal neighbor node data that are affected by minor topological changes, thereby generating a clean semantic comparison sample set. Based on the pure semantic contrast sample set, a multi-view self-supervised contrast loss function is constructed to map the semantic representation of the same node at different time steps to a unified latent space. The cosine similarity distance between positive sample pairs is calculated and minimized to generate node semantic anchor features. The repulsion force calculation is performed using the semantic anchor features of the nodes and the semantic representations of non-critical neighbor nodes. By maximizing the Euclidean distance of negative sample pairs in the latent space to push away the semantic similarity of non-associated nodes, node semantic separation boundary parameters are generated. The original node-level temporal semantic vector is reconstructed by weighting based on the node semantic separation boundary parameters, and the temporal invariance constraint and semantic separation constraint are integrated to output the node semantic distillation features.
4. The method for coordinated control of small hydropower plant clusters based on graph neural networks according to claim 1, characterized in that, Step S4 specifically includes: Obtain the node semantic distillation features of each node within a certain number of time steps in the past, and perform temporal position calibration processing on the node semantic distillation features based on the sliding time window alignment algorithm to generate a node semantic feature matrix; Based on the node semantic feature matrix, a time weight calculation model is constructed using a parameterizable exponential decay kernel function. Time sensitivity mapping is performed on the feature vectors of different historical moments in the node semantic feature matrix to generate a time weight vector containing a time decay coefficient. Based on the time weight vector and the node semantic feature matrix, an element-wise weighted aggregation operation is performed to fuse the discrete historical node semantic distillation features into a continuous time-accumulated semantic representation, generating a time-series fusion semantic vector. Based on the temporal fusion semantic vector, semantic contribution evaluation processing is performed to generate node-level stability contribution score data. The node-level stability contribution score data is normalized by probability distribution transformation. The discrete node-level stability contribution score data is transformed into relative probability values using a soft maximum function, forming a scaling factor for scaling the edge weights of the graph neural network, and generating the dynamic importance confidence score.
5. The graph neural network-based small hydropower group grid-connected coordinated control method according to claim 5, characterized in that, The time weight vector includes a time decay coefficient.
6. The method for coordinated control of small hydropower plant grid connection based on graph neural networks according to claim 1, characterized in that, Step S5 specifically includes: The dynamic importance confidence is obtained, and a piecewise linear activation function mapper is constructed based on the grid connection stability constraints of small hydropower groups. Threshold truncation and interval mapping are performed on the dynamic importance confidence to generate a normalized importance coefficient vector. Receive the normalized importance coefficient vector and the original graph structure adjacency matrix at the current time, and use the neighbor node pairing broadcast mechanism to expand the normalized importance coefficient vector into an edge-level importance matching matrix to generate an initial edge weight candidate dataset. Based on the initial edge weight candidate dataset and the preset grid-connected power balance robustness gain base value, an adaptive nonlinear scaling operation is performed to increase the initial edge weight candidate dataset of the high-confidence node associated edge to a range greater than the preset value, thereby generating a preliminary edge weight scaling factor matrix. The initial edge weight scaling factor matrix is smoothed and filtered to eliminate edge weight oscillation noise caused by sudden changes in local node confidence, thereby generating an optimized edge weight scaling factor matrix. The edge weight parameters in the original graph structure adjacency matrix are multiplied and fused element-wise using the optimized edge weight scaling factor matrix to reconstruct the graph topology connection strength distribution and generate the enhanced graph structure data.
7. The method for coordinated control of small hydropower plant grid connection based on graph neural networks according to claim 1, characterized in that, The enhanced graph structure data includes: priority sampling priority and parameters for extending the information propagation path.
8. The method for coordinated control of small hydropower plant grid connection based on graph neural networks according to claim 1, characterized in that, After step S6, the following is included: S7: Based on the collaborative optimization control strategy sequence, perform real-time adjustment actions on the governor commands and excitation parameters of each station in the small hydropower group, and output an updated snapshot of the diagram structure.
9. The method for coordinated control of small hydropower plant grid connection based on graph neural networks according to claim 9, characterized in that, After step S7, the following is included: S8: Collect the new synchronous multidimensional running state stream after the adjustment action is executed and compare it with the updated graph structure snapshot. If the topological perturbation mask indicates a new neighborhood reconstruction event, trigger the next round of node semantic distillation feature update; otherwise, maintain the current dynamic importance confidence.