Time-sharing electricity quantity restoration method and system based on umap-hdbscan and constraint optimization

By constructing a low-dimensional feature space and filtering similar electricity curves through the improved UMAP-HDBSCAN algorithm, the problem of missing electricity consumption data for users who purchase electricity through agents is solved. This enables rapid and accurate restoration of time-of-use electricity consumption and improves robustness, making it suitable for power system data analysis.

CN123049181APending Publication Date: 2026-11-06ECONOMIC & TECH RES INST OF HUBEI ELECTRIC POWER COMPANY SGCC +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610907371.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

Existing technologies suffer from data gaps in time-of-use electricity data collection for electricity purchasers, affecting transaction settlement and dispatch decisions in the electricity spot market. Furthermore, traditional methods struggle to effectively capture the manifold structure and local topological features of high-dimensional time-of-use electricity data, resulting in significant loss of dimensionality reduction information and decreased accuracy.

Method used

An improved UMAP-HDBSCAN algorithm is used for dimensionality reduction and clustering. By introducing a time-series decay term, a meteorological coupling term, and an improved reachability distance, a low-dimensional feature space is constructed. Typical time-of-use electricity curves similar to the day to be decomposed are selected, and time-of-use electricity is restored based on the similarity of electricity influencing factors.

Benefits of technology

It enables rapid and accurate restoration of time-of-use electricity consumption, improves data integrity and robustness, reduces computational costs, and the dimensionality reduction results have semantic consistency and physical interpretability in the power business, reducing cross-seasonal data misassociations and noise impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123049181A_ABST
    Figure CN123049181A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of power system data analysis, and particularly relates to a method and system for restoring time-of-use electricity based on UMAP-HDBSCAN and constraint optimization. The method is based on input data set construction according to electricity influencing factors. The high-dimensional data in the improved UMAP is used for nonlinear dimension reduction, and then the improved HDBSCAN is used for clustering to obtain a typical time-of-use electricity curve set. Finally, the typical time-of-use electricity curve corresponding to the day to be decomposed is selected based on the similarity of the electricity influencing factors. The time-of-use electricity of the day to be decomposed is calculated based on the selected typical time-of-use electricity curve. The improved UMAP introduces a time decay term and a meteorological coupling term in the edge weight calculation. The improved HDBSCAN introduces an improved reachable distance in the interworking graph. The present application can realize fast and accurate restoration of time-of-use electricity without constructing a complex prediction model, and can effectively solve the problem of missing time-of-use electricity of proxy electricity purchasing users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system data analysis technology, specifically relating to a time-sharing energy restoration method and system based on UMAP-HDBSCAN and constraint optimization. Background Technology

[0002] With the deepening of power market reform, stringent requirements have been placed on the completeness and accuracy of electricity consumption data from agents purchasing electricity. However, in actual business scenarios, agents purchasing electricity are mostly small users, and are affected by factors such as data collection device failures and communication interruptions. As a result, time-of-use electricity collection generally suffers from data gaps. This problem directly interferes with the transaction settlement and dispatch decisions in the electricity spot market, seriously restricting the fairness and efficiency of market transactions.

[0003] Traditional time-of-use (TOU) electricity consumption reconstruction methods typically employ methods such as typical day electricity consumption ratio decomposition or reconstruction methods based on prediction models. Typical day methods rely on traditional clustering algorithms (such as k-means and hierarchical clustering) to extract typical electricity consumption curves. However, these algorithms are sensitive to high-dimensional data, require pre-specifying the number of clusters, and struggle to identify noise and clusters of arbitrary shapes. Simultaneously, traditional dimensionality reduction methods (such as PCA) use linear mapping, which fails to effectively capture the inherent manifold structure and local topological features of high-dimensional TOU electricity consumption data, resulting in significant loss of dimensionality reduction information. Furthermore, traditional TOU electricity consumption reconstruction methods do not fully consider the temporal continuity of electricity consumption behavior and the coupling effect of meteorological factors when constructing similarity metrics. They are also prone to misassociating heterogeneous data across seasons, and sudden meteorological changes can lead to significant differences in electricity consumption curves between adjacent workdays, significantly reducing the accuracy of traditional reconstruction methods. Therefore, there is an urgent need to propose a TOU electricity consumption reconstruction method that can achieve rapid and accurate reconstruction of TOU electricity consumption, fundamentally improving the integrity of electricity consumption data for agents purchasing electricity, and thus providing solid data support for the stable and efficient operation of the electricity spot market. Summary of the Invention

