LSTM-based load resource parameter accurate prediction method and system

By using an LSTM-based load resource parameter prediction method, the challenges of load reduction and dynamic response in power systems are solved. This method enables accurate prediction of load resources and assessment of controllability, improves the flexibility of the power grid and the efficiency of equipment utilization, and supports the consumption of clean energy and the optimal allocation of demand-side resources.

CN121413889BActive Publication Date: 2026-04-17STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
Filing Date
2025-12-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

The existing power system lacks a sound and flexible resource optimization and control mechanism, making it difficult to effectively reduce load and respond dynamically during peak electricity demand periods. This results in insufficient reliability of the regulation capabilities of virtual power plants, hindering their efficient participation in grid dispatch and decision-making.

Method used

An LSTM-based method for accurate prediction of load resource parameters is adopted. By acquiring user-side resource data, preprocessing and performing two-layer clustering, and combining user load characteristics and exogenous features, a multi-scale feature extraction and time-series prediction model is used to output load resource parameters, including total load power curve, adjustable capacity and load elasticity parameters.

Benefits of technology

It improves the accuracy of parameter prediction and the robustness of the model, enables accurate identification of the credibility of virtual resources and assessment of their controllability, enhances the utilization efficiency of power grid equipment assets, ensures the safe and stable supply of electricity and the balance between power grid supply and demand, and promotes the consumption of clean energy and the optimal allocation of demand-side resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121413889B_ABST
    Figure CN121413889B_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for accurate prediction of load resource parameters based on LSTM. The method includes the following steps: acquiring relevant user-side resource data and preprocessing it; based on the preprocessed user-side resource data, performing clustering processing using a load-side resource two-layer clustering model to obtain a comprehensive clustering result considering the adjustable potential of user load characteristics; analyzing the power transient waveform generated during load switching using a pre-constructed user-side load resource identification model to identify the type of currently operating electrical equipment, start-up and shutdown times, and durations, as the first type of parameter; based on the preprocessed user-side resource data, combining the comprehensive clustering result and real-time exogenous features, performing time-series prediction processing using a trained LSTM-based load resource parameter prediction model to output the second type of parameter, thus completing the parameter prediction process. Compared with existing technologies, this invention has advantages such as achieving accurate parameter prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of parameter prediction, and in particular to a method and system for accurate prediction of load resource parameters based on LSTM. Background Technology

[0002] With the deepening of the energy revolution, the structure and operation mode of energy systems are undergoing profound changes, placing higher demands on the construction of new power systems. As an important flexible resource in the energy system, demand-side load resources play a crucial role in tapping the system's energy-saving potential and enhancing the grid's regulation capabilities. By rationally utilizing adjustable power load resources, load transfer, load regulation, and load interruption can be achieved, thereby replacing or reducing investment in power source and grid construction to a certain extent, and improving the overall economy and operational efficiency of the system.

[0003] To meet the operational requirements of new power systems for adjustable, controllable, observable, and measurable operation, accurate prediction of power load resource parameters has become a key factor in achieving flexible load dispatch and intelligent management. However, the current power system still lacks a sound flexible resource optimization and control mechanism, making it difficult to effectively reduce load and respond dynamically during peak electricity consumption periods. This results in insufficient reliability of the regulation capabilities of virtual power plants, hindering their efficient participation in grid dispatch and decision-making. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for accurate prediction of load resource parameters based on LSTM to improve the accuracy of parameter prediction.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] A method for accurate prediction of load resource parameters based on LSTM, comprising:

[0007] Obtain relevant user-side resource data and perform preprocessing;

[0008] Based on the preprocessed resource data of the relevant users, a two-level clustering model of load-side resources is used for clustering to obtain a comprehensive clustering result that takes into account the adjustable potential of user load characteristics.

[0009] Based on the preprocessed user-side resource data, the constructed user-side load resource identification model is used to analyze the power transient waveform generated during load switching, and the type of currently operating electrical equipment, start-up and shutdown time and duration are identified as the first type of parameter.

[0010] Based on the preprocessed resource data from the relevant user side, combined with the comprehensive clustering results and real-time exogenous features, a trained LSTM-based load resource parameter prediction model is used for time-series prediction processing, outputting the second type of parameters to complete the parameter prediction process.

[0011] Furthermore, the relevant user-side resource data includes branch load monitoring data and data on factors influencing electricity consumption behavior, wherein,

[0012] The user electricity load data collected by the meter-based branch monitoring device is used as the branch load monitoring data. The branch load monitoring data consists of four quantities: physical quantity, electrical quantity, status quantity, and environmental quantity. The branch load monitoring data also includes load power time series data and load time series data.

[0013] Furthermore, the preprocessing includes integration transformation and data cleaning transformation, wherein the integration transformation steps include:

[0014] For the resource data on the relevant user side, linear interpolation of adjacent time periods or default values ​​of business rules are used to fill the data, and rule-based transformation is performed.

[0015] The data cleaning and transformation steps include:

[0016] Based on the integration and transformation, invalid data is removed by regular expressions and threshold filtering, missing data is filled by spatiotemporal interpolation or business rules, and then structured transformation is performed, including unit unification, encoding mapping and field merging.

[0017] During the preprocessing process, batch processing is performed using Python-UDF or SQL scripts. For heterogeneous data fusion, an entity alignment algorithm is used to associate cross-source data, and time-series alignment is achieved through a time window alignment method.

