A power system climbing constraint redundancy screening method based on time attention mechanism

By adopting a time attention mechanism-based approach, the problem of redundancy determination of ramp constraints in SCUC was solved, enabling effective screening of ramp constraints and improving the solution efficiency and accuracy of power system dispatching models.

CN122394093APending Publication Date: 2026-07-14SOUTHEAST UNIV +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTHEAST UNIV
Filing Date
2026-04-23
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In the Safety Constrained Unit Combination Problem (SCUC), existing technologies rely on static thresholds or local time-period analysis for redundancy determination of ramp constraints. This makes it difficult to characterize the long-term temporal dependencies of unit output changes, leading to an increase in the size of the scheduling model and the complexity of the solution.

Method used

A time-attention-based approach is adopted. By constructing a time-series sample dataset, time-frequency features are extracted and enhanced. Encoders and decoders are used to extract aggregated features across time steps. Combined with an adaptive threshold strategy and a loss function for class imbalance, the effectiveness of climbing constraints and redundancy screening are achieved.

Benefits of technology

It improves the accuracy and stability of climbing constraint redundancy judgment, reduces the solution complexity of the scheduling model, and improves the computational efficiency of SCUC.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122394093A_ABST
    Figure CN122394093A_ABST
Patent Text Reader

Abstract

The application discloses a power system climbing constraint redundancy screening method based on a time attention mechanism, deep time sequence modeling is performed on a load time sequence, so that the triggering law of the climbing constraint is more accurately represented, and the accuracy of constraint redundancy discrimination is improved; time-frequency enhancement processing is introduced before time attention coding, feature information of the load sequence in the time domain and the frequency domain is fused, the comprehensive perception ability of the model to the periodic change and short-time fluctuation characteristics of the load is effectively enhanced, and therefore the stability and reliability of climbing constraint effectiveness identification are improved; a time interval modulation strategy is introduced in the time attention modeling process, so that the model can adaptively focus on key historical information related to the climbing constraint under different time scales, and effectively screens the redundant climbing constraint without relying on complex physical rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system dispatching technology, and in particular to a power system ramp constraint redundancy screening method based on a time attention mechanism. Background Technology

[0002] The Security Constrained Unit Commitment (SCUC) problem involves various operational constraints, including ramping constraints, power flow constraints, and power balance constraints. Among these, ramping constraints, used to limit the rate of change in unit output between adjacent time periods, are a crucial type of constraint for ensuring the dynamic and safe operation of the power system. As the scale of power systems continues to expand, the number and role of ramping constraints in dispatching models are becoming increasingly prominent. In actual operation, many units experience relatively gradual output changes for most time periods, and their corresponding ramping constraints do not substantially affect the final unit combination scheme, thus constituting redundant constraints. However, dispatching models typically still need to explicitly introduce ramping constraints for all units and all time periods, leading to a significant increase in model size and solution complexity. Therefore, how to determine the effectiveness of ramping constraints and filter redundant ramping constraints while ensuring dispatching safety has become one of the key issues in improving the efficiency of SCUC solution.

[0003] Existing research on reducing the computational complexity of SCUC (Standardized Scaling Constraints) mainly focuses on constraint relaxation, model decomposition, or rule-based selection methods based on physical experience. Research on ramp constraints often relies on static threshold judgments or local time-period analysis, making it difficult to characterize the long-term temporal dependencies of unit output changes. Furthermore, the triggering of ramp constraints exhibits significant time-varying and nonlinear characteristics; their binding is not only related to the current load level but also closely related to historical output trajectories and future scheduling trends. Selection methods based solely on physical models or local information are unlikely to achieve ideal results. Summary of the Invention

[0004] Purpose of the invention: This invention provides a method for screening the redundancy of ramp constraints in power systems based on a time attention mechanism. By judging the effectiveness and redundancy of ramp constraints on generating units, it provides a reference for the selection and management of ramp constraints in subsequent scheduling models.

[0005] Technical solution: The present invention provides a power system ramp constraint redundancy screening method based on time attention mechanism, comprising the following steps:

[0006] Step 1: Collect historical load data, upper and lower limits of unit output, and corresponding ramp constraint status data of each node in the power system to construct a time series sample dataset;

