Park power grid flexible load resource optimization method and system based on deep learning
By collecting and processing operational data and meteorological information of flexible load entities within the park, and using deep learning models for load forecasting, the problem of difficulty in capturing coupling relationships and spatiotemporal correlation patterns in existing technologies has been solved. This has enabled high-precision and high-robustness load forecasting, meeting the needs of flexible load resource scheduling and active power distribution management in the park.
Patent Information
- Application Number
- CN202511128706.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-13
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-08-13
AI Technical Summary
In the existing power grid of the park, the existing load forecasting methods and existing technical means cannot solve specific problems. The existing technology is unable to capture the coupling relationship and spatiotemporal correlation pattern between different types of equipment, resulting in large errors and poor robustness in the load forecasting results, which makes it difficult to meet the accuracy and precision requirements of flexible load resource scheduling and active distribution management in the park.
By collecting operational data and meteorological information of flexible load entities within the park, multi-dimensional load features are extracted and coupled. A deep learning-based park load prediction model is used for load prediction, including preprocessing, dynamic coupling, model training and adjustment. Hierarchical encoder architecture, bidirectional temporal attention blocks and feature distillation layers are employed to generate load prediction curves for future time windows.
It effectively reduces the error of flexible load resource forecasting results in the park, improves the accuracy and robustness of flexible load resource forecasting, and meets the accuracy and precision requirements of flexible load resource scheduling and active power distribution management in the park.
Smart Images