[0004] The purpose of this invention is to address the aforementioned problems in the existing technology by providing a time-sharing power restoration method and system based on UMAP-HDBSCAN and constraint optimization, which can achieve rapid and accurate time-sharing power restoration.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] In a first aspect, the present invention provides a time-sharing energy restoration method based on UMAP-HDBSCAN and constraint optimization, the time-sharing energy restoration method comprising:

[0007] An input dataset is constructed based on historical time-of-use electricity consumption and factors influencing electricity consumption, including time-of-use temperature, time-of-use humidity, and day type.

[0008] First, the improved UMAP algorithm is used to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space. Then, the improved HDBSCAN method is used to cluster the low-dimensional feature space to obtain several typical time-of-use electricity curves. The improved UMAP algorithm introduces a time-series attenuation term and a meteorological coupling term in the edge weight calculation. The improved HDBSCAN method introduces an improved reachability distance in the interconnection graph.

[0009] Based on the similarity of factors affecting electricity consumption, typical time-of-use electricity curves corresponding to the day to be decomposed are selected from the set of typical time-of-use electricity curves. The time-of-use electricity consumption of the day to be decomposed is calculated based on the selected typical time-of-use electricity curves.

[0010] The process of selecting typical time-of-use electricity curves corresponding to the day to be decomposed from the set of typical time-of-use electricity curves based on the similarity of electricity influencing factors includes:

[0011] The similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve is calculated using the following formula:

[0012] ;

[0013] In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve;

[0014] The typical electricity consumption curve corresponding to the smallest similarity value of the factors affecting electricity consumption is selected as the reference curve. The ratio of electricity consumption to total electricity consumption at each time point in the reference curve is calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity data of the day to be decomposed is decomposed to obtain the time-of-use electricity of the day to be decomposed.

[0015] The improved UMAP algorithm includes:

[0016] The nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors;

[0017] A directed weighted graph is constructed based on the input dataset. For the i-th... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows:

[0018] ;

[0019] In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data Local scale; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding date's electricity consumption-temperature correlation coefficient;

[0020] Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula:

[0021] ;

[0022] In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge;

[0023] Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

[0024] The improved HDBSCAN method includes:

[0025] Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula:

[0026] ;

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and characteristics The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient;

[0032] On the interconnection graph, the Prim algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose reachable distance is less than a preset threshold, several typical time-of-use electricity curves are obtained through clustering.

[0033] The cross-entropy loss between the equivalent weighted graph and the undirected weighted graph is the cross-entropy loss with a cluster-friendly regularization term introduced, which is expressed as follows:

[0034] ;

[0035] ;

[0036] ;

[0037] In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; exist The value is 1 if the condition is met, and 0 otherwise.

[0038] Secondly, the present invention provides a time-sharing energy restoration system based on UMAP-HDBSCAN and constraint optimization, the time-sharing energy restoration system comprising:

[0039] The dataset construction module is used to construct an input dataset based on historical time-of-use electricity consumption and factors influencing electricity consumption, including time-of-use temperature, time-of-use humidity, and day type.

[0040] The typical curve acquisition module is used to first use the improved UMAP algorithm to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space, and then use the improved HDBSCAN method to cluster the low-dimensional feature space to obtain several typical time-of-use electricity curves. The improved UMAP algorithm introduces a time-series attenuation term and a meteorological coupling term in the edge weight calculation, and the improved HDBSCAN method introduces an improved reachability distance in the interconnection graph.

[0041] The time-of-use electricity decomposition module is used to select typical time-of-use electricity curves corresponding to the day to be decomposed from the set of typical time-of-use electricity curves based on the similarity of electricity influencing factors, and calculate the time-of-use electricity of the day to be decomposed based on the selected typical time-of-use electricity curves.

[0042] The time-of-use energy decomposition module is used to calculate the time-of-use energy for the day to be decomposed according to the following steps:

[0043] The similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve is calculated using the following formula:

[0044] ;

[0045] In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve;