[0018] Furthermore, the step of obtaining a comprehensive clustering result that takes into account the adjustable potential of user load characteristics includes:

[0019] First clustering:

[0020] Based on the preprocessed user electricity load data, the K-means clustering algorithm is used to cluster users into K groups with the same load characteristics, which is the result of the first clustering.

[0021] Secondary clustering:

[0022] Principal component analysis is used to reduce the dimensionality of the data on factors influencing electricity consumption behavior. The reduced data is then used as input for secondary clustering. Based on the pattern classification performance of the self-organizing competitive neural network, secondary clustering is performed on the user groups with the same load characteristics, resulting in a comprehensive clustering result that considers the adjustable potential of user load characteristics.

[0023] Furthermore, the load-side resource two-layer clustering model introduces a reverse correction mechanism to correct the comprehensive clustering results that consider the adjustable potential of user load characteristics. The specific steps include:

[0024] The comprehensive clustering results that take into account the adjustable potential of user load characteristics are used as the training dataset for the BP neural network. The first clustering results are then corrected in reverse, and finally the second clustering is repeated to complete the correction process.

[0025] Furthermore, the execution process of the user-side load resource identification model includes:

[0026] Waveform segmentation:

[0027] Based on the preprocessed real-time load power time series data, within a set time sliding window, when a set condition is met, a fixed-length load power time subsequence is extracted from this as the starting point of a candidate load event, forming a candidate load event waveform segment. The set condition is:

[0028] ,

[0029] In the formula, Let be the change in load power over time t. The load power value at time t. The power jump threshold, This represents the average load power.

[0030] Feature extraction:

[0031] For each candidate load event waveform segment, principal component analysis is used to extract features and obtain a time series representation vector of energy consumption features.

[0032] Similarity matching and recognition:

[0033] A dynamic time adjustment algorithm is used to calculate the DTW distance between the time series representation vector of the energy consumption feature and all template vectors in the device reference waveform library, and use it as a similarity metric.

[0034] Select the device type with the smallest DTW distance as the identification result of the corresponding candidate load event waveform segment, and output the currently activated electrical equipment type, start / stop time and duration.

[0035] Furthermore, the LSTM-based load resource parameter prediction model includes a multi-scale feature extraction module with four branches, a feature fusion module, and a time-series prediction module. The execution steps of the LSTM-based load resource parameter prediction model include:

[0036] Input data fusion:

[0037] The preprocessed historical and current load time series data, the comprehensive clustering results, and real-time exogenous features are fused together as input data;

[0038] Multi-scale feature extraction:

[0039] One-dimensional input data is fed into the first branch. It is first transformed into two-dimensional data by reshaping operation. Two-dimensional convolution and pooling operations are used to extract local fluctuations and global contour features at different time spans. Then, average pooling, max pooling and flattening operations are performed. Finally, the first branch features are output through fully connected operation.

[0040] The one-dimensional input data is fed into the second branch and processed using recursive and upsampling networks and skip connections to obtain the features of the second branch.

[0041] One-dimensional input data is fed into the third branch, a one-dimensional neural network is used to perform downsampling, and then a bidirectional LSTM is used to extract relevant information about trends and fluctuations from the downsampled sequence, and finally the features of the third branch are output.

[0042] One-dimensional input data is fed into the fourth branch, and the Light-GBM algorithm is used to deeply mine the nonlinear correlation between the real-time exogenous features and historical and current load time series data, and finally output the features of the fourth branch.

[0043] Multi-scale feature fusion:

[0044] The first branch features, second branch features, third branch features and fourth branch features are input into the feature fusion module for feature concatenation or weighted fusion to obtain a comprehensive feature representation;

[0045] Time series prediction:

[0046] The comprehensive feature representation is input into the time-series prediction module for time-series prediction, and the predicted values ​​of load resource parameters for a specific future period are output, including the total load power curve, adjustable capacity, and load elasticity parameters for the specific future period.

[0047] Furthermore, the timing prediction module employs an attention-based LSTM for timing prediction. The attention-based LSTM includes a serially connected self-attention layer and a bidirectional interactive LSTM, and its execution steps include:

[0048] Attention weights are assigned to the comprehensive feature representation at different time steps through a self-attention layer, wherein the expression for calculating the attention weights is:

[0049] ,

[0050] In the formula, The attention weights are for time step t. The attention score at time step t. Let be the LSTM hidden state vector at time step t. The total length of the time series. For trainable weight matrix, For context vectors;

[0051] Based on the assigned attention weights, a bidirectional interactive LSTM is used to further capture temporal context dependencies from both directions, ultimately outputting the predicted load resource parameters for a specific future period.

[0052] Furthermore, a progressive optimization strategy is employed to train the LSTM-based load resource parameter prediction model. The training process includes a pre-training phase, a fine-tuning phase, and a dynamic update mechanism phase. The pre-training phase uses a contrastive learning paradigm and introduces domain adversarial training. The fine-tuning phase employs a course learning strategy, training in stages according to complexity. In the dynamic update mechanism phase, a double-buffered training architecture and a concept drift monitoring method based on KL divergence are used for dynamic updates.

[0053] The LSTM-based load resource parameter prediction model uses the following loss function during training:

[0054] ,

[0055] In the formula, For the overall loss function, For the loss function on the new data, The regularization coefficient is . For parameters, For the model parameters i One element, The first parameter of the old model i Each element.