[0007] Step 2: Clean and time-align the collected raw data, and use a sliding window mechanism to divide the data into multiple consecutive time segments to form an input sample matrix and a corresponding label matrix;

[0008] Step 3: Extract time-frequency features from the input sample matrix, concatenate the extracted time-domain features and frequency-domain features, and pass them through a fully connected layer to obtain the input representation after time-frequency enhancement.

[0009] Step 4: Input the time-frequency enhanced input representation into the encoder and output the time context representation;

[0010] Step 5: Input the time context representation into the decoder for feature integration, extract cross-time step aggregated features that can reflect the overall operating trend of the system, and map the features to the feature subspace corresponding to each unit to generate a prediction vector corresponding to the ramp-up constraint state of each unit.

[0011] Step 6: Use the Sigmoid activation function to map the output to the interval [0, 1] to obtain the constrained effective probability matrix. Then, convert the probability output into a binary prediction result using a preset or adaptive threshold strategy.

[0012] Step 7: Using the load feature window as input, predict the constraint state of the ramp label window, and use the loss function targeting the class imbalance characteristics as the main optimization objective.

[0013] Step 8: Use the validation set data to evaluate the model performance, calculate the accuracy, recall, precision and F1 score, update the model's hyperparameters based on the validation results, and finally obtain a stable model that can identify redundant ramp constraints.

[0014] Furthermore, in step 1, when the rate of change of unit output reaches or exceeds its ramp-up / ramp-down limit, the ramp constraint is considered to be triggered (effective) at that moment and is marked as 1; when the change of unit output does not reach the constraint boundary, the ramp constraint is considered not triggered (redundant) and is marked as 0.

[0015] Furthermore, in step 2, a sliding window mechanism is used to divide the data into multiple consecutive time segments, specifically including the following steps:

[0016] Step 21: The dimension of the input sample matrix is... Where D represents the number of days, L represents the length of the time step per day, and N represents the number of load nodes in the power grid. The corresponding label matrix dimension is... Where G represents the number of generating units in the power grid;

[0017] Step 22: The sliding window mechanism uses a fixed-length time window and slides along the time axis with a preset step size to construct multiple consecutive time series samples. The input feature window length is set to 24 or 48 hours, the prediction length is set to 24 hours, and the sliding step size is set to 6 hours. The input feature sequence and the predicted label sequence are shown in the following formula:

[0018]

[0019]

[0020] In the formula: X i The feature sequence within the i-th time window contains T in Node load data at each time step; Y i This represents the predicted label sequence corresponding to the i-th time window, containing T. out The climbing constraint state data for each time step.

[0021] Furthermore, in step 3, a frequency domain transformation is performed on the input feature sequence along the time dimension to extract a frequency domain representation that characterizes the periodicity of load changes; frequency domain components related to periodic changes are selected from the frequency domain representation, and their features are combined and statistically aggregated to obtain a frequency domain enhanced representation; the frequency domain enhanced representation is concatenated with the time domain features and fused through a mapping layer to form an input representation for subsequent time attention coding.

[0022] Furthermore, in step 4, the encoder includes a temporal attention module, a feedforward network module, a residual connection module, and a normalization module. These modules are connected in series in a hierarchical order to form the encoding structure. The input representation first enters the temporal attention module, which models the correlation between different time steps in the time series, obtaining a preliminary temporal feature representation. Subsequently, the output is superimposed on the module input through the residual connection module, and then normalized by the normalization module to improve training stability. Based on this, the normalized features are input to the feedforward network module for nonlinear feature transformation to enhance feature expressive power. The output of the feedforward network module is also fused with its input through the residual connection and normalized again to obtain the final encoded output representation.

[0023] In the temporal attention module, the input representation is linearly mapped to obtain the query vector corresponding to the h-th attention head. Key vector and value vector Based on this, an attention scoring function is constructed; when calculating the attention score between any i-th time step and j-th time step, the time interval information between the two is introduced. The attention score is modulated using a time decay function, and the modulated attention score is... The expression is as follows:

[0024]