[0046] The typical electricity consumption curve corresponding to the smallest similarity value of the factors affecting electricity consumption is selected as the reference curve. The ratio of electricity consumption to total electricity consumption at each time point in the reference curve is calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity data of the day to be decomposed is decomposed to obtain the time-of-use electricity of the day to be decomposed.

[0047] The typical curve acquisition module is used to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space by using the improved UMAP algorithm according to the following steps:

[0048] The nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors;

[0049] A directed weighted graph is constructed based on the input dataset. For the i-th... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows:

[0050] ;

[0051] In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data Local scale; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding date's electricity consumption-temperature correlation coefficient;

[0052] Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula:

[0053] ;

[0054] In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge;

[0055] Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

[0056] The typical curve acquisition module is used to cluster the low-dimensional feature space using the improved HDBSCAN method according to the following steps to obtain several typical time-sharing power curves:

[0057] Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula:

[0058] ;

[0059] ;

[0060] ;

[0061] ;

[0062] ;

[0063] In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and characteristics The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient;

[0064] On the interconnection graph, the Prim algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose reachable distance is less than a preset threshold, several typical time-of-use electricity curves are obtained through clustering.

[0065] The cross-entropy loss between the equivalent weighted graph and the undirected weighted graph is the cross-entropy loss with a cluster-friendly regularization term introduced, which is expressed as follows:

[0066] ;

[0067] ;

[0068] ;

[0069] In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; exist The value is 1 if the condition is met, and 0 otherwise.

[0070] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0071] 1. The time-of-use electricity restoration method of this invention, after constructing the input dataset, uses UMAP to perform nonlinear dimensionality reduction on the high-dimensional data in the input dataset, preserving the manifold topological features to form a low-dimensional feature space. Then, HDBSCAN is used to cluster the low-dimensional feature space. Without pre-setting the number of clusters, it can automatically identify noise and discover clusters of arbitrary shapes, significantly improving the robustness and accuracy of typical time-of-use electricity curve extraction. Finally, based on the similarity of electricity influencing factors such as time-of-use temperature, humidity, and day type, typical time-of-use electricity curves corresponding to the day to be decomposed are selected. Without building a complex prediction model, it can achieve fast and accurate restoration of time-of-use electricity, effectively solving the problem of missing time-of-use electricity for agents purchasing electricity and greatly reducing the computational cost.

[0072] 2. The UMAP in the time-of-use electricity restoration method described in this invention is an improved UMAP. It introduces a time-series decay term and a meteorological coupling term in the edge weight calculation. The time-series decay term is dynamically weighted according to the date sequence number to avoid miscorrelation of cross-seasonal data. The meteorological coupling term introduces the electricity-temperature correlation coefficient to establish enhanced connections between data points with similar meteorological influence patterns in the graph structure, thereby strengthening the aggregation of data with similar meteorological patterns in the low-dimensional space. This embeds the prior knowledge of time continuity and meteorological correlation into the dimensionality reduction process, making the dimensionality reduction result semantically consistent with power business and physically interpretable.

[0073] 3. The HDBSCAN in the time-of-use electricity restoration method of this invention is an improved HDBSCAN. First, it introduces time-aware inter-access distance and time-series sliding window into the reachability distance calculation of the interconnection graph, quantifying date proximity as a cluster similarity measure, effectively preventing erroneous aggregation of heterogeneous data across seasons and time periods. Second, it introduces a sparsity penalty coefficient to adaptively correct low-sampling areas or data sparsity features, alleviating density estimation bias caused by missing data collection, and improving clustering stability and anti-interference ability in scenarios with fluctuating data quality. Third, it constructs an interconnection graph based on the weighted distance function of time-of-use electricity consumption, uses the Prim algorithm to generate a minimum spanning tree and disconnects specific connected branches, realizing hierarchical density clustering without pre-setting the number of clusters, automatically identifying noise and discovering clusters of arbitrary shapes, and extracting typical time-of-use electricity curves that are more representative and have better morphological distinguishability, providing a high-quality clustering benchmark for subsequent accurate restoration of time-of-use electricity consumption.

[0074] 4. The time-of-use electricity restoration method described in this invention introduces a clustering-friendly regularization term into the cross-entropy loss of UMAP, and defines a subset of business prior knowledge based on the combination of meteorological and daily types. This forces data points within the same subset to be more clustered in the low-dimensional space, so that the dimensionality reduction result can be directly mapped to the clear business semantics in the power field. This provides a higher quality and more discriminative low-dimensional input for subsequent HDBSCAN clustering, and reduces the fuzziness of cluster boundaries and misclassification. Attached Figure Description