[0056] This invention also provides a system for accurate prediction of load resource parameters based on LSTM, comprising:

[0057] Data acquisition module: Used to acquire relevant user-side resource data and perform preprocessing;

[0058] Clustering module: Based on the preprocessed resource data of relevant users, it uses a two-level clustering model of load-side resources to perform clustering processing, and obtains a comprehensive clustering result that takes into account the adjustable potential of user load characteristics;

[0059] Identification module: Based on the pre-processed relevant user-side resource data, it uses the constructed user-side load resource identification model to analyze the power transient waveform generated during load switching, and identifies the type of currently operating electrical equipment, start-up and shutdown time, and duration as the first type of parameter;

[0060] Prediction module: Based on the preprocessed resource data from the relevant user side, combined with the comprehensive clustering results and real-time exogenous features, it uses a trained LSTM-based load resource parameter prediction model to perform time-series prediction processing, outputs the second type of parameters, and completes the parameter prediction process.

[0061] Compared with the prior art, the present invention has the following beneficial effects:

[0062] (1) This invention uses a load-side resource two-layer clustering model to cluster users based on load characteristics, accurately identify user adjustability potential, and combine exogenous features and other data to make predictions using an LSTM-based load resource parameter prediction model, thereby improving the accuracy of parameter prediction.

[0063] (2) The load-side resource two-layer clustering model of the present invention introduces a reverse correction mechanism in the two clustering processes. Through this mechanism, features that have a significant impact on "adjustable potential" can be automatically discovered or strengthened to guide the second clustering, making the basis of the second clustering more scientific and reliable, and improving the robustness of the model under complex real data.

[0064] (3) In the load resource parameter prediction model based on LSTM of this invention, four branches are used for parallel processing. The four branches focus on different aspects of feature extraction, including local and global features, fine-grained dependence, long-term trends and fluctuations, and external correlations. A comprehensive feature representation containing this information is obtained. An attention mechanism is used to assign appropriate weights to features at different time steps, focusing on key information, so that the bidirectional interactive LSTM can output more accurate prediction results.

[0065] (4) This invention introduces a progressive optimization strategy. In the pre-training stage, comparative learning enables the model to have strong generalization ability, without relying on deep feature representations of user electricity load resource data in specific regions. Domain adversarial training improves the model's transferability. In the fine-tuning stage, a course learning strategy is used to conduct a learning process from shallow to deep, which can significantly improve training stability, accelerate training, and improve data efficiency. In the dynamic update mechanism stage, the double buffer architecture supports the continuous learning process of the model. The elastic weight solidification technology cleverly achieves knowledge consolidation by penalizing changes in parameters important to old tasks. Therefore, this progressive optimization strategy systematically solves the key challenges in the entire life cycle of the model.

[0066] (5) This invention enables accurate identification of the credibility of virtual resources and accurate assessment of their controllability. Based on the load resources on the user side, it provides a scientific basis for power grid control decisions, comprehensively improves the utilization efficiency of equipment assets, improves the demand-side regulation capability, helps ensure the safe and stable supply of electricity and the balance between power grid supply and demand, helps to realize the consumption of clean energy and the optimal allocation of demand-side resources, helps to improve the resilience of the power grid and reduce the perception of power outages in the whole society, and realizes the friendly interaction between the power grid and users and the development of related industrial chains. Attached Figure Description

[0067] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0068] Figure 2 This is a schematic diagram of the load resource parameter prediction model structure based on LSTM of the present invention;

[0069] Figure 3 This is a structural diagram of the attention-based LSTM of the present invention. Detailed Implementation

[0070] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0071] Example 1

[0072] This embodiment provides a method for accurate prediction of load resource parameters based on LSTM, such as... Figure 1 As shown, the method includes the following steps:

[0073] Step 1: Obtain relevant user-side resource data, perform preprocessing, and use a load-side resource two-layer clustering model for clustering.

[0074] The relevant user-side resource data acquired in this embodiment are specifically divided into branch load monitoring data and electricity consumption behavior influencing factor data. The branch load monitoring data is based on user electricity load data collected by the branch monitoring device of the electricity meter. It is not sufficient information but represents the user's load characteristics. The specific data collected by the branch monitoring device consists of four quantities: physical quantity, electrical quantity, state quantity, and environmental quantity. The branch load monitoring data includes load power time series data and load time series data. The electricity consumption behavior influencing factor data is based on basic information on user electricity consumption behavior influencing factors collected by questionnaire survey. It is sufficient information and represents the user's adjustable potential.

[0075] After acquiring relevant user-side resource data, preprocessing operations such as data integration, transformation, and data cleaning are required. For multi-data integration and transformation, linear interpolation of adjacent time periods or default values ​​of business rules are used for filling, followed by rule-based transformation. Field mapping rules, unit conversion, and code standardization are defined according to the "Power Grid Data Model Specification," and batch processing is achieved through SQL scripts or Python-UDF. For data cleaning and transformation, invalid data is first removed by filtering with regular expressions and thresholds. Missing data is filled by spatiotemporal interpolation or business rules, and then structured transformation is performed, including unit unification, code mapping, and field merging. Batch processing is achieved through Python-UDF or SQL scripts. At the same time, for heterogeneous data fusion, entity alignment algorithms are used to associate cross-source data, and time window alignment is used to solve time series deviations.