[0025] In the formula: This represents the time interval between the i-th time step and the j-th time step; This is a time-interval-based decay function used to characterize the decay relationship of the correlation between different time steps as the time interval changes; The learnable time scale parameter corresponding to the h-th attention head is used to control the attention range of this attention head for features across different time spans. This represents the average value of the time decay function under the current attention head, and is used to center the time modulation term; The time modulation amplitude coefficient is used to control the intensity of the influence of time interval information on attention scores. This represents the feature dimension corresponding to a single attention head. By incorporating time interval information into the attention scoring calculation process through multiplicative modulation, different attention heads can adaptively focus on key temporal features at different time scales, thereby improving the model's ability to model the temporal characteristics of load changes and the triggering patterns of ramp constraints.

[0026] Furthermore, in step 5, the decoder includes a temporal self-attention layer for modeling the temporal correlation within the decoder input load time series; a cross-attention layer for modeling the correlation between the decoder input load time series and the temporal context representation of the encoder output; a feedforward mapping layer for performing nonlinear feature mapping on the attention output results; and a normalization layer and residual connections for improving the stability of the decoding process. Through the above decoding process, cross-time-step aggregated features reflecting the system's operating trend are extracted, and these features are mapped to the unit-level output space to generate prediction vectors that characterize the effectiveness of the unit's ramp-up constraints at each time step.

[0027] Furthermore, in step 6, the Sigmoid activation function is used to map the model output, converting continuous output values ​​into probability values ​​in the interval [0,1] to obtain a probability matrix characterizing whether the ramp constraint is effective at each time step. The probability values ​​reflect the model's confidence in the ramp constraint being in a bound state. Based on a preset threshold or adaptive threshold strategy, the probability matrix is ​​processed to convert the probability output into a binary prediction result, thereby determining the effectiveness or redundancy of the ramp constraint for each unit at each time step.

[0028] Furthermore, in step 7, the model training uses a loss function targeting class imbalance as the optimization objective. This loss function consists of a focus loss term and a regularization term, and its expression is shown below:

[0029]

[0030] The focus loss term is defined as follows:

[0031]

[0032] Where: h i y represents the model's original output for the i-th sample. i α represents the true label of the corresponding climbing constraint; α is the class balancing factor, used to increase the loss weight of a few positive samples in the climbing constraint; γ is the focusing factor, used to reduce the contribution of easily classified samples to the loss function; p i This indicates the confidence level that the model's prediction of the sample is correct;

[0033] The regularization term is defined as follows:

[0034]

[0035] In the formula: This represents the set of trainable parameters for the model, where λ is the regularization coefficient used to prevent overfitting. The loss function design described above improves the model's training stability and recognition accuracy when the proportion of positive samples in the climbing constraint is extremely low.

[0036] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages: By performing deep time series modeling on the load time series, the triggering rules of the ramp constraint are more accurately characterized, improving the accuracy of constraint redundancy judgment; by introducing time-frequency enhancement processing before time attention encoding, the model's comprehensive perception ability of load periodic changes and short-term fluctuations is effectively enhanced by fusing the feature information of the load sequence in the time and frequency domains, thereby improving the stability and reliability of ramp constraint validity identification; by introducing a time interval modulation strategy in the time attention modeling process, the model can adaptively focus on key historical information related to ramp constraints at different time scales, achieving effective screening of redundant ramp constraints without relying on complex physical rules. Attached Figure Description

[0037] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0038] Figure 2 This is a schematic diagram illustrating the input and label construction of the sliding window mechanism of this invention.

[0039] Figure 3This is a schematic diagram of time-frequency feature extraction according to the present invention.

[0040] Figure 4 This is a schematic diagram of the encoder layer of the present invention.

[0041] Figure 5 This is a loss diagram of the training and validation sets for this invention.

[0042] Figure 6(a) shows the accuracy of the validation set of this invention.

[0043] Figure 6(b) shows the recall rate of the validation set of this invention. Detailed Implementation

[0044] like Figure 1 As shown, a power system ramp constraint redundancy screening method based on time attention mechanism includes the following steps:

[0045] S1. Data Preparation. Collect historical load data, upper and lower limits of unit output, and corresponding ramp constraint status data for each node in the power system. When the rate of change of unit output reaches or exceeds its ramp-up / ramp-down limit, the ramp constraint is considered to be triggered (effective) and marked as 1. When the change of unit output does not reach the constraint boundary, the ramp constraint is considered not triggered (redundant) and marked as 0. This constructs a time series sample dataset.