[0075] Figure 1 This is a flowchart of the time-sharing power restoration method described in this invention.

[0076] Figure 2 This is a structural block diagram of the time-sharing power restoration system described in this invention. Detailed Implementation

[0077] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0078] Example 1:

[0079] See Figure 1 A time-sharing energy restoration method based on UMAP-HDBSCAN and constraint optimization is performed in the following steps:

[0080] S1. Construct an input dataset based on historical time-of-use electricity consumption and factors affecting electricity consumption. The factors affecting electricity consumption include time-of-use temperature, time-of-use humidity, and day type. Indicates time-of-use electricity consumption, Indicates time-of-use temperature, Indicates hourly humidity, Indicates day type; 24 refers to the 24 hours in a day.

[0081] S2. First, the improved UMAP algorithm is used to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space. Then, the improved HDBSCAN method is used to cluster the low-dimensional feature space to obtain several typical time-of-use electricity curves. The improved UMAP algorithm introduces a time-series attenuation term and a meteorological coupling term in the edge weight calculation. The improved HDBSCAN method introduces an improved reachability distance in the interconnection graph.

[0082] Specifically, the improved UMAP algorithm includes:

[0083] First, the nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors;

[0084] Then, a directed weighted graph is constructed based on the input dataset. For the i-th element in the directed weighted graph... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows:

[0085] ;

[0086] In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data The local scale is used to control how quickly the similarity of a single sample's neighborhood decays; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding electricity consumption-temperature correlation coefficient is used to increase the weight of dates with similar meteorological influence patterns and strengthen the clustering effect of similar electricity consumption patterns; in this embodiment, the Pierre correlation coefficient is used to calculate the electricity consumption-temperature correlation coefficient.

[0087] Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula:

[0088] ;

[0089] In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge;

[0090] Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

[0091] The cross-entropy loss between the equivalent weighted graph and the undirected weighted graph is the cross-entropy loss with the addition of a cluster-friendly regularization term, which is expressed as follows:

[0092] ;

[0093] ;

[0094] ;

[0095] In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; because The larger the value, the more similar the two data points are in the high-dimensional feature space. exist When the value is 1, then It is activated and added to the cross-entropy loss to enforce a penalty on similar point pairs in the high-dimensional feature space; otherwise, it is set to 0, and only the standard UMAP loss is retained.

[0096] The equivalent weighted graph is obtained by applying attractive and repulsive forces along the directed edges and vertices (a single data point is a vertex in the directed weighted graph) of the directed weighted graph, respectively. The data in the directed weighted graph... Coordinates in the equivalent weighted graph Data in the gravitational and directed weighted graph at the location Coordinates in the equivalent weighted graph The gravitational force is determined by the following formula:

[0097] ;

[0098] In the above formula, , All of these are hyperparameters; in this embodiment... , The values ​​are 1.93 and 0.79 respectively;

[0099] Data With data When an edge between two points exerts an attractive force, the vertices of that edge will be repelled by the other vertices. The repulsive force is determined by the following formula:

[0100] ;

[0101] In the above formula, This is a local minimum value, used to prevent the denominator from being zero.

[0102] Specifically, the improved HDBSCAN method includes:

[0103] Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula:

[0104] ;

[0105] ;

[0106] ;

[0107] ;

[0108] ;

[0109] In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and characteristics The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient is set to 1.0-1.4 in this embodiment.

[0110] Because the power load curve exhibits significant time-period heterogeneity, this invention encodes time-period weights into the distance metric of the HDBSCAN algorithm: the difference in electricity consumption between the midday photovoltaic output period and the evening peak period contributes significantly to pattern recognition, while minor fluctuations in the early morning period may introduce noise. Specifically, time-period weights are set according to the electricity consumption patterns: the weight for the midday period (11:00-14:00) is set to 3; the weight for the evening peak period (18:00-21:00) is set to 2; the weight for the morning peak period (08:00-10:00) is set to 1.5; the weight for the nighttime off-peak period (22:00-06:00) is set to 0.5; and the baseline weight for the remaining time periods is 1.0.