[0076] The preprocessed user-side resource data is used as the raw data. Clustering is then performed on the raw data, specifically by constructing a two-layer clustering model for load-side resources based on the back-correction principle. The feedback mechanism of the back-correction principle uses sufficient information to correct errors caused by insufficient information, while also associating the adjustable potential of user load characteristics. This achieves accurate classification considering the multi-dimensional influencing factors of user electricity consumption behavior. The first stage of the two-layer clustering uses the K-means clustering algorithm, specifically clustering user electricity load data to obtain K groups of users with similar load characteristics. The second stage of the two-layer clustering uses the pattern classification performance of a self-organizing competitive neural network, specifically performing a second clustering on user groups with similar load characteristics to obtain a comprehensive clustering result considering the adjustable potential of user load characteristics.

[0077] Before performing secondary clustering, this embodiment uses principal component analysis (PCA) to reduce the dimensionality of the data on factors influencing user electricity consumption behavior, and uses the reduced principal components as input for secondary clustering.

[0078] In this embodiment, the load-side resource two-layer clustering model introduces a reverse correction mechanism. The specific processing procedure of this mechanism is as follows: the secondary clustering result is used as the training dataset of the BP neural network, the primary clustering result is corrected in reverse, and finally the secondary clustering is repeated to obtain the comprehensive clustering result. Through the powerful adaptive learning ability and nonlinear mapping ability of the BP neural network, the output of the secondary clustering can flexibly adjust the primary clustering result.

[0079] Specifically, the load-side resource two-layer clustering model accurately divides the user group, obtaining a comprehensive clustering result that considers both load characteristics and adjustability potential.

[0080] Inputs to the load-side resource two-layer clustering model: user electricity load data and data on factors influencing electricity consumption behavior (such as household composition and building type obtained from questionnaire surveys, representing adjustable potential).

[0081] Load-side resource two-layer clustering model processing procedure:

[0082] First clustering: The load data is clustered using the K-means algorithm to obtain preliminary user groups based on electricity consumption curves.

[0083] Secondary clustering: The results of the primary clustering and the data on factors influencing electricity consumption behavior after dimensionality reduction are input into a self-organizing competitive neural network (SOM) for secondary clustering, which initially introduces adjustable potential information.

[0084] Backward correction: Using the results of the secondary clustering as the training set, a backpropagation (BP) neural network is trained to learn and simulate the decision-making process of secondary clustering. This BP network is then used to correct the initial results of the primary clustering, forming a feedback loop. Finally, through iterative optimization, a stable comprehensive clustering result is obtained.

[0085] Output of the load-side resource two-layer clustering model: the comprehensive cluster category label to which each user belongs.

[0086] Step 2: Construct a user-side load resource identification model to identify the operating status of equipment.

[0087] This step mainly uses principal component analysis (PCA) to establish the time series of load energy consumption characteristics, and applies the dynamic time adjustment (DTW) algorithm to calculate the distance between the two time series. The distance is used as a measure of the similarity between the load time series to be identified and the equipment reference time series. Before applying the Dynamic Time Adjustment (DTW) algorithm, waveform segmentation is performed on the low-frequency load time series. In the Matlab environment, waveform segmentation divides the continuous load time series into independent segments to form candidate waveform segments, which facilitates the matching operation of the Dynamic Time Adjustment (DTW) algorithm. The starting point of the subsequence is determined based on the jump value of the load power. The similarity metric is used to determine which equipment state the waveform segment belongs to. In the process of confirming the starting point of the subsequence, in order to exclude load power changes caused by power fluctuations or other interferences during normal equipment operation, a power jump threshold is set. When the load power change is greater than the power jump threshold, it is considered that a device has been started or shut down, and it can be identified as the starting point of the subsequence. For the power drop state in the load power change, it may also be caused by the switching of the working mode. Therefore, when the jump value in the power drop state is greater than the power jump threshold, it is also necessary to determine whether the load power value after the drop state and the load power in the T time periods after time t have entered a stable state. If they have entered a stable state, it is caused by the switching of the working mode; otherwise, it is the device shutdown state.

[0088] Optionally, the power jump threshold satisfies the following:

[0089] ;

[0090] in This is expressed as the change in load power over time t. The load power value at time t is represented by the historical average power, which is calculated as the average power over a recent period (such as the past 24 hours). θ represents the power jump threshold, which is set to 0.5 (i.e. 50%). This threshold is set based on the power change characteristics of typical residential loads. θ=0.5 can effectively distinguish between equipment start-up and shutdown events and normal fluctuations, reducing false identification.

[0091] The core objective of the user-side load resource identification model is to accurately identify the specific type of electrical equipment currently in operation by analyzing the power transient waveforms generated during load switching.

[0092] Input to the user-side load resource identification model:

[0093] Real-time load power time series: The total active power data of users' load collected by the branch monitoring device at low frequency (e.g., once every minute) constitutes a continuous time series segment.

[0094] Equipment Reference Waveform Library: A pre-built database that stores standard power characteristic time series templates of various typical electrical devices (such as air conditioners, electric water heaters, electric vehicle charging piles, washing machines, etc.) in the start-up, operation, and shutdown states.

[0095] User-side load resource identification model processing procedure:

[0096] Waveform Segmentation: The model first performs a sliding window scan on the input real-time power sequence and applies a power jump threshold (e.g., setting a change exceeding 50% of the historical average power as a valid event) to detect the starting point of candidate load events. Once a positive or negative jump exceeding the threshold is detected, a fixed-length load power time subsequence is extracted from this starting point to form a candidate load event waveform segment.