[0046] S2. Data Preprocessing. The collected raw data is cleaned and time-aligned; a sliding window mechanism is used to divide the data into multiple consecutive time segments, each containing a fixed-length time step, to capture the dynamic trends of load changes; an input sample matrix is ​​formed. Where M represents the number of samples, L represents the time window length, and N represents the number of nodes; the corresponding label matrix is , where G is the number of units, and represents the binding status of the ramp constraint at each time.

[0047] S3. Input Time-Frequency Enhancement Processing. Time-frequency features are extracted from the input sample matrix. A linear layer is used to extract time-domain features, and a Fast Fourier Transform (FFT) is used to extract frequency-domain features. The extracted time-domain and frequency-domain features are concatenated and then passed through a fully connected layer to obtain the time-frequency enhanced input representation. Where B is the batch number and d is the representation dimension, in order to enhance the model's ability to express the characteristics of periodic load fluctuations and sudden changes.

[0048] S4, Encoding Stage. The time-frequency enhanced input representation is input to the encoder, such as... Figure 4As shown, the encoder consists of position encoding, a feedforward neural network, a multi-head temporal attention mechanism, and a normalization layer. The temporal attention module adaptively aggregates key temporal information by calculating the correlation weights between different time steps, thereby obtaining an encoded representation containing temporal dependencies. The encoder outputs a temporal context representation. .

[0049] S5. Decoding Stage. The temporal context representation output by the encoder is input to the decoder, which consists of a temporal self-attention layer, a cross-attention layer, a normalization layer, and a feedforward mapping layer. Cross-time-step aggregated features reflecting the system's operational trend are extracted and mapped to the unit-level output space to generate a prediction vector. .

[0050] S6. Output Mapping and Prediction Generation. The Sigmoid activation function is used to map the output to the interval [0, 1], resulting in the constrained effective probability matrix. The probability output is converted into a binary prediction result through a preset or adaptive threshold strategy.

[0051] S7. Model Training. Using the load feature window as input, predict the constraint state of the climbing label window. Employ a loss function targeting class imbalance as the primary optimization objective to improve the model's ability to identify the minority class in climbing constraint samples.

[0052] S8. Model Validation and Optimization. The model performance is evaluated using the validation set data, and metrics such as accuracy, recall, precision, and F1 score are calculated. Based on the validation results, the model's hyperparameters are updated to obtain a stable model that can identify redundant ramping constraints.

[0053] In S2:

[0054] Load and ramp constraint data from the IEEE 118-bus system were used. The dimensions of the load characteristic matrix are [dimensions missing]. Here, 1440 represents a time span of 1440 days, 24 represents that each day contains 24 time steps, and 118 represents 118 load nodes in the power grid. The corresponding label matrix dimension is... , where 54 represents the ramp-up constraint status of 54 generating units in the power grid.

[0055] like Figure 2As shown, to convert continuous load time series into a sample format suitable for model training, a sliding window mechanism is used to construct the input feature sequence and the corresponding predicted label sequence. A fixed-length historical load segment is used as the model input, and the ramp constraint state corresponding to subsequent time periods within the aforementioned historical segment is used as the prediction target. The time span of the historical load sequence is set to 48 hours; the time span corresponding to the prediction target is set to 24 hours; and the time shift interval between adjacent samples is set to 6 hours, meaning that the input sequence and the corresponding predicted label sequence are reconstructed by shifting 6 time steps forward along the time axis each time, until the entire time series data range is covered. The mathematical representations of the input feature sequence and the predicted label sequence are shown in the following equations.

[0056]

[0057]

[0058] In the formula: X i The feature sequence within the i-th time window contains T in Node load data at each time step; Y i This represents the predicted label sequence corresponding to the i-th time window, containing T. out The climbing constraint state data for each time step.

[0059] In S3:

[0060] like Figure 3 As shown, time-frequency enhancement processing is performed on the input load time series before time attention encoding. Specifically, the input load time series is... Where B represents the batch number, L represents the time step length, and N represents the number of nodes.

