Characteristic subsequence-based power grid line power return behavior identification and classification method
By constructing a power backflow behavior network for power grid lines that combines a feature subsequence bottleneck model with a deep neural network and a gating function, the problems of speed and accuracy in identifying power backflow behavior of power grid lines are solved. This enables fast and automated identification of power backflow behavior, improves the credibility and interpretability of the identification, and meets the requirements for safe and stable operation of the power grid.
Patent Information
- Application Number
- CN202511645651.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-01-16
AI Technical Summary
Existing technologies are slow and inefficient in identifying power backflow behavior in power grid lines, and cannot provide dynamic data. Furthermore, traditional deep learning models lack interpretability and accuracy, and cannot effectively capture complex power characteristics such as those in the frequency domain, resulting in an accuracy rate lower than that required in practice.
By processing missing values and removing outliers from historical active power time series data, a bottleneck model of feature subsequences and a deep neural network are constructed. Combined with a gating function, a power back-feedback behavior network based on feature subsequences is formed, enabling rapid and automated identification of power back-feedback behavior.
It enables rapid and accurate identification of power backflow behavior in power grid lines, improves the reliability and interpretability of the results, meets the real-time requirements of dynamic security analysis of power grids, provides reliable data support, and prevents the risk of cascading failures caused by power backflow.
Smart Images