Figure CN120634201B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flexible power grid technology, and in particular to a method and system for optimizing flexible load resources in a campus power grid based on deep learning. Background Technology
[0002] As industrial park power grids transform towards intelligence and flexibility, precise forecasting of flexible load resources has become a crucial link in achieving load regulation, demand response, and coordinated supply and demand control. With a high proportion of renewable energy integration and the coexistence of various energy-consuming terminals, the load characteristics of industrial park power grids exhibit highly dynamic and nonlinear features. Especially under extreme conditions such as high temperature, high humidity, or fluctuating electricity prices, the response behavior of flexible load resources such as air conditioners, electric vehicle charging stations, and interruptible industrial loads is extremely complex. Existing load forecasting methods are mostly based on single data sources, fixed characteristics, and static models, making it difficult to capture the coupling relationships and spatiotemporal correlation patterns between different types of equipment. Furthermore, existing solutions lack systematic processing for the alignment and fusion of multi-source heterogeneous data, ignoring factors such as sampling rate differences, inconsistent spatial granularity, and load response time delays. This results in large errors and poor robustness in load forecasting results, failing to meet the accuracy and precision requirements for flexible load resource scheduling and active distribution management in industrial parks. Summary of the Invention
[0003] To address the problems existing in the prior art, this invention provides a method and system for optimizing flexible load resources in a park power grid based on deep learning. This method can effectively reduce the error of the prediction results of flexible load resources in the park, improve the accuracy and robustness of the prediction, and meet the accuracy and precision requirements of flexible load resource scheduling and active distribution management in the park.
[0004] In a first aspect, embodiments of the present invention provide a method for optimizing flexible load resources in a campus power grid based on deep learning, comprising:
[0005] The system collects operational data from each flexible load entity within the target park and meteorological information monitored by meteorological stations around the target park; wherein, the operational data includes load information and electricity price information of the corresponding flexible load entities;
[0006] The operational data and meteorological information are preprocessed to obtain multi-dimensional load characteristics; wherein, the multi-dimensional load characteristics include load characteristics, meteorological characteristics and electricity price characteristics;
[0007] Based on the aforementioned multi-load characteristics, the correlation between weather and electricity price fluctuations is dynamically coupled to obtain coupling characteristics;
[0008] Based on the multi-variable load characteristics and the coupling characteristics, load prediction is performed using a pre-trained park load prediction model to obtain the park load prediction curve within a future set time window;
[0009] Based on the park load forecast curve, load resources are adjusted for the flexible load entities within the target park.
[0010] As an improvement to the above scheme, the preprocessing of the operational data and meteorological information to obtain multi-dimensional load characteristics includes:
[0011] The contribution of each flexible load subject is calculated based on the absolute deviation between the first historical average power consumption of each of the flexible load subjects and the second average power consumption of the target park, and the preset weight distribution steepness adjustment parameters.
[0012] The load information in the operating data of each flexible load subject is time-aligned using a dynamic time warping function to obtain the load characteristics of each flexible load subject;
[0013] The load characteristics of the target park are calculated based on the load characteristics and contribution of each of the flexible load subjects.
[0014] The meteorological information is spatially interpolated and diffused using a preset convolution kernel to obtain the spatially interpolated meteorological characteristics of the meteorological information within the target park.
[0015] The electricity price information is time-aligned and interpolated with the load characteristics of the target park to obtain the electricity price characteristics;
[0016] The load characteristics, meteorological characteristics, and electricity price characteristics of the target park are combined to obtain the multi-dimensional load characteristics.
[0017] As an improvement to the above scheme, the dynamic coupling of the correlation between weather and electricity price fluctuations based on the multi-load characteristics to obtain coupling characteristics includes:
[0018] Based on the aforementioned multi-variable load characteristics, calculate the mixed second-order partial derivative of the electricity price characteristics with respect to the meteorological characteristics;
[0019] Based on the aforementioned multi-variable load characteristics, calculate the gradient Euclidean norm of the electricity price characteristics with respect to the meteorological characteristics;
[0020] Meteorological coupling weights are calculated based on the mixed second-order partial derivatives, the gradient Euclidean norm, and the preset sensitivity coefficients, using a nonlinear activation function.
[0021] The product between the temperature element at each time point in the meteorological feature and the electricity price element at the corresponding time point in the electricity price feature is calculated to obtain the temperature-electricity price product feature.
[0022] The product between the humidity element at each time point in the meteorological feature and the electricity price element at the corresponding time point in the electricity price feature is calculated to obtain the humidity-electricity-price product feature.
[0023] The coupling feature is generated based on the meteorological coupling weight, the temperature-electricity price product feature, and the humidity-electricity price product feature.
[0024] As an improvement to the above scheme, the training process of the park load prediction model includes:
[0025] Historical operating data of each flexible load entity within the target park and historical meteorological information monitored by meteorological stations around the target park are collected; wherein, the historical operating data includes historical load information and historical electricity price information of the corresponding flexible load entities;
[0026] The historical operating data and historical meteorological information are preprocessed to obtain historical multi-dimensional load characteristics; wherein, the historical multi-dimensional load characteristics include historical load characteristics, historical meteorological characteristics, and historical electricity price characteristics;
[0027] Based on the aforementioned historical multi-load characteristics, the correlation between weather and electricity price fluctuations is dynamically coupled to obtain historical coupling characteristics;
[0028] Based on the historical multi-load characteristics and the historical coupling characteristics, the park load prediction model is trained until the preset convergence condition is met, and a trained park load prediction model is obtained.
[0029] As an improvement to the above scheme, the step of training the park load prediction model based on the historical multi-dimensional load characteristics and the historical coupling characteristics until a preset convergence condition is met, to obtain a trained park load prediction model, includes:
[0030] The historical multivariate load features and the historical coupling features are concatenated to obtain the input feature matrix;
[0031] The input feature matrix is input into the park load prediction model built on bidirectional temporal attention for model training to obtain the historical park predicted load curve of this round of output;
[0032] The loss value and KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding park actual load curve are calculated using a preset double-penalty loss function.
[0033] Based on the loss value and the KL divergence distribution matching fluctuation, it is determined whether the convergence condition is met; wherein, the convergence condition includes: the decrease in the loss value for multiple consecutive rounds is less than a preset decay threshold, and the KL divergence distribution matching fluctuation for multiple consecutive rounds is less than a preset fluctuation threshold.
[0034] If so, stop training the park load prediction model and output the trained park load prediction model;
[0035] If not, continue training the park load prediction model.
[0036] As an improvement to the above scheme, the park load prediction model includes an input layer, a bidirectional temporal attention block, a feature distillation layer, a decoding layer constructed based on a gated deconvolution module, and an output layer, all configured according to a hierarchical encoder architecture.
[0037] Specifically, the causal convolutional layer in the bidirectional temporal attention block captures the forward temporal dependency features of the input feature matrix received by the input layer to obtain the query vector matrix;
[0038] The backward historical pattern features of the input feature matrix received by the input layer are captured by the temporally reversed convolutional layer in the bidirectional temporal attention block to obtain the key vector matrix and the value vector matrix.
[0039] In the attention mechanism layer of the bidirectional temporal attention block, attention weights are calculated based on the query vector matrix and the key vector matrix, and an attention mechanism output matrix is generated based on the attention weights, the value vector matrix, and the query vector matrix.
[0040] The attention mechanism output matrix is processed sequentially through the feature distillation layer, the decoding layer, and the output layer to generate the corresponding historical park predicted load curve.
[0041] As an improvement to the above solution, the method further includes:
[0042] The input feature matrix is subjected to k-means clustering analysis to divide the input feature matrix into multiple clusters, and the cluster center of each cluster corresponds to a load pattern.
[0043] Calculate the variance of each cluster, and obtain the weight coefficient of the corresponding cluster based on the proportion of the variance of each cluster to the sum of the variances of all clusters.
[0044] Principal component analysis is performed on each cluster center to reduce its dimensionality so that the dimensionality of each cluster center meets the input requirements of the park load prediction model.
[0045] Based on the weight coefficients of each cluster, the weighted sums of the cluster centers after dimensionality reduction are obtained to get the initial weight matrix;
[0046] The model parameters of the park load prediction model are initialized using the initial weight matrix.
[0047] As an improvement to the above scheme, the double-penalty loss function includes a mean absolute error term, a curvature constraint term, and a distribution matching term;
[0048] The step of calculating the loss value and KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding park actual load curve using a preset double-penalty loss function includes:
[0049] Calculate the average absolute error between the predicted load in the historical park predicted load curve and the actual load in the corresponding park actual load curve to obtain the average absolute error term;
[0050] Calculate the second difference of the predicted load in the predicted load curve of the historical park, and calculate the Frobenius norm of the second difference to obtain the curvature constraint term;
[0051] The KL divergence distribution matching fluctuation between the probability distribution of the historical park predicted load curve and the probability distribution of the corresponding park actual load curve is calculated and used as the distribution matching term;
[0052] Based on the mean absolute error term, the curvature constraint term, and the distribution matching term, the loss value between the historical park predicted load curve and the corresponding park actual load curve is obtained.
[0053] As an improvement to the above solution, the method further includes:
[0054] At the start of each training round, the decay rate of the learning rate for the current training round is calculated using the natural exponential function based on the ratio of the current training round to the preset total number of training rounds and the variance of the loss value for the current training round.
[0055] The learning rate of the park load prediction model is dynamically adjusted using the decay rate.
[0056] Secondly, embodiments of the present invention provide a campus power grid flexible load resource optimization system based on deep learning, comprising:
[0057] The data acquisition module is used to collect operational data of each flexible load entity within the target park and meteorological information monitored by meteorological stations around the target park; wherein, the operational data includes load information and electricity price information of the corresponding flexible load entities;
[0058] The data preprocessing module is used to preprocess the operational data and the meteorological information to obtain multi-dimensional load characteristics; wherein, the multi-dimensional load characteristics include the spatiotemporally aligned load characteristics, meteorological characteristics and electricity price characteristics of each of the flexible load subjects;
[0059] The feature coupling module is used to dynamically couple the correlation between weather and electricity price fluctuations based on the multi-element load characteristics to obtain coupling features;
[0060] The load forecasting module is used to perform load forecasting based on the multi-variable load characteristics and the coupling characteristics, using a pre-trained park load forecasting model, to obtain the park load forecasting curve within a future set time window.
[0061] The load resource adjustment module is used to adjust the load resources of the flexible load entities in the target park according to the park load forecast curve.
[0062] Compared to existing technologies, this invention provides a deep learning-based method and system for optimizing flexible load resources in a park power grid. This method collects operational data from various flexible load entities within a target park and meteorological information monitored by meteorological stations around the target park. The operational data includes load information and electricity price information for the corresponding flexible load entities. The operational data and meteorological information are preprocessed to obtain multi-dimensional load characteristics, including load characteristics, meteorological characteristics, and electricity price characteristics. Based on these multi-dimensional load characteristics, the correlation between meteorological and electricity price fluctuations is dynamically coupled to obtain coupling characteristics. Based on the multi-dimensional load characteristics and the coupling characteristics, a pre-trained park load prediction model is used to predict the load, resulting in a park load prediction curve within a future set time window. Based on the park load prediction curve, load resources are adjusted for the flexible load entities within the target park. This invention effectively reduces the error in the prediction results of flexible load resources in a park, improves the accuracy and robustness of the prediction, and meets the accuracy and precision requirements for flexible load resource scheduling and active distribution management in a park. Attached Figure Description
[0063] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is a flowchart of a method for optimizing flexible load resources in a campus power grid based on deep learning, provided in an embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram comparing the curves of absolute error obtained using different prediction methods, provided in an embodiment of the present invention.
[0066] Figure 3This is a comparative schematic diagram of load distribution using different loss functions provided in an embodiment of the present invention;
[0067] Figure 4 This is a schematic diagram comparing the curves of the 24-hour average absolute error obtained using different prediction methods, provided in an embodiment of the present invention.
[0068] Figure 5 This is a scatter plot of the prediction results obtained by load forecasting using ARIMA, provided in an embodiment of the present invention.
[0069] Figure 6 This is a scatter plot of the prediction results obtained by using LSTM for load forecasting provided in an embodiment of the present invention;
[0070] Figure 7 This is a scatter plot of the prediction results obtained by load forecasting using GNN-GRU according to an embodiment of the present invention.
[0071] Figure 8 This is a scatter plot of the prediction results obtained by load forecasting using the embodiments of the present invention.
[0072] Figure 9 This is a structural block diagram of a campus power grid flexible load resource optimization system based on deep learning, provided by an embodiment of the present invention. Detailed Implementation
[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0074] It is understood that the various numerical designations used in the embodiments of this invention are merely for descriptive convenience and are not intended to limit the scope of this application. The order of the process numbers does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.
[0075] In embodiments of the invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. The terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0076] See Figure 1 , Figure 1 This is a flowchart illustrating a deep learning-based method for optimizing flexible load resources in a campus power grid, as provided in an embodiment of the present invention. The deep learning-based method for optimizing flexible load resources in a campus power grid specifically includes:
[0077] S11: Collect operational data of each flexible load entity within the target park and meteorological information monitored by meteorological stations around the target park; wherein, the operational data includes load information and electricity price information of the corresponding flexible load entities;
[0078] S12: Preprocess the operational data and meteorological information to obtain multi-dimensional load characteristics; wherein, the multi-dimensional load characteristics include load characteristics, meteorological characteristics and electricity price characteristics;
[0079] S13: Based on the aforementioned multi-load characteristics, the correlation between weather and electricity price fluctuations is dynamically coupled to obtain coupling characteristics;
[0080] S14: Based on the multi-variable load characteristics and the coupling characteristics, load prediction is performed using a pre-trained park load prediction model to obtain the park load prediction curve within a future set time window;
[0081] S15: Adjust the load resources of the flexible load entities in the target park according to the park load forecast curve.
[0082] In this embodiment of the invention, the current operating data of each flexible load entity within the target park is collected, including timestamps, equipment identifiers of the corresponding flexible load entities, load information, electricity price information, etc.; meteorological information monitored by meteorological stations around the target park, including timestamps, temperature, humidity, etc. Then, the collected operational data and meteorological information are preprocessed to construct multi-dimensional load characteristics; forming a multi-dimensional load characteristic that includes load characteristics (load information), meteorological characteristics (temperature and humidity), and electricity price characteristics (electricity price information) of each flexible load subject; based on this multi-dimensional load characteristic, the correlation between meteorological and electricity price fluctuations is dynamically coupled to obtain coupled characteristics; then, the multi-dimensional load characteristics and coupled characteristics are concatenated and input into a pre-trained park load prediction model for load prediction, obtaining the park load prediction curve within a future set time window; finally, based on the park load prediction curve, load resources are adjusted for the flexible load subjects in the target park; this invention, by dynamically coupling the correlation between meteorological and electricity price fluctuations, can explore the impact of the interaction between meteorological and electricity price fluctuations on the load demand of flexible load subjects in the target park, thereby reducing the error of the model's prediction results for park flexible load resources, improving the accuracy and robustness of park flexible load resource prediction, and meeting the accuracy and precision requirements of park flexible load resource scheduling and active distribution management.
[0083] In one optional embodiment, the training process of the park load prediction model includes:
[0084] Historical operating data of each flexible load entity within the target park and historical meteorological information monitored by meteorological stations around the target park are collected; wherein, the historical operating data includes historical load information and historical electricity price information of the corresponding flexible load entities;
[0085] The historical operating data and historical meteorological information are preprocessed to obtain historical multi-dimensional load characteristics; wherein, the historical multi-dimensional load characteristics include historical load characteristics, historical meteorological characteristics, and historical electricity price characteristics;
[0086] Based on the aforementioned historical multi-load characteristics, the correlation between weather and electricity price fluctuations is dynamically coupled to obtain historical coupling characteristics;
[0087] Based on the historical multi-load characteristics and the historical coupling characteristics, the park load prediction model is trained until the preset convergence condition is met, and a trained park load prediction model is obtained.
[0088] For example, to predict the demand for flexible load resources within a target industrial park, smart meters and IoT sensors deployed at distribution network nodes collect minute-level operational data from various flexible load entities (i.e., electrical equipment, such as air conditioning systems, electric vehicle charging stations, and interruptible industrial equipment). Simultaneously, meteorological information from nearby meteorological stations provided by the meteorological bureau and electricity price information published by the power trading platform are accessed. Historical operational data, historical meteorological information, and historical electricity price information within a set time period are collected to construct a raw dataset containing timestamps, equipment identifiers, historical load information, historical meteorological information, and historical electricity price information.
[0089] Furthermore, based on the control instructions of flexible load entities recorded by the power grid dispatching system, the collected raw dataset is finely annotated through manual annotation. The specific annotation process is as follows:
[0090] First, based on the effective period of the control instructions, the "response period" and "baseline period" are marked in the historical load information (load time series) of each flexible load subject. The "response period" indicates the effective period of the control instructions, and the "baseline period" indicates the effective period of non-control instructions.
[0091] Then, based on the equipment identification, the system queries the preset equipment database to find the type attributes and adjustable capability parameters (such as maximum interruption duration and power adjustment range) of each flexible load entity, and marks the type attributes, such as temperature control type, energy storage type, and production type; at the same time, it marks the adjustable capability parameters, such as maximum interruption duration and power adjustment range.
[0092] Finally, based on historical meteorological and electricity price information, identify meteorological warning events (such as extreme temperatures, for example, temperatures exceeding a set temperature range are considered extreme temperatures) and electricity price fluctuation events (such as electricity prices corresponding to peak and valley periods, which can be preset or the period corresponding to the park's load exceeding a set load threshold within a day), and mark abnormal operating conditions for meteorological warning events and electricity price fluctuation events.
[0093] In an optional embodiment, the step of training the park load prediction model based on the historical multi-dimensional load characteristics and the historical coupling characteristics until a preset convergence condition is met to obtain a trained park load prediction model includes:
[0094] The historical multivariate load features and the historical coupling features are concatenated to obtain the input feature matrix;
[0095] The input feature matrix is input into the park load prediction model built on bidirectional temporal attention for model training to obtain the historical park predicted load curve of this round of output;
[0096] The loss value and KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding park actual load curve are calculated using a preset double-penalty loss function.
[0097] Based on the loss value and the KL divergence distribution matching fluctuation, it is determined whether the convergence condition is met; wherein, the convergence condition includes: the decrease in the loss value for multiple consecutive rounds is less than a preset decay threshold, and the KL divergence distribution matching fluctuation for multiple consecutive rounds is less than a preset fluctuation threshold.
[0098] If so, stop training the park load prediction model and output the trained park load prediction model;
[0099] If not, continue training the park load prediction model.
[0100] The park load prediction model includes an input layer, a bidirectional temporal attention block, a feature distillation layer, a decoding layer based on a gated deconvolution module, and an output layer, all configured according to a hierarchical encoder architecture.
[0101] Specifically, the causal convolutional layer in the bidirectional temporal attention block captures the forward temporal dependency features of the input feature matrix received by the input layer to obtain the query vector matrix;
[0102] The backward historical pattern features of the input feature matrix received by the input layer are captured by the temporally reversed convolutional layer in the bidirectional temporal attention block to obtain the key vector matrix and the value vector matrix.
[0103] In the attention mechanism layer of the bidirectional temporal attention block, attention weights are calculated based on the query vector matrix and the key vector matrix, and an attention mechanism output matrix is generated based on the attention weights, the value vector matrix, and the query vector matrix.
[0104] The attention mechanism output matrix is processed sequentially through the feature distillation layer, the decoding layer, and the output layer to generate the corresponding historical park predicted load curve.
[0105] Furthermore, the method also includes:
[0106] The input feature matrix is subjected to k-means clustering analysis to divide the input feature matrix into multiple clusters, and the cluster center of each cluster corresponds to a load pattern.
[0107] Calculate the variance of each cluster, and obtain the weight coefficient of the corresponding cluster based on the proportion of the variance of each cluster to the sum of the variances of all clusters.
[0108] Principal component analysis is performed on each cluster center to reduce its dimensionality so that the dimensionality of each cluster center meets the input requirements of the park load prediction model.
[0109] Based on the weight coefficients of each cluster, the weighted sums of the cluster centers after dimensionality reduction are obtained to get the initial weight matrix;
[0110] The model parameters of the park load prediction model are initialized using the initial weight matrix.
[0111] The double-penalty loss function includes a mean absolute error term, a curvature constraint term, and a distribution matching term.
[0112] The step of calculating the loss value and KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding park actual load curve using a preset double-penalty loss function includes:
[0113] Calculate the average absolute error between the predicted load in the historical park predicted load curve and the actual load in the corresponding park actual load curve to obtain the average absolute error term;
[0114] Calculate the second difference of the predicted load in the predicted load curve of the historical park, and calculate the Frobenius norm of the second difference to obtain the curvature constraint term;
[0115] The KL divergence distribution matching fluctuation between the probability distribution of the historical park predicted load curve and the probability distribution of the corresponding park actual load curve is calculated and used as the distribution matching term;
[0116] Based on the mean absolute error term, the curvature constraint term, and the distribution matching term, the loss value between the historical park predicted load curve and the corresponding park actual load curve is obtained.
[0117] Furthermore, the method also includes:
[0118] At the start of each training round, the decay rate of the learning rate for the current training round is calculated using the natural exponential function based on the ratio of the current training round to the preset total number of training rounds and the variance of the loss value for the current training round.
[0119] The learning rate of the park load prediction model is dynamically adjusted using the decay rate.
[0120] This invention embodiment considers the multi-source heterogeneous nature of the target park's power grid load information, the significant differences in sampling rates among different flexible load entities, the fact that meteorological information is typically monitored at a single point but needs to represent the entire park space, and that electricity price information is a global single scalar. Using simple interpolation or downsampling methods for processing would destroy the temporal correlation between the load information of different flexible load entities and ignore the spatial differences in meteorological conditions in different areas within the target park, resulting in severe loss of feature information after fusion. Therefore, this invention embodiment preprocesses the original dataset after annotation using a spatiotemporal dynamic alignment method. The specific preprocessing process is as follows:
[0121] First, the absolute deviation between the first historical average power consumption of the flexible load subject and the second historical average power consumption of the target park is calculated. Then, combined with the preset weight distribution steepness adjustment parameter, the energy consumption weight of each flexible load subject is dynamically calculated as the contribution of different flexible load subjects in feature fusion. The calculation formula of energy consumption weight is as follows.
[0122] (1);
[0123] in, This represents the energy consumption weight of the j-th flexible load element. The first historical average power consumption of the j-th flexible load body represents the energy consumption level of the equipment, and M represents the number of flexible load bodies in the target park; It is a natural exponential function; This represents the second historical average power consumption of the target campus, characterizing the overall energy consumption benchmark. This represents the weight distribution steepness adjustment parameter, which controls the degree of concentration in weight allocation, for example... .
[0124] Then, a dynamic time warping function is applied to perform time alignment on the historical load information of each flexible load subject with different sampling rates, using a unified baseline sampling rate as a reference, thereby preserving the temporal correlation between different historical load information. At the same time, a preset convolution kernel is used to perform spatial convolution operation on the spatial coordinates of meteorological stations, realizing the spatial interpolation and diffusion of meteorological information throughout the target source, thus making up for the shortcomings of single-point monitoring.
[0125] Next, the load characteristics obtained after time and space alignment and the meteorological characteristics obtained after spatial diffusion are combined with the electricity price information at the corresponding time to ensure that features from different sources, with different sampling rates, and with different spatial granularities are consistent and fused in both time and space, forming a spatiotemporally aligned feature vector (i.e., historical multivariate load characteristics), thus avoiding information loss. The functional expression of the historical multivariate load characteristics is as follows:
[0126] (2);
[0127] in, This represents the historical multivariate load features after spatiotemporal alignment. For example, for the original dataset, the data is divided according to a preset unit of time. The data corresponding to one unit of time is one sample. Correspondingly, after the above preprocessing, the corresponding historical multivariate load features can be obtained for one sample. Represents a dynamic time warping function; This indicates the time from time t to t+ of the j-th flexible load element. Historical load information at any given time (i.e., load sequence). The length of the time window (also known as a unit of time), such as Hour; This represents a baseline sampling rate sequence, unifying the sampling benchmark, such as at the minute level; This represents the feature concatenation operator, used to connect different feature components; Represents the convolution kernel (also known as the weather diffusion convolution kernel), for example , used for spatial interpolation; This represents the spatial convolution operator; Represents the spatial coordinates of the meteorological station. and These represent longitude and latitude, respectively. express Electricity price at any given time; This indicates the number of flexible load elements within the target park.
[0128] The process for generating the coupling characteristics between weather and electricity prices is as follows:
[0129] There is a dynamic nonlinear coupling effect between meteorological factors such as temperature and humidity and electricity price fluctuations. For example, the simultaneous occurrence of high temperature and high humidity may lead to a surge in air conditioning load and push up peak electricity prices. If meteorological information and electricity price information are processed independently, ignoring this dynamic interaction mechanism between the two, it will be impossible to accurately capture the intensity and pattern of the impact of meteorological conditions on electricity prices. Based on this, the embodiments of the present invention quantify the correlation strength between meteorology and electricity prices by coupling influencing factors and generate fused features. First, the mixed second-order partial derivatives of historical electricity price information with respect to temperature and humidity in historical meteorological information are calculated to reflect the combined influence of temperature and humidity interaction on electricity price changes at a specific moment. Simultaneously, the Euclidean L2 norm (i.e., gradient L2 norm) of historical electricity price information with respect to the temperature and humidity gradient vectors in historical meteorological information is calculated to characterize the overall sensitivity of electricity prices to changes in meteorological factors. Then, the mixed second-order partial derivatives are adjusted for sensitivity coefficients and input into a nonlinear activation function (such as the Sigmoid activation function), and multiplied by the gradient L2 norm to obtain the meteorological coupling weights at each moment (also called temperature and humidity coupling weights), used to dynamically adjust the contribution ratio of temperature and humidity to the impact on electricity prices. Next, the meteorological coupling weights are used to weight and fuse the element-wise product features of temperature and electricity price in historical meteorological information (i.e., historical temperature-electricity price product features) and the element-wise product features of humidity and electricity price in historical meteorological information (i.e., historical humidity-electricity price product features), and then feature concatenation is used to form the final coupling features, dynamically capturing the nonlinear interaction effect between meteorology and electricity prices, as specifically represented below:
[0130] (3);
[0131] (4);
[0132] in, express Meteorological coupling weights at any given time; This represents the Sigmoid activation function, used to compress the input to... Intervals are used to ensure the interpretability of weights; This represents the sensitivity coefficient, which controls the degree to which the coupling strength is sensitive to the second derivative, such as... ; express The mixed second-order partial derivative of electricity price with respect to temperature and humidity at any given time. This represents the temperature at time t. The humidity at time t is calculated by fitting historical temperature and humidity data to reflect the intensity of the interaction between temperature and humidity on electricity prices. Indicates the gradient of electricity price with respect to temperature and humidity. Norm, The gradient operator represents the partial derivative with respect to temperature T and humidity H. The L2 norm is the Euclidean norm, which characterizes the overall sensitivity of electricity prices to meteorological factors. Indicates historical coupling characteristics; Hadamard product, element-wise product, in and The meteorological-electricity price interaction characteristics are generated. Similarly, by performing the above processing on a sample within a unit of time, the historical coupling characteristics corresponding to that sample can be obtained.
[0133] In some embodiments, a scatter plot in three-dimensional space can visualize the key role of the dynamic coupling mechanism between meteorological factors and electricity price fluctuations in load forecasting. Experimental results show that load demand points in high-temperature and high-humidity areas (e.g., temperatures exceeding 30°C and humidity greater than 70%) exhibit a significant clustering and increasing trend. Furthermore, the steep rise in surface curvature in this region highly coincides with the warm hue of the coupling features, proving that the interaction between temperature and humidity triggers a surge in load through the electricity price transmission mechanism. Particularly in extreme weather regions, the coupling features generated by the embodiments of the present invention accurately capture the nonlinear jump points of the load, indicating that the embodiments of the present invention, by quantifying the coupling strength through hybrid partial derivatives and gradient norms, solve the inherent defects of existing technologies that independently process meteorological and electricity price information, and can accurately capture the intensity and pattern of the impact of meteorological condition changes on electricity prices.
[0134] After completing the above data processing, a deep feature extraction network structure is constructed to generate a park load prediction model. The processed data is then sampled to generate a model sequence for the park load prediction model, which is used for subsequent load demand prediction of the target park. The specific model construction and training process is as follows:
[0135] The model employs a hierarchical encoder architecture, consisting of an input layer, bidirectional temporal attention blocks, a feature distillation layer, a decoding layer, and an output layer. During training, the input layer receives the concatenation results of historical multivariate load features and historical coupled features after spatiotemporal alignment. The stacked bidirectional temporal attention blocks are the core of the model and the backbone of feature extraction, with the output of each attention block connected to the feature distillation layer. The first layer of the feature distillation layer uses dilated convolutions with an inflation rate of 2 to capture long-period patterns, the second layer uses max pooling with a stride of 2 to compress redundant features, and the last layer dynamically weights key feature dimensions through a channel attention mechanism. The decoding layer (also known as the decoding end) uses gated deconvolution modules to progressively upsample, and finally generates the prediction sequence by connecting a temporally distributed fully connected network to the output layer.
[0136] In this embodiment of the invention, considering that load demand forecasting needs to simultaneously capture the rapid transient response of a single flexible load entity and the long-term trend change of the entire park's load, traditional combined convolutional neural network and recurrent neural network models are difficult to effectively unify the modeling of such long-short-term temporal dependencies. Furthermore, in temporal modeling, if not handled properly, information from future time steps can easily be used to predict the current moment, causing future information leakage and leading to model failure in actual predictions. Therefore, this embodiment of the invention employs bidirectional temporal attention blocks. For each bidirectional temporal attention block, firstly, a one-dimensional causal convolution is used to process the input feature matrix. The causal convolution ensures, through a specific left-padding method, that the convolution output depends only on the input at the current and past moments, strictly guaranteeing temporal causality and effectively preventing future information leakage. This is mainly used to extract forward temporal dependency features. Simultaneously, a one-dimensional temporally reversed convolution is used to process the same input feature matrix, first reversing the input feature matrix along the time... The axis is reversed, convolution is performed, and then reversed back to the original temporal sequence to capture the backward historical pattern features contained in the sequence. The output of causal convolution is used as the query vector matrix, and the output of temporal reverse convolution is used as the key vector matrix and value vector matrix, respectively. Then, the query vector matrix and the key vector matrix are multiplied to calculate the attention score. After scaling, the softmax function is used for row normalization to obtain the attention weights, which are then applied to the value vector matrix to generate the output of the attention mechanism (i.e., the attention mechanism output matrix). Afterward, the attention output (i.e., the attention mechanism output matrix) and the output of causal convolution (i.e., the query vector matrix) are joined by a residual connection. This combines the forward dependency modeling capability of causal convolution and the backward pattern extraction capability of temporal reverse convolution, and then fuses bidirectional information through the attention mechanism. The original features are preserved through the residual connection, achieving a unified modeling of complex long and short-term temporal dependencies in the load information, as shown in the following figure:
[0137] (5);
[0138] (6);
[0139] (7);
[0140] in, Represents the query vector matrix, with dimensions of Generated by causal convolution, used to capture forward temporal dependencies; Represents the parameter space; Represents the key vector matrix, This is a matrix identifier with dimensions of . It is generated by temporally reverse convolution and is used to characterize backward temporal features; Represents a value vector matrix. This is a matrix identifier with dimensions of . , generated synchronously with the key vector; This represents the implicit dimension, i.e. Feature dimensions, such as ; This represents a one-dimensional causal convolution operation, in In the middle, parameters This indicates that the convolutional kernel width is 5 time steps, and left padding is used to ensure that the output timing length remains unchanged to prevent future information leakage; Represents the input feature matrix. ; This represents a one-dimensional temporal reverse convolution operation, in In the middle, parameters This indicates that the convolution kernel width is 5. First, the input sequence is reversed along the time axis, then convolved, and then reversed back to the original time sequence. This indicates the kernel size, which controls the receptive field for feature extraction; This represents the output matrix of the attention mechanism, with dimension 1. ; This represents the row normalization exponential function, which converts attention scores into a probability distribution; This represents the transpose of the product of the query vector matrix and the key vector matrix; This represents the scaling factor, used to stabilize the gradient.
[0141] For the model constructed above, the advantages of bidirectional time-series attention blocks in modeling complex load patterns are verified through multi-scale curve comparison. The prediction results of this embodiment closely match the long-term trend of the actual load. This embodiment can accurately capture a 300kW peak fluctuation lasting 25 minutes, while the comparison models (such as Transformer and LSTM) show response delay and amplitude attenuation. In addition, the advantages are further quantified through comparison of absolute error curves, such as... Figure 2 As shown, during the equipment state switching period (such as the 12th / 36th hour), the error of the embodiment of the present invention is always below 50kW, while the error of the comparison model soars to over 120kW, proving that the joint mechanism of bidirectional causal convolution and temporal reverse convolution can effectively unify the ability to model transient response and long-term trends.
[0142] Furthermore, considering that the load information of the power grid in the park usually exhibits obvious time-period patterns, such as different patterns on weekdays and holidays, and different load curves in different seasons, if the model uses conventional random initialization of weights, the model needs to learn these complex patterns from scratch, which will lead to slow convergence during the training process. Therefore, after completing the model construction, this embodiment of the invention uses an initialization method based on historical load pattern clustering for adaptive weight initialization, enabling the model to learn from typical load patterns and accelerate convergence. The specific process is as follows: First, the number of cluster centers is preset, and the k-means clustering algorithm is used to analyze the historical input feature matrix set, dividing the historical input feature matrix into several categories. The cluster centers of each category represent a typical load pattern, such as corresponding to different seasonal patterns. (e.g., winter, summer, etc.) or time-period patterns (e.g., peak hours) or combinations of seasons and time periods; then, calculate the variance of each cluster to characterize the stability of that type of load pattern; subsequently, based on the proportion of each cluster's variance to the sum of all cluster variances, obtain the weight coefficient for that cluster. Clusters with larger variances usually contain more diverse patterns and are assigned higher weights; perform principal component analysis to reduce the dimensionality of the high-dimensional load patterns represented by each cluster center, reducing the dimension of the cluster centers to the same dimension as the model input layer; use the weight coefficients of each cluster to perform a weighted summation of the features of each cluster center after dimensionality reduction, generating the final initial weight matrix, which is used to initialize the parameters of the first layer constructed above, so that the initial state of the model contains typical historical load pattern knowledge, specifically represented as follows:
[0143] (8);
[0144] (9);
[0145] (10);
[0146] in, For the first The cluster centers, generated by the k-means clustering algorithm, represent the i-th cluster center. Load-like mode, These correspond to different load patterns for different seasons / time periods. It is a set of historical input feature matrices, containing historical load information for multiple time units; This is the k-means clustering algorithm. This indicates that the number of cluster centers is 4; For the first The weight coefficients of each cluster are determined by the proportion of the intra-cluster variance to the total cluster variance; For the first The variance of the cluster corresponding to each cluster center characterizes the stability of this type of load pattern; It is the sum of the variances of the four clusters; This is used to initialize the weight matrix, which is used for parameter initialization in the first layer of the model. Indicates the cluster center Perform principal component analysis for dimensionality reduction. The dimension after dimensionality reduction is consistent with the dimension of the model input layer.
[0147] Furthermore, considering that load curves often undergo abrupt changes due to the start-up and shutdown of flexible loads, traditional ReLU family activation functions are not differentiable at zero input values, which is not conducive to model optimization. At the same time, ReLU sets all negative input values to zero, ignoring negative signals that may contain important information, which is not good for capturing load decline or shutdown states. Based on this, the present invention employs a smooth rectifier unit activation function, combined with a dynamic adjustment threshold calculated from the mean of the absolute values of the input feature vector obtained by concatenating historical multivariate load features and historical coupling features corresponding to all samples in the current training batch. This threshold is used to control the boundaries of different regions of the function. When the input value is greater than the dynamic adjustment threshold, the function adopts a linear response to maintain the normal transmission of positive signals. When the input value is less than the negative dynamic adjustment threshold, the function adopts a linear response with a fixed leakage coefficient in the negative region to retain key negative information. Furthermore, within the interval where the absolute value of the input value is less than or equal to the dynamic adjustment threshold, the function adopts a quadratic function form to ensure that the function is not only continuous at the zero point, but also that its first derivative is continuous, achieving a smooth transition. This makes the activation function particularly suitable for the step change points in load information caused by equipment start-up and shutdown, providing better gradient and negative information processing capabilities while maintaining computational efficiency. The specific expression of the activation function of the model is as follows:
[0148] (11);
[0149] in, This represents the neuron input values of the model, which are the weighted sum of the outputs of the previous layer; The activation function for the smoothing rectifier unit; To dynamically adjust the threshold, it is calculated from the current batch of data to control the boundary of the linear interval. The calculation method is expressed as follows: ; This represents the number of samples in the current training batch. For the first The input feature matrix (or input feature vector) corresponding to each sample. The absolute value of the input feature matrix is obtained by taking the absolute value of each element and then calculating the norm. For the leakage coefficient in the negative region, if a fixed value is taken... Control the degree to which negative value information is retained; When the activation function is a quadratic function, Ensure that The first derivative is continuous and smoothly transitions. When the activation function is linear A linear response that maintains a positive value; When the function is linear Negative values are retained.
[0150] Furthermore, considering that using single-objective loss functions such as mean absolute error or mean squared error focuses on the accuracy of predicted point values but neglects the smoothness of the predicted load curve and the consistency between the overall distribution characteristics of the predicted load and the actual load distribution, this invention constructs a double-penalty loss function containing three core terms in real time to simultaneously optimize prediction accuracy, curve smoothness, and distribution matching. The first term is the mean absolute error term, which directly measures the prediction accuracy by calculating the average absolute error between the predicted values and the actual load values at the corresponding times in all historical park load prediction curves. The second term is the curvature constraint term. First, the second-order difference of the predicted load sequence corresponding to the historical park load prediction curve is calculated to characterize the curvature or smoothness change of the historical park load prediction curve, i.e., the smoothness of the load curve. Then, the Frobenius norm of this second-order difference matrix is calculated as the curvature constraint term (i.e., the penalty term) to suppress drastic and unrealistic fluctuations in the predicted load curve. The third term is the distribution matching term. It calculates the Kullback-Leibler (KL) divergence between the probability distribution of the predicted load sequence corresponding to the historical park load forecast curve and the probability distribution of the actual load sequence corresponding to the park's actual load curve at the corresponding time, and measures the degree of difference between the two distributions. This is used as the KL divergence distribution matching fluctuation (i.e., distribution matching) term to ensure that the predicted load curve maintains consistency with the actual load curve in overall statistical characteristics. Summing the mean absolute error term, curvature constraint term, and distribution matching term obtained above yields the final loss value. The overall double-penalty loss function of the model is specifically expressed as follows:
[0151] (12);
[0152] in, The total loss value needs to be minimized through backpropagation; The predicted load vector for all times; for Forecast load values at any given time; ; for The actual load value at any given time; for The absolute error between the predicted value and the actual value at any given time; The term is the mean absolute error. Indicates the time length of the predicted / actual load sequence; for The second-order difference is calculated as follows: ; It is the Frobenius norm; This is the curvature constraint penalty coefficient, which can be set to a fixed value. ; The distribution is KL divergence. To predict the probability distribution of the load sequence; This represents the probability distribution of the true load sequence; The term represents the distribution matching term, which measures the difference between the predicted distribution and the true distribution; The distribution matching penalty coefficient, such as taking a fixed value. .
[0153] Multi-dimensional analysis verifies the prediction accuracy of the double-penalty loss function, mean squared error loss function (MSE), and mean absolute error loss function (MAE). Specifically, in the time range of equipment cluster start-up and shutdown events, conventional MSE prediction loses details of 300kW sudden changes due to over-smoothing, and MAE produces step-like artifacts. However, the double-penalty loss function in this embodiment accurately reproduces the slope of the 120kW / minute change. Figure 3 The probability density plot shown reveals that the predicted load distribution in the embodiment of the present invention has an overlap of over 90% with the actual load distribution, which is significantly higher than the matching degree of the mean squared error loss function (MSE) and the mean absolute error loss function (MAE), proving that the KL divergence constraint effectively ensures the consistency of statistical characteristics. At the same time, comparing the predicted load curves under the three loss functions, it can be seen that the load prediction curve of the embodiment of the present invention maintains the sharpness of event response while the curvature fluctuation amplitude (0-0.03) is closest to the actual load, while the comparison method still has high-frequency oscillations (curvature > 0.04) during the steady period, confirming that the curvature constraint term successfully suppresses non-physical fluctuations.
[0154] Furthermore, in the later stages of model training, fine-tuning of model parameters is required to achieve optimal performance. However, park load information typically exhibits non-stationary characteristics, such as pattern drift. Conventional fixed decay strategies cannot dynamically adjust according to the model's current actual learning state, making it difficult to adapt to these data characteristics and potentially leading to poor convergence or oscillations. Therefore, this embodiment of the invention employs a variance-sensitive decayer to dynamically adjust the decay rate of the learning rate. The adjustment is based on the fluctuation of the loss value corresponding to the validation dataset (e.g., dividing the original dataset into 70% for training and 30% for validation) over several recent training rounds. The validation loss variance is obtained by calculating the loss values of the validation dataset in recent rounds, reflecting the stability of the model's performance on the validation dataset. At the start of training, the learning rate for that round is calculated using the natural exponential function, based on the ratio of the current training round to the preset total number of training rounds and the current variance of the validation loss. Specifically, when the loss value exhibits high variance, it means that the model training may be unstable or in a sensitive region. In this case, the learning rate decays faster to help stabilize the training process. Conversely, when the loss value exhibits low variance, it means that the model training is in good condition. In this case, the strategy slows down the decay of the learning rate, allowing the model to make more fine-tuning parameters at the current learning rate to pursue a better solution. Furthermore, the initial learning rate serves as the starting point, and the variance normalization factor is used to balance the impact of the magnitude of the loss value variance on the decay calculation, achieving adaptive matching between the learning rate decay and the actual training state and progress of the model. The specific implementation of the model's learning rate adjustment is as follows:
[0155] (13);
[0156] in, For the first Learning rate during training rounds; The initial learning rate, if a fixed value is used. ; It is a natural exponential function; The variance of the loss value is calculated using the loss values from the five most recent consecutive training epochs. This is the loss value; This is the variance normalization factor, such as taking a fixed value. , used to balance the magnitude of variance; For the current training round, start counting from 1; The preset total number of training rounds; The training progress coefficient, ranging from [0,1], represents the current training completion rate.
[0157] In this embodiment of the invention, mini-batch gradient descent is used during the training process, and double convergence determination is performed by using a validation dataset after each round of training.
[0158] Specifically, the primary criterion is whether the loss value in the validation dataset decreases by less than the decay threshold set by the dynamic learning rate scheduler for five consecutive rounds. The secondary criterion is whether the KL divergence distribution matching term (i.e., KL divergence distribution matching fluctuation) between the load prediction sequence and the actual composite sequence reaches a preset fluctuation threshold (i.e., the stability boundary, such as 1%). When both convergence conditions are met, an early stopping mechanism is triggered to save the optimal weights and output the trained model. If the convergence conditions are not met even after reaching the maximum number of training rounds, a backup mode is automatically activated to load the historical best checkpoint (i.e., optimal weights) and trigger the feature importance analysis module to locate ineffective features for targeted retraining. For example, features with negligible impact on model accuracy, or even those whose deletion does not affect model performance, are identified using methods such as SHAP values and gradient analysis. These features are also considered ineffective features, indicating that they did not play a positive role in training and may even slow down training due to increased computation. After locating ineffective features, they are filtered out from the historical input feature matrix, and the model is retrained to optimize the training effect.
[0159] In one optional embodiment, the preprocessing of the operational data and the meteorological information to obtain multi-dimensional load characteristics includes:
[0160] The contribution of each flexible load subject is calculated based on the absolute deviation between the first historical average power consumption of each of the flexible load subjects and the second average power consumption of the target park, and the preset weight distribution steepness adjustment parameters.
[0161] The load information in the operating data of each flexible load subject is time-aligned using a dynamic time warping function to obtain the load characteristics of each flexible load subject;
[0162] The load characteristics of the target park are calculated based on the load characteristics and contribution of each of the flexible load subjects.
[0163] The meteorological information is spatially interpolated and diffused using a preset convolution kernel to obtain the spatially interpolated meteorological characteristics of the meteorological information within the target park.
[0164] The electricity price information is time-aligned and interpolated with the load characteristics of the target park to obtain the electricity price characteristics;
[0165] The load characteristics, meteorological characteristics, and electricity price characteristics of the target park are combined to obtain the multi-dimensional load characteristics.
[0166] In an optional embodiment, the step of dynamically coupling the correlation between weather and electricity price fluctuations based on the multi-load characteristics to obtain coupling characteristics includes:
[0167] Based on the aforementioned multi-variable load characteristics, calculate the mixed second-order partial derivative of the electricity price characteristics with respect to the meteorological characteristics;
[0168] Based on the aforementioned multi-variable load characteristics, calculate the gradient Euclidean norm of the electricity price characteristics with respect to the meteorological characteristics;
[0169] Meteorological coupling weights are calculated based on the mixed second-order partial derivatives, the gradient Euclidean norm, and the preset sensitivity coefficients, using a nonlinear activation function.
[0170] The product between the temperature element at each time point in the meteorological feature and the electricity price element at the corresponding time point in the electricity price feature is calculated to obtain the temperature-electricity price product feature.
[0171] The product between the humidity element at each time point in the meteorological feature and the electricity price element at the corresponding time point in the electricity price feature is calculated to obtain the humidity-electricity-price product feature.
[0172] The coupling feature is generated based on the meteorological coupling weight, the temperature-electricity price product feature, and the humidity-electricity price product feature.
[0173] For example, after completing the model training described above, real-time operational data (including load information and electricity price) of each flexible load entity within the target park and meteorological information monitored by meteorological stations around the target park are collected within a preset unit time period. The preprocessing method described above is used to construct real-time multi-dimensional load characteristics. Then, the meteorological-electricity price coupling method described above is used to generate real-time coupled characteristics. The obtained real-time multi-dimensional load characteristics and coupled characteristics are then concatenated and input into the trained park load prediction model. A bidirectional temporal attention block captures long-term and short-term dependencies, and finally, the output layer generates a park load prediction curve within a future set sliding time window, indicating the park load resource demand within the future set sliding time window. Finally, based on this park load prediction curve, load resource adjustments are made to the flexible load entities (such as those marked as adjustable) within the target park to balance the load resources within the park, forming a "prediction-optimization" closed-loop control link. For example, the model performs rolling prediction updates every 15 minutes, and the model hot update mechanism is automatically triggered by the model stability index recorded by the dynamic learning rate scheduler.
[0174] For example, by comparing the error fluctuations of the method of this embodiment with other methods at different times of the day, with particular attention to the predictive stability during peak electricity consumption periods, the comparison results are as follows: Figure 4 As shown, Figure 4The horizontal axis represents the 24-hour period, and the vertical axis displays the mean absolute error value under different methods, characterizing the prediction performance of the autoregressive moving average model ARIMA, the long short-term memory network LSTM, the prophetic model Prophet, the convolutional neural network-gated recurrent unit combination CNN-GRU, and the implementation of this invention. Experimental results show that all methods have significantly increased errors during peak electricity consumption periods in the morning and evening (such as 7-9 am and 5-7 pm), but the implementation of this invention always maintains the lowest error level and the smallest fluctuation. Especially in the afternoon when air conditioning load surges, the implementation of this invention accurately captures the dynamic interaction effect of temperature, humidity and electricity price through the meteorological-electricity price coupling feature generation mechanism, which significantly reduces the peak load prediction deviation. Moreover, the error curve of the implementation of this invention has moderate smoothness and reasonable fluctuation, reflecting the complexity of load changes in real scenarios. Its outstanding performance during key periods verifies the advantages of the spatiotemporal dynamic alignment layer in fusing multi-source heterogeneous data.
[0175] Furthermore, by comparing the Autoregressive Moving Average (ARIMA) model, the Long Short-Term Memory (LSTM) network, the Prophet model, the Convolutional Neural Network-Gated Recurrent Unit (CNN-GRU) combination, and the scatter plot of the present invention, the correlation between the predicted results and the actual load values can be examined. Figure 5-8 As shown in the figure, the horizontal axis represents the actual load value, the vertical axis represents the predicted load value, and the reference diagonal represents the ideal prediction. It can be seen that the scatter points from this invention are closely distributed on both sides of the reference line, forming a narrow and concentrated band-like distribution, while the scatter points from other methods show a diffusion trend. This proves that the prediction results from this invention have the smallest systematic deviation, indicating that the curvature constraint term suppresses unrealistic load fluctuations, and the distribution matching term ensures that the predicted sequence is consistent with the statistical characteristics of the actual load. Especially in high-load areas, the scatter points from this invention still maintain a good linear relationship, and the park load prediction model of this embodiment has a stronger predictive ability for peak loads.
[0176] Compared to existing technologies, this invention integrates data with different sampling rates and spatial granularities through spatiotemporal dynamic alignment, ensuring the temporal correlation of load sequences of various devices within the park. It also overcomes the limitations of conventional interpolation and downsampling methods, avoiding information loss and enabling the processing of heterogeneous data from different devices and sensors. This improves the system's adaptability to changes in park power grid load demand, maintaining high prediction accuracy and stability, especially in highly dynamic and complex environments. Furthermore, by calculating the mixed second-order partial derivatives of temperature and humidity and the sensitivity of electricity prices to meteorological gradients, the nonlinear coupling effect between meteorology and electricity prices is dynamically quantified, capturing the impact of temperature, humidity, and electricity price changes on load fluctuations. This addresses the problem of conventional methods neglecting this interaction effect, significantly reducing prediction errors during peak periods, especially in scenarios with surging equipment loads, effectively predicting load fluctuations and further improving the accuracy of park load forecasting.
[0177] This invention constructs a bidirectional temporal attention block and extracts temporal dependencies through causal convolution and temporal reverse convolution. This enables a unified modeling of transient responses and long-term trends in load information, avoids future information leakage, solves the problem of insufficient modeling of short-term and long-term temporal dependencies in traditional models, and improves prediction accuracy and stability. It has significant advantages, especially in dealing with complex patterns of park load.
[0178] The embodiments of the present invention use historical load patterns obtained by clustering to perform adaptive weight initialization of the model, avoiding learning complex load patterns from scratch, accelerating model convergence, and introducing a variance-sensitive attenuator strategy to dynamically adjust the learning rate, thus optimizing the training process. In particular, it is more adaptable to non-stationary load information and adapts to the time-varying characteristics of park load information.
[0179] See Figure 9 , Figure 9 This invention provides a structural block diagram of a deep learning-based flexible load resource optimization system for a campus power grid. The deep learning-based flexible load resource optimization system for a campus power grid includes:
[0180] The data acquisition module 11 is used to collect the operation data of each flexible load entity within the target park and the meteorological information monitored by meteorological stations around the target park; wherein, the operation data includes the load information and electricity price information of the corresponding flexible load entity;
[0181] The data preprocessing module 12 is used to preprocess the operating data and the meteorological information to obtain multi-dimensional load characteristics; wherein, the multi-dimensional load characteristics include the spatiotemporally aligned load characteristics, meteorological characteristics and electricity price characteristics of each of the flexible load subjects;
[0182] The feature coupling module 13 is used to dynamically couple the correlation between weather and electricity price fluctuations based on the multi-element load characteristics to obtain coupling features;
[0183] The load forecasting module 14 is used to perform load forecasting based on the multi-variable load characteristics and the coupling characteristics, using a pre-trained park load forecasting model, to obtain the park load forecasting curve within a future set time window.
[0184] The load resource adjustment module 15 is used to adjust the load resources of the flexible load entities in the target park according to the park load forecast curve.
[0185] In an optional embodiment, the data preprocessing module 12 includes:
[0186] The contribution calculation unit is used to calculate the contribution of each flexible load subject based on the absolute deviation between the first historical average power consumption of each flexible load subject and the second average power consumption of the target park, and a preset weight distribution steepness adjustment parameter.
[0187] The first load feature generation unit is used to perform time alignment on the load information in the operation data of each of the flexible load subjects using a dynamic time warping function to obtain the load features of each of the flexible load subjects.
[0188] The second load characteristic generation unit is used to calculate the load characteristics of the target park based on the load characteristics and contribution of each of the flexible load subjects.
[0189] The meteorological feature generation unit is used to perform spatial interpolation and diffusion on the meteorological information using a preset convolution kernel to obtain the spatially interpolated meteorological features of the meteorological information within the target park.
[0190] The electricity price feature generation unit is used to perform time alignment and interpolation processing between the electricity price information and the load characteristics of the target park to obtain the electricity price feature;
[0191] The multi-load characteristic generation unit is used to splice the load characteristics, meteorological characteristics and electricity price characteristics of the target park to obtain the multi-load characteristics.
[0192] In an optional embodiment, the feature coupling module 13 includes:
[0193] A mixed second-order partial derivative calculation unit is used to calculate the mixed second-order partial derivative of the electricity price characteristic with respect to the meteorological characteristic based on the multi-element load characteristics;
[0194] The gradient Euclidean norm calculation unit is used to calculate the gradient Euclidean norm of the electricity price characteristic with respect to the meteorological characteristic based on the multivariate load characteristics.
[0195] The meteorological coupling weight calculation unit is used to calculate the meteorological coupling weight based on the mixed second-order partial derivative, the gradient Euclidean norm, and the preset sensitivity coefficient, using a nonlinear activation function.
[0196] The temperature-electricity-price product feature generation unit is used to calculate the product between the temperature element at each time in the meteorological feature and the electricity price element at the corresponding time in the electricity price feature, so as to obtain the temperature-electricity-price product feature.
[0197] The humidity-electricity-price product feature generation unit is used to calculate the product between the humidity element at each time in the meteorological feature and the electricity price element at the corresponding time in the electricity price feature, so as to obtain the humidity-electricity-price product feature.
[0198] The coupling feature generation unit is used to generate the coupling feature based on the meteorological coupling weight, the temperature-electricity price product feature, and the humidity-electricity price product feature.
[0199] In an optional embodiment, the system further includes:
[0200] The historical data acquisition module is used to collect historical operating data of each flexible load entity within the target park and historical meteorological information monitored by meteorological stations around the target park; wherein, the historical operating data includes historical load information and historical electricity price information of the corresponding flexible load entities;
[0201] The second preprocessing module is used to preprocess the historical operating data and the historical meteorological information to obtain historical multi-dimensional load characteristics; wherein, the historical multi-dimensional load characteristics include historical load characteristics, historical meteorological characteristics and historical electricity price characteristics;
[0202] The second feature coupling module is used to dynamically couple the correlation between weather and electricity price fluctuations based on the historical multi-load characteristics to obtain historical coupling characteristics;
[0203] The model training module is used to train the park load prediction model based on the historical multi-dimensional load characteristics and the historical coupling characteristics until the preset convergence conditions are met, so as to obtain the trained park load prediction model.
[0204] In one optional embodiment, the model training module includes:
[0205] The feature splicing unit is used to splice the historical multivariate load features and the historical coupling features to obtain the input feature matrix;
[0206] The training unit is used to input the input feature matrix into the park load prediction model built based on bidirectional temporal attention for model training, and to obtain the historical park predicted load curve of the current round of output;
[0207] The loss calculation unit is used to calculate the loss value and KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding park actual load curve through a preset double penalty term loss function;
[0208] The convergence judgment unit is used to determine whether the convergence condition is met based on the loss value and the KL divergence distribution matching fluctuation. The convergence condition includes: the decrease in the loss value for multiple consecutive rounds is less than a preset decay threshold, and the KL divergence distribution matching fluctuation for multiple consecutive rounds is less than a preset fluctuation threshold. If yes, the training of the park load prediction model is stopped, and the trained park load prediction model is output. If no, the training of the park load prediction model continues.
[0209] In one optional embodiment, the park load prediction model includes an input layer, a bidirectional temporal attention block, a feature distillation layer, a decoding layer constructed based on a gated deconvolution module, and an output layer, all configured according to a hierarchical encoder architecture.
[0210] Specifically, the causal convolutional layer in the bidirectional temporal attention block captures the forward temporal dependency features of the input feature matrix received by the input layer to obtain the query vector matrix;
[0211] The backward historical pattern features of the input feature matrix received by the input layer are captured by the temporally reversed convolutional layer in the bidirectional temporal attention block to obtain the key vector matrix and the value vector matrix.
[0212] In the attention mechanism layer of the bidirectional temporal attention block, attention weights are calculated based on the query vector matrix and the key vector matrix, and an attention mechanism output matrix is generated based on the attention weights, the value vector matrix, and the query vector matrix.
[0213] The attention mechanism output matrix is processed sequentially through the feature distillation layer, the decoding layer, and the output layer to generate the corresponding historical park predicted load curve.
[0214] In an optional embodiment, the system further includes:
[0215] The clustering analysis module is used to perform k-means clustering analysis on the input feature matrix to divide the input feature matrix into multiple clusters, and the cluster center of each cluster corresponds to a load pattern.
[0216] The cluster weight coefficient calculation module is used to calculate the variance of each cluster and obtain the weight coefficient of the corresponding cluster based on the proportion of the variance of each cluster to the sum of the variances of all clusters.
[0217] The dimensionality reduction module is used to perform principal component analysis dimensionality reduction on each of the cluster centers so that the dimensions of each cluster center meet the input requirements of the park load prediction model.
[0218] The weight matrix calculation module is used to perform a weighted summation of the dimensionality-reduced cluster centers based on the weight coefficients of each cluster to obtain an initial weight matrix.
[0219] The model parameter initialization module is used to initialize the model parameters of the park load prediction model using the initialization weight matrix.
[0220] In one optional embodiment, the double-penalty loss function includes a mean absolute error term, a curvature constraint term, and a distribution matching term;
[0221] The loss calculation unit includes:
[0222] The mean absolute error calculation subunit is used to calculate the average value of the absolute error between the predicted load in the historical park predicted load curve and the actual load in the corresponding park actual load curve, and obtain the mean absolute error term.
[0223] The norm calculation subunit is used to calculate the second difference of the predicted load in the historical park predicted load curve, and to calculate the Frobenius norm of the second difference to obtain the curvature constraint term.
[0224] The divergence distribution calculation subunit is used to calculate the KL divergence distribution matching fluctuation between the probability distribution of the historical park predicted load curve and the probability distribution of the corresponding park actual load curve, as a distribution matching term;
[0225] The loss value calculation subunit is used to obtain the loss value between the historical park predicted load curve and the corresponding park actual load curve based on the mean absolute error term, the curvature constraint term, and the distribution matching term.
[0226] In an optional embodiment, the system further includes:
[0227] The decay rate calculation module is used to calculate the decay rate of the learning rate of the current training round at the beginning of each training round, based on the ratio of the current training round to the preset total number of training rounds and the variance of the loss value of the current training round, using the natural exponential function.
[0228] The learning rate adjustment module is used to dynamically adjust the learning rate of the park load prediction model using the decay rate.
[0229] It should be noted that the working process of each module in the deep learning-based flexible load resource optimization system for park power grids described in the embodiments of the present invention can refer to the working process of the deep learning-based flexible load resource optimization method for park power grids described in the above embodiments, and the technical effects achieved are the same as those of the deep learning-based flexible load resource optimization method for park power grids described in the above embodiments, and will not be repeated here.
[0230] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A deep learning-based park power grid flexible load resource optimization method, characterized in that, The method comprises the following steps: Collecting operation data of each flexible load subject in a target park and meteorological information monitored by a meteorological station around the target park; wherein the operation data comprises load information and electricity price information of the corresponding flexible load subject; Preprocessing the operation data and the meteorological information to obtain multivariate load characteristics; wherein the multivariate load characteristics comprise load characteristics, meteorological characteristics and electricity price characteristics; According to the multivariate load characteristics, the correlation between meteorology and electricity price fluctuations is dynamically coupled to obtain coupling characteristics; According to the multivariate load characteristics and the coupling characteristics, load prediction is performed through a pre-trained park load prediction model to obtain a park load prediction curve in a future set time window; According to the park load prediction curve, the flexible load subject in the target park is adjusted; According to the multivariate load characteristics, the mixed second-order partial derivative of the electricity price characteristics with respect to the meteorological characteristics is calculated; According to the multivariate load characteristics, the gradient Euclidean norm of the electricity price characteristics with respect to the meteorological characteristics is calculated; According to the mixed second-order partial derivative, the gradient Euclidean norm and a preset sensitivity coefficient, the meteorological coupling weight is calculated based on a nonlinear activation function; The product of the temperature element at each time in the meteorological characteristics and the electricity price element at the corresponding time in the electricity price characteristics is calculated to obtain a temperature-electricity price product feature; The product of the humidity element at each time in the meteorological characteristics and the electricity price element at the corresponding time in the electricity price characteristics is calculated to obtain a humidity-electricity price product feature; According to the meteorological coupling weight, the temperature-electricity price product feature and the humidity-electricity price product feature, the coupling characteristics are generated. The preprocessing of the operation data and the meteorological information to obtain the multivariate load characteristics comprises:
2. The park power grid flexible load resource optimization method based on deep learning according to claim 1, wherein, According to the absolute deviation of the first historical average power consumption of each flexible load subject and the second average power consumption of the target park, a preset weight distribution steepness adjustment parameter, the contribution degree of each flexible load subject is calculated; The load information in the operation data of each flexible load subject is time-aligned using a dynamic time warping function to obtain the load characteristics of each flexible load subject; According to the load characteristics and the contribution degree of each flexible load subject, the load characteristics of the target park are calculated; The meteorological information is spatially interpolated and diffused using a preset convolution kernel to obtain the meteorological characteristics of the meteorological information after spatial interpolation in the target park; The electricity price information and the load characteristics of the target park are time-aligned and interpolated to obtain the electricity price characteristics; The load characteristics of the target park, the meteorological characteristics and the electricity price characteristics are spliced to obtain the multivariate load characteristics. The training process of the park load prediction model comprises: 3.The park power grid flexible load resource optimization method based on deep learning according to claim 1, wherein, Collect historical operation data of each flexible load subject in the target park and historical meteorological information monitored by a meteorological station around the target park; wherein the historical operation data includes historical load information and historical electricity price information of the corresponding flexible load subject; Preprocess the historical operation data and the historical meteorological information to obtain historical multi-element load characteristics; wherein the historical multi-element load characteristics include historical load characteristics, historical meteorological characteristics and historical electricity price characteristics; According to the historical multi-element load characteristics, the correlation between meteorology and electricity price fluctuations is dynamically coupled to obtain historical coupling characteristics; According to the historical multi-element load characteristics and the historical coupling characteristics, the park load prediction model is trained until the preset convergence condition is met to obtain the trained park load prediction model.
4. The park power grid flexible load resource optimization method based on deep learning according to claim 3, characterized in that, According to the historical multi-element load characteristics and the historical coupling characteristics, the park load prediction model is trained until the preset convergence condition is met to obtain the trained park load prediction model, including: Splice the historical multi-element load characteristics and the historical coupling characteristics to obtain an input feature matrix; Input the input feature matrix into the park load prediction model constructed based on bidirectional time series attention for model training to obtain the historical park predicted load curve of this round of output; Calculate the loss value and the KL divergence distribution matching fluctuation between the historical park predicted load curve and the corresponding real park load curve through the preset double penalty term loss function; According to the loss value and the KL divergence distribution matching fluctuation, it is judged whether the convergence condition is met; wherein the convergence condition includes that the decline amplitude of the loss value of the continuous multiple rounds is less than the preset attenuation threshold, and the KL divergence distribution matching fluctuation of the continuous multiple rounds is less than the preset fluctuation threshold; If yes, stop training the park load prediction model and output the trained park load prediction model; If not, continue to train the park load prediction model.
5. The park power grid flexible load resource optimization method based on deep learning according to claim 4, characterized in that, The park load prediction model includes an input layer, a bidirectional time series attention block, a feature distillation layer, a decoding layer constructed based on a gated deconvolution module, and an output layer arranged according to a hierarchical encoder architecture; Wherein, the forward time series dependent features of the input feature matrix received by the input layer are captured through the causal convolution layer in the bidirectional time series attention block to obtain a query vector matrix; The backward historical mode features of the input feature matrix received by the input layer are captured through the time reverse convolution layer in the bidirectional time series attention block to obtain a key vector matrix and a value vector matrix; In the attention mechanism layer in the bidirectional time series attention block, the attention weight is calculated according to the query vector matrix and the key vector matrix, and the attention mechanism output matrix is generated according to the attention weight, the value vector matrix and the query vector matrix; The attention mechanism output matrix is processed in turn through the feature distillation layer, the decoding layer and the output layer to generate the corresponding historical park predicted load curve.
6. The park power grid flexible load resource optimization method based on deep learning according to claim 4, characterized in that, The method further comprises: performing k-means clustering analysis on the input feature matrix to divide the input feature matrix into a plurality of clustering clusters, and a clustering center of each clustering cluster corresponds to a load mode; calculating a variance of each clustering cluster, and obtaining a weight coefficient of a corresponding clustering cluster according to a proportion of the variance of each clustering cluster in a total sum of variances of all clustering clusters, performing principal component analysis dimension reduction operation on each clustering center to make dimensions of each clustering center meet input requirements of the park load prediction model; performing weighted summation on each clustering center after dimension reduction according to the weight coefficient of each clustering cluster to obtain an initialized weight matrix; using the initialized weight matrix to initialize model parameters of the park load prediction model.
7. The park power grid flexible load resource optimization method based on deep learning according to claim 4, characterized in that, The double penalty term loss function includes an average absolute error term, a curvature constraint term, and a distribution matching term; The loss value between the historical park predicted load curve and the corresponding real park load curve is calculated by the preset double penalty term loss function and the KL divergence distribution matching fluctuation, which includes: calculating the average absolute error between the predicted load in the historical park predicted load curve and the real load in the corresponding real park load curve to obtain the average absolute error term; calculating the second-order difference of the predicted load in the historical park predicted load curve, and calculating the Frobenius norm of the second-order difference to obtain the curvature constraint term; calculating the KL divergence distribution matching fluctuation between the probability distribution of the historical park predicted load curve and the probability distribution of the corresponding real park load curve as the distribution matching term; obtaining the loss value between the historical park predicted load curve and the corresponding real park load curve according to the average absolute error term, the curvature constraint term, and the distribution matching term.
8. The park power grid flexible load resource optimization method based on deep learning according to claim 7, characterized in that, The method further includes: at the beginning of each training round, calculating the decay rate of the learning rate of the current training round by a natural exponential function according to the ratio of the current training round to the total number of preset training rounds and the variance of the loss value of the current training round; using the decay rate to dynamically adjust the learning rate of the park load prediction model.
9. A park power grid flexible load resource optimization system based on deep learning, characterized in that, It includes: a data acquisition module for acquiring operation data of each flexible load subject in a target park and meteorological information monitored by a meteorological station around the target park; wherein the operation data includes load information and electricity price information of the corresponding flexible load subject; a data preprocessing module for preprocessing the operation data and the meteorological information to obtain multivariate load features; wherein the multivariate load features include spatiotemporally aligned load features, meteorological features and electricity price features of each flexible load subject; a feature coupling module for dynamically coupling the correlation between meteorological and electricity price fluctuations according to the multivariate load features to obtain coupled features; a load prediction module for predicting the park load in a future set time window by a pre-trained park load prediction model according to the multivariate load features and the coupled features to obtain a park load prediction curve. The load resource adjustment module is configured to adjust a load resource of a flexible load subject in the target park according to the park load prediction curve. The feature coupling module includes: A mixed second-order partial derivative calculation unit is configured to calculate a mixed second-order partial derivative of the electricity price feature with respect to the meteorological feature according to the multi-element load feature; A gradient Euclidean norm calculation unit is configured to calculate a gradient Euclidean norm of the electricity price feature with respect to the meteorological feature according to the multi-element load feature; A meteorological coupling weight calculation unit is configured to calculate a meteorological coupling weight based on a nonlinear activation function according to the mixed second-order partial derivative, the gradient Euclidean norm, and a preset sensitivity coefficient; A temperature electricity price product feature generation unit is configured to calculate a product between a temperature element at each time in the meteorological feature and an electricity price element at a corresponding time in the electricity price feature, to obtain a temperature electricity price product feature; A humidity electricity price product feature generation unit is configured to calculate a product between a humidity element at each time in the meteorological feature and an electricity price element at a corresponding time in the electricity price feature, to obtain a humidity electricity price product feature; A coupling feature generation unit is configured to generate the coupling feature according to the meteorological coupling weight, the temperature electricity price product feature, and the humidity electricity price product feature.
Citation Information
Patent Citations
Power load prediction method based on multivariable time sequence information interaction
CN118333232A
Multi-time-scale area load adjustable capability prediction method and device
CN120256854A