[0097] Feature extraction and dimensionality reduction: For each candidate load event waveform segment, principal component analysis (PCA) is used to extract features and reduce dimensionality, transforming it into a low-dimensional vector that retains the main shape features, called the time series representation vector of energy use features.

[0098] Similarity Matching and Recognition: The Dynamic Time Adjustment (DTW) algorithm is applied to calculate the DTW distance between the time series representation vector of the energy consumption feature and all template vectors in the device reference waveform library, using this distance as a similarity metric. The DTW distance effectively measures the similarity between two time series of different lengths and phases. Finally, the model identifies the candidate segment as the device type corresponding to the device template with the smallest DTW distance.

[0099] The user-side load resource identification model outputs this result, which is used as the first type of parameter:

[0100] The identified device type (e.g., "Air Conditioner-1", "Electric Vehicle Charging Pile"), the device's start and stop timestamps, and the confidence level of the event (usually calculated based on the normalized value of the DTW distance).

[0101] Step 3: Construct a load resource parameter prediction model based on LSTM to predict the load resource parameters.

[0102] Combination Figure 2 As shown, the LSTM-based load resource parameter prediction model includes a multi-scale feature extraction module, a feature fusion module, and a time series prediction module. The multi-scale feature extraction module adopts a multi-input design and includes four branch paths:

[0103] The first branch processes one-dimensional time series data, using a reshaping operation to convert it into two-dimensional data. Then, two-dimensional convolutional and pooling layers are used to extract local and global features across different time spans. These feature extraction operations help capture key patterns and information in the time series data. After the reshaping operation, the data is passed sequentially through an average pooling layer and a max pooling layer, then flattened, and finally output as the first branch features after passing through a fully connected layer.

[0104] The second branch processes the input sequence data using a recursive and upsampling (Scale-DNN) network structure and skip connections. Scale-DNN employs a recursive design concept, upsampling the output of each module to enhance the effective extraction and capture of fine-grained dependencies within the time series. Skip connections fully utilize the correlation between previously processed information and new input data to facilitate the capture of important features in the time series data, ultimately yielding the second branch features. These features more effectively reveal subtle dependencies in the time series data, thereby improving model performance.

[0105] The third branch extracts relevant information between trends and fluctuations in long-term time series based on bidirectional LSTM. Specifically, it first uses a one-dimensional neural network to perform one-dimensional downsampling on the time series, then uses a bidirectional LSTM to extract relevant information about trends and fluctuations from the downsampled sequence, finally outputting the third branch features. The one-dimensional downsampling operation enhances the ability to grasp the overall trend of long-term load resources, while the bidirectional LSTM network captures fluctuation characteristics. Through this comprehensive approach, a deeper understanding of the key features in time series data is gained, enhancing the model's ability to analyze long-term trends.

[0106] The fourth branch uses Light-GBM to deeply correlate exogenous features with load resource sequences. At the same time, date, weather data and temperature data are integrated into the input of the fourth branch to comprehensively evaluate the impact of external factors on load resource sequences and obtain the features of the fourth branch.

[0107] The feature fusion module concatenates or weights the features extracted from the four branches to obtain a comprehensive feature representation; the temporal prediction module uses an attention-based LSTM, and finally flattens and fully connects the output of the attention-based LSTM as the final output.

[0108] Among them, combined Figure 3As shown: The attention-based LSTM consists of a serial structure of a self-attention layer and a bidirectional interactive LSTM. In the self-attention layer, the attention-based LSTM restores multi-scale features to time-series weighted feature outputs. The first bidirectional direction is from the initial feature of the sequence to the end feature of the sequence, and the second bidirectional direction is from the end feature of the sequence to the initial feature of the sequence. One of the inputs of the first LSTM in the second bidirectional interaction direction is the output of the last LSTM in the first direction, so that the output sequence of the attention-based LSTM can more comprehensively consider the sequence LSTMs in different directions.

[0109] The attention-based LSTM first calculates attention weights for the comprehensive feature representation of different time steps through a self-attention layer. The model can focus on key time steps in the input sequence (such as peak load periods) and capture contextual information by combining bidirectional interactive LSTM. This enhances the model's ability to extract long-term trends and fluctuation features and improves the prediction accuracy of load parameters (such as power and adjustable capacity).

[0110] Optionally, the formula for calculating attention weights is as follows:

[0111] ;

[0112] in, Let be the attention weight at time step t (range [0,1]), representing the importance of that time step for the prediction. This is represented as an attention score. It is represented as the LSTM hidden state vector at time step t (the dimension is determined by the number of LSTM units, usually set to 64-256 dimensions). It is represented as a trainable weight matrix (the dimension is the square of the hidden state dimension, which is learned automatically through training). Represented as a context vector (with the same dimensions as the hidden state), it is typically the initial state or global state of the decoder. This represents the total length of the time series.

[0113] The LSTM-based load resource parameter prediction model is a multi-branch deep learning model that deeply integrates multi-source information and aims to achieve high-precision prediction of future load parameters (such as power and adjustable capacity).

[0114] Inputs to the load resource parameter prediction model:

[0115] Historical and current load time series data: historical load power, current and other time series data over a period of time (e.g., 72 hours).