[0111] On the interconnection graph, the Prim algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose reachable distance is less than a preset threshold, several typical time-of-use electricity curves are obtained through clustering.

[0112] S3. Based on the similarity of factors affecting electricity consumption, select typical time-of-use electricity consumption curves corresponding to the day to be decomposed from the set of typical time-of-use electricity consumption curves, and calculate the time-of-use electricity consumption of the day to be decomposed based on the selected typical time-of-use electricity consumption curves.

[0113] Specifically, the step of selecting typical time-of-use electricity curves corresponding to the day to be decomposed from the set of typical time-of-use electricity curves based on the similarity of electricity influencing factors includes:

[0114] First, calculate the similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve using the following formula:

[0115] ;

[0116] In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve;

[0117] Subsequently, the typical electricity consumption curve corresponding to the minimum similarity value of electricity influencing factors was selected as the reference curve. The minimum similarity value of electricity influencing factors indicates a higher similarity. Then, the ratio of electricity consumption to total electricity consumption at each time point in the reference curve was calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity consumption data of the day to be decomposed was decomposed to obtain the time-of-use electricity of the day to be decomposed. The formula for calculating the time-of-use electricity of the day to be decomposed is as follows:

[0118] ;

[0119] In the above formula, The day to be decomposed is the time period Time-of-use electricity consumption; For time period The time-of-use electricity ratio; This is the daily electricity consumption data for the days to be analyzed.

[0120] Example 2:

[0121] See Figure 2A time-of-use energy recovery system based on UMAP-HDBSCAN and constraint optimization includes a dataset construction module, a typical curve acquisition module, and a time-of-use energy decomposition module. The dataset construction module constructs an input dataset based on historical time-of-use energy and energy influencing factors, including time-of-use temperature, time-of-use humidity, and day type. The typical curve acquisition module first uses an improved UMAP algorithm to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space, and then uses an improved HDBSCAN method to cluster the low-dimensional feature space to obtain several typical time-of-use energy curves. The improved UMAP algorithm introduces a time-series decay term and a meteorological coupling term in the edge weight calculation, and the improved HDBSCAN method introduces an improved reachability distance in the interconnection graph. Specifically, the typical curve acquisition module uses the improved UMAP algorithm to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space according to the following steps:

[0122] The nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors;

[0123] A directed weighted graph is constructed based on the input dataset. For the i-th... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows:

[0124] ;

[0125] In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data Local scale; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding date's electricity consumption-temperature correlation coefficient;

[0126] Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula:

[0127] ;

[0128] In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge;

[0129] Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

[0130] The cross-entropy loss between the directed weighted graph and the equivalent weighted graph is the cross-entropy loss with the addition of a cluster-friendly regularization term, which is expressed as follows:

[0131] ;

[0132] ;

[0133] ;

[0134] In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; exist The value is 1 if the condition is met, and 0 otherwise.

[0135] Specifically, the typical curve acquisition module is used to cluster the low-dimensional feature space using the improved HDBSCAN method according to the following steps to obtain several typical time-sharing power curves:

[0136] Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula:

[0137] ;

[0138] ;

[0139] ;

[0140] ;

[0141] ;

[0142] In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and characteristics The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient;

[0143] On the interconnection graph, Prim's algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose improved reachable distance is less than a preset threshold, several typical time-sharing power curves are obtained by clustering.

[0144] The time-of-use energy decomposition module is used to select typical time-of-use energy curves corresponding to the day to be decomposed from the set of typical time-of-use energy curves based on the similarity of energy influencing factors, and calculate the time-of-use energy of the day to be decomposed based on the selected typical time-of-use energy curves; specifically, the time-of-use energy decomposition module is used to calculate the time-of-use energy of the day to be decomposed according to the following steps:

[0145] The similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve is calculated using the following formula:

[0146] ;

[0147] In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve;

[0148] The typical electricity consumption curve corresponding to the smallest similarity value of the factors affecting electricity consumption is selected as the reference curve. The ratio of electricity consumption to total electricity consumption at each time point in the reference curve is calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity data of the day to be decomposed is decomposed to obtain the time-of-use electricity of the day to be decomposed.