[0061] (1) Frequency domain feature extraction and aggregation. A fast Fourier transform is performed on the input load time series X along the time dimension to obtain its frequency domain representation. The first k low-frequency components are selected from the frequency domain representation to form a low-frequency frequency domain feature subset. The real and imaginary parts of the low-frequency domain features are extracted separately and concatenated along the frequency dimension to obtain the real-valued frequency domain feature representation. The frequency domain feature F is statistically aggregated along the node dimension. Mean aggregation is used to compress the node dimension, resulting in the frequency domain enhancement vector. To align the frequency domain enhancement features with the time series structure, the frequency domain enhancement vector is extended along the time dimension to obtain the frequency domain enhancement feature sequence. .

[0062] (2) Time-frequency feature extraction and time-frequency fusion. Simultaneously, the input load time series X is processed through a linear mapping layer to extract time-domain features, resulting in a time-domain feature representation. , where d time This represents the temporal feature dimension. The temporal feature T and its corresponding frequency domain enhancement feature F... enh By concatenating the features along the feature dimension, a joint time-frequency feature representation is obtained. Subsequently, the time-frequency joint features are nonlinearly mapped and their dimensions adjusted through a mapping fusion layer, projecting them onto a unified model feature space to obtain the time-frequency fusion input representation. The time-frequency fusion input represents the input to the subsequent time attention coding module, used to model the temporal characteristics of the load time series.

[0063] In S4:

[0064] In the multi-head attention framework, query vectors, key vectors, and value vectors are constructed through linear mapping, and features are mapped to multiple attention subspaces to capture the temporal correlation features of the load time series in different representation subspaces.

[0065] When calculating the attention score between any two time steps, the time interval information between the corresponding time steps is introduced to modulate the attention score, so as to enhance the model's ability to characterize the temporal dependencies of different time spans. The modulated attention score is calculated as shown in the following formula.

[0066]

[0067] In the formula: This represents the time interval between the i-th time step and the j-th time step; This is a time-interval-based decay function used to characterize the decay relationship of the correlation between different time steps as the time interval changes; The learnable time scale parameter corresponding to the h-th attention head is used to control the attention range of this attention head for features across different time spans. This represents the average value of the time decay function under the current attention head, and is used to center the time modulation term; The time modulation amplitude coefficient is used to control the intensity of the influence of time interval information on attention scores. This represents the feature dimension corresponding to a single attention head.

[0068] By setting independent timescale parameters for different attention heads in a multi-head attention mechanism, each attention head can focus on temporal dependence features within different time spans, thereby enabling parallel modeling of short-term fluctuations and long-term variations in load time series. For example... Figure 4As shown, the outputs of each attention head are fused along the feature dimension, and combined with residual connections and normalization processing to form a high-level feature representation of the time series. This is used to predict the climbing constraint state in the subsequent decoding stage.

[0069] In S5:

[0070] The temporal context features output from the encoding stage are used as memory sequences and input into the decoder, while the load time series features within the corresponding time range are used as the decoder's input sequence. The decoder employs an attention-based decoding structure, whose module organization can be implemented with reference to the Transformer decoder structure, including a temporal self-attention layer, a cross-attention layer, and a feedforward mapping layer. Both the temporal self-attention layer and the cross-attention layer use the same time interval modulation attention mechanism as the encoding stage. After completing the attention feature modeling, the decoder output is processed by the feedforward mapping layer and combined with residual connections and normalization operations to obtain the unit-level output feature representation. It is used to generate prediction results of the effectiveness of the ramp constraint for each unit at each time step.

[0071] In S6:

[0072] A sigmoid activation function is used to map the model output, converting continuous output values ​​into probability values ​​in the interval [0,1] to obtain a probability matrix characterizing whether the ramp constraint is effective at each time step. The probability values ​​reflect the model's confidence that the ramp constraint is in a bound state.

[0073] Based on a preset threshold or adaptive threshold strategy, the probability matrix is ​​processed to convert the probability output into a binary prediction result, thereby enabling the determination of the effectiveness or redundancy of the ramp constraint for each unit at each time step.

[0074] In S7:

[0075] Based on the model output and the corresponding true labels of the climbing constraints, a focus loss function is constructed as the main loss term. This focus loss, building upon the binary cross-entropy loss, introduces a class balance factor and a focus factor. By assigning higher weights to difficult-to-classify samples and reducing the impact of easily-classified samples on the overall loss, the model is guided to pay more attention to the few positive samples in the climbing constraints.

[0076]

[0077]

[0078]