[0116] Real-time exogenous features include date and time features (hours, weekdays, etc.) and meteorological features (temperature, humidity, weather type coding).

[0117] User cluster label: The comprehensive clustering result obtained from step 1 to which the user belongs serves as an important static feature characterizing their electricity consumption behavior pattern and adjustability potential.

[0118] The preprocessed historical and current load time series data, real-time exogenous features, and the comprehensive clustering results of the user are fused to construct a model input with a multi-branch input structure.

[0119] Internal structure and processing of the load resource parameter prediction model:

[0120] Multi-scale window feature extraction (four-branch parallel processing):

[0121] First branch (local and global features): Reshape the one-dimensional load sequence into a two-dimensional structure, and use two-dimensional convolution and pooling layers to extract local fluctuations and global contour features at different time spans;

[0122] The second branch (fine-grained dependency): It uses a combination of recursive and upsampling networks (Scale-DNN) and skip connections to enhance the ability to capture fine-grained temporal dependencies within a sequence;

[0123] The third branch (long-term trend and volatility): First, the sequence is downsampled in one dimension to highlight the long-term trend, and then a bidirectional LSTM is used to extract the deep relevant information between the trend and volatility from the downsampled sequence.

[0124] The fourth branch (external correlation): uses the Light-GBM algorithm to deeply explore the nonlinear correlation between exogenous features (such as temperature and date) and load sequences.

[0125] Feature fusion: The feature vectors extracted from the above four branches are concatenated or weighted and fused to form a comprehensive feature representation that includes local, global, fine-grained, long-term trend and external factor information.

[0126] Temporal prediction: The fused features are input into a bidirectional interactive LSTM network based on an attention mechanism. The attention mechanism is responsible for assigning appropriate weights to features at different time steps, focusing on key information; the bidirectional interactive LSTM further captures temporal contextual dependencies from both directions, and finally outputs the prediction result through a fully connected layer.

[0127] The load resource parameter prediction model outputs include, but are not limited to, the following:

[0128] Total load power curve: Overall electricity load forecast for future periods;

[0129] Adjustable capacity: Based on the identified load equipment and its characteristics, predict the range of load power that may be safely reduced or transferred within a specific future period;

[0130] Load resilience parameters: such as response speed, maximum response duration, etc.

[0131] In this step, the output of the load resource parameter prediction model is used as the second type of parameter.

[0132] Furthermore, this embodiment employs a progressive optimization strategy, inputting the comprehensive clustering results into the LSTM-based load resource parameter prediction model for training. This includes a pre-training phase, a fine-tuning phase, and a dynamic update mechanism phase. The pre-training phase uses user electricity load resource data from different regions, employing a contrastive learning paradigm to enable the model to learn deep feature representations independent of specific regional user electricity load resource data. Domain Adversarial Neural Network (DANN) training is introduced to enhance model transferability. The fine-tuning phase implements a course learning strategy, training in stages according to complexity. First, sunny day samples are trained, then cloudy and overcast day samples are gradually added, and finally extreme weather data is introduced. The loss function uses an adaptive weighting scheme, dynamically adjusting the weights of different samples based on the prediction error. In the dynamic update mechanism phase, a dual-buffered training architecture is set up. While the main model provides services, the shadow model continuously learns new data. A concept drift monitoring based on KL divergence is implemented, triggering model updates when data distribution changes exceed a threshold. Simultaneously, the Elastic Weight Consolidation (EWC) method is used to balance the retention and updating of old knowledge.

[0133] Optionally, the loss function used during training is the Elastic Weight Fixation (EWC) loss function, as shown in the following formula:

[0134] ;

[0135] in, Represented as the overall loss function, This can be represented as a loss function (such as mean squared error) on the new data. Represented as the model parameter of the first i One element, This is represented as the i-th element of the old model parameters. Represented as parameters, The diagonal elements (dimensionless) of the Fisher information matrix measure the importance of parameters. This is expressed as a regularization coefficient (dimensionless), set to 1.0. This value is based on the concept drift characteristics in the power load forecasting task. This formula is used for the dynamic update mechanism. Through the EWC loss function, the model retains important parameters of old knowledge when learning new data. Combined with a double-buffered training architecture and KL divergence monitoring, stable updates are achieved. This ensures the adaptability and accuracy of the load parameter forecasting model in long-term deployment and improves the reliability of power grid regulation.

[0136] Step 4: Based on the predicted parameters of load resources, build a resource aggregation management platform to further manage load resources.

[0137] This step involves constructing a resource aggregation management platform based on predicted load resource parameters for further management of load resources. The resource aggregation management platform includes a resource management dashboard, a real-time monitoring dashboard, a data analysis dashboard, an operation planning dashboard, a regulation and operation monitoring dashboard, an anomaly dashboard, and a multi-timescale adjustable resource comparison dashboard. The resource management and real-time monitoring dashboards manage user energy storage, charging pile resources, and flexible load resources. The data analysis dashboard includes resource health data analysis, response speed data analysis, response accuracy data analysis, and maximum response rate data analysis. The operation planning dashboard includes resource adjustable capacity configuration, safe operation strategies, and economic operation strategies. The system includes a smooth power consumption curve operation strategy and a cloud-edge collaborative operation strategy. The operation monitoring function dashboard includes a real-time operation monitoring overview, real-time power statistics monitoring, power curve comparison monitoring, resource quantity comparison monitoring, prediction result monitoring, aggregated control capability and cost assessment monitoring, and control effectiveness monitoring. The abnormal status function dashboard includes electrical appliance abnormal status monitoring and resource allocation abnormal status monitoring. The multi-timescale adjustable resource comparison dashboard includes aggregated load resources, direct procurement resources, resource inventory, and resource comparison. Based on future data feedback, the load resource parameter prediction model based on STML is adjusted.