[0149] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program goods. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program goods embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

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

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

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

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A time-sharing energy restoration method based on UMAP-HDBSCAN and constraint optimization, characterized in that: The time-sharing power restoration method includes: An input dataset is constructed based on historical time-of-use electricity consumption and factors influencing electricity consumption, including time-of-use temperature, time-of-use humidity, and day type. First, the improved UMAP algorithm is used to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space. Then, the improved HDBSCAN method is used to cluster the low-dimensional feature space to obtain several typical time-of-use electricity curves. The improved UMAP algorithm introduces a time-series attenuation term and a meteorological coupling term in the edge weight calculation. The improved HDBSCAN method introduces an improved reachability distance in the interconnection graph. Based on the similarity of factors affecting electricity consumption, typical time-of-use electricity curves corresponding to the day to be decomposed are selected from the set of typical time-of-use electricity curves. The time-of-use electricity consumption of the day to be decomposed is calculated based on the selected typical time-of-use electricity curves.

2. The time-sharing power restoration method based on UMAP-HDBSCAN and constraint optimization according to claim 1, characterized in that: The process of selecting typical time-of-use electricity curves corresponding to the day to be decomposed from the set of typical time-of-use electricity curves based on the similarity of electricity influencing factors includes: The similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve is calculated using the following formula: ; In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve; The typical electricity consumption curve corresponding to the smallest similarity value of the factors affecting electricity consumption is selected as the reference curve. The ratio of electricity consumption to total electricity consumption at each time point in the reference curve is calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity data of the day to be decomposed is decomposed to obtain the time-of-use electricity of the day to be decomposed.

3. The time-sharing power restoration method based on UMAP-HDBSCAN and constraint optimization according to claim 1 or 2, characterized in that: The improved UMAP algorithm includes: The nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors; A directed weighted graph is constructed based on the input dataset. For the i-th... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows: ; In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data Local scale; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding date's electricity consumption-temperature correlation coefficient; Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula: ; In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

4. The time-sharing power restoration method based on UMAP-HDBSCAN and constraint optimization according to claim 1 or 2, characterized in that: The improved HDBSCAN method includes: Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula: ; ; ; ; ; In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and features The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient; On the interconnection graph, the Prim algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose reachable distance is less than a preset threshold, several typical time-of-use electricity curves are obtained through clustering.

5. The time-sharing energy restoration method based on UMAP-HDBSCAN and constraint optimization according to claim 3, characterized in that: The cross-entropy loss between the equivalent weighted graph and the undirected weighted graph is the cross-entropy loss with a cluster-friendly regularization term introduced, which is expressed as follows: ; ; ; In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; exist The value is 1 if the condition is met, and 0 otherwise.

6. A time-sharing power restoration system based on UMAP-HDBSCAN and constraint optimization, characterized in that: The time-sharing power restoration system includes: The dataset construction module is used to construct an input dataset based on historical time-of-use electricity consumption and factors influencing electricity consumption, including time-of-use temperature, time-of-use humidity, and day type. The typical curve acquisition module is used to first use the improved UMAP algorithm to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space, and then use the improved HDBSCAN method to cluster the low-dimensional feature space to obtain several typical time-of-use electricity curves. The improved UMAP algorithm introduces a time-series attenuation term and a meteorological coupling term in the edge weight calculation, and the improved HDBSCAN method introduces an improved reachability distance in the interconnection graph. The time-of-use electricity decomposition module is used to select typical time-of-use electricity curves corresponding to the day to be decomposed from the set of typical time-of-use electricity curves based on the similarity of electricity influencing factors, and calculate the time-of-use electricity of the day to be decomposed based on the selected typical time-of-use electricity curves.

7. The time-sharing power restoration system based on UMAP-HDBSCAN and constraint optimization according to claim 6, characterized in that: The time-of-use energy decomposition module is used to calculate the time-of-use energy for the day to be decomposed according to the following steps: The similarity of the factors influencing electricity consumption between the day to be decomposed and each typical time-of-use electricity curve is calculated using the following formula: ; In the above formula, For the day to be decomposed and for the first Similarity of the factors affecting electricity consumption in a typical time-of-use electricity curve; , , These are the weighting coefficients for temperature, humidity, and day type factors, respectively. , , These are the temperature, humidity, and day type of the day to be decomposed; , , The first Temperature, humidity, and day type of a typical time-of-use electricity curve; The typical electricity consumption curve corresponding to the smallest similarity value of the factors affecting electricity consumption is selected as the reference curve. The ratio of electricity consumption to total electricity consumption at each time point in the reference curve is calculated to obtain the time-of-use electricity ratio. Based on the time-of-use electricity ratio, the daily electricity data of the day to be decomposed is decomposed to obtain the time-of-use electricity of the day to be decomposed.

