A risk assessment method and system for a wind-solar complementary power generation system
By performing multi-dimensional encoding and time-aware attention modulation on alarm events of wind-solar hybrid power generation systems, combined with dynamic risk mapping analysis, the temporal correlation and cross-plant correlation problems of risk assessment in existing technologies have been solved, realizing high-precision and dynamic risk assessment and prediction of wind-solar hybrid power generation systems.
Patent Information
- Application Number
- CN202611530038.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-17
AI Technical Summary
Existing risk assessment technologies for wind-solar hybrid power generation systems cannot effectively characterize the temporal correlation between alarm events, ignore time interval differences, make it difficult to quantify the risk weakening or cumulative effect caused by time decay, lack the ability to refine cross-plant correlation modeling, cannot achieve global risk aggregation and assessment among multiple plants, and lack a dynamic evolution analysis mechanism, resulting in a large deviation between assessment results and actual risks.
By encoding the multi-dimensional attributes of alarm events, a time-aware attention encoder is constructed, a time decay factor is generated and the attention weight is modulated, a comprehensive confidence score is calculated in groups, a dynamic risk graph is constructed, graph embedding encoding is performed using a sliding time window, risk evolution trend indicators are extracted, high-risk propagation chains are identified, and system risk scoring is achieved.
It improves the accuracy and dynamism of risk assessment for multi-plant wind-solar hybrid power generation systems, enabling the identification of risk transmission correlations, accurate extraction of risk evolution trends, provision of high-precision system risk assessment, and enhancement of operation and maintenance risk perception capabilities.
Smart Images