[0138] In the specific implementation process, the optimized model and toolchain can also be packaged into a standardized service package. The LSTM-based load resource parameter prediction model is integrated into the algorithm repository of the user scheduling platform through Docker containerization, and the lightweight model on the edge side is deployed to smart meters to support local inference.

[0139] Meanwhile, configuration management utilizes Ansible playbooks for batch deployment of dependent environments and Consul for dynamic service discovery. For user-hosted environments, offline installation packages and HTTPS encrypted transmission channels are provided to ensure compatibility and compliance.

[0140] The results can also be visualized, with a 3D visualization dashboard built based on WebGL and ECharts to display the power grid topology, load heat map, equipment health and prediction curves in real time. It is equipped with interactive functions to support drill-down analysis and dynamic early warning, and integrates a natural language question answering module. A lightweight H5 page is developed simultaneously for mobile devices, supporting real-time push of key indicators (such as adjustable resource capacity). The visualization design follows the "Power Grid Data Visualization Specification" and the user experience is optimized through A / B testing.

[0141] Example 2

[0142] This embodiment provides a load resource parameter accurate prediction system based on LSTM, including:

[0143] Data acquisition module: Used to acquire relevant user-side resource data and perform preprocessing;

[0144] Clustering module: Based on the preprocessed resource data of relevant users, it uses a two-level clustering model of load-side resources to perform clustering processing, and obtains a comprehensive clustering result that takes into account the adjustable potential of user load characteristics;

[0145] Identification module: Based on the pre-processed relevant user-side resource data, it uses the constructed user-side load resource identification model to analyze the power transient waveform generated during load switching, and identifies the type of currently operating electrical equipment, start-up and shutdown time, and duration as the first type of parameter;

[0146] Prediction module: Based on the preprocessed resource data from the relevant user side, combined with the comprehensive clustering results and real-time exogenous features, it uses a trained LSTM-based load resource parameter prediction model to perform time-series prediction processing, outputs the second type of parameters, and completes the parameter prediction process.

[0147] The rest are as in Example 1.

[0148] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0149] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0150] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0151] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0153] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0154] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A load resource parameter accurate prediction method based on LSTM, characterized in that, include: Obtain relevant user-side resource data and perform preprocessing; Based on the preprocessed resource data of the relevant users, a two-level clustering model of load-side resources is used for clustering to obtain a comprehensive clustering result that takes into account the adjustable potential of user load characteristics. Based on the preprocessed user-side resource data, the constructed user-side load resource identification model is used to analyze the power transient waveform generated during load switching, identifying the type of currently operating electrical equipment, start-up and shutdown time, and duration as the first type of parameter. The execution process of the user-side load resource identification model includes: Waveform segmentation: Based on the preprocessed real-time load power time series data, within a set time sliding window, when a set condition is met, a fixed-length load power time subsequence is extracted from this as the starting point of a candidate load event, forming a candidate load event waveform segment. The set condition is: , In the formula, Let be the change in load power over time t. The load power value at time t. The power jump threshold, This represents the average load power. Feature extraction: For each candidate load event waveform segment, principal component analysis is used to extract features and obtain a time series representation vector of energy consumption features. Similarity matching and recognition: A dynamic time adjustment algorithm is used to calculate the DTW distance between the time series representation vector of the energy consumption feature and all template vectors in the device reference waveform library, and use it as a similarity metric. Select the device type with the smallest DTW distance as the identification result of the corresponding candidate load event waveform segment, and output the currently activated electrical equipment type, start / stop time and duration; Based on the preprocessed resource data from the relevant user side, combined with the comprehensive clustering results and real-time exogenous features, a trained LSTM-based load resource parameter prediction model is used for time-series prediction processing, outputting a second type of parameters to complete the parameter prediction process. The second type of parameters includes the total load power curve, adjustable capacity, and load resilience parameters. The LSTM-based load resource parameter prediction model includes a multi-scale feature extraction module with four branches, a feature fusion module, and a time-series prediction module. The execution steps of the LSTM-based load resource parameter prediction model include: Input data fusion: The preprocessed historical and current load time series data, the comprehensive clustering results, and real-time exogenous features are fused together as input data; Multi-scale feature extraction: One-dimensional input data is fed into the first branch. It is first transformed into two-dimensional data by reshaping operation. Two-dimensional convolution and pooling operations are used to extract local fluctuations and global contour features at different time spans. Then, average pooling, max pooling and flattening operations are performed. Finally, the first branch features are output through fully connected operation. The one-dimensional input data is fed into the second branch and processed using recursive and upsampling networks and skip connections to obtain the features of the second branch. One-dimensional input data is fed into the third branch, a one-dimensional neural network is used to perform downsampling, and then a bidirectional LSTM is used to extract relevant information about trends and fluctuations from the downsampled sequence, and finally the features of the third branch are output. One-dimensional input data is fed into the fourth branch, and the Light-GBM algorithm is used to deeply mine the nonlinear correlation between the real-time exogenous features and historical and current load time series data, and finally output the features of the fourth branch. Multi-scale feature fusion: The first branch features, second branch features, third branch features and fourth branch features are input into the feature fusion module for feature concatenation or weighted fusion to obtain a comprehensive feature representation; Time series prediction: The comprehensive feature representation is input into the time series prediction module for time series prediction, and the predicted values ​​of load resource parameters for a specific future period are output, including the total load power curve, adjustable capacity and load elasticity parameters for the specific future period. The timing prediction module employs an attention-based LSTM for timing prediction. The attention-based LSTM includes a serially connected self-attention layer and a bidirectional interactive LSTM. Its execution steps include: Attention weights are assigned to the comprehensive feature representation at different time steps through a self-attention layer, wherein the expression for calculating the attention weights is: , In the formula, The attention weights are for time step t. The attention score at time step t. Let be the LSTM hidden state vector at time step t. The total length of the time series. For trainable weight matrix, For context vectors; Based on the assigned attention weights, a bidirectional interactive LSTM is used to further capture temporal context dependencies from both directions, ultimately outputting the predicted load resource parameters for a specific future period.