Figure CN121350772A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of power grid operation state monitoring, and particularly relates to a power grid line power return behavior identification and classification method based on a feature subsequence. BACKGROUND
[0002] With a large number of distributed new energy sources being connected, the distribution network is changing from a passive network to an active network. When the output of new energy sources is high, the capacity of some power plants may not meet the requirements of the low-frequency and low-voltage load shedding scheme during the high output period of new energy sources. If the photovoltaic output cannot be consumed locally, the line power will be returned. At this time, if the system frequency decreases, the low-frequency and low-voltage load shedding device will act to remove the power return line, which will cause the system frequency to further decrease and expand the impact of the accident. To prevent this situation, the development of the low-frequency load shedding scheme needs to dynamically consider the power return situation, and the demand for dynamically providing power return data by the State Grid Corporation of China is increasing. At the same time, the line power return checking requirement is added in the special action of checking and rectifying the safety and stability measures of the large power grid, and a fast and accurate power return data identification and classification method is urgently needed. At present, the traditional power grid power return behavior statistics mainly rely on manual visual identification or power value judgment, which is slow and inefficient, cannot provide dynamic data, and cannot further classify the power return behavior according to the active power waveform. Although the traditional deep learning model has certain classification ability, it has the problem of "black box", lacks explainability, and the reliability of the classification result is insufficient.
[0003] The prior art also has the problems of weak correlation between the learned features and the physical laws of power grid operation (such as negative power and power sudden change), the need to strengthen the specificity and applicability, and the insufficient model performance, which cannot effectively capture complex power features in the frequency domain and has a lower identification accuracy than the actual demand. SUMMARY
[0004] (I) Technical problems solved In view of the problems in the related art, the application provides a power grid line power return behavior identification and classification method based on a feature subsequence to overcome the above technical problems existing in the prior art.
[0005] (II) Technical solutions To solve the above technical problems, the application is implemented by the following technical solutions: S1, performing missing value processing, outlier removal and data standardization on the historical active power time series data to obtain effective historical active power time series data; Based on the effective historical active power time series data, sample construction and labeling are performed to obtain a historical power return identification data set; S2, training a feature subsequence bottleneck model using a historical power return identification dataset, to obtain a power return feature subsequence bottleneck model; S3, training a DNN neural network using effective historical active power time series data, to obtain a power return DNN neural network; S4, designing a gating function based on the prediction confidence of the power return feature subsequence bottleneck model, to obtain a power return gating function; S5, jointly training the power return feature subsequence bottleneck model, the power return DNN neural network and the gating function, to form a power return behavior network of a power grid line based on feature subsequence; inputting effective real-time active power time series data into the power return behavior network of the power grid line, to obtain real-time return behavior data; Preferably, the S1 comprises the following steps: S11, obtaining historical active power time series data of a line from a power grid dispatching system and a metering department, to obtain historical active power time series data; S12, filling missing values in the historical active power time series data by using a linear interpolation method, to obtain filled historical active power time series data; identifying and removing abnormal data points outside a reasonable range in the filled historical active power time series data, to obtain cleaned historical active power time series data; normalizing the cleaned historical active power time series data by using a Z-score standardization method, to obtain effective historical active power time series data; S13, segmenting the effective historical active power time series data according to a fixed time window, to form a single sample, to obtain a historical power return data sample set; labeling a class label for each sample in the historical power return data sample set, and performing data set division, to obtain a historical power return identification dataset; the historical power return identification dataset comprises a historical power return identification data training set and a historical power return identification data test set; Preferably, the S2 comprises the following steps: S21, defining a feature subsequence; the definition of the feature subsequence is a single-variable characteristic of the active power time series data, a total number of feature subsequences corresponding to the length of each sample in the historical power return identification dataset is set, and a feature subsequence set is defined based on the total number of feature subsequences corresponding to the length of each sample; S22, calculating the similarity between each sample in the historical power return identification dataset and each feature subsequence in the feature subsequence set by using a Gaussian radial basis function, to obtain a logical predicate set; S23. Based on the feature subsequence combined with the Gaussian radial basis function, an initial interpretable model is constructed; the initial interpretable machine learning model includes a linear layer, a linear classification formula, and hyperparameters; S24. Set the first maximum number of iterations and the category score threshold; input the logical predicates in the logical predicate set into the linear layer of the initial interpretability model, and classify them using the linear classification formula to obtain the category score; adjust the hyperparameters of the machine learning model according to the category score, and continue to train the initial interpretability model using logical predicates; S25. Repeat S24. Stop iterating when the category score is greater than or equal to the category score threshold or when the first maximum number of iterations is reached. This will give you the power feedback feature subsequence bottleneck model. Preferably, step S3 includes the following steps: S31. Construct the initial DNN neural network and set the learning rate of the initial DNN neural network; S32. The initial DNN neural network is trained using the historical power feedback identification data training set to obtain the trained DNN neural network. S33. Test the trained DNN neural network using the historical power feedback identification data test set. After the test is completed, the power feedback DNN neural network is obtained. Preferably, step S32 includes the following steps: S321. Set a training error threshold and a second maximum number of training iterations; according to the learning rate of the DNN neural network, input the historical power feedback identification data training set into the initial DNN neural network for repeated training, adjust the learning rate according to the training results of each round, and stop training when the training error of the DNN neural network is less than the training error threshold or reaches the second number of training iterations, and obtain the trained fully connected neural network model. Preferably, step S33 includes the following steps: S331. Set the test accuracy threshold; input the historical power feedback identification data test set into the trained DNN neural network for testing to obtain the test accuracy; S332. If the test accuracy is greater than or equal to the test accuracy threshold, the trained fully connected neural network model shall be used as the power feedback DNN neural network. Otherwise, an optimization algorithm is used to optimize the learning rate of the trained DNN neural network to obtain the optimal solution; the optimal solution is used as the learning rate of the trained DNN neural network to obtain the power fed back to the DNN neural network. Preferably, step S332 involves using an optimization algorithm to optimize the learning rate of the trained DNN neural network to obtain the optimal solution, including the following steps: S3321, set the search space of learning rate, the maximum number of random iterations; define the candidate learning rate set according to the search space of learning rate; S3322, initialize the optimal learning rate in the candidate learning rate set as C , and initialize the best performance as D , randomly select a learning rate from the candidate learning rate set E , divide the training data in the historical power return identification data training set into P folds, for each fold p , ; train the trained DNN neural network using all training data in the historical power return identification data training set except the first p fold, evaluate the model using the training data in the historical power return identification data training set of the first p fold, and obtain a performance index set; calculate the average of the performance indexes of all folds to obtain the average performance M ; If the average performance M is greater than the best performance D , update the best performance to M , and update the optimal learning rate to E ; otherwise, keep the original best performance and optimal learning rate; S3323, repeat S3322, and stop iteration when the maximum number of random iterations is reached to obtain the optimal solution; Preferably, the S4 comprises the following steps: S41, calculate the prediction confidence of the power return feature subsequence bottleneck model by a confidence calculation formula to obtain a confidence value; S42, set a confidence threshold; set a gating function rule based on the confidence threshold, the gating rule being to predict alone by the power return feature subsequence bottleneck model when the confidence value is greater than or equal to the confidence threshold; otherwise, predict by the power return feature subsequence bottleneck model in combination with the power return DNN neural network; Preferably, the S5 comprises the following steps: S51, integrate the power return feature subsequence bottleneck model, the power return DNN neural network, and the gating function to obtain an initial power return behavior network of power grid lines; S52, set a total loss function of the initial power return behavior network of power grid lines; Train the initial power return behavior network of power grid lines based on the total loss function of the initial power return behavior network of power grid lines in combination with the historical power return identification data training set and the historical power return identification data test set to obtain a power return behavior network of power grid lines based on feature subsequence; S53, collecting the missing value processing, outlier rejection, and data standardization of the real-time active power time series data, to obtain effective real-time active power time series data; inputting the effective real-time active power time series data into a power grid line power return behavior network to obtain real-time return behavior data.
[0006] The power grid line power return behavior identification and classification system based on the feature subsequence is used to implement the power grid line power return behavior identification and classification method based on the feature subsequence, and includes a data preprocessing and sample construction module, a feature subsequence bottleneck model training module, a DNN neural network training module, a gating function design module, and a joint network construction and real-time identification module. The data preprocessing and sample construction module is used to obtain original historical active power time series data from a power grid dispatching system and a metering department, fill in missing values by a linear interpolation method, reject abnormal data points outside a reasonable range, normalize the data to the [0, 1] interval by using a Z-score standardization method, form effective historical active power time series data, segment the effective data into single samples according to a fixed time window, label each sample with a category label, divide the samples into a training set and a test set, and construct a complete historical power return identification data set. The feature subsequence bottleneck model training module is based on a feature subsequence transformation technology. First, a set of feature subsequences of different lengths is defined, then a set of logical predicates is obtained by calculating the similarity between samples and feature subsequences by using a Gaussian radial basis function, an initial interpretable machine learning model containing a linear layer and a linear classification formula is constructed, the model hyperparameters are adjusted by iterative training, the training is stopped when the category score reaches a threshold value or the maximum number of iterations is reached, and finally a power return feature subsequence bottleneck model capable of identifying power return feature patterns is obtained. The DNN neural network training module is used to construct a deep neural network containing a convolution layer, a normalization layer, a global average pooling layer, and a fully connected layer, train the network by using the historical power return identification data training set, optimize the model performance by adjusting the learning rate, evaluate the model accuracy by using the test set after the training is completed, search for the optimal learning rate by using an optimization algorithm if the threshold value is not reached, and finally obtain a high-performance power return DNN neural network model. The gating function design module designs a dynamic routing mechanism based on the prediction confidence of the power return feature subsequence bottleneck model, evaluates the model prediction reliability by using a confidence calculation formula, sets a confidence threshold to construct a gating function rule, predicts by the feature subsequence bottleneck model alone when the confidence is higher than the threshold value to ensure interpretability, and performs collaborative prediction by combining the DNN neural network when the confidence is low to improve the accuracy, and forms an intelligent power return gating function. The joint network construction and real-time identification module integrates the power return feature subsequence bottleneck model, the power return DNN neural network and the gating function, trains the whole network by setting the total loss function, and forms the power return behavior network of the power grid line based on the feature subsequence; the preprocessed real-time active power time series data is input into the network, and the real-time return behavior data including normal power transmission, distributed power return and fault power return is output, so that the intelligent identification and monitoring of the power return behavior of the power grid line are completed.
[0007] (Three) beneficial effects The present application has the following beneficial effects: The present application effectively solves the key bottleneck problem of the traditional method in the power return behavior identification of the power grid by constructing a hybrid identification system combining the feature subsequence bottleneck model and the deep neural network; the feature subsequence bottleneck model extracts the highly correlated and interpretable features (such as negative power, power mutation and the like) of the power grid physical law, overcomes the limitations of the traditional deep learning model "black box" operation, makes the classification decision process transparent, greatly improves the credibility and traceability of the results, and is convenient for operation and maintenance personnel to understand and trust the judgment basis of the model.
[0008] The present application realizes the optimal balance between accuracy and interpretability by introducing the gating function to dynamically coordinate the prediction output of the interpretable model and the DNN model; when the feature subsequence model has high confidence, the judgment result with clear physical meaning is directly used; when facing complex patterns, the powerful nonlinear feature capturing ability of the DNN is fused to ensure high-precision identification of the system in different scenarios, and the classification accuracy of distributed power return and fault power return is significantly improved.
[0009] The present application realizes the technical leap from manual interpretation to intelligent identification, can quickly and automatically analyze and classify the real-time active power data, greatly improves the work efficiency, meets the real-time requirement of power return data for dynamic safety analysis of the power grid, not only provides reliable data support for accurate formulation of low-frequency load shedding scheme, but also effectively prevents the cascading failure risk caused by power return, and has important practical value for ensuring the safe and stable operation of the power grid with high proportion of new energy.
[0010] Of course, any product implementing the present application does not necessarily need to achieve all the advantages described above at the same time. BRIEF DESCRIPTION OF DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the description of the embodiments. Obviously, the drawings described in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0012] Figure 1 A flowchart of the power return behavior recognition and classification method of the power grid line based on the feature subsequence of the application; Figure 2 A structured flowchart of the power return behavior recognition and classification method of the power grid line based on the feature subsequence of the application; Figure 3 A module schematic diagram of the power return behavior recognition and classification system of the power grid line based on the feature subsequence of the application; Figure 4 A structure diagram of the power return DNN neural network in the power return behavior recognition and classification method based on the feature subsequence of the application; Figure 5 A position schematic diagram in the low-cycle load shedding process of the application. DETAILED DESCRIPTION
[0013] The technical solutions in the embodiments of the application will be described clearly and completely in the following with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only some of the embodiments of the application, not all the embodiments. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0014] Please refer to Figure 1 The embodiments of the application disclose a power return behavior recognition and classification method of a power grid line based on a feature subsequence, which comprises the following steps: S1, performing missing value processing, outlier elimination and data standardization on historical active power time series data to obtain effective historical active power time series data; Based on the effective historical active power time series data, sample construction and labeling are performed to obtain a historical power return recognition data set; The S1 comprises the following steps: S11, obtaining historical active power time series data of a line from a power grid dispatching system and a metering department; S12, filling the missing values in the historical active power time series data by using a linear interpolation method to obtain filled historical active power time series data; and ensuring the continuity of the time series; Identify and eliminate abnormal data points beyond the reasonable range in the filling historical active power time series data, obtain the cleaned historical active power time series data; the abnormal data points beyond the reasonable range mainly include two cases, one is physically impossible value, such as power factor device reverse rotation and other theoretical reasons, far exceeding the line transmission limit value; such as a line with a rated power of 100 MW, a +300 MW or-300 MW instantaneous power value is recorded, which obviously exceeds the theoretical transmission capacity of the line, and belongs to the physically impossible case and should be eliminated; The second is the statistical extreme outlier, for example, the instantaneous power mutation exceeds 200% of the line rated power, although such data may exist physically, but the probability is extremely low and the interference to the model training is great, so it is eliminated. For the 100 MW line, a +190 MW instantaneous power peak may be physically possible (such as accompanied by severe failure or impact), but its probability is extremely low and its form is different from the normal power return behavior. In order to eliminate its interference to the model training, it is also regarded as an abnormal data point and is eliminated to ensure the stability and representativeness of the training data; The Z-score standardization method is used to normalize the cleaned historical active power time series data to the interval [0, 1] to obtain the effective historical active power time series data; the formula of the Z-score standardization method is as follows, , Wherein μ is the mean of the cleaned historical active power time series data, σ is the standard deviation of the cleaned historical active power time series data, x represents the input cleaned historical active power time series data; S13, the effective historical active power time series data is segmented according to a fixed time window (for example, T=48 time steps, corresponding to 1 hour data, sampling interval 1.25 minutes) to form a single sample, and a historical power return data sample set is obtained; Each sample in the historical power return data sample set is labeled with a category label, and the data set is divided to obtain a historical power return identification data set; the historical power return identification data set includes a historical power return identification data training set and a historical power return identification data test set; the category label includes normal power transmission, distributed power return and fault power return; the normal power transmission is recorded as 0, the distributed power return is recorded as 1, and the fault power is recorded as 2; The data set division is specifically that the processed sample set is randomly divided into a training set and a test set according to a ratio of 8:2; The above steps construct a high-quality effective historical data set by strictly filling in missing values, removing outliers and standardizing preprocessing of historical active power time series data, and segment and label (normal power transmission, distributed power return, fault power return) according to a fixed time window to form a historical power return identification data set for model training; The above processing flow effectively solves the problems of inconsistent original data quality and low efficiency of manual identification, provides a standardized and normalized data basis for subsequent intelligent identification models, ensures the continuity and reliability of model input data, and thus lays a solid data foundation for quickly and accurately realizing automatic classification and dynamic monitoring of power return behavior of power grid lines.
[0015] S2, based on feature subsequence transformation, training a feature subsequence bottleneck model using the historical power return identification data set to obtain a power return feature subsequence bottleneck model; The S2 includes the following steps: S21, defining a feature subsequence; the definition of the feature subsequence is a single variable characteristic of the active power time series data, and the total number of feature subsequences corresponding to the length of each sample in the historical power return identification data set is set as K , defining a feature subsequence set based on the total number of feature subsequences corresponding to the length of each sample; the feature subsequence set is as follows, ; Wherein is the k th feature subsequence with a length of l , each sample contains T power value values at each time step, L is a feature subsequence length set; the feature subsequence length set is as follows, ; Wherein, corresponding to the 5%, 10%, 20%, 30%, and 50% sequence lengths of the corresponding power data; S22, calculating the similarity between each sample in the historical power return identification data set and each feature subsequence in the feature subsequence set by Gaussian radial basis function (RBF), to obtain a logic predicate set; the Gaussian radial basis function is as follows, ; Wherein, represents the similarity score of the sample x i and the feature subsequence s k,l , that is, the logic predicate; σa bandwidth parameter or a scale parameter of a Gaussian radial basis function; denotes x i with the feature subsequence s k l the Euclidean distance between S23, based on the feature subsequence combined with the Gaussian radial basis function, an initial interpretable model is constructed; the initial interpretable machine learning model includes a linear layer, a linear classification formula, and hyperparameters; the hyperparameters include a learning rate, an iteration number, and a loss function weight (classification loss, diversity loss, and sparse regularization); the linear classification formula is as follows, ; wherein, r i denotes a category score, is the k th feature subsequence with a length of l importance weight for power backhaul identification (a positive weight indicates that the feature subsequence is positively correlated with power backhaul, and a negative weight indicates a negative correlation); S24, set the first maximum iteration number and the category score threshold; input the logical predicate in the logical predicate set to the linear layer in the initial interpretable model, and classify by the linear classification formula to obtain the category score; the category score reflects the recognition accuracy of the model; adjust the hyperparameters of the machine learning model according to the category score, and continue to train the initial interpretable model using the logical predicate; Specifically, in the model training phase, first set the training termination condition, the first maximum iteration number is 200 times, and the category score threshold is 0.95; then enter the iterative training cycle, in each training period, input the logical predicate set into the linear classification layer, calculate the original scores of the three power backhaul categories by the linear classification formula, and convert them into prediction probabilities by the Softmax function; based on the prediction result and the true label, calculate the multi-objective loss function value, which is composed of three parts: a cross-entropy loss to ensure classification accuracy, a cosine similarity penalty term to promote feature diversity, and an L1 sparse regularization term to enhance model interpretability; In the back propagation process, an adaptive matrix estimator optimizer is used to update the model parameters, including linear layer weights and feature subsequences themselves, with an initial learning rate of 0.01. After completing 20 training cycles, the model performance is evaluated on the validation set. If the accuracy rate improves less than 0.5%, the learning rate is reduced to one-tenth of the original. At the same time, the evolution process of the key feature subsequences is monitored to ensure that they gradually converge to power waveform patterns with clear physical meaning. When the classification accuracy of the model on the validation set continuously reaches 95% or the training reaches the maximum number of iterations, the training process is terminated, and the optimal model parameters are saved. In the back propagation process, an adaptive matrix estimator optimizer is used to update the model parameters, including linear layer weights and feature subsequences themselves, with an initial learning rate of 0.01. After completing 20 training cycles, the model performance is evaluated on the validation set. If the accuracy rate improves less than 0.5%, the learning rate is reduced to one-tenth of the original. At the same time, the evolution process of the key feature subsequences is monitored to ensure that they gradually converge to power waveform patterns with clear physical meaning. When the classification accuracy of the model on the validation set continuously reaches 95% or the training reaches the maximum number of iterations, the training process is terminated, and the optimal model parameters are saved. In the back propagation process, an adaptive matrix estimator optimizer is used to update the model parameters, including linear layer weights and feature subsequences themselves, with an initial learning rate of 0.01. After completing 20 training cycles, the model performance is evaluated on the validation set. If the accuracy rate improves less than 0.5%, the learning rate is reduced to one-tenth of the original. At the same time, the evolution process of the key feature subsequences is monitored to ensure that they gradually converge to power waveform patterns with clear physical meaning. When the classification accuracy of the model on the validation set continuously reaches 95% or the training reaches the maximum number of iterations, the training process is terminated, and the optimal model parameters are saved. S25, repeat S24, when the category score is greater than or equal to the category score threshold or the first maximum number of iterations is reached, stop iteration, and obtain the power return feature subsequence bottleneck model; The above steps are aimed at the core problem that the deep learning model "black box" decision in power grid power return identification is disconnected with the physical law of power grid. An interpretable modeling method based on feature subsequence transformation is proposed. By defining a plurality of feature subsequences of typical lengths (such as 5% to 50% of the sequence), a dictionary library capable of capturing power change patterns of different time scales is constructed. Then, the similarity between each historical power sample and these feature subsequences is quantified using Gaussian radial basis functions, and the original time series is converted into a set of logical predicates with clear physical meaning (such as similarity scores with "negative power mode" or "power mutation mode"). A linear classification model with transparent structure and interpretable parameters is used for decision-making, where the weight of each feature subsequence clearly identifies its positive or negative contribution to power return classification. This fundamentally solves the pain points of traditional black box model decision-making logic, which is not transparent and has low result reliability. The model not only accurately identifies distributed power return and fault power return, but also provides reasonable explanations for "why such classification" to the operation and maintenance personnel, greatly enhancing the result reliability and practicality, and providing accurate and reliable decision support for power grid safety regulation. S3, training a DNN neural network using effective historical active power time series data to obtain a power return DNN neural network; The S3 includes the following steps: S31, constructing an initial DNN neural network and setting the learning rate of the initial DNN neural network. The DNN construction specifically includes 3 convolutional layers (convolution kernel sizes are 3, 5, and 7, and output channel numbers are 64, 128, and 256) of FCN, 2 normalization layers, and 1 global average pooling layer, and finally outputs a power return prediction probability through a fully connected layer. The initial DNN neural network is a deep neural network, which is a general concept. Its implementation is based on a full convolutional network (FCN) structure, and a model with a fully connected layer is added; S32, training the initial DNN neural network using the historical power return identification data training set to obtain a trained DNN neural network; The S32 includes the following steps: S321, setting a training error threshold and a second maximum training iteration number; according to the learning rate of the DNN neural network, inputting the historical power return identification data training set into the initial DNN neural network for repeated training, adjusting the learning rate according to the training result of each round, and stopping training when the training error of the DNN neural network is less than the training error threshold or the second training iteration number is reached, to obtain a trained fully connected neural network model; Specifically, the training error threshold is set to 0.001, and the second maximum number of training iterations is 500; a deep neural network based on the FCN architecture is adopted, which includes three convolutional layers (kernel sizes of 3, 5, and 7, respectively, and channel numbers of 64 / 128 / 256), a normalization layer, a global average pooling layer, and a fully connected output layer. The Adam optimizer is used for training, the initial learning rate is set to 0.001, and an exponential decay strategy is adopted, with a decay of 0.8 times every 50 epochs; The training error threshold is set to 0.001 based on the empirical balance selection in deep learning practice; the determination of this value mainly considers two key factors; on the one hand, a too high threshold (such as 0.01) will cause the model to terminate training prematurely, and the model cannot fully learn the complex patterns in the data, resulting in underfitting; on the other hand, a too low threshold (such as 0.0001) will significantly prolong the training time, and it is easy to cause the model to pay too much attention to the noise details in the training set, causing overfitting; the threshold of 0.001 can effectively control the training cost while ensuring that the model fully learns the effective features, and it has good generalization ability on the validation set, which is an ideal balance point between accuracy and efficiency; The initial learning rate of 0.001 with the exponential decay strategy follows the deep learning optimization theory; the initial value is based on the default setting of the Adam optimizer, which can ensure sufficient convergence speed in the early stage of training, and avoid training shock caused by too large learning rate; the strategy of decaying by 0.8 times every 50 epochs is to fine-tune the parameters by moderately reducing the learning rate when the loss function enters the plateau period in the middle of training, helping the model to jump out of the local optimal solution and converge to the global optimal point; this decay rhythm has been verified by experiments, which can improve the accuracy of the model on the validation set by about 3-5% without significantly prolonging the training period; S33, test the trained DNN neural network using the historical power return identification data test set, and obtain a power return DNN neural network after the test is completed; The S33 includes the following steps: S331, set a test accuracy threshold; input the historical power return identification data test set into the trained DNN neural network for testing, and obtain the test accuracy; Specifically, in the training process, the mini-batch gradient descent method is adopted, and the batch size is 32; after each training period, the test set is used to evaluate the model performance, and the cross-entropy loss and accuracy indicators are monitored; to prevent overfitting, an early stopping mechanism is implemented - if the validation set loss does not improve for 15 consecutive epochs, the training is automatically stopped; S332, if the test accuracy is greater than or equal to the test accuracy threshold, the trained DNN neural network is used as the power return DNN neural network; Otherwise, an optimization algorithm is used to optimize the learning rate of the trained DNN neural network to obtain the optimal solution; the optimal solution is used as the learning rate of the trained DNN neural network to obtain the power fed back to the DNN neural network. The step S332 involves using an optimization algorithm to optimize the learning rate of the trained DNN neural network to obtain the optimal solution, including the following steps: S3321. Define the search space for the learning rate and the maximum number of random iterations; define the candidate learning rate set based on the search space for the learning rate. , A i Represents the first in the candidate learning rate set i The learning rate of each candidate B This represents the total number of candidate learning rates; S3322, Initialize the optimal learning rate in the candidate learning rate set as... C Initialization optimal performance is D From the candidate learning rate set Randomly select the learning rate E The training data in the historical power feedback identification data training set is divided into... P Fold, for each fold p , Use except the first p The training data in the training set of all historical power feedback identification data outside the fold are used to train the trained DNN neural network, and the first... p The historical power feedback identification data training set is used to evaluate the model and obtain a set of performance indicators. ,in, H p Indicates the first p One performance metric, P This represents the total number of performance indicators; calculate the mean of all performance indicators to obtain the average performance. M The calculation formula is as follows: ; If average performance M >Optimal performance D Then update the best performance to M Update the optimal learning rate E Conversely, it maintains the original optimal performance and learning rate. S3323, repeat S3322, stop iterating when the maximum number of random iterations is reached, and obtain the optimal solution; The above steps are aimed at overcoming the performance limitations of interpretable models in recognizing complex power patterns in power grid lines. In addition, this invention simultaneously constructs a deep neural network as a high-performance supplement. The DNN neural network adopts a multi-scale one-dimensional convolutional structure, which can effectively capture local features and frequency domain information at different time granularities in the power sequence, effectively solving the problem of insufficient feature extraction capability of traditional methods for complex power waveforms. To address the technical problems of unstable training, reliance on expert experience for hyperparameters, and difficulty in guaranteeing optimal model performance in traditional deep neural networks for power grid power feedback identification, this solution designs an automatic optimization mechanism based on random search and cross-validation. When the test accuracy is not up to standard, the system automatically starts a random search algorithm within a preset learning rate space (e.g., [0.0001, 0.01]), evaluates the generalization performance of each candidate learning rate through P-fold cross-validation, and uses the average accuracy as the selection criterion, iterating cyclically until the optimal learning rate that maximizes model performance is found. This method effectively solves the problems of low efficiency in manual parameter tuning and the model's tendency to get trapped in local optima, significantly improving the convergence stability and classification accuracy of DNNs in complex power pattern recognition, and laying a reliable performance foundation for subsequent collaborative work with interpretable models. Through rigorous training error control and automatic hyperparameter optimization based on cross-validation, the system ensures that the model converges to the optimal state. When the test accuracy is not up to standard, the system automatically starts a random search algorithm to intelligently find the best learning rate within the defined space, which significantly improves the stability of model training and the final performance. This module ultimately forms a highly robust high-precision classifier that can accurately identify various complex power return modes, providing a reliable performance foundation for subsequent collaborative work with interpretable models. S4. Design a gate function based on the prediction confidence of the power feedback feature subsequence bottleneck model to obtain the power feedback gate function; S4 includes the following steps: S41. Calculate the prediction confidence of the power feedback feature subsequence bottleneck model using the confidence calculation formula to obtain the confidence value; the confidence calculation formula is as follows. ; in, η ( x i ) represents the prediction confidence of the bottleneck model for the power feedback feature subsequence; The predicted probability of the feature subsequence bottleneck model for the category of "distributed power source power return" is given. (The closer the value is to 1, the higher the confidence level). S42. Set a confidence threshold; set a gating function rule based on the confidence threshold, wherein the gating rule is that when the confidence value is ≥ the confidence threshold, the power feedback feature subsequence bottleneck model makes predictions alone; otherwise, the power feedback feature subsequence bottleneck model is combined with the power feedback DNN neural network for prediction; specifically, set a confidence threshold. ,like The sample is predicted solely by the feature subsequence bottleneck model; if The samples are predicted collaboratively by the feature subsequence bottleneck model and DNN (output is...). ), h i This represents the predicted probability of the joint output; For the fully connected layer to the first i The output probability of each output power being returned; The confidence threshold is set to 0.8, which is an empirically optimal value determined based on a large number of validation set experiments. This aims to achieve a precise balance between model interpretability and system accuracy. This threshold means that when the power feedback feature sequence bottleneck model predicts "distributed power feedback" with a probability of 90% (because conf=2×0.9-1=0.8), it is considered to have a high degree of reliability and can independently output fully interpretable results. If the threshold is too low (e.g., 0.6), it will sacrifice the interpretability of too many samples. If it is too high (e.g., 0.9), it will prevent a large number of boundary samples from being assisted by the DNN, thus reducing the accuracy. The threshold of 0.8 ensures that about 70-80% of the samples are processed independently by the power feedback feature sequence bottleneck model to ensure interpretability, while the complex and challenging 20-30% of the samples are processed collaboratively by the feature sequence bottleneck model and the DNN to improve the overall accuracy. This is why different thresholds lead to significant differences in system performance. The above steps address the core contradiction in power grid backfeed identification: the difficulty of balancing interpretability and high accuracy. Therefore, a dynamic gating function based on confidence assessment is introduced. The decision confidence is calculated by quantifying the prediction probability of the feature subsequence bottleneck model for key categories (such as distributed power backfeed), and intelligent routing rules are set: when the confidence is higher than the threshold, the result of the interpretable model is directly adopted to ensure that the decision-making process is completely transparent and conforms to physical laws; when facing complex or boundary samples that lead to insufficient confidence, the DNN neural network is automatically activated for collaborative prediction, combining the advantages of both to improve the accuracy of the judgment. The aforementioned intelligent scheduling mechanism fundamentally solves the limitations of a single model in terms of interpretability and performance, and constructs a hybrid system that prioritizes transparency and guarantees performance. It can provide reliable and clear explanations for maintenance personnel in most cases, and ensure recognition accuracy in difficult scenarios, thus meeting the dual requirements of power grid safety control for decision results that require both high reliability and high accuracy. S5. Jointly train the bottleneck model of power feedback feature subsequence, power feedback DNN neural network and gate function to form a power feedback behavior network of power grid line based on feature subsequence; Effective real-time active power time series data is input into the power feedback behavior network of the power grid line to obtain real-time feedback behavior data; S5 includes the following steps: S51. Integrate the bottleneck model of the power feedback feature subsequence, the power feedback DNN neural network and the gate function to obtain the initial power feedback behavior network of the power grid line; Specifically, at the model architecture level, the sample data from the effective active power time series data are simultaneously input into the power feedback feature subsequence bottleneck model and the power feedback DNN neural network for parallel processing, and the gate function receives the output confidence of the power feedback feature subsequence bottleneck model. Dynamic routing decisions are made based on confidence thresholds. High-confidence samples directly use the results of the power feedback feature subsequence bottleneck model to ensure interpretability, while low-confidence samples are weighted and fused with the outputs of the power feedback feature subsequence bottleneck model and the power feedback DNN neural network to improve accuracy. S52. Define the initial power return behavior of the power grid lines as the total network loss function; the formula for the total loss function is as follows. , in, The training loss for the feature subsequence bottleneck model is calculated as a weighted sum of classification loss, feature subsequence diversity loss, and weight sparsity regularization. The hybrid output of the feature subsequence bottleneck model and DNN co-prediction Cross-entropy loss with the true label, The feature subsequence bottleneck model loss weights; Based on the total loss function of the initial power grid line power feedback behavior network, the initial power grid line power feedback behavior network is trained by combining the training set and the test set of historical power feedback identification data, and a power grid line power feedback behavior network based on feature subsequence is obtained. Specifically, for the active power samples in the test set, when The output of the bottleneck model is the feature subsequence and the key feature subsequence. If the sample is a distributed power return, the importance weight of the negative power feature subsequence is greater than 0, the importance weight of the power mutation feature subsequence is less than 0, and the key feature subsequence is the corresponding negative power feature subsequence and power mutation feature subsequence mentioned above. If the sample is a fault power feedback, the importance weight of the negative power feature subsequence is greater than 0, the importance weight of the power mutation feature subsequence is greater than 0, and the key feature subsequences are the corresponding negative power feature subsequence and power mutation feature subsequence mentioned above; when The hybrid output results of the bottleneck model of output feature subsequence and DNN co-prediction and the local interpretation of the bottleneck model of feature subsequence; If the sample is not a power return, i.e., it is screened The three largest feature subsequences are local solutions to the feature subsequence bottleneck model; S53. Collect real-time active power time series data, process missing values, remove outliers, and standardize the data to obtain effective real-time active power time series data; Effective real-time active power time series data is input into the power return behavior network of the power grid line to obtain real-time return behavior data; the real-time return behavior data includes normal power transmission, distributed power return, and fault power return. The above steps, by integrating an interpretable feature subsequence bottleneck model, a high-precision DNN neural network, and an intelligent gating function, construct a complete power backflow behavior network for power grid lines, solving the industry problem that a single model cannot simultaneously ensure decision transparency and identification accuracy. This network adopts a joint training strategy, coordinating the optimization of each component through a carefully designed total loss function, and realizes dynamic routing decision based on confidence: for samples with clear features, it directly outputs interpretable results and indicates key physical features (such as negative power, power mutation subsequences and their weight directions), while for complex samples, it integrates the advantages of dual models to ensure accuracy. This design enables the system to perform rapid and automated analysis of real-time active power data when it is put into actual operation, and output classification results with high reliability and accuracy (normal power transmission, distributed power feedback, and fault power feedback). This provides reliable and transparent key data support for the dynamic security assessment of the power grid and the accurate formulation of under-cycle load shedding schemes, effectively improving the operational safety level of power grids with a high proportion of new energy sources.
[0016] Example 1 During the State Grid Corporation's special campaign to investigate and rectify the safety and stability measures of the large power grid from May to August 2025, this invention was practically applied and verified in a local power supply company. The application scenario involves monitoring and analyzing a 10kV distribution line within the jurisdiction that frequently experiences power backflow. This line is connected to multiple distributed photovoltaic power stations. Active power data for the line from May 1 to July 31, 2025, was extracted from the dispatch automation system at a sampling interval of 1.25 minutes, resulting in approximately 100,000 power data points. After preprocessing, 2,083 valid samples were formed. Operation experts, in conjunction with SCADA records and fault waveform data, labeled 157 "distributed power feedback" samples and 23 "fault power feedback" samples. By dividing the training and test sets in an 8:2 ratio, the bottleneck model for power feedback feature subsequences learned a series of feature subsequences with clear physical meanings, including a continuous negative power mode of length 10 (corresponding to photovoltaic backfeeding), a power drop mode of length 3 (corresponding to fault conditions), and a smooth transition mode of length 15 (corresponding to normal load changes); the power feedback DNN neural network successfully captured the frequency domain features and complex temporal dependencies in the power sequence; Real-time monitoring and analysis of newly generated data in August: On a certain day in August, the system accurately identified a distributed power backfeed event. The bottleneck model of the power backfeed feature subsequence determined it to be photovoltaic backfeeding with a 92% confidence level. The key basis was that a feature subsequence with continuous negative power was matched. During a thunderstorm in August, the system identified a fault power feedback. The gating mechanism activated hybrid prediction due to a confidence level of less than 0.8, which ultimately accurately classified and located the time period in which the fault occurred. The recognition accuracy rate reaches 96.2%, which is about 50 times more efficient than traditional manual recognition; the average processing speed is only 3 minutes for the analysis of a single line's full-month data; it provides reliable data support for local dispatching departments to dynamically adjust under-week load reduction schemes; in the investigation of power grid safety and stability measures, it enables rapid verification and accurate statistics of power return; this embodiment fully demonstrates the effectiveness and practicality of the invention in actual power grid operation.
[0017] For further details, please refer to Figure 2 A power grid line power feedback behavior identification and classification system based on feature subsequences is used to implement the above-mentioned power grid line power feedback behavior identification and classification method based on feature subsequences. It includes a data preprocessing and sample construction module, a feature subsequence bottleneck model training module, a DNN neural network training module, a gating function design module, and a joint network construction and real-time identification module. The data preprocessing and sample construction module is used to obtain raw historical active power time series data from the power grid dispatching system and metering department, fill missing values and remove abnormal data points that exceed the reasonable range by linear interpolation, and normalize the data to the [0,1] interval using the Z-score standardization method to form valid historical active power time series data; the valid data is segmented into individual samples according to a fixed time window, and each sample is labeled with a category label and divided into training set and test set to construct a complete historical power feedback identification dataset; The feature subsequence bottleneck model training module is based on feature subsequence transformation technology. First, it defines feature subsequence sets of different lengths. Then, it calculates the similarity between the sample and the feature subsequence using Gaussian radial basis function to obtain a logical predicate set, and constructs an initial interpretable machine learning model containing a linear layer and a linear classification formula. The model hyperparameters are adjusted through iterative training. Training stops when the class score reaches a threshold or the maximum number of iterations is reached, and finally, a power return feature subsequence bottleneck model that can identify power return feature patterns is obtained. The DNN neural network training module is used to construct a deep neural network containing convolutional layers, normalization layers, global average pooling layers, and fully connected layers. The network is trained using a historical power feedback identification data training set, and the model performance is optimized by adjusting the learning rate. After training, the model accuracy is evaluated using a test set. If the threshold is not reached, an optimization algorithm is used to search for the optimal learning rate, and finally a high-performance power feedback DNN neural network model is obtained. The gate function design module designs a dynamic routing mechanism based on the prediction confidence of the power feedback feature subsequence bottleneck model. It evaluates the model's prediction reliability through the confidence calculation formula and sets a confidence threshold to construct the gate function rules. When the confidence is higher than the threshold, the feature subsequence bottleneck model makes predictions alone to ensure interpretability. When the confidence is lower, it combines a DNN neural network for collaborative prediction to improve accuracy, thus forming an intelligent power feedback gate function. The joint network construction and real-time identification module integrates the bottleneck model of power feedback feature subsequence, the power feedback DNN neural network, and the gating function. By setting the total loss function, the overall network is jointly trained to form a power feedback behavior network of power grid lines based on feature subsequences. The preprocessed real-time active power time series data is input into the network, and the real-time feedback behavior data including normal power transmission, distributed power feedback, and fault power feedback are output to complete the intelligent identification and monitoring of power feedback behavior of power grid lines.
[0018] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0019] The preferred embodiments of the invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention.
Claims
1. A method for identifying and classifying power backfeed behavior on a power grid line based on characteristic subsequences, characterized in that, Comprise the following steps: S1, missing value processing, outlier rejection, data standardization are carried out to historical active power time series data, and effective historical active power time series data are obtained; Sample construction and marking are carried out based on the effective historical active power time series data, and historical power return identification data set is obtained; S2, based on feature subsequence transformation, the historical power return identification data set is used to train the feature subsequence bottleneck model, and the power return feature subsequence bottleneck model is obtained; S3, the effective historical active power time series data is used to train DNN neural network, and the power return DNN neural network is obtained; S4, a gating function is designed based on the prediction confidence of the power return feature subsequence bottleneck model, and the power return gating function is obtained; S5, the power return feature subsequence bottleneck model, the power return DNN neural network and the gating function are jointly trained to form a power return behavior network of power grid line based on feature subsequence; Effective real-time active power time series data is input into the power return behavior network of power grid line, and real-time return behavior data is obtained.
2. The feature subsequence based power line grid power backfeed behavior identification classification method of claim 1, wherein, The S1 comprises the following steps: S11, the active power time series data of historical line is obtained from the power grid dispatching system and the metering department; S12, the missing values in the historical active power time series data are filled by using linear interpolation method, and the filled historical active power time series data are obtained; Abnormal data points exceeding the reasonable range in the filled historical active power time series data are identified and removed, and the cleaned historical active power time series data are obtained; The cleaned historical active power time series data are normalized by using Z-score standardization method, and the effective historical active power time series data are obtained; S13, the effective historical active power time series data are segmented according to fixed time window, and single sample is formed, and the historical power return data sample set is obtained; Each sample in the historical power return data sample set is labeled with a category label, and the data set is divided, and the historical power return identification data set is obtained;The historical power return identification data set comprises historical power return identification data training set and historical power return identification data test set.
3. The feature subsequence based power line grid power backfeed behavior identification classification method of claim 1, wherein, The S2 comprises the following steps: S21, define the feature subsequence;The definition of the feature subsequence is the single variable characteristic of the active power time series data, the total number of feature subsequences corresponding to the length of each sample in the historical power return identification data set is set, and the feature subsequence set is defined based on the total number of feature subsequences corresponding to the length of each sample; S22, the similarity between each sample in the historical power return identification data set and each feature subsequence in the feature subsequence set is calculated by using Gaussian radial basis function, and the logical predicate set is obtained; S23, based on the feature subsequence and the Gaussian radial basis function, an initial interpretable model is constructed;The initial interpretable machine learning model comprises linear layer, linear classification formula and hyperparameter. S24, set the first maximum iteration number and the category score threshold; input the logical predicate in the logical predicate set into the linear layer of the initial explainable model, and classify through the linear classification formula to obtain a category score; adjust the hyperparameters of the machine learning model according to the category score, and continue to train the initial explainable model using the logical predicate; S25, repeat S24, when the category score is greater than or equal to the category score threshold or the first maximum iteration number is reached, stop iteration, and obtain the power return feature subsequence bottleneck model.
4. The feature subsequence based method of grid circuit power backfeed behavior identification classification of claim 1, wherein, The S3 includes the following steps: S31, constructing an initial DNN neural network, and setting a learning rate of the initial DNN neural network; S32, training the initial DNN neural network using the historical power return identification data training set to obtain a trained DNN neural network; S33, testing the trained DNN neural network using the historical power return identification data test set, and obtaining a power return DNN neural network after the testing is completed.
5. The feature subsequence based power line grid power backfeed behavior identification classification method of claim 4, wherein, The S32 includes the following steps: S321, setting a training error threshold and a second maximum training iteration number; inputting the historical power return identification data training set into the initial DNN neural network for repeated training according to the learning rate of the DNN neural network, adjusting the learning rate according to the training result of each round, and stopping training when the training error of the DNN neural network is less than the training error threshold or the second training iteration number is reached, to obtain a trained full connection neural network model.
6. The feature subsequence based method of grid circuit power backfeed behavior identification classification of claim 4, wherein, Preferably, the S33 includes the following steps: S331, setting a test accuracy threshold; inputting the historical power return identification data test set into the trained DNN neural network for testing to obtain a test accuracy; S332, if the test accuracy is greater than or equal to the test accuracy threshold, taking the trained full connection neural network model as the power return DNN neural network; Otherwise, using an optimization algorithm to optimize the learning rate of the trained DNN neural network to obtain an optimal solution; taking the optimal solution as the learning rate of the trained DNN neural network to obtain the power return DNN neural network.
7. The feature subsequence based power line grid power backfeed behavior identification classification method of claim 5, wherein, The S332 includes the following steps: S3321, setting a search space of the learning rate and a maximum random iteration number; and defining a candidate learning rate set according to the search space of the learning rate; S3322, initialize the optimal learning rate in the candidate learning rate set as C , initialize the best performance as D , randomly select a learning rate from the candidate learning rate set E , divide the training data in the historical power return identification data training set into P folds, for each fold p , ; train the trained DNN neural network using the training data in the historical power return identification data training set except the training data in the first p fold, evaluate the model using the training data in the historical power return identification data training set in the first p fold, and obtain a performance index set; calculate the average of the performance indexes of all folds to obtain an average performance M ; If average performance M > best performance D , then update best performance as M , update optimal learning rate as E ; otherwise, keep the original best performance and optimal learning rate. S3323, repeating S3322, and stopping iteration when the maximum random iteration number is reached to obtain the optimal solution.
8. The feature subsequence based method of grid circuit power backfeed behavior identification classification of claim 1, wherein, The S4 includes the following steps: S41, calculating a prediction confidence of the power return feature subsequence bottleneck model through a confidence calculation formula to obtain a confidence value; S42, setting a confidence threshold; setting a gating function rule based on the confidence threshold, the gating rule being that when the confidence value is greater than or equal to the confidence threshold, the power return feature subsequence bottleneck model is used for single prediction; otherwise, the power return feature subsequence bottleneck model is combined with the power return DNN neural network for prediction.
9. The feature subsequence based method of grid circuit power backfeed behavior identification classification of claim 1, wherein, The S5 includes the following steps: S51, integrate the power return feature subsequence bottleneck model, the power return DNN neural network and the gating function to obtain an initial power return behavior network of the power grid line; S52, set an initial total loss function of the power return behavior network of the power grid line; Based on the initial total loss function of the power return behavior network of the power grid line, the initial power return behavior network of the power grid line is trained in combination with the historical power return identification data training set and the historical power return identification data test set to obtain a power return behavior network of the power grid line based on the feature subsequence; S53, collect the missing value processing, the abnormal value elimination and the data standardization of the real-time active power time series data to obtain effective real-time active power time series data; The effective real-time active power time series data is input into the power return behavior network of the power grid line to obtain real-time return behavior data.
10. A power backfeed behavior identification classification system for power grid lines based on characteristic subsequences, characterized in that, The system includes a data preprocessing and sample construction module, a feature subsequence bottleneck model training module, a DNN neural network training module, a gating function design module and a joint network construction and real-time identification module.