[0079] In the formula: N is the sample size, h i y represents the model's original output for the i-th sample. i For the corresponding ramp constraint true label; L BCE (h i , y i ) is the binary cross-entropy loss for the i-th sample; α is the class balance factor, used to increase the loss weight of a few positive samples in the climbing constraint; γ is the focusing factor, used to control the sensitivity of the loss function to samples with low prediction confidence; p i This indicates the confidence level that the model's prediction of the sample is correct;

[0080] Based on the focus loss term, a parameter regularization term is introduced to constrain the trainable parameters of the model, as shown in the following equation, to suppress model complexity and reduce the risk of overfitting, thereby improving the model's generalization ability in different operating scenarios. The final loss function is the sum of the focus loss and the regularization term.

[0081]

[0082] In the formula: This represents the set of trainable parameters for the model, where λ is the regularization coefficient used to prevent overfitting.

[0083] Figure 5 The diagram shows how the training set loss (solid line) and validation set loss (dashed line) of the model change over 300 iterations (epochs).

[0084] In the early stages of training, the training set loss function decreased rapidly, indicating that the model can quickly capture the fundamental mapping relationship between power system load and ramping constraints. Around the 100th iteration, the validation set loss showed a significant, sharp drop, and subsequently maintained a stable downward trend in sync with the training set loss. Ultimately, both curves converged smoothly to lower values, and the validation set did not rebound, demonstrating the strong robustness of the encoder and decoder structure incorporating a temporal attention mechanism described in this invention, effectively avoiding overfitting.

[0085] Figure 6(a) shows the accuracy curve as a function of iteration rounds. Although there are some fluctuations in the early stage, it steadily increases after the 100th round and eventually stabilizes above 0.97. Figure 6(b) shows the recall curve as a function of iteration rounds. It steadily increases with the number of iteration rounds and eventually stabilizes above 0.98.

[0086] Experimental results show that the high recall rate enables this method to effectively capture the vast majority of valid ramp constraints, reducing the risk of missed detections. Simultaneously, the high accuracy significantly reduces false positives for redundant constraints, improving the screening quality. Experiments demonstrate that this invention can achieve accurate identification of ramp constraint states in power systems, significantly improving the overall performance of redundant constraint screening.

Claims

1. A method for screening redundancy due to ramp constraints in power systems based on a time attention mechanism, characterized in that, Includes the following steps: Step 1: Collect historical load data, upper and lower limits of unit output, and corresponding ramp constraint status data of each node in the power system to construct a time series sample dataset; Step 2: Clean and time-align the collected raw data, and use a sliding window mechanism to divide the data into multiple consecutive time segments to form an input sample matrix and a corresponding label matrix; Step 3: Extract time-frequency features from the input sample matrix, concatenate the extracted time-domain features and frequency-domain features, and pass them through a fully connected layer to obtain the input representation after time-frequency enhancement. Step 4: Input the time-frequency enhanced input representation into the encoder and output the time context representation; Step 5: Input the time context representation into the decoder for feature integration, extract cross-time step aggregated features that can reflect the overall operating trend of the system, and map the features to the feature subspace corresponding to each unit to generate a prediction vector corresponding to the ramp-up constraint state of each unit. Step 6: Use the Sigmoid activation function to map the output to the interval [0, 1] to obtain the constrained effective probability matrix. Then, convert the probability output into a binary prediction result using a preset or adaptive threshold strategy. Step 7: Using the load feature window as input, predict the constraint state of the ramp label window, and use the loss function targeting the class imbalance characteristics as the main optimization objective. Step 8: Use the validation set data to evaluate the model performance, calculate the accuracy, recall, precision and F1 score, update the model's hyperparameters based on the validation results, and finally obtain a stable model that can identify redundant ramp constraints.

2. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 1, when the rate of change of unit output reaches or exceeds its ramp-up / ramp-down limit, the ramp constraint is considered to be triggered and effective at that moment, and is marked as 1; when the change of unit output does not reach the constraint boundary, the ramp constraint is considered not triggered and redundant, and is marked as 0.

3. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 2, a sliding window mechanism is used to divide the data into multiple consecutive time segments, specifically including the following steps: Step 21: The dimension of the input sample matrix is... Where D represents the number of days, L represents the length of the time step per day, and N represents the number of load nodes in the power grid, the corresponding label matrix dimension is... Where G represents the number of generating units in the power grid; Step 22: The sliding window mechanism uses a fixed-length time window and slides along the time axis with a preset step size to construct multiple consecutive time series samples; The input feature window length is set to 24 or 48 hours, the prediction length is set to 24 hours, and the stride is set to 6 hours. The input feature sequence and the predicted label sequence are shown in the following formula: In the formula: X i The feature sequence within the i-th time window contains T in Node load data at each time step; Y i This represents the predicted label sequence corresponding to the i-th time window, containing T. out The climbing constraint state data for each time step.

4. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 3, a frequency domain transformation is performed on the input feature sequence along the time dimension to extract the frequency domain representation that characterizes the periodicity of load changes; frequency domain components related to periodic changes are selected from the frequency domain representation, and their features are combined and statistically aggregated to obtain the frequency domain enhanced representation; the frequency domain enhanced representation is concatenated with the time domain features and fused through a mapping layer to form the input representation used for subsequent time attention coding.

5. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 4, the encoder includes a time attention module, a feedforward network module, a residual connection module, and a normalization module. Each module is connected in series in a hierarchical order to form an encoding structure. The input representation first enters the time attention module to model the correlation between different time steps in the time series and obtain a preliminary temporal feature representation. Subsequently, the output is superimposed on the module input through the residual connection module, and then normalized by the normalization module to improve training stability. On this basis, the normalized features are input to the feedforward network module for nonlinear feature transformation to enhance feature representation capability. The output of the feedforward network module is also fused with its input through the residual connection and normalized again to obtain the final encoded output representation.

6. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 5, characterized in that, In the temporal attention module, the input representation is linearly mapped to obtain the query vector corresponding to the h-th attention head. Key vector and value vector Based on this, an attention scoring function is constructed; when calculating the attention score between any i-th time step and j-th time step, the time interval information between the two is introduced. The attention score is modulated using a time decay function, and the modulated attention score is... The expression is as follows: In the formula: This represents the time interval between the i-th time step and the j-th time step; This is a time-interval-based decay function used to characterize the decay relationship of the correlation between different time steps as the time interval changes; The learnable time scale parameter corresponding to the h-th attention head is used to control the attention range of this attention head for features across different time spans. This represents the average value of the time decay function under the current attention head, and is used to center the time modulation term; The time modulation amplitude coefficient is used to control the intensity of the influence of time interval information on attention scores. This represents the feature dimension corresponding to a single attention head.

7. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 5, the decoder includes a temporal self-attention layer, which is used to model the temporal correlation within the time series of the decoder input load; Cross-attention layers are used to model the relationship between the time series of the decoder input payload and the temporal context representation of the encoder output; The feedforward mapping layer is used to perform non-linear feature mapping on the attention output; Normalization layers and residual connections are used to improve the stability of the decoding process. Through the above decoding process, cross-time step aggregated features reflecting the system operation trend are extracted and mapped to the output space at the unit level to generate prediction vectors that characterize the effectiveness of the unit's ramp-up constraint at each time step.

8. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 6, the Sigmoid activation function is used to map the model output, converting continuous output values ​​into probability values ​​in the interval [0,1] to obtain a probability matrix characterizing whether the ramp constraint is effective at each time step. The probability values ​​reflect the confidence level of the model in the ramp constraint being in a bound state. Based on a preset threshold or adaptive threshold strategy, the probability matrix is ​​processed to convert the probability output into a binary prediction result, thereby enabling the determination of the effectiveness or redundancy of the ramp constraint for each unit at each time step.

9. The power system ramp constraint redundancy screening method based on time attention mechanism as described in claim 1, characterized in that, In step 7, the model training uses a loss function targeting class imbalance as the optimization objective. The loss function consists of a focus loss term and a regularization term, and its expression is shown in the following equation: The focus loss term is defined as follows: Where: h i y represents the model's original output for the i-th sample. i α represents the true label of the corresponding climbing constraint; α is the class balancing factor, used to increase the loss weight of a few positive samples in the climbing constraint; γ is the focusing factor, used to reduce the contribution of easily classified samples to the loss function; p i This indicates the confidence level that the model's prediction of the sample is correct; The regularization term is defined as follows: In the formula: This represents the set of trainable parameters for the model, where λ is the regularization coefficient used to prevent overfitting.