Load decomposition method, device and equipment based on bayesian transfer learning
Patent Information
- Application Number
- CN202610531891.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-21
- Publication Date
- 2026-09-01
AI Technical Summary
[0005]本发明实施例提供了一种基于贝叶斯迁移学习的负荷分解方法、装置及设备,以解决负荷分解准确性低的问题
[0016] This invention provides a method, apparatus, and device for load decomposition based on Bayesian transfer learning. First, by clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior, the user's electricity consumption characteristics are classified and distinguished, and the electricity consumption category to which the net load to be decomposed belongs is identified, providing a basis for matching a dedicated decomposition model. Then, using the source domain data of each electricity consumption category, the initial model is trained specifically to obtain a dedicated load decomposition model adapted to each electricity consumption category. This allows the model to learn and identify the personalized decomposition characteristics of the net load in that category, and to uncover the personalized decomposition patterns of users in the corresponding category, ensuring that each electricity consumption category has a decomposition model that fits its own characteristics. Finally, based on the electricity consumption category of the net load to be decomposed, the corresponding dedicated load decomposition model is matched to complete the decomposition, enabling the model to accurately capture the inherent decomposition logic of the net load in that category and improve the accuracy of net load decomposition.
Smart Images

Figure CN122673786A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a load decomposition method, apparatus and equipment based on Bayesian transfer learning. Background Technology
[0002] Distributed photovoltaic (PV) power has been widely integrated into the power user-side distribution network system, becoming an important support for energy structure transformation. To achieve refined planning, operation, and management of the power system, accurately obtaining raw user-side electricity load and PV output data from the net load collected by electricity meters is crucial for grid dispatching and other tasks, and is of great significance for the efficient operation of the power system.
[0003] The current common practice is to train a single model to learn the net load decomposition rules, and then input the net load to be decomposed into the model to complete the decomposition, thereby obtaining the original load and photovoltaic output.
[0004] However, in practical applications, there are significant differences in the electricity consumption behavior of different electricity users. Their electricity consumption habits, load curve characteristics, and the correlation between photovoltaic output and electricity load are all different. A single general model can only learn the average decomposition pattern of all users and cannot accurately capture the inherent decomposition logic of net load under different electricity consumption behaviors, which ultimately leads to low accuracy of net load decomposition. Summary of the Invention
[0005] This invention provides a method, apparatus, and device for load decomposition based on Bayesian transfer learning to solve the problem of low load decomposition accuracy.
[0006] In a first aspect, embodiments of the present invention provide a load decomposition method based on Bayesian transfer learning, comprising: acquiring original source domain data containing net load, original load, and photovoltaic output, and the net load to be decomposed; clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed; training an initial model corresponding to each electricity consumption category using the source domain data corresponding to each electricity consumption category to obtain a load decomposition model adapted to each electricity consumption category; the initial model is used to identify personalized decomposition features of net load for different electricity consumption categories; and decomposing the net load to be decomposed based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed to obtain the decomposition result.
[0007] In one possible implementation, the original source domain data and the net load to be decomposed are clustered according to electricity consumption behavior to obtain the source domain data and the electricity consumption category of the net load to be decomposed corresponding to each electricity consumption category. This includes: extracting the nighttime load sequence from the original source domain data and the net load to be decomposed, and using the nighttime load sequence as the electricity consumption behavior feature; using the K-shape clustering method, combined with the normalized cross-correlation coefficient, to cluster the nighttime load sequence to obtain the source domain data and the electricity consumption category of the net load to be decomposed corresponding to each electricity consumption category.
[0008] In one possible implementation, the K-shape clustering method, combined with normalized cross-correlation coefficients, is used to cluster nighttime load sequences to obtain source domain data and the electricity consumption category of the net load to be decomposed for each electricity consumption category. This includes: calculating the normalized cross-correlation coefficient between any two nighttime load sequences based on the time-series shape characteristics of each nighttime load sequence; determining the shape similarity between different nighttime load sequences based on the normalized cross-correlation coefficients; performing preliminary K-shape clustering on the original source domain data and the nighttime load sequences of the net load to be decomposed for different numbers of clusters based on the shape similarity; calculating the average silhouette coefficient corresponding to each number of clusters for the preliminary clustering results; taking the cluster number corresponding to the maximum average silhouette coefficient as the optimal number of clusters; and determining the electricity consumption category of the original source domain data and the net load to be decomposed based on the optimal number of clusters, thus obtaining the source domain data and the electricity consumption category of the net load to be decomposed for each electricity consumption category.
[0009] In one possible implementation, the electricity consumption category of the original source domain data and the net load to be decomposed is determined based on the optimal number of clusters, and the source domain data and the electricity consumption category of the net load to be decomposed corresponding to each electricity consumption category are obtained. This includes: using the optimal number of clusters as a benchmark, performing K-shape final clustering on the nighttime load sequences of the original source domain data and the net load to be decomposed to obtain the electricity consumption behavior category label of the net load to be decomposed and each original source domain data; and determining the electricity consumption category of the source domain data and the net load to be decomposed corresponding to each electricity consumption category based on the electricity consumption behavior category label.
[0010] In one possible implementation, source domain data corresponding to each electricity consumption category is used to train an initial model for each category to obtain a load decomposition model adapted to each category. This includes: training a Bayesian-based general model based on the original source domain data to learn the general rules of net load decomposition applicable to various types of electricity consumption behaviors, resulting in a trained general model; using variational inference methods, combining the trained general model for reasoning to obtain the probability distribution of the model weight parameter values of the general model representing the general rules of net load decomposition and the uncertainty of these rules; and using the probability distribution, combined with source domain data corresponding to each electricity consumption category, training the initial model for each category to obtain a load decomposition model adapted to each category.
[0011] In one possible implementation, based on variational inference methods and combined with the trained general model, the probability distribution of the model weight parameters of the general model, which characterizes the general decomposition law of net load and the uncertainty of the law, is obtained. This includes: reconstructing the model weight parameters of the general model using reparameterization to obtain the reconstructed model weight parameters; determining the lower bound function of evidence based on the reconstructed model weight parameters, combined with the prior distribution of the general model and the likelihood function of the original source domain data; iteratively updating the mean and variance parameters of the Gaussian variational distribution using gradient descent with the optimization objective of maximizing the value of the lower bound function, until the model converges to obtain the converged Gaussian variational distribution; and using the converged Gaussian variational distribution as the probability distribution of the model weight parameters of the general model.
[0012] In one possible implementation, based on probability distribution and combined with source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain a load decomposition model adapted to each electricity consumption category. This includes: using source domain data corresponding to each electricity consumption category, with the optimization objective of minimizing the decomposition error between the model decomposition result and the labeled value of the source domain data, and under the constraint of probability distribution, training each initial model to obtain a load decomposition model adapted to each electricity consumption category.
[0013] In one possible implementation, before clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data and the electricity consumption category of the net load to be decomposed for each electricity consumption category, the method further includes: extracting the time series of net load, original load, and photovoltaic output from the original source domain data and preprocessing them to obtain an effective original source domain sample set; determining the sample fusion weight based on two random samples in the effective original source domain sample set and combining them with the fusion weight coefficient; performing linear fusion on the net load, original load, and photovoltaic output sequences of the two random samples based on the fusion weight to obtain fused samples; if the fused samples meet the physical constraints of the net load, adding the fused samples to the original source domain sample set to obtain the expanded original source domain data.
[0014] Secondly, embodiments of the present invention provide a load decomposition device based on Bayesian transfer learning, comprising: a communication module for acquiring raw source domain data containing net load, original load, and photovoltaic output, and the net load to be decomposed; a processing module for clustering the raw source domain data and the net load to be decomposed according to electricity consumption behavior to obtain source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed; training an initial model corresponding to each electricity consumption category using the source domain data corresponding to each electricity consumption category to obtain a load decomposition model adapted to each electricity consumption category; the initial model is used to identify personalized decomposition characteristics of net load for different electricity consumption categories; and decomposing the net load to be decomposed based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed to obtain the decomposition result.
[0015] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.
[0016] This invention provides a method, apparatus, and device for load decomposition based on Bayesian transfer learning. First, by clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior, the user's electricity consumption characteristics are classified and distinguished, and the electricity consumption category to which the net load to be decomposed belongs is identified, providing a basis for matching a dedicated decomposition model. Then, using the source domain data of each electricity consumption category, the initial model is trained specifically to obtain a dedicated load decomposition model adapted to each electricity consumption category. This allows the model to learn and identify the personalized decomposition characteristics of the net load in that category, and to uncover the personalized decomposition patterns of users in the corresponding category, ensuring that each electricity consumption category has a decomposition model that fits its own characteristics. Finally, based on the electricity consumption category of the net load to be decomposed, the corresponding dedicated load decomposition model is matched to complete the decomposition, enabling the model to accurately capture the inherent decomposition logic of the net load in that category and improve the accuracy of net load decomposition. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating the implementation of the load decomposition method based on Bayesian transfer learning provided in this embodiment of the invention. Figure 2a This is a graph showing the correspondence between the number of clusters and the silhouette coefficients provided in an embodiment of the present invention; Figure 2b This is a nighttime load cluster center curve provided in an embodiment of the present invention; Figure 3 This is a framework diagram of load decomposition based on Bayesian transfer learning provided in an embodiment of the present invention; Figure 4 This is a network structure and transfer diagram based on Bayesian transfer learning provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the error distribution and nRMSE value of each decomposition algorithm provided in the embodiments of the present invention; Figure 6 This is a schematic diagram of the load decomposition device based on Bayesian transfer learning provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0019] See Figure 1 The flowchart illustrating the implementation of the load decomposition method based on Bayesian transfer learning provided in this embodiment of the invention is described in detail below: Step 101: Obtain raw source domain data containing net load, original load, and photovoltaic output, as well as the net load to be decomposed.
[0020] In some embodiments, the raw source domain data is power monitoring data with three types of labeled information: net load, raw load, and photovoltaic output. It is sample data for the model to learn the decomposition rules. This type of data comes from users who can directly observe the raw load and photovoltaic output.
[0021] In some embodiments, net load is the electricity data directly measured by the meter, which is equal to the original load minus the photovoltaic power generation, and is easily accessible total meter data in the power system.
[0022] In some embodiments, the original load is the user's actual electricity load before deducting photovoltaic power generation, reflecting the user's true electricity demand.
[0023] In some embodiments, photovoltaic output is the actual power generation of a user's distributed photovoltaic equipment, reflecting the power generation contribution of photovoltaics.
[0024] In some embodiments, the net load to be decomposed is net load data for which only meter readings are available, and the original load and photovoltaic output have not been decomposed.
[0025] Step 102: Cluster the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data and the electricity consumption category of the net load to be decomposed for each electricity consumption category.
[0026] In some embodiments, electricity behavior clustering is based on the electricity usage characteristics of users to classify users with similar electricity usage patterns into the same category, so that users of the same category have similar net load, original load, and photovoltaic output mapping relationships.
[0027] In some embodiments, the electricity consumption category is a user group obtained by clustering electricity consumption behavior, and users in the same category have highly similar photovoltaic output and original load change patterns.
[0028] As one possible implementation, step 102 can be specifically implemented as steps 1021-1022.
[0029] Step 1021: Extract the nighttime load sequence from the original source domain data and the net load to be decomposed, and use the nighttime load sequence as a feature of electricity consumption behavior.
[0030] In some embodiments, the nighttime load sequence refers to the net load time sequence during the nighttime period in the power data. There is no photovoltaic power generation at night, and the net load at this time is equivalent to the user's original load. It is a pure electricity consumption data sequence that is not affected by photovoltaic interference and can truly reflect the user's inherent electricity consumption habits.
[0031] In some embodiments, electricity consumption behavior features are core data features used to distinguish users' electricity consumption patterns, and nighttime load sequences, as electricity consumption behavior features, serve as the basis for determining the similarity of users' electricity consumption patterns.
[0032] In this embodiment, photovoltaic power generation is only generated during the day, and the net load at night is completely equivalent to the original load. The electricity consumption category obtained by clustering the night load sequence as the electricity consumption behavior feature has a highly similar mapping relationship between the daytime load, photovoltaic output and net load of its users, which completely eliminates the interference of photovoltaic output on the determination of electricity consumption behavior and ensures the authenticity and uniqueness of electricity consumption behavior features.
[0033] Step 1022: Using the K-shape clustering method and combined with the normalized cross-correlation coefficient, the nighttime load sequence is clustered to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed.
[0034] In some embodiments, the K-shape clustering method is a clustering algorithm specifically designed for time series data. Its core advantage is that it focuses on the shape similarity of time series rather than the absolute value of the values or strict time synchronization. It is suitable for clustering data such as electricity load, which has strong time sequence and whose shape features can reflect behavioral patterns.
[0035] In some embodiments, the normalized cross-correlation coefficient is a metric used in K-shape clustering to quantify the shape similarity between two time series. It is insensitive to the amplitude of the series or the overall offset, and only measures whether the shape trends of the series are consistent.
[0036] As one possible implementation, step 1022 can be specifically implemented as steps 201-206.
[0037] Step 201: Based on the time series shape characteristics of each nighttime load sequence, calculate the normalized cross-correlation coefficient between any two nighttime load sequences.
[0038] In some embodiments, the time series shape feature refers to the trend and morphological characteristics of the nighttime load sequence as it changes over time, such as evening peak type, stable type, late night rising type, etc. It is the core of distinguishing users' electricity consumption behavior and the core of K-shape clustering, and is unrelated to the absolute value of the sequence value or small time offset.
[0039] In this embodiment, the shape similarity is quantitatively calculated, transforming the fuzzy shape similarity into a specific numerical index. This provides a unified and objective basis for clustering decisions. The coefficients are calculated solely based on the shape features of the time series, eliminating interference from the absolute value of the sequence values and minor time shifts. This ensures that the calculation results truly reflect the degree of similarity in users' electricity consumption behavior.
[0040] Step 202: Determine the shape similarity between different nighttime load sequences based on the normalized cross-correlation coefficient.
[0041] In this embodiment, a correspondence between coefficient values and similarity is established, transforming the normalized cross-correlation coefficient into a shape similarity index that can be directly used for clustering. This simplifies the subsequent clustering decision logic, allowing K-shape clustering to quickly group samples based on similarity and improving clustering computation efficiency. Standardized similarity determination is achieved, unifying the similarity criteria between different nighttime load sequences, avoiding decision biases caused by differences in sequence length and units, and ensuring the consistency and accuracy of clustering computation.
[0042] Step 203: Based on shape similarity and combined with different preset cluster numbers, perform K-shape preliminary clustering on the original source domain data and the nighttime load sequence of the net load to be decomposed, and obtain preliminary clustering results under different cluster numbers.
[0043] In some embodiments, shape similarity is a quantitative indicator used to characterize the degree of fit between the shape trends of two nighttime load sequences, calculated by normalized cross-correlation coefficients. The higher the value, the more similar the electricity consumption behavior patterns of the two sequences are, which is the core criterion for K-shape clustering.
[0044] In this embodiment, preliminary clustering with multiple preset cluster numbers provides sufficient samples for subsequent selection of the optimal cluster number, ensuring the optimality of the final clustering result. In the same round of preliminary clustering, the original source domain data and the nighttime load sequences of the net load to be decomposed are grouped to ensure consistent clustering criteria, avoiding the problem of the net load to be decomposed failing to match the source domain electricity consumption category.
[0045] Step 204: For the preliminary clustering results, calculate the average silhouette coefficient corresponding to each cluster number.
[0046] In some embodiments, the average silhouette coefficient is a core indicator used to quantitatively evaluate the quality of clustering, taking into account both intra-cluster cohesion and inter-cluster separation of the clustering results, i.e., the similarity of samples within the same category and the difference between samples in different categories.
[0047] In some embodiments, the clustering effect is converted into a numerical value using the average silhouette coefficient, making the preliminary clustering results under different numbers of clusters comparable and providing an objective basis for subsequent screening. The average silhouette coefficient considers both intra-cluster cohesion and inter-cluster separation, avoiding the one-sidedness of evaluation by a single indicator and ensuring that the evaluation results can truly reflect the overall quality of clustering.
[0048] Step 205: The number of clusters corresponding to the maximum average silhouette coefficient is taken as the optimal number of clusters.
[0049] In some embodiments, the optimal number of clusters is the number of clusters that has the largest value among the average contour coefficients corresponding to different preset numbers of clusters. The K-shape clustering result under this number of clusters is the most reasonable, with the highest similarity of samples within the class and the most significant difference between samples between classes.
[0050] In this embodiment, the maximum average profile coefficient is used as the screening criterion to ensure that, under the final selected number of clusters, the clustering results are most similar within each cluster and most different between clusters, which is the optimal grouping method to adapt to the current user's electricity consumption behavior characteristics. The selected optimal number of clusters will not cause overfitting due to too many clusters resulting in one user per cluster, nor will it cause underfitting due to too few clusters resulting in users with different electricity consumption behaviors being grouped into one cluster, thus ensuring the practicality and rationality of the clustering results.
[0051] Step 206: Determine the electricity category affiliation of the original source domain data and the net load to be decomposed based on the optimal cluster number, and obtain the source domain data and the electricity category of the net load to be decomposed corresponding to each electricity category.
[0052] In some embodiments, the classification of electricity consumption categories refers to the determination of the final classification of the original source domain data and the nighttime load sequence of the net load to be decomposed into a certain electricity consumption category, which is the result of clustering.
[0053] As one possible implementation, step 206 can be specifically implemented as steps 2061-2062.
[0054] Step 2061: Based on the optimal number of clusters, perform K-shape final clustering on the nighttime load sequences of the original source domain data and the net load to be decomposed, and obtain the electricity consumption behavior category labels of the net load to be decomposed and each original source domain data.
[0055] In some embodiments, the K-shape final clustering partition is a final, deterministic clustering grouping of the original source domain data and the nighttime load sequence of the net load to be decomposed, based solely on the optimal number of clusters.
[0056] In some embodiments, the electricity consumption behavior category label is a unique category identifier assigned to each original source domain data and each group of net loads to be decomposed after the final clustering is completed. Such as category 1, category 2, category 3, etc., it is used to directly determine the electricity consumption category of the data and is a visual and labeled representation of the clustering results.
[0057] In this embodiment, the final partitioning is completed using the optimal number of clusters as the sole criterion, allowing the clustering results to converge from multiple intermediate attempts to a single definite result. The final partitioning of both is completed under the same optimal number of clusters and the same K-shape algorithm, ensuring complete consistency in the electricity consumption category determination rules and guaranteeing the consistency and matching of category labels. By assigning category labels to electricity consumption behaviors, the abstract clustering grouping results are transformed into simple identifiers, eliminating the need for complex sequence similarity calculations for classification. The final clustering partitioning relies solely on the objective parameter of the optimal number of clusters, without any subjective human intervention. Repeated operations will yield the same clustering partitioning results and category labels.
[0058] Step 2062: Based on the electricity consumption behavior category labels, determine the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed.
[0059] In some embodiments, clustering is performed within the same geographical region to consider the diversity of user behavior and capture subtle differences in the data, further refining the individuality within each cluster. Despite the net load to be decomposed... L c The user's raw load and photovoltaic (PV) power generation are unobservable, but PV power generation only affects the net load during the daytime. Therefore, based on source domain data... L a , L b and the net load to be decomposed L c The nighttime data is clustered. This method is supported by research showing that nighttime load patterns can effectively capture users' all-day electricity consumption behavior patterns because electricity consumption habits have inherent consistency and identifiability. Let the nighttime period be defined as... t n ∈[ t n_s , t n_e Therefore, the user's nighttime sequence can be represented as follows:
[0060] in,x i n ( t )and x i ( t ) represent users respectively i Nighttime and full-day data sequences; I n ( t Let represent the nighttime indicator function. Subsequently, the k-shape clustering method is chosen to classify the nighttime sequences. The k-shape clustering method uses the normalized cross-correlation coefficient (NCC) to measure the shape similarity between time series, thus preserving the shape characteristics of the sequences during the clustering process. NCC is a metric insensitive to amplitude and offset, focusing on evaluating the shape similarity of time series rather than absolute values or strict synchronicity. This is particularly suitable for electricity consumption behavior clustering tasks, as it can correctly group users with similar electricity consumption habits but different total electricity consumption or slightly offset daily routines into the same category, thus ensuring the homogeneity quality of clustering and providing a reliable foundation for subsequent hierarchical transfer learning.
[0061] Here, the silhouette coefficient is selected as the evaluation index for clustering effect to determine the optimal number of clusters k. The silhouette coefficient combines intra-cluster cohesion and inter-cluster separation, and its value is between [-1, 1]. A higher value indicates a better clustering effect. For nighttime sequence clustering, the average silhouette coefficient under different k values is compared, and the k value that maximizes the silhouette coefficient is selected as the final number of clusters.
[0062] Figure 2a , Figure 2b The results of k-shape clustering of nighttime load sequences are shown in a typical community. Figure 2a The figures show the silhouette coefficients for different k values. It can be seen that the silhouette coefficient is the highest when k=4, indicating that the clustering structure is optimal at this value. Figure 2b The cluster center curves for k=4 are shown. The four curves represent four typical nighttime electricity consumption patterns, such as evening peak type, steady type, and late night rising type. The differences in shape are obvious, which verifies the ability of clustering to identify behavioral patterns.
[0063] At this point, users within the same cluster are considered to have similar electricity consumption behaviors. This is because the nighttime load sequence used for user clustering represents the pure, raw load, unaffected by photovoltaic power generation, and directly reflects the users' inherent electricity consumption habits. Users with similar nighttime electricity consumption habits will necessarily have similar daytime load curve patterns. Simultaneously, these users are located in the same geographical area, sharing the same meteorological conditions, therefore their photovoltaic power generation curves are highly correlated. This dual similarity jointly determines that the decomposition mapping relationship from net load to its components is similar within the same cluster.
[0064] In this embodiment, source domain data corresponding to each electricity consumption category is automatically collected using category labels as indexes, forming a structured sample set. This solves the problem of disorganized source domain data after clustering, which cannot directly provide classification training samples for each initial model. This allows subsequent training of one model per category to directly and efficiently call the corresponding samples, improving model training efficiency. The category of the net load to be decomposed is directly determined by the category labels, eliminating the need for additional calculations or judgments. This solves the problem of unclear category attribution of the net load to be decomposed, making it impossible to determine which decomposition model to use, and provides a clear model matching basis for subsequent net load decomposition steps.
[0065] In this embodiment, the electricity consumption category is determined based on the optimal number of clusters, allowing the original source domain data and the net load to be decomposed to be scientifically and reasonably grouped. The source domain data corresponding to each electricity consumption category can directly provide structured samples for subsequent classification model training, achieving seamless integration between the clustering step and the model training step. This ensures that the net load to be decomposed is assigned to the source domain user category with the most similar electricity consumption behavior, allowing the most suitable load decomposition model to be called during subsequent decomposition. The clustering stage provides an underlying guarantee for the accuracy of subsequent decomposition.
[0066] In this embodiment, K-shape, combined with normalized cross-correlation coefficients, focuses on shape similarity, perfectly adapting to the temporal characteristics of nighttime load sequences. Users with similar electricity usage behaviors can be accurately classified into the same category. Normalized cross-correlation coefficients are insensitive to sequence amplitude and overall offset. Even if two users have different total electricity consumption and slightly different peak consumption times, as long as the shape trend of their nighttime load curves is consistent, they can be classified into the same category. This solves the problem of users with different total electricity consumption but similar habits being incorrectly classified by traditional algorithms, ensuring the homogeneity of user behavior within the same electricity usage category.
[0067] Step 103: Using the source domain data corresponding to each electricity consumption category, train the initial model corresponding to each electricity consumption category to obtain a load decomposition model adapted to each electricity consumption category; the initial model is used to identify the personalized decomposition characteristics of the net load of different electricity consumption categories.
[0068] In some embodiments, the initial model is an untrained Bayesian model built for each electricity consumption category, which has the basic architecture to identify the personalized decomposition characteristics of the net load for the corresponding category.
[0069] In some embodiments, the load decomposition model is a mature model that can be directly used for net load decomposition, obtained by training the initial model on source domain data of the application electricity category. Each electricity category corresponds to a dedicated load decomposition model that is adapted to the electricity consumption characteristics of users in that category.
[0070] In some embodiments, personalized decomposition characteristics are net load decomposition patterns unique to different electricity consumption categories, such as the peak photovoltaic output characteristics at midday and the stable load characteristics at night for a certain type of user.
[0071] As one possible implementation method, step 103 can be specifically implemented as steps 1031-1033.
[0072] Step 1031: Based on the original source domain data, train the Bayesian-based general model to learn the general rules of net load decomposition applicable to various types of electricity consumption behaviors, and obtain the trained general model.
[0073] In some embodiments, the Bayesian-based general model is a global model built on the basis of Bayesian neural networks. It does not distinguish between electricity consumption categories and is used to learn the general laws of photovoltaic-load decomposition from all original source domain data. It is the basic model of the entire hierarchical training and has the ability to capture data patterns and the uncertainty of patterns.
[0074] In some embodiments, the general rule for net load decomposition is a mapping relationship between net load and original load or photovoltaic output that is common to all users of all electricity consumption categories. For example, the net load is reduced due to the offsetting of load by photovoltaic output during the day, and the net load is equal to the original load at night. This is a decomposition logic that is common across categories.
[0075] In this embodiment, a general model is trained using all original source domain data, enabling the model to learn the decomposition logic common to all electricity consumption categories. Compared to traditional deterministic models, the Bayesian general model does not learn a single decomposition rule, but rather simultaneously captures the volatility of the data and the uncertainty of the rules during training, making the knowledge transferred later more consistent with the strong uncertainty characteristics of electricity data.
[0076] Step 1032: Based on the variational inference method, and combined with the trained general model, reasoning is performed to obtain the probability distribution of the model weight parameter values of the general model that characterizes the general decomposition law of net load and the uncertainty of the law.
[0077] In some embodiments, the variational inference method is the core algorithm in Bayesian models used to approximate the posterior distribution of model weight parameters. It solves the curse of dimensionality problem caused by too many weight parameters in Bayesian neural networks and can efficiently obtain the probability distribution that represents the learning pattern of the model.
[0078] In some embodiments, the probability distribution of the model weight parameter values is obtained by variational inference from the trained general model. It is a quantitative representation of the general law of net load decomposition and the uncertainty of the law, including the mean and variance of the law. The mean represents the most likely decomposition law, and the variance represents the fluctuation or uncertainty of the law.
[0079] In some embodiments, the uncertainty of the pattern is the characteristic of the photovoltaic-load decomposition pattern that cannot be precisely determined due to the volatility of power data and the randomness of user electricity consumption. For example, the photovoltaic output corresponding to the same net load may fluctuate reasonably at different times.
[0080] As one possible implementation method, step 1032 can be specifically implemented as steps 301-304.
[0081] Step 301: Reconstruct the model weight parameters of the general model using the reparameterization method to obtain the reconstructed model weight parameters.
[0082] In some embodiments, reparameterization is a parameter transformation method designed in Bayesian models to solve the problem of uncalculated gradients of random variables. It transfers the randomness of model weight parameters to independent standard random variables, thereby realizing the gradient calculation of weight parameters. It is a basic technique for gradient descent optimization in variational inference.
[0083] In some embodiments, the reconstructed model weight parameters are model weight parameters that are transformed through reparameterization and can be used for gradient calculation. They retain the probability distribution characteristics of the original weight parameters and are also optimizable.
[0084] In this embodiment, the weight parameters in the Bayesian model are random variables. Directly calculating the gradient introduces randomness, making the gradient unpredictable. Reparameterization decouples this randomness to independent standard random variables, enabling the reconstructed weight parameters to compute gradients. This lays the technical foundation for subsequent gradient descent optimization. Reparameterization only transforms the parameter form, without altering the Gaussian distribution and value patterns of the weight parameters. This ensures that the reconstructed parameters accurately represent the model's decomposition patterns and uncertainties, guaranteeing the effectiveness of subsequent optimization results.
[0085] Step 302: Based on the reconstructed model weight parameters, and combining the prior distribution of the general model with the likelihood function of the original source domain data, determine the lower bound function of the evidence.
[0086] In some embodiments, the evidence lower bound function is an optimization objective function used in variational inference to approximate the log-likelihood of the posterior distribution. By maximizing this function, the KL divergence between the variational distribution and the true posterior distribution can be minimized, which is the core optimization index for solving the approximate posterior distribution.
[0087] In this embodiment, the log-likelihood of the true posterior distribution of the Bayesian model cannot be directly calculated. The evidence lower bound function, serving as its lower bound, can be precisely solved through mathematical derivation. This evidence lower bound function combines the prior distribution of the general model with the likelihood function of the original source domain data. This allows the subsequent optimization process to both adhere to the prior probability assumptions and update parameters based on actual data. It solves the dual problems of relying solely on priors without data support and relying solely on data without prior constraints, ensuring the rationality of the approximate posterior distribution and data fit.
[0088] Step 303: With the goal of maximizing the value of the lower bound function of evidence, the mean and variance parameters of the Gaussian variational distribution are iteratively updated using the gradient descent method until the model converges, thus obtaining the converged Gaussian variational distribution.
[0089] In this embodiment, the gradient descent method adjusts the parameter update step size according to the gradient magnitude of the lower bound of evidence in each round. When the lower bound of evidence increases slowly, the step size is automatically reduced, making the parameter update more stable and ensuring the stability of the model optimization process.
[0090] Step 304: Use the converged Gaussian variational distribution as the probability distribution of the model weight parameter values of the general model.
[0091] In this embodiment, the converged Gaussian variational distribution is directly used as the probability distribution of the general model weight parameter values, transforming all previous optimization operations into knowledge that can be directly transferred to the initial class model. The Gaussian variational distribution is presented as a standardized Gaussian distribution with mean and variance, which can be directly used as the prior distribution of the initial class model without additional format conversion. This solves the problem of incompatible transfer knowledge formats, preventing it from being directly used as prior knowledge, and improves the efficiency of subsequent model training.
[0092] In this embodiment, variational inference transforms the abstract patterns learned by the general model into transferable probability distributions, solving the technical challenge of directly transferring patterns from Bayesian models to other models. This allows general patterns to be transformed from internal model knowledge into transferable external prior knowledge. Variational inference, through approximate solutions, addresses the curse of dimensionality problem caused by excessive weight parameters in Bayesian neural networks. The resulting probability distribution simultaneously contains the core trends of the general patterns and the degree of fluctuation, overcoming the problem of traditional transfer learning only transferring deterministic patterns, losing uncertain information, and failing to adapt to data volatility. This makes the transferred knowledge more complete and more relevant to reality.
[0093] Step 1033: Based on the probability distribution and combined with the source domain data corresponding to each electricity consumption category, train the initial model corresponding to each electricity consumption category to obtain a load decomposition model adapted to each electricity consumption category.
[0094] As one possible implementation method, step 1033 can be specifically processed as follows: By utilizing source domain data corresponding to each electricity consumption category, and with the optimization objective of minimizing the decomposition error between the model decomposition result and the source domain data label value, each initial model is trained under the constraint of probability distribution to obtain a load decomposition model adapted to each electricity consumption category.
[0095] In some embodiments, the model decomposition results are the original load prediction values and photovoltaic output prediction values obtained by decomposing the input source domain net load data of each category during the training process of the initial model of each category. They are intermediate output results in the model training process.
[0096] In some embodiments, in the photovoltaic-load decomposition model of Bayesian transfer learning (BTL), from the user L a and L b The collected raw load and photovoltaic power generation serve as the source data, while data from users... L c The collected payload is used as the target data. The Bayesian Neural Network (BNN) is trained on the source task and the obtained posterior distribution is transferred to the target task as the prior distribution, thereby achieving learning of uncertain data from the source domain to the target domain.
[0097] Given a source domain dataset D s = { x s , y s},in x s ={ n i s , i =1, … , n} represents the input sample set, which is defined by the user. L a and L b The net load data constitutes; y s ={ l i s , p i s , i =1, … , n} indicates the output sample set, which is provided by the user. L a and L b The dataset consists of raw load and photovoltaic output data. Given the target domain dataset...D t = { x t ,y t},in x t ={ n i t , i =1, … , m} represents the input sample set, which is defined by the user. L c The net load data constitutes; y t ={ l i t , p i t , i =1, … , m} indicates the output sample set, which is provided by the user. L c The original load and photovoltaic output data constitute the data.
[0098] Source domain (user) L a and L b This provides valuable observable data, while the target domain (user) L c Only the net load sequence is provided. The key technology lies in how to effectively transfer the deterministic and uncertain patterns in the complex joint mapping relationship of "net load → (load, photovoltaic)" learned in the source domain to the target domain to compensate for the lack of component labels.
[0099] Therefore, a Bayesian neural network (BNN) is used as the basic learner. Its technical advantage lies in the fact that it integrates the neural network weight parameters. w Treating the input and output as random variables, the predicted probability distribution is output. During the source domain training phase, the BNN does not learn a single mapping function, but rather learns the posterior distribution of the weight parameters through variational inference. This posterior distribution encodes all plausible decomposition patterns extracted from the source domain data and their uncertainties. If there are potential commonalities in user electricity consumption behavior between the source and target domains, this posterior distribution contains strong prior knowledge applicable to the target domain decomposition task. The BNN uses a Gaussian random process to describe the relationship between the input and output, i.e.:
[0100] in, p s( * ) represents the probability density function of the source domain. w s The weight parameters of the source domain neural network are represented as the mean in BNN. μ ( x s ) and variance σ 2 ( x s ). Assumption D s If the samples in the dataset are independent, then the likelihood function of the dataset can be expressed as:
[0101] The training objective of BNN is to find the source domain weight parameters. w s posterior distribution p ( w s | D s According to Bayes' theorem, the posterior distribution of the weight parameters can be expressed as:
[0102] in, p s ( w s ) is the prior distribution of the source domain model parameters, while p s ( D s | w s ) represents the likelihood function of the measured data.
[0103] Subsequently, in the target domain dataset D t ={ x t , y tThe second-layer BNN is trained on the target domain. During training in the target domain, uninformative priors (such as conventional random initialization) are no longer used. Instead, the posterior distribution of the source domain is directly set as the prior distribution of the target domain BNN weight parameters. This is equivalent to injecting the target model with experience and patterns summarized from massive source data regarding load curve shape, photovoltaic output characteristics, and their correlation with net load from the very beginning of target model training. The model is then fine-tuned on a small amount of target net load data Dt, obtaining the target posterior distribution through Bayesian updates. This process essentially utilizes the collective knowledge of the source domain to perform guided initialization and regularization constraints on the target model, greatly reducing the model's dependence on limited target data and effectively suppressing overfitting. The prior distribution of the target task is based on the posterior distribution of the source task, i.e.:
[0104] The likelihood function of the target domain dataset can be expressed as:
[0105] The posterior distribution of the target task is calculated by combining the likelihood function of the target domain and the posterior distribution of the source domain (as the prior distribution), i.e.:
[0106] Solve for the posterior distribution p ( ω | D The weights are key to BNNs. However, due to the large number of weight parameters in neural network models (often referred to as the "curse of dimensionality"), it is difficult to compute them through direct integration or Markov chain Monte Carlo (MCMC) sampling. p ( ω | D Therefore, a variational inference method for BNNs, namely the backpropagation Bayesian algorithm, was adopted. This method approximates the posterior distribution by maximizing the lower bound of evidence, ELBO. The computation process of the backpropagation Bayesian algorithm mainly includes the following steps: First, in order to approximate the posterior distribution p ( ω | D Introducing a simple variational distribution q ( w | θ ), where θ represents the parameters of the variational distribution. Typically, the variational distribution is assumed to be Gaussian, with parameters being the mean and variance. The goal of variational inference is to minimize the variational distribution using ELBO. q ( w | θ ) and posterior distribution p ( ω | D The KL divergence between ) is defined as follows. The variational lower bound is defined as:
[0107] To simplify gradient calculation and optimize via backpropagation, the backpropagation Bayesian algorithm employs a reparameterization technique. Assume... q ( w | θ It follows a Gaussian distribution. N ( μ , σ 2 Then the weight parameters w It can be represented as:
[0108] in, e ~ N (0,1) is a random variable derived from a standard normal distribution. Using the reparameterization technique, a sampled estimate of the variational lower bound can be obtained, and gradient descent can be applied to calculate... μ and σ 2 Instead of calculating directly w .
[0109] Then, ELBO is sampled and estimated, i.e.:
[0110] in, These are weights sampled from the variational distribution. Then, the gradient of the variational lower bound is calculated. And update the variational parameters using gradient descent. θ ,Right now:
[0111] Through the above process, the backpropagation Bayesian algorithm can approximate the posterior distribution of a BNN. p ( w | D Once obtained p ( w | D For a given new input x* It can generate output. y* Predicted distribution:
[0112] Based on the Monte Carlo principle w Perform multiple samplings, and then calculate the corresponding training function values. f w (x * ) The expected value of the result is:
[0113] The variance of the training results can also be obtained, i.e.:
[0114] Figure 3 This paper demonstrates the two-layer network structure and knowledge transfer mechanism of the BTL algorithm designed for payload decomposition tasks. For tasks requiring payload decomposition... L c The user directly inputs the net load. However, the model's knowledge does not solely come from... L c The user's net load, but from L a Users and L b The model learns from user (load + photovoltaic) data. During training, the model has already learned from... L a and L b The user data clearly shows the independent patterns of raw load and photovoltaic power generation, their fluctuation patterns, and their relationship with characteristics such as time and season.
[0115] The model in the source domain ( L a , L b What is learned in the model is not a simple pattern, but a complex mapping from input features to the output target. These input features include, but are not limited to, time (hours, weekdays / weekends), sequence history values, and deep features automatically extracted from the data. The output target is net load or photovoltaic power generation. Through transfer learning, this ability to separate components from a mixed signal is transferred to the target model. Therefore, when the target model sees a new net load sequence, it is applying this learned mapping ability, rather than blindly solving a mathematically underdetermined problem from this single sequence.
[0116] Furthermore, users with similar behavioral patterns are grouped by clustering based on nighttime sequences. This is equivalent to grouping each user to be decomposed... L c The user provides a behavioral label. This label, as powerful additional information, significantly constrains the understanding space, enabling the model to perform more accurate decomposition within the feature range of its category, thus effectively overcoming the problem of insufficient input information.
[0117] In summary, our method's model is an intelligent reasoning system based on prior knowledge of the source domain and user clustering. The payload is the input signal that activates the system, and the system's ability to achieve high-precision decomposition stems from its pre-transfer of the ability to accomplish this task through our framework.
[0118] The framework of this invention aims to solve a core challenge in low-voltage photovoltaic load decomposition: how to achieve high-reliability decomposition when only the net load of the target user (Lc) is observable, while the original load and photovoltaic output, two key components, are completely missing. BTL addresses this challenge by constructing a two-layer architecture: an outer general model that learns the commonalities of the group, and an inner decomposition model for each electricity consumption category that adapts to individual characteristics. In the outer layer, the Bayesian neural network utilizes multiple observable users ( L a , L b For complete data pairs, learn the probabilistic representation of the complex mapping relationship "net load → (original load, photovoltaic output)", and its output posterior distribution. p ( ω s | D s This not only captures the typical patterns of load curves and photovoltaic output, but also quantifies the correlation and uncertainty between the two at different times and under different weather conditions. This distribution essentially encapsulates common knowledge about the electricity consumption and generation behavior of community-level users.
[0119] from Figure 4 It can be seen that the posterior distribution learned from the outer layer... p ( ω s | D s ), directly migrated to the inner layer, as the target user ( L c Strong priors of the model p ( ω t In the context of photovoltaic-load decomposition, this means that the inner-layer model, upon initialization, already possesses knowledge learned from similar users regarding key patterns such as how daytime photovoltaic load decreases and how nighttime net load changes. When the model faces a limited net load sequence for the target users, it no longer guesses the decomposition results from scratch, but rather, guided by transferred priors, only needs fine-tuning to adapt to individual deviations between the target users and the group average pattern.
[0120] Therefore, for L cWhen a user's net load for a given day is decomposed, the prediction process can be explained as follows: a basic photovoltaic output curve and load curve are inferred based on migration priors (group experience). Then, based on the user's specific net load observations, these two curves are updated and adjusted using Bayesian methods. Ultimately, the model outputs a joint probability distribution of the original load and photovoltaic output. The mean represents the most likely decomposition result, while the variance reflects the residual uncertainty in the decomposition result due to individual differences and noise, given limited data.
[0121] Through transfer learning, the rich knowledge learned from large-scale source domain datasets—the posterior distribution—serves as a powerful prior for training the target region. The posterior distribution is learned by the outer Bayesian neural network trained on all available region data. p ( ω s | D s This encapsulates general knowledge about load and photovoltaic modes. This knowledge-rich posterior distribution is then transferred to the inner layer as its training prior distribution. p ( ω t )= p ( ω s | D s This is equivalent to injecting a large amount of experience into the model at the beginning of training, greatly reducing the dependence on limited target data. Therefore, even if target user data is scarce, the model does not start from scratch, and its prediction range will be more compact and informative, rather than meaninglessly broad.
[0122] In this embodiment, model training uses a probability distribution of globally universal laws as a prior constraint to ensure that the model masters the basic decomposition logic across categories. Simultaneously, fine-tuning with category-specific source domain data allows the model to accurately learn the unique, personalized decomposition features of its category. This ensures that the trained load decomposition model possesses both unified decomposition logic and adapts to the electricity consumption behavior of users in each category, directly improving the accuracy of net load decomposition at the model level. The prior constraint of the probability distribution strictly limits the range of model weight parameters, ensuring that model training always revolves around globally universal laws, with fine-tuning only within a reasonable range to adapt to category features. This results in a small amount of category source domain data while maintaining stable and high-precision decomposition performance. Since globally universal laws are injected through the probability distribution before initial model training, there is no need to learn all decomposition logic from scratch. Training can be completed by only locally fine-tuning the model using category source domain data, significantly reducing the sample size and iteration count required for model training and solving the problems of large data requirements and long computation time in category-specific training.
[0123] In this embodiment, a probability distribution based on general patterns is used as a priori, combined with category-specific source domain data to train the initial model. This allows the model to simultaneously grasp both global general patterns and category-specific decomposition features, significantly improving the model's decomposition accuracy and adaptability. The probability distribution provides strong prior constraints for the initial model, limiting the random fluctuations in model weights. Even with limited source domain data for each category, the model will not overfit the finite samples, addressing the deficiency of poor model training performance due to scarce samples in some electricity consumption categories in real-world scenarios. Each electricity consumption category has its own dedicated load decomposition model. The model only learns the personalized features of the corresponding category, avoiding mutual interference between features of different categories. This solves the problem of a one-size-fits-all global model that cannot adapt to the personalized needs of different electricity consumption categories, allowing the decomposition model to accurately match the electricity consumption behavior of various types of users.
[0124] Step 104: Based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed, decompose the net load to be decomposed to obtain the decomposition result.
[0125] In some embodiments, the decomposition results are the raw load data and photovoltaic output data obtained after processing the net load to be decomposed.
[0126] This invention provides a load decomposition method based on Bayesian transfer learning. First, the original source domain data and the net load to be decomposed are clustered according to electricity consumption behavior to classify and distinguish user electricity consumption characteristics, thus clarifying the electricity consumption category to which the net load to be decomposed belongs, providing a basis for matching a dedicated decomposition model. Then, using the source domain data of each electricity consumption category, the initial model is trained specifically to obtain a dedicated load decomposition model adapted to each category. This allows the model to learn and identify the personalized decomposition characteristics of the net load for that category, uncovering the personalized decomposition patterns of users in the corresponding category, ensuring that each electricity consumption category has a decomposition model that fits its own characteristics. Finally, based on the electricity consumption category of the net load to be decomposed, the corresponding dedicated load decomposition model is matched to complete the decomposition, enabling the model to accurately capture the inherent decomposition logic of the net load for that category and improving the accuracy of net load decomposition.
[0127] This invention's hierarchical transfer learning structure enhances robustness. The outer BNN learns general patterns from all available data, establishing a foundation for user behavior. The inner layer then builds upon this foundation, using cluster-specific data for specialized learning. This two-stage approach ensures that the model maintains reliable baseline performance even when individual users deviate from the typical characteristics of their clusters. Secondly, the Bayesian framework provides inherent uncertainty quantification. The model outputs a probability distribution, not point estimates. For users well-matched to their clusters, it returns predictions with high confidence and narrow intervals. For atypical users, it automatically represents reduced confidence through wider prediction intervals. Thirdly, practical strategies can be integrated for continuous adaptation. Systems can be designed to periodically recalculate clusters using the latest data, capturing long-term behavioral changes. Users consistently producing high uncertainty decomposition results can be flagged as anomalies and handled individually, for example, by restoring their estimates to use a robust global model. These characteristics collectively enable the BTL method to operate reliably even with imperfect clustering.
[0128] By integrating clustering methods into the BTL two-layer framework, the outer layer is effectively able to learn common features of multiple regions, while the inner layer focuses on learning individual features of each community.
[0129] As one possible implementation, steps 11-14 can also be performed before step 102.
[0130] Step 11: Extract the time series of net load, original load, and photovoltaic output from the original source domain data, and perform preprocessing to obtain an effective original source domain sample set.
[0131] In some embodiments, preprocessing includes operations such as data cleaning, outlier removal, missing value completion, and standardization of the time series data. The purpose is to remove invalid and noisy data and obtain standardized data that meets the requirements of model training, which is the prerequisite for data augmentation.
[0132] In this embodiment, by preprocessing to remove outliers and fill in missing values, the problems of excessive noise and inconsistent data formats in the original source domain data are solved. The resulting effective sample set can provide high-quality, interference-free basic data for subsequent data augmentation and model training, avoiding the model learning errors caused by noisy data.
[0133] Step 12: Based on two random samples in the effective original source domain sample set, and combined with the fusion weight coefficient, determine the sample fusion weight.
[0134] In some embodiments, the sample fusion weight is a specific fusion ratio assigned to two random samples based on the fusion weight coefficient. It serves as the direct basis for linear fusion, ensuring the quantification and controllability of the fusion process.
[0135] In this embodiment, the specific fusion weight is calculated by fusion weight coefficient, which transforms sample fusion from a fuzzy operation into a precise quantitative calculation, ensuring that the features of the fused sample are between those of the two original samples, and improving the scientific nature of sample fusion.
[0136] Step 13: Based on the fusion weight, linearly fuse the net load, original load, and photovoltaic output sequences of the two random samples to obtain the fused sample.
[0137] In some embodiments, linear fusion is a sample generation method that weights and sums the net load, original load, and photovoltaic output sequences of two samples according to the sample fusion weight. It is the basic operation of Mixup data augmentation and achieves smooth fusion of sample features.
[0138] In this embodiment, novel fusion samples are artificially generated through linear fusion, eliminating the need for additional real data collection. This addresses the core issues of scarce source domain samples, high collection costs, and numerous privacy protection restrictions in practical engineering, thereby increasing the amount of source domain data without violating privacy regulations and providing sufficient samples for subsequent model training.
[0139] Step 14: If the fused sample meets the net load physical constraints, add the fused sample to the original source domain sample set to obtain the expanded original source domain data.
[0140] In some embodiments, the net load physical constraint is an objective physical constraint existing in the photovoltaic-load system. The core is that net load = original load - photovoltaic output, and the photovoltaic output and original load are non-negative. This is the core criterion for determining whether the fusion sample conforms to the actual engineering situation.
[0141] In some embodiments, to address the problem of insufficient training data due to the small user base of certain communities, a data augmentation layer is inserted into the decomposition model. This layer is designed to directly address the core pain points of limited source domain training samples and insufficient data diversity in photovoltaic-load decomposition tasks, aiming to enhance the model's ability to learn common decomposition mappings from limited samples by generating physically meaningful synthetic data.
[0142] The Mixup algorithm is a data augmentation technique that uses linear interpolation to blend two distinct samples. This algorithm helps improve the generalization ability of models trained on small datasets. The formula for the Mixup algorithm is as follows:
[0143] in, λ It's a scaling factor used to control the proportion of data augmentation. The Mixup algorithm applies data augmentation to any two samples. x m and x nPerform linear augmentation to generate new samples x l .
[0144] In the photovoltaic-load decomposition scenario, the source domain data consists of a triple {net load, original load, photovoltaic output}. The traditional Mixup algorithm generates new samples by linearly interpolating any two samples. However, in decomposition tasks, simple linear mixing can produce physically unreasonable samples: for example, directly mixing a user sample with high photovoltaic output on a sunny day with a user sample with high load at night might result in composite data exhibiting an anomalous pattern of "high load at noon, high photovoltaic output at night." Such noisy samples can mislead the model into learning incorrect decomposition logic.
[0145] To address this, this invention proposes a spatial mixup data augmentation algorithm for photovoltaic-load decomposition tasks. In this algorithm, the key characteristics of electricity consumption behavior lie not only in the instantaneous values of the load curve, but also in its statistical form and temporal correlation pattern. Eigenmotor moments are introduced to characterize the statistical properties of the load and photovoltaic curves over a period of time: the first moment (mean) reflects the average electricity consumption level or average photovoltaic output intensity, while the second moment (variance) characterizes the volatility of electricity consumption or the degree of change in photovoltaic output. The eigenmotor moments of the samples can be expressed as:
[0146] in, u m and δ m Representing samples respectively x m The first and second order eigenmotes. Similarly, the sample... x n of u n and δ n Through fusion x m and x n The characteristic moments can be used to obtain a new sample, namely:
[0147] Specifically, in the decomposition task, for a source domain sample, we calculate the characteristic moments of its original load sequence and photovoltaic output sequence. When generating new samples, the algorithm does not directly mix the original time series, but first fuses the statistical characteristics of the two samples in the characteristic moment space. For example, the load characteristic moments of a "stable" user and a "peak" user can be reasonably fused to generate a new composite load pattern with statistical characteristics between the two; simultaneously, their photovoltaic characteristic moments are fused synchronously. Subsequently, based on the fused characteristic moments, a statistically reasonable and smooth load and photovoltaic curves are reconstructed.
[0148] The technical advantage of this method lies in its ability to ensure that the generated synthetic data statistically conforms to the behavioral patterns of real users, avoiding physical inconsistencies. For example, the photovoltaic curve generated after mixing will still maintain the basic pattern of daytime output and zero output at night, with output intensity and fluctuations within a reasonable range; the load curve also maintains the time-series characteristics consistent with actual electricity consumption habits. This is equivalent to providing the model with more diverse, but physically interpretable, net load-component correspondences, enabling the model to learn more fundamental and robust decomposition mappings, rather than merely memorizing a limited number of sample patterns.
[0149] Spatial Mixup data augmentation effectively expands the source domain training set. In communities with limited data, this is equivalent to providing richer learning material for the outer BNN, enabling it to more accurately extract the common probability distribution of how load and photovoltaic output together constitute net load from the population data. A more effective source domain posterior distribution provides more reliable and informative prior knowledge for subsequent transfer to the target domain, thereby improving the overall generalization ability and reliability of the BTL framework for photovoltaic-load decomposition in small sample communities.
[0150] In this embodiment, the core constraint is net load = original load - photovoltaic output. This eliminates fusion samples that do not conform to physical laws, solving the problem that simple linear fusion easily generates physically contradictory samples. This ensures that all expanded source domain data conforms to engineering reality and avoids erroneous samples misleading model training.
[0151] Example: The effectiveness of the proposed BTL-based photovoltaic load decomposition algorithm was verified in Community 1, and compared with Multilayer Perceptron (MLP), BNN, and Recurrent Neural Network (RNN). Community 1 has a sufficient number of users and a satisfactory observation rate. Under these conditions, the performance of the four algorithms in decomposing net load was compared. Figure 5 The error distribution diagram after decomposition by each algorithm is shown, along with the nRMSE values for the original load and photovoltaic power generation.
[0152] Since BTL is a probabilistic algorithm, the mathematical expectation of the original load and photovoltaic power generation is used here as the basis for calculating the error distribution and nRMSE. Figure 5 As can be seen from the error distribution plot, all four algorithms exhibit excellent decomposition performance, with relatively small error distributions after decomposition. However, the BTL algorithm performs slightly better, demonstrating the effectiveness of the proposed algorithm in photovoltaic-load decomposition.
[0153] To more accurately evaluate the decomposition performance, Table I provides specific nRMSE and MAPE values. Since the decomposition trends of load and photovoltaic are consistent, analyzing only the nRMSE and MAPE of the load is sufficient to comprehensively evaluate the photovoltaic-load decomposition performance of each algorithm in this scenario.
[0154] Table I
[0155] From Table I, by analyzing the nRMSE and MAPE of the four algorithms, it can be found that the proposed BTL algorithm performs best in photovoltaic-load decomposition, followed by the RNN algorithm. This indicates that partitioning users first and then decomposing based on the load characteristics of each region can effectively improve the performance of photovoltaic-load decomposition.
[0156] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0157] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0158] Figure 6 A schematic diagram of the load decomposition device based on Bayesian transfer learning provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 6 As shown, the load decomposition device 6 based on Bayesian transfer learning includes: The communication module 61 is used to acquire raw source domain data containing net load, original load and photovoltaic output, as well as net load to be decomposed.
[0159] Processing module 62 is used to cluster the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data and the electricity consumption category of the net load to be decomposed for each electricity consumption category; using the source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain the load decomposition model adapted to each electricity consumption category; the initial model is used to identify the personalized decomposition characteristics of the net load of different electricity consumption categories; based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed, the net load to be decomposed is decomposed to obtain the decomposition result.
[0160] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 7 As shown, the electronic device 7 of this embodiment includes a processor 70 and a memory 71. The memory 71 stores a computer program 72. When the processor 70 executes the computer program 72, it implements the steps in the various method embodiments described above. Alternatively, when the processor 70 executes the computer program 72, it implements the functions of each module / unit in the various device embodiments described above.
[0161] For example, computer program 72 may be divided into one or more modules / units, which are stored in memory 71 and executed by processor 70 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 72 in electronic device 7.
[0162] Electronic device 7 may include, but is not limited to, processor 70 and memory 71. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 7 and does not constitute a limitation on electronic device 7. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 7 may also include input / output devices, network access devices, buses, etc.
[0163] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0164] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0165] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A load decomposition method based on Bayesian transfer learning, characterized in that, include: Obtain raw source domain data containing net load, raw load, and photovoltaic output, as well as the net load to be decomposed; The original source domain data and the net load to be decomposed are clustered according to electricity consumption behavior to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed. Using source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain a load decomposition model adapted to each electricity consumption category; the initial model is used to identify the personalized decomposition characteristics of net load for different electricity consumption categories. Based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed, the net load to be decomposed is decomposed to obtain the decomposition result.
2. The load decomposition method based on Bayesian transfer learning according to claim 1, characterized in that, The process of clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed includes: Extract the nighttime load sequence from the original source domain data and the net load to be decomposed, and use the nighttime load sequence as a feature of electricity consumption behavior. The nighttime load sequence is clustered using the K-shape clustering method, combined with normalized cross-correlation coefficients, to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed.
3. The load decomposition method based on Bayesian transfer learning according to claim 2, characterized in that, The K-shape clustering method, combined with normalized cross-correlation coefficients, is used to cluster the nighttime load sequence to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed, including: Based on the time series shape characteristics of each nighttime load sequence, calculate the normalized cross-correlation coefficient between any two nighttime load sequences; Based on the normalized cross-correlation coefficient, the shape similarity between different nighttime load sequences is determined; Based on the shape similarity, and combined with different preset cluster numbers, K-shape preliminary clustering is performed on the original source domain data and the nighttime load sequence of the net load to be decomposed, to obtain preliminary clustering results under different cluster numbers; For the preliminary clustering results, the average silhouette coefficient corresponding to each cluster number is calculated respectively; The number of clusters corresponding to the maximum average profile coefficient is taken as the optimal number of clusters; Based on the optimal cluster number, the electricity category of the original source domain data and the net load to be decomposed is determined, and the source domain data corresponding to each electricity category and the electricity category of the net load to be decomposed are obtained.
4. The load decomposition method based on Bayesian transfer learning according to claim 3, characterized in that, The process of determining the electricity consumption category of the original source domain data and the net load to be decomposed based on the optimal cluster number, and obtaining the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed, includes: Based on the optimal number of clusters, the nighttime load sequences of the original source domain data and the net load to be decomposed are subjected to K-shape final clustering to obtain the electricity consumption behavior category labels of the net load to be decomposed and each original source domain data. Based on the electricity consumption behavior category labels, the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed are determined.
5. The load decomposition method based on Bayesian transfer learning according to any one of claims 1-4, characterized in that, The process involves using source domain data corresponding to each electricity consumption category to train an initial model for each category, thereby obtaining a load decomposition model adapted to each electricity consumption category, including: Based on the original source domain data, the Bayesian-based general model is trained to learn the general rules of net load decomposition applicable to various types of electricity consumption behaviors, and the trained general model is obtained. Based on variational inference methods, and combined with the trained general model, we obtain the probability distribution of the model weight parameter values of the general model that characterizes the general decomposition law of net load and the uncertainty of the law. Based on the probability distribution, and combined with the source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain a load decomposition model adapted to each electricity consumption category.
6. The load decomposition method based on Bayesian transfer learning according to claim 5, characterized in that, The variational inference method, combined with the trained general model, yields the probability distribution of the model weight parameters that characterize the general decomposition law and uncertainty of the net load. This includes: By using reparameterization, the model weight parameters of the general model are reconstructed to obtain the reconstructed model weight parameters; Based on the reconstructed model weight parameters, and combining the prior distribution of the general model with the likelihood function of the original source domain data, the lower bound function of evidence is determined. With the goal of maximizing the value of the lower bound function of evidence, the mean and variance parameters of the Gaussian variational distribution are iteratively updated using the gradient descent method until the model converges, thus obtaining the converged Gaussian variational distribution. The converged Gaussian variational distribution is used as the probability distribution of the model weight parameters of the general model.
7. The load decomposition method based on Bayesian transfer learning according to claim 5, characterized in that, Based on the probability distribution and combined with the source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain a load decomposition model adapted to each electricity consumption category, including: Using source domain data corresponding to each electricity consumption category, with the optimization objective of minimizing the decomposition error between the model decomposition result and the source domain data label value, each initial model is trained under the constraint of the probability distribution to obtain a load decomposition model adapted to each electricity consumption category.
8. The load decomposition method based on Bayesian transfer learning according to claim 1, characterized in that, Before clustering the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed, the process further includes: Extract the time series of net load, raw load, and photovoltaic output from the original source domain data, and perform preprocessing to obtain an effective original source domain sample set; Based on two random samples in the effective original source domain sample set, and combined with the fusion weight coefficient, the sample fusion weight is determined. Based on the fusion weight, the net load, original load, and photovoltaic output sequences of the two random samples are linearly fused to obtain fused samples; If the fused sample meets the net load physical constraints, the fused sample is added to the original source domain sample set to obtain the expanded original source domain data.
9. A load decomposition device based on Bayesian transfer learning, characterized in that, include: The communication module is used to acquire raw source domain data containing net load, raw load and photovoltaic output, as well as the net load to be decomposed; The processing module is used to cluster the original source domain data and the net load to be decomposed according to electricity consumption behavior to obtain the source domain data corresponding to each electricity consumption category and the electricity consumption category of the net load to be decomposed. Using source domain data corresponding to each electricity consumption category, the initial model corresponding to each electricity consumption category is trained to obtain a load decomposition model adapted to each electricity consumption category; the initial model is used to identify the personalized decomposition characteristics of net load for different electricity consumption categories. Based on the load decomposition model corresponding to the electricity consumption category of the net load to be decomposed, the net load to be decomposed is decomposed to obtain the decomposition result.
10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 8.