8. The time-sharing power restoration system based on UMAP-HDBSCAN and constraint optimization according to claim 6 or 7, characterized in that: The typical curve acquisition module is used to reduce the dimensionality of the input dataset to obtain a low-dimensional feature space by using the improved UMAP algorithm according to the following steps: The nearest neighbor descent algorithm is used to calculate the number of elements in the input dataset. Data The set of nearest neighbors; A directed weighted graph is constructed based on the input dataset. For the i-th... Data To its nearest neighbor set nearest neighbors The directed edges are used to calculate the edge weights in the directed weighted algorithm by introducing a time-series attenuation term and a meteorological coupling term. The formula for calculating the edge weights of the directed edges is as follows: ; In the above formula, In a directed weighted graph, the first... Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; For the first Data To its nearest neighbor set nearest neighbors The distance; For the first Data Local scale; For the first Data The minimum distance to all nearest neighbors in its nearest neighbor set; , The first Data , No. nearest neighbors The corresponding date sequence number; For the first Data With the nearest neighbors The corresponding date's electricity consumption-temperature correlation coefficient; Construct an undirected weighted graph from the directed weighted graph, and calculate the edge weights of the undirected edges in the undirected weighted graph according to the following formula: ; In the above formula, In an undirected weighted graph, the first... Data With the Data The edge weight of the undirected edge; For the th in the directed weighted graph Data To its nearest neighbor set nearest neighbors The edge weight of the directed edge; Construct an equivalent weighted graph of the directed weighted graph, and minimize the cross-entropy loss between the equivalent weighted graph and the undirected weighted graph using the stochastic gradient descent method to obtain the optimal bidirectional adjacency similarity probability of the equivalent weighted graph. The low-dimensional feature set determined by the equivalent weighted graph under the optimal bidirectional adjacency similarity probability is output as the low-dimensional feature space.

9. The time-sharing power restoration system based on UMAP-HDBSCAN and constraint optimization according to claim 6 or 7, characterized in that: The typical curve acquisition module is used to cluster the low-dimensional feature space using the improved HDBSCAN method according to the following steps to obtain several typical time-sharing power curves: Construct an interconnected graph in the low-dimensional feature space, and calculate the improved reachability distance between any two features in the interconnected graph using the following formula: ; ; ; ; ; In the above formula, Representation of features With features Improvements can be made to the distance; , Features and characteristics Time-series-aware reachability; This represents the time-weighted distance function between two features; , Representing features respectively and characteristics At the point of time Time-of-use electricity consumption; For time points Weighting coefficients; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; Representation of features The nearest neighbor set of the th The nearest neighbor; Representation of features The number of features in the nearest neighbor set; This represents the threshold for the number of nearest neighbors; , Features Corresponding date and features The corresponding date; It is a time-series sliding window; The sparsity penalty coefficient; On the interconnection graph, the Prim algorithm is used to generate a minimum spanning tree. After disconnecting the connected branches in the minimum spanning tree whose reachable distance is less than a preset threshold, several typical time-of-use electricity curves are obtained through clustering.

10. The time-sharing power restoration system based on UMAP-HDBSCAN and constraint optimization according to claim 8, characterized in that: The cross-entropy loss between the equivalent weighted graph and the undirected weighted graph is the cross-entropy loss with a cluster-friendly regularization term introduced, which is expressed as follows: ; ; ; In the above formula, Cross-entropy loss; For the first in the equivalent weighted graph The data and the first The bidirectional adjacency similarity probability of each data point; The relative importance coefficient is non-negative. This represents a cluster-friendly regularization term; , The low-dimensional feature dataset of the equivalent weighted graph and the original input data are respectively. , The corresponding coordinates, i.e., the original input data , The date is mapped to the location coordinates in a low-dimensional space; For the first A subset of business prior knowledge, which is obtained by classifying according to the combination of meteorological and daily types; The similarity threshold; The number of data points in the input dataset; , All are hyperparameters; exist The value is 1 if the condition is met, and 0 otherwise.