Figure CN123121853A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electrical digital data processing technology, and in particular relates to a risk assessment method and system for wind-solar hybrid power generation systems. Background Technology
[0002] With the large-scale development of new energy power systems, wind-solar hybrid power generation systems, leveraging the complementary characteristics of wind and solar power output, effectively mitigate power fluctuations from single-source renewable energy generation. They are widely used in grid connection and distributed power supply scenarios, forming a core component of new power system construction. However, wind-solar hybrid power generation systems involve multiple substations and various types of power equipment, generating a massive number of operation and maintenance alarm events during long-term operation. The temporal correlation of these alarm events and the risk propagation across equipment and substations are key factors contributing to safety issues such as system power oscillations, equipment failures, and grid connection anomalies. Accurate and efficient temporal event risk assessment is a crucial prerequisite for predicting faults, tracing hidden dangers, and optimizing operation and maintenance in wind-solar hybrid power generation systems, and is of great significance for ensuring the safe and stable operation of new energy power systems.
[0003] Currently, existing risk assessment technologies for wind-solar hybrid power generation systems mostly employ traditional statistical analysis, shallow machine learning, or static graph network models for risk evaluation, exhibiting significant technical limitations. First, most existing risk assessment techniques neglect the temporal dynamic characteristics of alarm events, only assessing the risk of a single alarm event in isolation. This fails to characterize the impact of time interval differences and temporal correlations between different alarm events on risk evolution, and makes it difficult to quantify the risk weakening or cumulative effects of time decay. Consequently, the extraction of temporal risk features is insufficient, leading to significant discrepancies between the assessment results and the actual operational risks of the system. Second, traditional assessment methods lack the ability to mine multi-dimensional attributes of alarm events, often simplifying modeling by using single alarm information or simple feature overlays. This fails to deeply integrate and encode multi-dimensional heterogeneous attributes such as event type, plant identification, and temporal information, making it difficult to accurately represent the differentiated risk characteristics of different events and different plants.
[0004] Furthermore, existing risk assessment schemes lack the ability to perform refined modeling of risk hierarchy transmission and cross-plant / station correlations. Most can only achieve static risk scoring for single equipment or single site, failing to effectively identify risk transmission correlations between events within a plant / station, making it difficult to screen effective risk transmission links through quantitative confidence levels, and even more difficult to achieve global risk aggregation and assessment across multiple plants / stations. This easily leads to the omission of hidden and transmissive systemic risks. In addition, existing risk assessment technologies are mostly static risk assessment models based on fixed time points, failing to build dynamic evolution analysis mechanisms for time-series alarm events. They cannot capture the dynamic changes in systemic risks through sliding time windows, making it difficult to extract risk evolution trend indicators and identify high-risk propagation chains. They can only output a single risk score result, resulting in a lack of risk tracing capabilities, poor dynamic predictability, and a single assessment dimension. Summary of the Invention
[0005] Therefore, it is necessary to provide a risk assessment method and system for wind-solar hybrid power generation systems to address the aforementioned technical issues, aiming to improve the accuracy, dynamic predictability, and interpretability of risk assessment, and enhance the ability to perceive operation and maintenance risks of multi-station wind-solar hybrid power generation systems.
[0006] Firstly, this application provides a risk assessment method for wind-solar hybrid power generation systems, including:
[0007] S1: Obtain an alarm event sequence containing multiple events; encode each event based on its multi-dimensional attributes to obtain an event embedding vector for each event, and construct an optimized event sequence based on the event embedding vectors for each event; wherein, the multi-dimensional attributes of each event include timestamp, event type, and plant / station identifier;
[0008] S2: Calculate the time interval between any two events based on the timestamps of each event; input the event embedding vectors of each event into the time-aware attention encoder and generate a time decay factor based on the time interval; perform attention modulation based on the time decay factor and the event embedding vectors of each event to obtain time-aware attention weights; encode the event embedding vectors based on the time-aware attention weights and output the time-aware representation vectors of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder.
[0009] S3: Group the events to obtain multiple plant / station groups; for each plant / station group, calculate the comprehensive confidence score based on the time-aware representation vector and attention weight matrix of each event within the plant / station group; determine the risk propagation edge set from each event based on the comprehensive confidence score; construct the risk state vector of each event within the plant / station group and the plant / station risk state vector of each plant / station based on the risk propagation edge set; aggregate the plant / station risk state vectors of each plant / station to obtain the global risk state vector;
[0010] S4: Slide time windows across the optimized event sequence at preset step sizes. For each time window, construct a corresponding dynamic risk graph based on the risk state vectors of each event, the plant / station risk state vectors, and the risk propagation edge set within the time window. Perform graph embedding encoding on each dynamic risk graph to obtain the corresponding graph embedding vector. Extract risk evolution trend indicators based on the dynamic risk graphs corresponding to each time window, and select high-risk propagation chains from each dynamic risk graph. Calculate the corresponding system risk score based on the graph embedding vectors, risk evolution trend indicators, high-risk propagation chains, and global risk state vectors for each time window.
[0011] Secondly, this application also provides a risk assessment system for wind-solar hybrid power generation systems, including:
[0012] The event encoding module is used to obtain an alarm event sequence containing multiple events; it encodes each event based on its multi-dimensional attributes to obtain an event embedding vector for each event, and constructs an optimized event sequence based on the event embedding vectors of each event; wherein, the multi-dimensional attributes of each event include timestamp, event type and plant identifier;
[0013] The time-aware module is used to calculate the time interval between any two events based on the timestamps of each event; input the event embedding vectors of each event into the time-aware attention encoder to generate a time decay factor based on the time interval; perform attention modulation based on the time decay factor and the event embedding vectors of each event to obtain time-aware attention weights; encode each event embedding vector based on the time-aware attention weights to output the time-aware representation vector of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder.
[0014] The risk propagation module is used to group events into multiple plant / station groups. For each plant / station group, a comprehensive confidence score is calculated based on the time-aware representation vector and attention weight matrix of each event within the group. Based on the comprehensive confidence score, a risk propagation edge set is determined from each event. Based on the risk propagation edge set, a risk state vector for each event within the plant / station group and a plant / station risk state vector for each plant / station are constructed. The plant / station risk state vectors of each plant / station are aggregated to obtain a global risk state vector.
[0015] The dynamic evaluation module slides time windows across the optimized event sequence at preset step sizes. For each time window, it constructs a corresponding dynamic risk graph based on the risk state vectors of each event, the plant / station risk state vectors, and the set of risk propagation edges within the time window. It then performs graph embedding encoding on each dynamic risk graph to obtain the corresponding graph embedding vector. Based on the dynamic risk graphs corresponding to each time window, it extracts risk evolution trend indicators and filters out high-risk propagation chains from each dynamic risk graph. Finally, based on the graph embedding vectors, risk evolution trend indicators, high-risk propagation chains, and global risk state vectors for each time window, it calculates the corresponding system risk score.
[0016] Thirdly, this application also provides a computer electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the first aspect.
[0017] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the first aspect.
[0018] The aforementioned risk assessment method and system for wind-solar hybrid power generation systems firstly constructs optimized event sequences by embedding and encoding multi-dimensional attributes of alarm events, achieving standardized and unified representation and enhanced risk characteristics of multi-source heterogeneous alarm data. Secondly, by generating time decay factors based on time intervals and modulating time-aware attention weights, it can dynamically characterize the temporal correlation between events across different time spans, solving the problem of ignoring the dynamic characteristics of temporal sequence. Furthermore, by filtering risk transmission edges based on plant grouping and comprehensive confidence scores and constructing multi-level risk state vectors, it can identify risk transmission correlations within plants and aggregate global risks across multiple plants, overcoming the limitations of static scoring of single equipment and achieving refined modeling of risk transmission across levels and correlations across plants. Moreover, by constructing a dynamic risk map through a sliding time window and performing graph embedding and encoding, it can fully explore the temporal evolution patterns of system risks, accurately extract risk evolution trend indicators, and identify high-risk propagation chains, achieving dynamic risk evolution perception and propagation path tracing. Finally, by integrating graph embedding vectors, risk evolution trend indicators, high-risk propagation chains, and global risk state vectors to calculate system risk scores, system-level risk quantification assessment can be completed based on time-series dynamic changes, improving the dynamism and accuracy of risk assessment for wind-solar hybrid power generation systems. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart of a risk assessment method for a wind-solar hybrid power generation system is provided as an exemplary embodiment of the present invention;
[0021] Figure 2 This is a schematic diagram of a risk assessment system for a wind-solar hybrid power generation system, provided as an exemplary embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0023] In one embodiment, such as Figure 1 As shown, a risk assessment method for wind-solar hybrid power generation systems is provided. This embodiment illustrates the application of this method to a terminal, but it is understood that the method can also be applied to a server, and to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0024] S1: Obtain an alarm event sequence containing multiple events; encode each event based on its multi-dimensional attributes to obtain the event embedding vector of each event, and construct an optimized event sequence based on the event embedding vector of each event; wherein, the multi-dimensional attributes of each event include timestamp, event type and plant identifier.
[0025] Specifically, multiple raw alarm events generated during the daily operation and maintenance of the wind-solar hybrid power generation system can be collected first. All alarm events are then aggregated and constructed into an alarm event sequence according to the system's runtime order. However, the raw alarm data in this sequence consists of heterogeneous raw data uploaded from the system's underlying equipment and site monitoring units, resulting in fragmented data dimensions, features that cannot be directly recognized by the model, and a chaotic temporal arrangement. Therefore, the raw alarm events can be optimized through structured feature encoding. For example, multi-dimensional attributes such as timestamp, event type, site identifier, equipment type, action behavior, and alarm level can be selected as the basic feature dimensions for risk assessment. The timestamp is used to characterize the occurrence sequence and temporal correlation of alarm events; the event type is used to distinguish the risk attribute differences of different faults and abnormal operation and maintenance events; and the site identifier is used to define the spatial scope of the alarm event.
[0026] By uniformly encoding and mapping the multi-dimensional attributes of each event, discrete and unstructured raw textual and numerical attributes can be transformed into low-dimensional, dense, and computable event embedding vectors. This enables the fusion and unified representation of multi-source heterogeneous alarm features, eliminating modeling interference caused by differences in the dimensionality and format of the original data. Based on the encoded event embedding vectors, a well-ordered and optimized event sequence can be reconstructed, eliminating redundant noise and disordered features of the original alarm sequence. This provides a standardized sequence input foundation for subsequent time-series attention modeling and risk correlation analysis.
[0027] S2: Calculate the time interval between any two events based on the timestamps of each event; input the event embedding vectors of each event into the time-aware attention encoder and generate a time decay factor based on the time interval; perform attention modulation based on the time decay factor and the event embedding vectors of each event to obtain time-aware attention weights; encode the event embedding vectors based on the time-aware attention weights and output the time-aware representation vectors of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder.
[0028] Specifically, after constructing the optimized event sequence, the time interval between any two alarm events within the sequence can be quantified based on the timestamps corresponding to each event. This represents the temporal relationship between different alarm events. This approach differs from the traditional model's coarse-grained method of modeling solely based on the order of events, and can accurately reproduce the risk accumulation and decay characteristics of alarm events in wind and solar power generation systems over time. Event embedding vectors are input into a time-aware attention encoder. This encoder, built on a temporal attention architecture, can adapt to the feature enhancement modeling needs of temporal event sequences. Using the quantified event time intervals as the core basis, it generates corresponding time decay factors. Furthermore, the fixed weight allocation logic of the standard attention mechanism can be dynamically modified through these time decay factors. For example, weight decay constraints can be applied to events that occurred a long time ago and have weakened risk correlation, while higher attention weights can be retained for events that are temporally close and have strong risk coupling, achieving temporal adaptive modulation of attention weights.
[0029] By using dynamically modulated time-aware attention weights to perform deep weighted encoding on the embedding vectors of each event, it is possible to fully integrate the event's own characteristics with global temporal correlation features, generating a time-aware representation vector that combines individual features with temporal correlation features. This accurately characterizes the risk feature attributes of each alarm event in the global temporal sequence. Furthermore, during the encoder's multi-layer encoding process, the attention weight matrix corresponding to each attention layer can be output simultaneously to retain temporal correlation weight information at different levels, providing a core weight basis for subsequent risk correlation calculations across events and plants.
[0030] S3: Group the events to obtain multiple plant / station groups; for each plant / station group, calculate the comprehensive confidence score based on the time-aware representation vector and attention weight matrix of each event within the plant / station group; determine the risk propagation edge set from each event based on the comprehensive confidence score; construct the risk state vector of each event within the plant / station group and the plant / station risk state vector of each plant / station based on the risk propagation edge set; aggregate the plant / station risk state vectors of each plant / station to obtain the global risk state vector.
[0031] Specifically, a wind-solar hybrid power generation system comprises multiple independent power plants. The equipment operation and alarm events at different power plants are independent of each other. Alarm events within the same power plant exhibit strong risk transmission correlations, while cross-power plant events show weaker risk correlations. Therefore, the first step is to group all alarm events according to their power plant affiliation, forming independent power plant groups. This achieves spatial dimension decomposition in risk modeling, avoiding interference from invalid risk correlations across power plants. For each independent power plant group, by integrating time-aware representation vectors and multi-layer attention weight matrices, the system can comprehensively consider the event's own risk characteristics and global temporal correlation weights, quantifying the overall confidence level of risk correlations between events. This overall confidence level accurately characterizes the reliability and correlation strength of risk transmission between different alarm events. Using the overall confidence level as a screening criterion, invalid event correlations with weak correlations and no actual risk transmission effect are eliminated. This allows for the precise selection of event correlations with genuine risk transmission characteristics, forming a standardized set of risk transmission edges within a single power plant. This set clearly depicts the risk propagation path and correlation topology within a single power plant.
[0032] Based on the topological relationships of the risk transmission edge set, the risk characteristics of each event within the power plant are iteratively updated to construct an event risk state vector that closely reflects the actual risk transmission pattern, accurately representing the real-time risk state of a single event. Furthermore, the risk state characteristics of all events within the same power plant can be aggregated and fused to eliminate the random bias of single-event risks, resulting in a power plant risk state vector that comprehensively represents the overall operational risk of a single power plant. Finally, global aggregation modeling of the risk state vectors of all power plants is performed, fusing local risk characteristics from multiple power plants and integrating risk information from all areas within the system. This generates a global risk state vector that reflects the overall operational status of the entire wind-solar hybrid power generation system, completing hierarchical modeling from single-point event risk and single-power plant risk to system-wide risk.
[0033] S4: Slide time windows across the optimized event sequence at preset step sizes. For each time window, construct a corresponding dynamic risk graph based on the risk state vectors of each event, the plant / station risk state vectors, and the risk propagation edge set within the time window. Perform graph embedding encoding on each dynamic risk graph to obtain the corresponding graph embedding vector. Extract risk evolution trend indicators based on the dynamic risk graphs corresponding to each time window, and select high-risk propagation chains from each dynamic risk graph. Calculate the corresponding system risk score based on the graph embedding vectors, risk evolution trend indicators, high-risk propagation chains, and global risk state vectors for each time window.
[0034] Specifically, the operational risks of wind-solar hybrid power generation systems exhibit dynamic evolution characteristics over time. Static assessments at fixed points in time cannot reflect the changing patterns of these risks. Therefore, a sliding time window mechanism can be employed, which segments continuous optimization event sequences according to a preset step size. This breaks down long-sequence alarm event sequences into multiple continuous, overlapping short-time window sequences, enabling frame-by-frame dynamic monitoring of system risks. Subsequently, for each time window, the event-level risk status, plant-level risk status, and intra-plant risk propagation topology within the window can be integrated to construct a dynamic risk graph adapted to the single-window time-series scenario. This graph topology structure visually quantifies the overall structure of system event associations and risk propagation within that time period, achieving a structured representation of risk relationships. Graph embedding encoding is then applied to the dynamic risk graph, fusing the graph's topological features and node risk features into a low-dimensional, dense graph embedding vector. This fully preserves the global graph risk features of a single window, enabling a computable representation of the graph structure data.
[0035] Furthermore, based on the temporal variation characteristics of the dynamic risk map, risk evolution trend indicators that reflect the evolutionary patterns of system risks can be extracted to accurately capture the dynamic characteristics of system risks, such as increases and decreases, propagation speed, and connectivity. Simultaneously, the map topology can be traversed to screen high-risk propagation chains with strong risk transmission capabilities, enabling precise tracing of risk sources and propagation paths. Finally, the global map features represented by the graph embedding, the dynamic temporal characteristics of risk evolution trends, the key risk characteristics of high-risk propagation chains, and the global risk status characteristics of the system are fused to achieve deep integration of multi-dimensional risk information, resulting in a fusion vector. This vector, through quantitative calculation, yields a high-precision system risk score for each time window, completing a dynamic, accurate, and traceable risk assessment of the wind-solar hybrid power generation system at different operating stages, improving the comprehensiveness, dynamism, and accuracy of system risk assessment.
[0036] The above method first encodes the multi-dimensional attributes of alarm event sequences and constructs optimized event sequences, achieving structured fusion and unified feature representation of multi-dimensional heterogeneous alarm information. Second, it constructs a time decay factor based on event time intervals and completes attention modulation, effectively solving the problems of traditional models ignoring time decay characteristics and insufficient time dependency capture, thus achieving refined extraction of alarm time-series correlation features. Furthermore, by grouping plants and stations and combining the attention weight matrix to calculate the comprehensive confidence level, it adaptively filters risk transmission edges and constructs event, plant, and global risk states layer by layer, achieving hierarchical and accurate modeling of intra-station risk transmission correlation and cross-plant global risk. Finally, it constructs a dynamic risk map through a sliding window, integrating map features, evolution indicators, and high-risk propagation chains to complete system risk scoring, solving the problems of static assessment, lack of traceability, and weak dynamic evolution characterization of traditional methods, and achieving dynamic assessment, trend perception, and accurate quantification of time-series risks in wind and solar power generation systems.
[0037] In one embodiment, a risk assessment method S1 for a wind-solar hybrid power generation system provided in this application may include:
[0038] S11: Perform one-hot encoding on each dimension of each event to obtain the one-hot vector of the corresponding dimension;
[0039] S12: Input the one-hot vectors of each dimension into the corresponding embedding layer, and map them into the corresponding embedding vectors through matrix multiplication;
[0040] S13: Concatenate the embedding vectors of each event along the feature dimension to obtain the initial fused embedding vector for each event;
[0041] S14: Input the initial fusion embedding vector into the gated fusion layer, calculate the gated vector using the preset gated weight matrix and gated bias vector, multiply the gated vector with the initial fusion embedding vector element by element to obtain the event embedding vector of each event, and arrange the events in ascending order of timestamp based on the timestamp of each event to form an optimized event sequence.
[0042] Specifically, the operation and maintenance alarm event sequence can be set to contain N events, each event having six dimensions of attribute information: timestamp, event type, plant / station identifier, equipment type, action behavior, and alarm level. For any given event, its five discrete attribute dimensions can be individually encoded using one-hot encoding. The event type attribute, after one-hot encoding, yields a single dimension. A sparse vector, the length of which equals the total number of event types in the entire dataset. Only the index position corresponding to the actual type of the event in the vector is 1, and all other positions are 0. Similarly, the factory / site identification attribute is encoded as a dimension. One-hot vectors, device type attribute encoded as dimensions One-hot vectors, with action behavior attributes encoded as dimensions. The one-hot vector, the alarm level attribute is encoded as a dimension The five discrete attributes are encoded using one-hot encoding, resulting in five sparse vectors.
[0043] For the five one-hot vectors mentioned above, they can be input into their respective embedding layers for linear mapping. Each embedding layer is a trainable parameter matrix, where the number of rows corresponds to the embedding dimension, and the number of columns corresponds to the dimension of the one-hot vector for that attribute. Matrix multiplication is used to compress the high-dimensional, sparse one-hot vectors into low-dimensional, dense real-valued vectors. For example, event type one-hot vectors... By embedding the event type matrix Multiply to obtain the event type embedding vector. Its dimensions are Plant / station identification unique thermal vector Embedded matrix with plant and station identification Multiplying them together yields the plant / station identifier embedding vector. , dimension Device type unique heat vector One-hot vector of action behavior Alarm Level Unique Heat Vector Each through the corresponding embedding matrix and After mapping, the device type embedding vector is obtained. Action behavior embedding vector and alarm level embedding vector The corresponding dimensions are respectively , and The five embedding matrices mentioned above can be continuously updated during model training using the backpropagation algorithm, and the values of each embedding dimension can be set according to the actual application scenario. For example, It can be set to 64. It can be set to 32. It can be set to 32. It can be set to 16. It can be set to 8, but these values are only examples and can be adjusted by those skilled in the art according to the richness of event types and the complexity of the model.
[0044] After completing the embedding mapping for each of the five dimensions, the resulting five embedding vectors can be concatenated along the feature dimension to form a single feature vector. Initial fusion embedding vector ,in The concatenation operation integrates information from all dimensions into a single vector space, enabling the event's multi-dimensional attributes to be processed uniformly by subsequent networks. To adaptively adjust the importance of features across different dimensions, the initial fusion embedding vector can be input into a gated fusion layer, first through a trainable gate weight matrix. and gate bias vector The initial fused embedding vector is linearly transformed and then activated by the Sigmoid function. Compressing the transformation result to the interval between 0 and 1 yields a gated vector with the same dimension as the initial fused embedding vector. Each element in this gating vector represents the pass rate of a feature in the corresponding dimension. A value closer to 1 indicates a higher contribution of that dimension's feature to subsequent risk assessment, while a value closer to 0 indicates lower importance of that dimension's feature or potential noise interference. Gating Vector With the initial fusion embedding vector Element-wise multiplication, i.e., multiplying corresponding elements, yields the event embedding vector. This gated fusion layer enables the model to adaptively adjust the weights of features across different dimensions based on the specific attributes of different events, achieving deep fusion and importance recalibration of multi-dimensional information. Consequently, the event embedding vector for each event can be obtained, with its dimension remaining [missing information]. .
[0045] After all events have been embedded and encoded, the timestamps record the precise moment the events occurred. Therefore, the events can be arranged in ascending order according to their timestamps to form an event sequence. Each event in the sorted event sequence carries a corresponding event embedding vector and timestamp information, which together constitute the input data for the subsequent time-aware attention encoder.
[0046] In one embodiment, the time-aware attention encoder comprises a factor computation layer and L stacked attention layers, where L is an integer greater than 1, typically set to 4 or 6 layers. More layers result in a stronger ability to model complex temporal dependencies, but also increase computational overhead. Those skilled in the art can adjust this based on the event sequence length and available computing resources. Each attention layer contains H attention heads, where H is a positive integer, typically set to 8 or 16. This multi-head mechanism enables the model to capture diverse association patterns between events in parallel from different semantic subspaces.
[0047] Indicatively, a risk assessment method S2 for wind-solar hybrid power generation systems provided in this application may include:
[0048] S21: Calculate the absolute value of the time interval between any two events based on the timestamps of each event, and construct a time interval matrix;
[0049] S22: Using the factor calculation layer, substitute each time interval in the time interval matrix into a time decay kernel function that includes a decay rate parameter and a shape parameter, calculate the corresponding time decay factor, and construct a time decay factor matrix;
[0050] S23: For the l-th layer in the time-aware attention encoder, take the first representation vector of each event output by the (l-1)-th layer as the input representation vector of the l-th layer; where l=1, 2, ..., L, and when l=1, the first representation vector is the event embedding vector;
[0051] S24: Perform linear transformation on the input representation vector of each event through the query projection matrix, key projection matrix and value projection matrix of the l-th layer respectively, to obtain the query vector, key vector and value vector of the l-th layer; calculate the dot product of the query vector of each event and the key vectors of all events to obtain the dot product result vector corresponding to the event, and combine the dot product result vectors of each event to form the initial attention score matrix of the l-th layer; divide the initial attention score matrix of the l-th layer by a preset scaling factor to obtain the standard attention score matrix of the l-th layer;
[0052] S25: Perform element-wise multiplication on the standard attention score matrix of the l-th layer and the time decay factor matrix to obtain the time-modulated attention score matrix of the l-th layer; perform Softmax normalization on each row of the time-modulated attention score matrix of the l-th layer to obtain the time-aware attention weight matrix of the l-th layer; the time-aware attention weight matrix includes a plurality of time-aware attention weights;
[0053] S26: Perform weighted summation on the value vectors of all events at the l-th layer according to the time-aware attention weight matrix of the l-th layer, to obtain the output vector of each attention head in the l-th layer; after concatenating the output vectors of the H attention heads of the l-th layer in the feature dimension, perform linear transformation on the concatenated vector through the output projection matrix of the l-th layer, to obtain the second representation vector of each event at the l-th layer;
[0054] S27: When l<L, take the second representation vector of the l-th layer as the input representation vector of the (l+1)-th layer, and continue the encoding; traverse each attention layer, and when l=L, take the second representation vector of the L-th layer as the time-aware representation vector of each event, and save the time-aware attention weight matrix of each attention head in each attention layer, to obtain the attention weight matrix of each attention layer.
[0055] Specifically, in the factor calculation layer, the absolute value of the time interval between any two events may be calculated first according to each event timestamp in S1. Let the timestamp of the i-th event be , and the timestamp of the j-th event be , then the time interval The unit is milliseconds. Iterate through all event pairs in the sequence, arranging the results into an N x N matrix of time intervals, where N is the total number of events in the sequence. This matrix is symmetric, with all diagonal elements being 0. After obtaining the time interval matrix, the factor calculation layer can map each time interval to a corresponding time decay factor using a time decay kernel function. The specific form of the time decay kernel function is:
[0056]
[0057] in, The decay rate parameter is a real number greater than 0, which controls the rate of decay. The larger the value, the stronger the suppression of attention scores by the time interval. The shape parameter is a real number greater than 0, which controls the shape of the decay curve. When the kernel function degenerates into standard exponential decay, when At that time, it can fit different types of decay trends. and All parameters are trainable and can be automatically adjusted through backpropagation during model training, enabling the kernel function to adaptively fit the time-scale characteristics of risk propagation in different wind-solar hybrid power generation systems. Each parameter in the time interval matrix... Substituting these values into the kernel function yields the corresponding time decay factors, which together form the time decay factor matrix. This matrix has the same dimensions as the time interval matrix. Furthermore, due to the symmetry of the time interval matrix, this matrix also exhibits symmetric properties.
[0058] After calculating the time decay factor matrix, the stacked encoding process of the attention layer can begin. For the time-aware attention encoder... layer, The range of values is Up to L, each layer receives the representation vector output by the previous layer as input. Specifically, when At that time, the first The input to the layer is the event embedding vector output by S1, and the first representation vector of each event is the event embedding vector; when At that time, the first The input of the layer is the first The second representation vector output by the layer. Each layer is independently configured with a set of trainable projection parameters, including the query projection matrix, key projection matrix, and value projection matrix. In the... Within a layer, the projection matrix can first be queried through that layer. Key projection matrix Sum projection matrix Perform linear transformations on the input representation vectors respectively. For the i-th event, its input representation vector is denoted as... After transformation, the query vectors are obtained respectively. key vector and value vector The dimensions of the three projection matrices mentioned above are all... ,in The projection dimensions of the query vector and key vector can typically be set to the same as those of the query vector and key vector. Equal numerical values, such as 64 or 128, while the dimension of the value projection matrix is... , Usually with Maintain consistency.
[0059] Then, the dot product of the query vector for each event and the key vectors for all events can be calculated. For events i and j, the dot product result is: This value represents the degree of matching between the query of event i and the key of event j in the semantic space. After calculating the dot product of event i with all events, a dot product vector of length N is obtained. The dot product vectors of all events are stacked row-wise to form the first... Initial attention score matrix of the layer Its dimensions are Divide each element in the initial attention score matrix by a preset scaling factor. This allows us to obtain the standard attention score matrix. The scaling factor is used to scale the dot product result to an appropriate numerical range, preventing the dot product result from becoming too large due to excessively high vector dimensions and entering the gradient saturation region of the Softmax function, thereby maintaining the stability of the training process.
[0060] After the standard attention score matrix is calculated, it is multiplied element-wise with the time decay factor matrix obtained from the factor calculation layer. This operation directly injects the temporal proximity information between events into the attention score. Specifically, for events i and j, their time-modulated attention scores are:
[0061]
[0062] When two events occur very close to each other When the value approaches 1, the attention score remains essentially constant, indicating that the model can adequately focus on the semantic connection between the two events; however, as the time interval increases, As the attention score gradually decays to near zero, the corresponding attention score is significantly weakened, and the model's attention to distant events decreases. This multiplicative modulation mechanism allows the model to consider both semantic relevance and temporal proximity when calculating attention weights.
[0063] After obtaining the time-modulated attention score matrix, Softmax normalization is performed on each row. For the i-th row, this operation transforms the attention score of the i-th event to all events into a probability distribution, ensuring that the sum of all elements in this row is 1. The matrix obtained after Softmax normalization is the matrix of the i-th event. Layer-aware attention weight matrix Its dimensions are The element in the i-th row and j-th column represents the element in the i-th row and j-th column. The time-aware attention weight of event i to event j in the layer.
[0064] After obtaining the time-aware attention weight matrix, the value vectors of all events are summed using this matrix. For each attention head h, its output vector is:
[0065]
[0066] in For the first The value vector of event i in the h-th attention head of layer 1. Each attention head independently performs the above weighted summation operation to obtain its own output vector. Furthermore, each attention head can capture the relationships between events from different projection subspaces, thereby extracting diverse dependency patterns. The h-th... The output vectors of the H attention heads in the layer are concatenated along the feature dimension, resulting in a vector with dimension [missing information]. Subsequently, the concatenated vector is passed through the first... The output projection matrix of the layer Perform a linear transformation, and the dimension of the output projection matrix is... After transformation, the first... The second representation vector of each event in the layer is restored to its original dimension. Through the above process, the first step was completed. The encoding process of the layer.
[0067] In a multi-layered stacked coding architecture, when At that time, the first The second representation vector output by the layer is used as the first... The input representation vector of the layer is then used to continue the above encoding process. When In this case, the second representation vector output by the Lth layer can be used as the final time-aware representation vector for each event. This vector integrates the temporal context information of all events in the event sequence as well as the influence of the precise time intervals between events. Furthermore, during the encoding process, the time-aware attention weight matrix of each attention head in each layer is saved. These weight matrices constitute the attention weight matrix of each attention layer and can be called upon in subsequent risk propagation modeling and dynamic risk graph construction.
[0068] In one embodiment, events are grouped to obtain multiple plant / station groups; for each plant / station group, a comprehensive confidence score is calculated based on the time-aware representation vector and attention weight matrix of each event within the plant / station group; based on the comprehensive confidence score, a risk transmission edge set is determined from each event, which may include:
[0069] S31: Divide each event into different plant groups based on the plant identifier of each event;
[0070] S32: For each plant group, map the time-aware representation vectors of all events within the plant group to the risk semantic space through a preset risk projection matrix to obtain the risk semantic vector of each event. Calculate the dot product of the risk semantic vectors of any two events within the plant group to obtain the first dot product result. Activate the first dot product result through the Sigmoid activation function to obtain the risk transmission strength between any two events within the plant group. Combine the risk transmission strength of each event pair to construct a risk transmission strength matrix.
[0071] S33: Take the average value of the attention weight matrices of all attention layers to obtain the average attention weight matrix; multiply the risk transmission intensity matrix element by element with the average attention weight matrix to obtain the comprehensive confidence matrix; where each element in the comprehensive confidence matrix is the comprehensive confidence of the corresponding event pair;
[0072] S34: Select elements whose values exceed the preset confidence threshold from the comprehensive confidence matrix, and obtain the event pairs corresponding to each element as directed event pairs; define the directed event pairs as the risk transmission edges within the plant group, and use the corresponding comprehensive confidence as the weight of the risk transmission edges within the plant; wherein, the starting event of the directed event pair points to the ending event.
[0073] S35: Summarize the risk transmission edges within all plant groups to obtain the risk transmission edge set.
[0074] Specifically, since events within the same power plant group originate from the same wind-solar hybrid power plant, these events are highly correlated in terms of electrical connections and control logic. Therefore, the risk transmission analysis is conducted on a power plant group basis. That is, based on the power plant identifier carried by each event, all events can be divided according to the power plant to which they belong, resulting in multiple power plant groups.
[0075] For any given plant group, suppose it contains M events. Arrange the time-aware representation vectors of all events within the plant group into an M x d matrix, where d is the dimension of the time-aware representation vector, typically set to 64 or 128, with the specific value adjusted according to the richness of event types and model complexity requirements. Subsequently, a trainable risk projection matrix is used... These vectors are mapped to a risk semantic space specifically used for risk propagation modeling. The dimension of this risk projection matrix is... The number of rows is , representing the dimension of the risk semantic space, can be set to the same as . For the same value, the number of columns is The dimension is consistent with the input time-aware representation vector. After mapping, each event obtains a risk semantic vector, which represents the semantic features of the event in the risk propagation dimension. The dot product between the risk semantic vectors of any two events within the plant group reflects the degree of matching between the two events in the risk semantic space. The larger the dot product value, the more related the two events are in terms of risk semantics, and the more likely there is a risk transmission relationship between the events. Processing the dot product result with the Sigmoid activation function yields a risk transmission strength value between 0 and 1. The closer the value is to 1, the higher the probability of risk transmission from the first event to the second event. Performing the above calculation on each event pair within the plant group constructs a risk propagation vector. OK Risk transmission strength matrix of columns , of which Line 1 Column elements This indicates the first [unit / item] within the plant / station group. The event to the The intensity of risk transmission in an event.
[0076] Furthermore, the attention weight matrices of all attention heads across all attention layers stored in S2 are averaged. The time-aware attention encoder in S2 contains L attention layers, each with H attention heads. Each attention head corresponds to an N x N attention weight matrix, where N is the total number of events in the event sequence. Adding the elements at the same position in all L x H attention weight matrices and dividing by L x H yields an N x N average attention weight matrix. This approach integrates the association information captured from different semantic subspaces by different attention layers and attention heads, resulting in a more robust and comprehensive temporal association metric. Each element in this matrix... It represents the average attention intensity of the corresponding event pair across all attention layers and all attention heads, reflecting the average degree of correlation between events at the temporal semantic level.
[0077] The above risk transmission strength matrix With the average attention weight matrix Perform element-wise multiplication. Since both matrices are indexed by events, and the risk transmission strength matrix only has non-zero values for event pairs within the same plant group, and event pairs across plants have zero values at their corresponding positions in the risk transmission strength matrix, the resulting comprehensive confidence matrix after element-wise multiplication is... Non-zero values are only present between event pairs within the same plant group. Each element in the comprehensive confidence matrix... This product value combines two dimensions: risk semantic matching degree and temporal semantic correlation degree, which can more reliably indicate whether there is a real risk transmission relationship between events.
[0078] After obtaining the comprehensive confidence matrix, a preset confidence threshold can be set. The specific value of this threshold can be adjusted according to the requirements of recall and precision in actual applications, for example, it can be set to 0.3 or 0.5. Values exceeding [a certain threshold] are selected from the comprehensive confidence matrix. For each element in the comprehensive confidence matrix, obtain the event pair corresponding to that element. Since the row and column indices of the comprehensive confidence matrix represent the start and end points of the event, each selected event pair naturally has directionality, i.e., the start event points to the end event, forming a directed event pair. These directed event pairs are defined as risk transmission edges within the plant group, and the corresponding comprehensive confidence value is used as the weight of the edge, representing the credibility of the risk transmission edge.
[0079] The above processing procedure is executed sequentially for all plant groups. The risk transmission edges obtained from all plant groups are then aggregated to form a risk transmission edge set covering the entire event sequence. Each edge in this set carries a starting event identifier, an ending event identifier, and a corresponding comprehensive confidence weight, which can serve as the basic edge information for constructing a dynamic risk graph in subsequent steps.
[0080] In one embodiment, risk state vectors for each event within a plant group and plant risk state vectors for each plant are constructed based on a risk propagation edge set; the plant risk state vectors of each plant are aggregated to obtain a global risk state vector, which may include:
[0081] For each event, find all preceding events pointing to the event based on the risk propagation edge set, sum the time-aware representation vectors of each preceding event according to the corresponding comprehensive confidence level, and obtain the weighted sum result. Add the weighted sum result to the event's own time-aware representation vector, and activate the sum result through the ReLU activation function to obtain the event's risk state vector.
[0082] For each plant group, the attention score of the risk state vector of each event in the plant group is calculated by using a preset attention score vector. The attention score of each event is normalized by Softmax to obtain the risk attention weight of each event. Based on the risk attention weight of each event, the risk state vectors of all events in the plant group are weighted and summed to obtain the plant risk state vector of the plant.
[0083] The risk state vectors of each plant are stacked into a plant state matrix. The plant state matrix is then linearly transformed using a preset plant-level query projection matrix and a plant-level key projection matrix to obtain a plant-level query matrix and a plant-level key matrix. Cross-plant attention scores are calculated based on the plant-level query matrix and the plant-level key matrix. The cross-plant attention scores are then Softmax normalized to obtain cross-plant attention weights. The risk state vectors of all plants are then weighted and summed based on the cross-plant attention weights to obtain the global risk state vector.
[0084] Specifically, for each event in the event sequence, we can first find all predecessor events pointing to that event based on the risk propagation edge set. A predecessor event is defined as: if there exists a successor event in the risk propagation edge set... Pointing to events If there is a directed edge, then the event For the event A preceding event, the overall confidence level carried by this edge is denoted as . Let the event... All preceding events constitute a set For each preceding event in this set Extract the time-aware representation vector output from its S2. The vector is then sorted according to its corresponding comprehensive confidence level. Weighting is applied. Summing the weighted vectors of all preceding events yields an aggregated vector that reflects the total risk transmission contribution of all preceding events to the current event. Subsequently, this weighted sum is compared with the event's own time-aware representation vector. Adding these elements allows the characteristic information of the current event itself to be fused with the risk transmission information from preceding events. Finally, the sum is processed by the ReLU activation function to obtain the event... Risk state vector The introduction of the ReLU activation function adds nonlinearity to the feature representation, and it is defined as ReLU. It can set negative values to zero, allowing the model to focus on positive risk characteristic responses.
[0085] After constructing the risk state vectors for all events, each plant group contains multiple events, each with a corresponding risk state vector. To aggregate the risk information of multiple events within a plant group into a unified plant-level risk representation, an attention pooling mechanism can be used for aggregation. Specifically, this is achieved through a trainable attention scoring vector. Calculate the attention score of the risk state vector for each event within the plant group. For the event in the plant group... Each event has an attention score of [value]. Its risk state vector The dot product of the event's score reflects its importance in characterizing the overall risk state of the plant. Softmax normalization is applied to all event attention scores to obtain the risk attention weight for each event, which is a probability value between 0 and 1. The sum of the attention weights of all events within the same plant group is 1. Subsequently, based on the risk attention weight of each event, the risk state vectors of all events within the plant group are weighted and summed to obtain the plant's risk state vector s. This vector integrates the different contributions of various events within the plant to the overall risk, with events with higher contributions dominating the aggregation result.
[0086] Finally, the risk state vectors of all plants are stacked row-wise to form a plant state matrix, where each row corresponds to the risk state vector of a single plant. To model the risk transmission relationships between different plants and filter concurrent but irrelevant cross-plant interference information, a cross-plant attention mechanism is used for aggregation. Specifically, the plant state matrix can be linearly transformed using a trainable plant-level query projection matrix and a trainable plant-level key projection matrix, respectively, to obtain the plant-level query matrix and the plant-level key matrix. For any two plants... and Factory Station Query vectors and factory sites The dot product of the key vectors reflects the power plant For the plant The cross-plant attention score; the higher the score, the better for the plant / station. Risk status of the plant The more important the risk perception, the better. After calculating the above attention scores for all plants, the row vector of the attention score for each plant is Softmax normalized to obtain the cross-plant attention weight matrix. In this matrix, the first... Line 1 The elements of the column represent the plant / station. For the plant The cross-plant attention weights are calculated, with the sum of the weights in each row being 1. Finally, the plant risk state vectors of all plants are weighted and aggregated based on the cross-plant attention weight matrix. The aggregation result is the state vectors of all power plants according to the first... The attention weights of each row are weighted and summed. The aggregated results from all plants are then globally averaged again, or a global attention aggregation is performed based on the global query vector to obtain the final global risk state vector. This global risk state vector integrates the risk information of all plants and automatically suppresses interference between irrelevant plants through a cross-plant attention mechanism, allowing the model to focus on the interactions between plants with real risk transmission relationships.
[0087] In one embodiment, a time window is slid across the optimized event sequence at a preset step size. For each time window, a corresponding dynamic risk graph is constructed based on the risk state vector of each event within the time window, the plant risk state vector, and the risk propagation edge set. This graph may include:
[0088] S41: Based on a preset time window length, slide the time window on the optimized event sequence according to a preset step size to obtain multiple time windows;
[0089] S42: For each time window, extract all events falling within the time window, construct event nodes based on the risk state vectors of each event within the time window, construct virtual nodes of plants and stations based on the plant and station risk state vectors associated with the time window, use the risk state vectors as the node features of the corresponding event nodes, and use the plant and station risk state vectors as the node features of the corresponding plant and station virtual nodes.
[0090] S43: Take the edges in the risk transmission edge set within the plant where both ends of the event belong to the time window as directed edges between event nodes, and establish directed edges between virtual nodes of the plant and the event node with the largest magnitude of the risk state vector within the corresponding plant based on the cross-plant attention weight, to obtain the dynamic risk map of the time window.
[0091] Specifically, the time window length determines the time span covered by each analysis. Its value should be able to encompass the time scale of typical fault propagation processes in a wind-solar hybrid power generation system; for example, it can be set to 10 minutes, 15 minutes, or 30 minutes. The sliding step size determines the time interval between adjacent time windows; for example, it can be set to 1 minute or 5 minutes. A smaller step size results in higher real-time risk monitoring, but also increases computational overhead. According to the set sliding step size, the time window is slid sequentially from the start time on the optimized event sequence obtained in S1. Each slide generates a new time window, resulting in multiple time windows. Each time window contains a start time and an end time. There may be overlapping areas between adjacent time windows; the length of this overlapping area is equal to the time window length minus the sliding step size. This overlap mechanism ensures the continuity of risk state changes between adjacent time windows, avoiding information gaps caused by window switching.
[0092] For each obtained time window, all events falling within that time window are first extracted, i.e., whether their timestamps fall between the start and end times of that time window. Since adjacent time windows overlap, the same event may belong to multiple time windows simultaneously. Then, a node set for the current time window is constructed based on the extracted events. Nodes are divided into two categories: the first category is event nodes, corresponding to each event within the time window, with each event node using its corresponding risk state vector as its node feature; the second category is plant / station virtual nodes, corresponding to all plants / stations involved within the time window, with each plant / station virtual node using its corresponding plant / station risk state vector as its node feature. Plant / station virtual nodes themselves do not correspond to any original alarm events, but rather serve as an abstract representation of the overall risk state of the plant / station, used in subsequent steps to connect various event nodes within the same plant / station and to interact with risk information from other plants / stations.
[0093] Subsequently, directed edges can be added to the nodes constructed in S42 to form a complete graph structure. There are two types of edges. The first type is directed edges between event nodes, sourced from the risk transmission edge set obtained in S3. Each edge in the risk transmission edge set contains a starting event identifier, an ending event identifier, and a comprehensive confidence weight. For the current time window, all edges in the risk transmission edge set whose starting and ending events both belong to that time window can be extracted and added to the graph as directed edges between event nodes. The direction of these directed edges is consistent with the risk transmission direction, and the edge weight is the corresponding comprehensive confidence. The second type of edge is directed edges between plant / station virtual nodes and event nodes, constructed based on the cross-plant / station attention weight obtained in S2. For each plant / station virtual node, all event nodes within that plant / station can be identified first, and then the event node with the largest risk state vector magnitude can be selected. The magnitude of the risk state vector is calculated using the L2 norm, i.e., ,in For the event The risk state vector, The vector dimension is used. A larger magnitude indicates a higher risk state intensity for the event. Subsequently, directed edges are established from virtual nodes of the plant / station to the event node with the largest magnitude, based on cross-plant / station attention weights. The weights are the corresponding cross-plant / station attention weight values. The basis for this edge construction method is that the event with the largest magnitude of the risk state vector represents the most prominent risk event for that plant / station within the current time window. By connecting virtual nodes of the plant / station to this event, the risk transmission relationship across plants / stations can be focused on the most representative risk event in each plant / station, thereby achieving an effective expression of cross-plant / station risk association. Through the above processing, each time window can obtain a directed graph containing two types of nodes: event nodes and virtual nodes of the plant / station, and two types of edges: directed edges between event nodes and directed edges from virtual nodes of the plant / station to event nodes. This directed graph is the dynamic risk map of that time window.
[0094] In one embodiment, risk evolution trend indicators include risk intensity change rate, average propagation speed, and connectivity indicators. Graph embedding encoding is performed on each dynamic risk map to obtain the corresponding graph embedding vector; risk evolution trend indicators are extracted based on the dynamic risk maps corresponding to each time window, and high-risk propagation chains are screened from each dynamic risk map, which may include:
[0095] For each dynamic risk graph, a graph isomorphic network is used to encode the dynamic risk graph in multiple layers to obtain the graph embedding vector of each node in the dynamic risk graph. The global attention score of the graph embedding vector of each node is calculated through a preset global attention score vector.
[0096] The global attention scores of each node are normalized using Softmax to obtain the global attention weight of each node. The graph embedding vectors of all nodes are then weighted and summed based on the global attention weight of each node to obtain the overall graph embedding vector of the time window.
[0097] The Euclidean distance is calculated for the overall graph embedding vectors of adjacent time windows. The Euclidean distance is used as the rate of change of risk intensity corresponding to adjacent time windows. The average propagation speed of all directed edges in the dynamic risk graph of the time window is calculated as the average propagation speed. The proportion of the number of nodes in the largest connected component of the dynamic risk graph of the time window to the total number of nodes in the dynamic risk graph is calculated as the connectivity index.
[0098] In the dynamic risk graph, a depth-first search algorithm is used to select directed paths with a length of not less than 3. The average of the comprehensive confidence of each edge on each directed path is calculated as the path strength of the directed path. Directed paths with path strength exceeding a preset path strength threshold are marked as high-risk propagation chains corresponding to the dynamic risk graph.
[0099] Specifically, for the dynamic risk map corresponding to each time window, graph isomorphic networks can be used for graph embedding encoding. Graph isomorphic networks are a type of graph neural network architecture with strong expressive power. Their core idea is to use multi-layered iterative neighborhood aggregation operations to gradually fuse the structural information of each node's representation vector with that of its surrounding multi-hop neighborhood. For the... Dynamic risk map of each time window Suppose it contains Each node has an initial feature vector, which is the node feature assigned in S4. The graph isomorphic network contains multiple graph convolutional layers, typically 3 or 4 layers; the more layers, the wider the neighborhood that a node can perceive. In each layer, the representation vector of each node is updated by the sum of its previous layer's representation vector and the previous layer's representation vectors of all its neighbors. This update process uses a multilayer perceptron for nonlinear transformation. Through multilayer stacking, the final graph embedding vector of each node fuses its local subgraph structure information in the dynamic risk graph with the node's own original feature information.
[0100] After completing node-level graph embedding encoding, the graph embedding vectors of all nodes can be aggregated into a fixed-length overall graph embedding vector to represent the entire dynamic risk graph. Furthermore, to highlight key nodes in the graph that contribute significantly to system risk, an attention pooling mechanism can be used for aggregation. For example, a scalar attention score is calculated for each node's graph embedding vector using a trainable global attention score vector; this score reflects the importance of the corresponding node in the overall graph risk representation. Softmax normalization is applied to the attention scores of all nodes to obtain the global attention weight for each node, ensuring that the sum of all weights is 1. Subsequently, the graph embedding vectors of all nodes can be weighted and summed according to their global attention weights to obtain the overall graph embedding vector for that time window. Through the above process, the dynamic risk map of each time window is compressed into a fixed-dimensional overall graph embedding vector. The overall graph embedding vectors of each time window are arranged in chronological order to form a graph embedding vector sequence. ,in This represents the total number of time windows.
[0101] After obtaining the graph embedding vector sequence, three-dimensional risk evolution trend indicators can be extracted based on this sequence. The first indicator is the risk intensity change rate, which measures the drastic change in the overall risk status of the system between adjacent time windows. For adjacent time windows... The first time window and the first The first metric is the average propagation speed, which measures how quickly risk propagates along directed edges in a dynamic risk graph. Each directed edge in the dynamic risk graph connects two event nodes, and there is a time interval between the occurrence of the starting event and the ending event; this time interval is the propagation time of the risk along that edge. The reciprocal of this time interval is defined as the propagation speed of that edge, expressed in events per second. A higher speed indicates faster risk transmission between events. Therefore, the arithmetic mean of the propagation speeds of all directed edges in the current time window of the dynamic risk graph can be calculated as the average propagation speed for that time window. The third metric is the connectivity metric, which measures the overall tightness of risk associations between events in the dynamic risk graph. For example, directed edges in the dynamic risk graph can be treated as undirected edges, and weakly connected components can be calculated after ignoring directional information. The connected component with the largest number of nodes is then identified, called the maximum connected component. The connectivity index is calculated by dividing the number of nodes in the maximum connected component by the total number of nodes in the dynamic risk graph. The value ranges from 0 to 1. A ratio closer to 1 indicates that most event nodes in the dynamic risk graph are connected as a whole through risk transmission edges, and the system risk may have strong transmissibility. A ratio closer to 0 indicates that the risk correlation between events is relatively dispersed.
[0102] When extracting risk evolution trend indicators, high-risk propagation chains can be searched in various dynamic risk graphs. For example, a depth-first search algorithm can be used to exhaustively search for directed paths in the dynamic risk graph. During the search, the minimum path length can be limited to 3 directed edges, meaning the path must contain at least 4 nodes; short paths with a length less than 3 do not constitute meaningful propagation chains. For each directed path with a length of at least 3, the path is composed of multiple directed edges connected end-to-end, each carrying a corresponding comprehensive confidence weight. The arithmetic mean of the comprehensive confidence scores of all directed edges on the path is taken as the path strength, reflecting the average credibility of risk transmission along the entire propagation path. A preset path strength threshold can also be set, which can be adjusted according to the sensitivity requirements for high-risk propagation chains in practical applications, for example, set to 0.4 or 0.5. Directed paths with a path strength exceeding this threshold are marked as high-risk propagation chains. These marked paths represent risk propagation channels with high credibility in the system and can serve as important criteria in subsequent risk level determination.
[0103] In one embodiment, the extracted graph embedding vector, risk evolution trend indicators, and high-risk propagation chains, along with the global risk state vector obtained in S3, can be integrated to form a unified multi-dimensional risk feature vector. This feature vector is then mapped to a system risk score via a risk scoring network. Finally, the risk level is determined by combining the high-risk propagation chain information, achieving a comprehensive assessment and graded early warning of system operational risks. For example, for the first... A time window can be used to embed the overall graph of that time window obtained in S4 into a vector. As the first feature vector, this vector contains structural and node feature information of the dynamic risk map. The three risk evolution trend indicators extracted from S4, namely the risk intensity change rate, are then used. Average propagation speed and connectivity metrics These three scalar features respectively characterize the drastic changes in systemic risk, the speed of risk transmission between events, and the overall tightness of risk correlation between events. The number of high-risk propagation chains marked in S4... As a counting feature, this feature reflects the existence of credible risk propagation channels within the current time window. The global risk state vector obtained in S3... The L2 norm is used as a norm feature, i.e. ,in The norm represents the dimension of the global risk state vector, reflecting the overall level of risk state across the entire system. By concatenating the first feature vector, the three scalar features, the count feature, and the norm feature along the feature dimension—that is, by linking the vector and scalars sequentially end-to-end—a multidimensional risk feature vector can be obtained. The scalar features and count features need to be expanded into vectors of dimension 1 before concatenation, so that they can be concatenated with the vector features in a unified dimension.
[0104] Subsequently, the spliced multidimensional risk feature vector can be obtained The input is fed into a risk scoring network for processing. The risk scoring network employs a two-layer fully connected structure based on residual connections. The multidimensional risk feature vector is first input into the first fully connected layer. The number of neurons in this layer can be set according to the dimension and complexity of the input features, for example, 128 or 256 neurons. After the input features undergo a linear transformation using the weight matrix and bias vector of the first fully connected layer, they are then non-linearly mapped using the ReLU activation function to obtain the first hidden vector. This first hidden vector is then input into the second fully connected layer, which has the same number of neurons as the first. The input vector undergoes a linear transformation using the weight matrix and bias vector of the second fully connected layer, followed by mapping using the ReLU activation function to obtain the second hidden vector. The first and second hidden vectors are then added element-wise to form a residual connection, allowing gradient information to bypass the intermediate non-linear transformation layer during backpropagation and directly propagate, alleviating the gradient vanishing problem in deep network training. The sum is then normalized to stabilize the distribution of features across all dimensions, resulting in the encoded feature vector. The encoded feature vector is then input to the output layer, which is a single-neuron fully connected layer. This neuron linearly transforms the encoded feature vector into a scalar value using a weight vector and a bias scalar. This scalar value is then mapped to a closed interval between 0 and 1 by the Sigmoid activation function. The Sigmoid activation function is defined as follows: Its output value is the system risk score for that time window. The closer the system risk score is to 1, the higher the risk of system operation; the closer it is to 0, the lower the risk.
[0105] Furthermore, after determining the system risk score, the presence and number of high-risk propagation chains can be considered to determine the risk level of the current time window according to a preset risk level determination strategy. Risk levels are divided into three levels: low risk, medium risk, and high risk. A first threshold and a second threshold can be set to determine the risk level, where the first threshold is less than the second threshold. The first threshold can be set to 0.3, and the second threshold to 0.7. When the system risk score is less than the first threshold and the number of high-risk propagation chains is zero, it is determined to be at a low risk level, indicating that the system is operating normally and no significant risk transmission phenomenon has occurred. When the system risk score is greater than or equal to the first threshold and less than the second threshold, or when the number of high-risk propagation chains is greater than or equal to one, it is determined to be at a medium risk level. The triggering conditions for the medium risk level cover two situations: one is that the system risk score is in the medium range but no clear high-risk propagation chain has appeared; the other is that although the risk score is still in the medium range, one or two high-risk propagation chains have already appeared, which means that a relatively clear risk propagation channel already exists in the system. A system is classified as high-risk when its risk score is greater than or equal to the second threshold, or when the number of high-risk propagation chains is greater than or equal to three. The triggering conditions for a high-risk level can also include two complementary scenarios: one is that the system risk score has reached a high value range, indicating a high overall risk level; the other is that although the risk score has not yet reached a high value range, the number of high-risk propagation chains has reached three or more, indicating the existence of multiple credible risk propagation channels in the system, potentially foreshadowing the rapid evolution of cascading failure risks. By employing a strategy that jointly determines risk levels based on risk score and the number of high-risk propagation chains, the system retains the quantitative sensitivity of deep learning models to overall risk while introducing interpretable, structured risk evidence as an auxiliary criterion, thus improving the robustness and operability of risk level determination.
[0106] Based on the same inventive concept, this application also provides a risk assessment system for a wind-solar hybrid power generation system to implement the risk assessment method for a wind-solar hybrid power generation system described above. The solution provided by this system is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more embodiments of the risk assessment system for a wind-solar hybrid power generation system provided below can be found in the limitations of the risk assessment method for a wind-solar hybrid power generation system described above, and will not be repeated here.
[0107] In one exemplary embodiment, such as Figure 2 As shown, a risk assessment system 50 for wind-solar hybrid power generation systems is provided, including:
[0108] Event encoding module 51 is used to obtain an alarm event sequence containing multiple events; it encodes each event based on its multi-dimensional attributes to obtain the event embedding vector of each event, and constructs an optimized event sequence based on the event embedding vector of each event; wherein, the multi-dimensional attributes of each event include timestamp, event type and plant identifier;
[0109] The time-aware module 52 is used to calculate the time interval between any two events based on the timestamps of each event; input the event embedding vector of each event into the time-aware attention encoder to generate a time decay factor based on the time interval; perform attention modulation based on the time decay factor and the event embedding vector of each event to obtain the time-aware attention weight; encode the event embedding vector based on the time-aware attention weight, and output the time-aware representation vector of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder.
[0110] The risk transmission module 53 is used to group events into multiple plant groups; for each plant group, it calculates the comprehensive confidence score based on the time-aware representation vector and attention weight matrix of each event within the plant group; it determines the risk transmission edge set from each event based on the comprehensive confidence score; it constructs the risk state vector of each event within the plant group and the plant risk state vector of each plant based on the risk transmission edge set; and it aggregates the plant risk state vectors of each plant to obtain the global risk state vector.
[0111] The dynamic evaluation module 54 is used to slide time windows on the optimized event sequence at preset step sizes. For each time window, a corresponding dynamic risk graph is constructed based on the risk state vector of each event, the plant risk state vector, and the risk transmission edge set within the time window. Graph embedding encoding is performed on each dynamic risk graph to obtain the corresponding graph embedding vector. Risk evolution trend indicators are extracted based on the dynamic risk graph corresponding to each time window, and high-risk propagation chains are screened from each dynamic risk graph. Based on the graph embedding vector, risk evolution trend indicators, high-risk propagation chains, and global risk state vector of each time window, the corresponding system risk score is calculated.
[0112] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the risk assessment method for a wind-solar hybrid power generation system according to this application. A multi-core processor is preferred to improve the system's parallel processing capability. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate large amounts of data and computational tasks.
[0113] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of a risk assessment method for a wind-solar hybrid power generation system according to this application. The computer-readable storage medium may include: a read-only memory, a random access memory, a solid-state drive, or an optical disk, etc.
[0114] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. A risk assessment method for wind-solar hybrid power generation systems, characterized in that, The method includes: S1: Obtain an alarm event sequence containing multiple events; encode each event based on its multi-dimensional attributes to obtain an event embedding vector for each event, and construct an optimized event sequence based on the event embedding vectors for each event; wherein, the multi-dimensional attributes of each event include timestamp, event type, and plant / station identifier; S2: Based on the timestamps of each event, calculate the time interval between any two events; input the event embedding vectors of each event into the time-aware attention encoder, and generate a time decay factor based on the time interval; perform attention modulation according to the time decay factor and the event embedding vectors of each event to obtain time-aware attention weights; encode each event embedding vector based on the time-aware attention weights, and output the time-aware representation vectors of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder; S3: Group the events to obtain multiple plant / station groups; for each plant / station group, calculate the comprehensive confidence score based on the time-aware representation vector of each event within the plant / station group and the attention weight matrix; determine the risk propagation edge set from each event based on the comprehensive confidence score; construct the risk state vector of each event within the plant / station group and the plant / station risk state vector of each plant / station based on the risk propagation edge set; aggregate the plant / station risk state vectors of each plant / station to obtain the global risk state vector; S4: Slide time windows across the optimized event sequence at preset step sizes. For each time window, construct a corresponding dynamic risk graph based on the risk state vector of each event, the plant risk state vector, and the risk propagation edge set within the time window. Perform graph embedding encoding on each dynamic risk graph to obtain a corresponding graph embedding vector. Extract risk evolution trend indicators based on the dynamic risk graph corresponding to each time window, and select high-risk propagation chains from each dynamic risk graph. Calculate the corresponding system risk score based on the graph embedding vector, risk evolution trend indicators, high-risk propagation chains, and the global risk state vector for each time window.
2. The method according to claim 1, characterized in that, S1 includes: One-hot encoding is performed on each dimension of each event to obtain the one-hot vector corresponding to the dimension; The one-hot vectors of each dimension are input into the corresponding embedding layer and mapped to the corresponding embedding vectors of the dimension through matrix multiplication. The embedding vectors of each dimension of each event are concatenated along the feature dimension to obtain the initial fused embedding vector of each event. The initial fusion embedding vector is input into the gated fusion layer. The gated vector is calculated using a preset gated weight matrix and a gated bias vector. The gated vector is then multiplied element-wise with the initial fusion embedding vector to obtain the event embedding vector for each event. Based on the timestamp of each event, the events are arranged in ascending order according to the timestamp to form the optimized event sequence.
3. The method according to claim 1, characterized in that, The time-aware attention encoder includes a factor calculation layer and L stacked attention layers, where L is an integer greater than 1; each of the attention layers contains H attention heads, where H is a positive integer; The step S2 includes: calculating the absolute value of the time interval between any two events according to the timestamp of each of the events, to construct a time interval matrix; substituting each time interval in the time interval matrix into a time decay kernel function including a decay rate parameter and a shape parameter through the factor calculation layer, to calculate the corresponding time decay factor, and construct a time decay factor matrix; for the l-th layer in the time-aware attention encoder, taking the first representation vector of each of the events output by the (l-1)-th layer as the input representation vector of the l-th layer; where l=1, 2, ..., L, and when l=1, the first representation vector is the event embedding vector; performing linear transformation on the input representation vector of each of the events through the query projection matrix, the key projection matrix and the value projection matrix of the l-th layer respectively, to obtain the query vector, the key vector and the value vector of the l-th layer; calculating the dot product of the query vector of each of the events and the key vectors of all the events to obtain the dot product result vector corresponding to the event, and combining the dot product result vectors of all the events to form the initial attention score matrix of the l-th layer; dividing the initial attention score matrix of the l-th layer by a preset scaling factor to obtain the standard attention score matrix of the l-th layer; performing element-wise multiplication on the standard attention score matrix of the l-th layer and the time decay factor matrix to obtain the time-modulated attention score matrix of the l-th layer; performing Softmax normalization on each row of the time-modulated attention score matrix of the l-th layer to obtain the time-aware attention weight matrix of the l-th layer; the time-aware attention weight matrix includes a plurality of the time-aware attention weights; performing weighted summation on the value vectors of the l-th layer of all the events according to the time-aware attention weight matrix of the l-th layer, to obtain the output vector of each attention head in the l-th layer; concatenating the output vectors of the H attention heads of the l-th layer in the feature dimension, and performing linear transformation on the concatenated vector through the output projection matrix of the l-th layer, to obtain the second representation vector of each event in the l-th layer; when l<L, taking the second representation vector of the l-th layer as the input representation vector of the (l+1)-th layer to continue encoding; traversing each of the attention layers, and when l=L, taking the second representation vector of the L-th layer as the time-aware representation vector of each of the events, and storing the time-aware attention weight matrix of each attention head in each of the attention layers, to obtain the attention weight matrix of each of the attention layers.
4. The method according to claim 1, characterized in that, In the step S3, each of the events is grouped to obtain a plurality of plant and station groups; for each of the plant and station groups, calculating a comprehensive confidence level based on the time-aware representation vector of each event in the plant and station group and the attention weight matrix; determining a risk propagation edge set from all the events based on the comprehensive confidence level, including: Each event is divided into different plant groups based on the plant identifier of each event; For each plant group, the time-aware representation vectors of all events within the plant group are mapped to the risk semantic space through a preset risk projection matrix to obtain the risk semantic vector of each event. The dot product of the risk semantic vectors of any two events within the plant group is calculated to obtain the first dot product result. The first dot product result is activated through the Sigmoid activation function to obtain the risk transmission strength between any two events within the plant group. The risk transmission strength of each event pair is combined to construct a risk transmission strength matrix. The average attention weight matrix is obtained by averaging the attention weight matrices of all attention layers; the risk transmission intensity matrix is multiplied element-wise by the average attention weight matrix to obtain the comprehensive confidence matrix; wherein each element in the comprehensive confidence matrix is the comprehensive confidence of the corresponding event pair. Elements whose values exceed a preset confidence threshold are selected from the comprehensive confidence matrix, and the event pairs corresponding to each element are obtained as directed event pairs; the directed event pairs are defined as risk transmission edges within the plant group, and the corresponding comprehensive confidence is used as the weight of the risk transmission edges within the plant; wherein, the starting event of the directed event pair points to the ending event. The risk transmission edge set is obtained by summing all the risk transmission edges within the plant groups.
5. The method according to claim 4, characterized in that, In S3, the risk state vector of each event within the plant group and the plant risk state vector of each plant are constructed based on the risk transmission edge set. By aggregating the risk state vectors of each of the aforementioned plants, a global risk state vector is obtained, including: For each event, find all preceding events pointing to the event according to the risk propagation edge set, sum the time-aware representation vectors of each preceding event according to the corresponding comprehensive confidence level, and obtain a weighted summation result. Add the weighted summation result to the event's own time-aware representation vector, and activate the summation result through the ReLU activation function to obtain the risk state vector of the event. For each of the plant groups, the attention score of the risk state vector of each event in the plant group is calculated by a preset attention score vector. The attention scores of each event are normalized by Softmax to obtain the risk attention weight of each event. Based on the risk attention weight of each event, the risk state vectors of all events in the plant group are weighted and summed to obtain the plant risk state vector of the plant. The risk state vectors of each plant are stacked into a plant state matrix. The plant state matrix is linearly transformed using a preset plant-level query projection matrix and a plant-level key projection matrix to obtain a plant-level query matrix and a plant-level key matrix. Cross-plant attention scores are calculated based on the plant-level query matrix and the plant-level key matrix. The cross-plant attention scores are then Softmax normalized to obtain cross-plant attention weights. The risk state vectors of all plants are weighted and summed based on the cross-plant attention weights to obtain the global risk state vector.
6. The method according to claim 5, characterized in that, In step S4, a time window slides across the optimized event sequence at a preset step size. For each time window, a corresponding dynamic risk map is constructed based on the risk state vector of each event within the time window, the plant risk state vector, and the risk transmission edge set, including: Based on a preset time window length, the time window is slid across the optimized event sequence according to the preset step size to obtain multiple time windows; For each time window, all events falling within the time window are extracted, event nodes are constructed based on the risk state vectors of each event within the time window, and virtual nodes of plants are constructed based on the plant risk state vectors of each plant associated with the time window. The risk state vectors are used as node features corresponding to the event nodes, and the plant risk state vectors are used as node features corresponding to the virtual nodes of the plants. The edges in the risk transmission edge set within the plant where both ends of the event belong to the time window are used as directed edges between the event nodes. Based on the cross-plant attention weight, directed edges are established between the virtual nodes of the plant and the event nodes with the largest magnitude of the risk state vector within the plant, thus obtaining the dynamic risk map of the time window.
7. The method according to claim 6, characterized in that, The risk evolution trend indicators include the risk intensity change rate, average propagation speed, and connectivity indicators; In step S4, graph embedding encoding is performed on each of the dynamic risk maps to obtain the corresponding graph embedding vector; risk evolution trend indicators are extracted based on the dynamic risk maps corresponding to each time window, and high-risk propagation chains are screened out from each of the dynamic risk maps, including: For each of the dynamic risk graphs, a graph isomorphic network is used to encode the dynamic risk graph in multiple layers to obtain the graph embedding vector of each node in the dynamic risk graph. The global attention score of the graph embedding vector of each node is calculated by a preset global attention score vector. The global attention scores of each node are normalized using Softmax to obtain the global attention weight of each node. The graph embedding vectors of all nodes are then weighted and summed based on the global attention weight of each node to obtain the overall graph embedding vector of the time window. The Euclidean distance is calculated for the overall graph embedding vectors of adjacent time windows, and the Euclidean distance is used as the risk intensity change rate corresponding to adjacent time windows. The average propagation speed of all directed edges in the dynamic risk graph of the time window is calculated as the average propagation speed. The proportion of the number of nodes in the maximum connected component of the dynamic risk graph of the time window to the total number of nodes in the dynamic risk graph is calculated as the connectivity index. In the dynamic risk graph, a depth-first search algorithm is used to select directed paths with a length of not less than 3. The average of the comprehensive confidence scores of each edge on each directed path is calculated as the path strength of the directed path. Directed paths whose path strength exceeds a preset path strength threshold are marked as high-risk propagation chains corresponding to the dynamic risk graph.
8. A risk assessment system for wind-solar hybrid power generation systems, characterized in that, The system includes: An event encoding module is used to acquire an alarm event sequence containing multiple events; to encode the multi-dimensional attributes of each event to obtain an event embedding vector for each event; and to construct an optimized event sequence based on the event embedding vectors of each event; wherein, the multi-dimensional attributes of each event include a timestamp, event type, and plant / station identifier; A time-aware module is used to calculate the time interval between any two events based on the timestamps of each event; input the event embedding vectors of each event into a time-aware attention encoder to generate a time decay factor based on the time interval; perform attention modulation based on the time decay factor and the event embedding vectors of each event to obtain time-aware attention weights; encode each event embedding vector based on the time-aware attention weights to output the time-aware representation vectors of each event and the attention weight matrix corresponding to each attention layer of the time-aware attention encoder; The risk propagation module is used to group the events into multiple plant / station groups; for each plant / station group, a comprehensive confidence score is calculated based on the time-aware representation vector of each event within the plant / station group and the attention weight matrix; a risk propagation edge set is determined from each event based on the comprehensive confidence score; a risk state vector for each event within the plant / station group and a plant / station risk state vector for each plant / station are constructed based on the risk propagation edge set; and the plant / station risk state vectors of each plant / station are aggregated to obtain a global risk state vector. The dynamic evaluation module is used to slide time windows over the optimized event sequence at preset step sizes. For each time window, a corresponding dynamic risk graph is constructed based on the risk state vector of each event, the plant risk state vector, and the risk propagation edge set within the time window. Graph embedding encoding is performed on each dynamic risk graph to obtain a corresponding graph embedding vector. Risk evolution trend indicators are extracted based on the dynamic risk graph corresponding to each time window, and high-risk propagation chains are screened from each dynamic risk graph. Based on the graph embedding vector, risk evolution trend indicators, high-risk propagation chains, and the global risk state vector of each time window, the corresponding system risk score is calculated.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