2. The method for accurate prediction of load resource parameters based on LSTM according to claim 1, characterized in that, The relevant user-side resource data includes branch load monitoring data and data on factors influencing electricity consumption behavior, among which, The user electricity load data collected by the meter-based branch monitoring device is used as the branch load monitoring data. The branch load monitoring data consists of four quantities: physical quantity, electrical quantity, status quantity, and environmental quantity. The branch load monitoring data also includes load power time series data and load time series data.

3. The method for accurate prediction of load resource parameters based on LSTM according to claim 1, characterized in that, The preprocessing process includes integration and transformation as well as data cleaning and transformation. The integration and transformation steps include: For the resource data on the relevant user side, linear interpolation of adjacent time periods or default values ​​of business rules are used to fill the data, and rule-based transformation is performed. The data cleaning and transformation steps include: Based on the integration and transformation, invalid data is removed by regular expressions and threshold filtering, missing data is filled by spatiotemporal interpolation or business rules, and then structured transformation is performed, including unit unification, encoding mapping and field merging. During the preprocessing process, batch processing is performed using Python-UDF or SQL scripts. For heterogeneous data fusion, an entity alignment algorithm is used to associate cross-source data, and time-series alignment is achieved through a time window alignment method.

4. The method for accurate prediction of load resource parameters based on LSTM according to claim 1, characterized in that, The steps for obtaining the comprehensive clustering results that take into account the adjustable potential of user load characteristics include: First clustering: Based on the preprocessed user electricity load data, the K-means clustering algorithm is used to cluster users into K groups with the same load characteristics, which is the result of the first clustering. Secondary clustering: Principal component analysis is used to reduce the dimensionality of the data on factors influencing electricity consumption behavior. The reduced data is then used as input for secondary clustering. Based on the pattern classification performance of the self-organizing competitive neural network, secondary clustering is performed on the user groups with the same load characteristics, resulting in a comprehensive clustering result that considers the adjustable potential of user load characteristics.

5. The method for accurate prediction of load resource parameters based on LSTM according to claim 4, characterized in that, The load-side resource two-layer clustering model introduces a reverse correction mechanism to correct the comprehensive clustering results that consider the adjustable potential of user load characteristics. The specific steps include: The comprehensive clustering results that take into account the adjustable potential of user load characteristics are used as the training dataset for the BP neural network. The first clustering results are then corrected in reverse, and finally the second clustering is repeated to complete the correction process.

6. The method for accurate prediction of load resource parameters based on LSTM according to claim 1, characterized in that, A progressive optimization strategy is employed to train the LSTM-based load resource parameter prediction model. The training process includes a pre-training phase, a fine-tuning phase, and a dynamic update mechanism phase. The pre-training phase uses a contrastive learning paradigm and introduces domain adversarial training. The fine-tuning phase employs a course learning strategy, training in stages according to complexity. In the dynamic update mechanism phase, a double-buffered training architecture and a concept drift monitoring method based on KL divergence are used for dynamic updates. The LSTM-based load resource parameter prediction model uses the following loss function during training: , In the formula, For the overall loss function, For the loss function on the new data, The regularization coefficient is . For parameters, For the model parameters i One element, The first parameter of the old model i Each element.

7. A prediction system for the LSTM-based method for accurate prediction of load resource parameters according to any one of claims 1-6, characterized in that, include: Data acquisition module: Used to acquire relevant user-side resource data and perform preprocessing; Clustering module: Based on the preprocessed resource data of relevant users, it uses a two-level clustering model of load-side resources to perform clustering processing, and obtains a comprehensive clustering result that takes into account the adjustable potential of user load characteristics; Identification module: Based on the pre-processed relevant user-side resource data, it uses the constructed user-side load resource identification model to analyze the power transient waveform generated during load switching, and identifies the type of currently operating electrical equipment, start-up and shutdown time, and duration as the first type of parameter; Prediction module: Based on the preprocessed resource data from the relevant user side, combined with the comprehensive clustering results and real-time exogenous features, it uses a trained LSTM-based load resource parameter prediction model to perform time-series prediction processing, outputs the second type of parameters, and completes the parameter prediction process.

Citation Information

Patent Citations

  • Double-layer adaptive clustering method considering load characteristics and adjustable potential

    CN115861671A

  • User load prediction method and device based on secondary clustering

    CN121052417A