Multi-energy user electricity utilization characteristic clustering method for virtual micro-grid regulation and control
By adopting the multi-energy user electricity usage characteristic clustering method in the virtual microgrid, combined with time-space feature extraction and twin neural network verification, the problem of power users' electricity usage characteristics recognition and classification is solved, and high-precision electricity usage behavior clustering and grid management optimization is achieved.
Patent Information
- Application Number
- CN202411690246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art is difficult to effectively identify and classify the power consumption characteristics of power users, resulting in low efficiency in power grid management and resource allocation, and the traditional method has limited identification accuracy in a label-free data environment.
The multi-energy user electricity consumption characteristic clustering method for virtual microgrid regulation is adopted. Through refined feature extraction of time-space features, combined with k-means++ clustering algorithm and intelligent verification of twin neural networks, high-precision clustering of user electricity consumption behavior is achieved.
It significantly improves the accuracy and accuracy of clustering, enhances the ability to describe electricity consumption behavior, and improves the model's ability to generalize electricity consumption behaviors of different users and adapts to new data.
Smart Images

Figure CN119622384A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of virtual microgrid control, and in particular to a multi-energy user power consumption characteristic clustering method for virtual microgrid control. Background Art
[0002] As the installed capacity of renewable energy in the power grid continues to increase, it is crucial to distinguish different types of electricity consumption. This is not only crucial for power grid companies to adopt differentiated management measures, but also the key to achieving demand response.
[0003] As residents' living standards improve, electricity consumption continues to grow, resulting in the power system often facing a mismatch between supply and demand. During certain periods, users' concentrated electricity consumption leads to a surge in demand, while at other times, electricity usage decreases significantly. The daily load fluctuations of the power grid have intensified, but the overall power utilization rate is relatively low, which poses a major challenge to the power industry.
[0004] Given these challenges, it is not enough to simply expand the scale of power plants to improve my country's power situation. This approach may lead to reduced efficiency of equipment within the power system and increase investment in the grid during peak load regulation, resulting in unnecessary increase in infrastructure costs. However, high costs do not necessarily bring corresponding high returns, and this strategy is not wise for the long-term development of the power system.
[0005] In order to meet these challenges, the key is to reasonably classify various types of load users in the power system and divide power users into several different categories by identifying typical load characteristics. This classification method helps to achieve more refined power management and optimize resource allocation. However, traditional load identification mainly relies on data clustering or classification technology. Although clustering methods are suitable for unlabeled data, their recognition accuracy is limited. Although classification methods perform well on labeled data, most data in the power grid lack labels, making classification methods difficult to apply. At the same time, the large scale, wide sources and diverse storage structures of power data make it difficult to achieve accurate and efficient clustering processing of data.
[0006] With the gradual opening of the power market and the continuous advancement of smart grid technology, as the level of intelligence of household appliances increases, the controllable load resources on the demand side have begun to receive more attention. Exploring the clustering analysis technology of demand-side load resources has become an inevitable direction for the development of the power system. This is of great strategic significance for ensuring the safe and stable operation of the power grid and improving the regulation capacity of the power system. Summary of the invention
[0007] The purpose of the present invention is to provide a multi-energy user power consumption characteristic clustering method for virtual microgrid regulation to solve the problems raised in the above background technology.
[0008] In order to achieve the above object, the present invention provides the following technical solution: a multi-energy user power consumption characteristic clustering method for virtual microgrid regulation, comprising the following steps:
[0009] Step 1: Extract the time-space characteristics of residential users' electricity consumption behavior through comprehensive and refined feature extraction. The three feature components of refined feature extraction are: wide-domain time series characteristics, dynamic time warping distance characteristics and Gaussian model parameter characteristics;
[0010] Step 2: The extracted spatiotemporal features are clustered using the k-means++ clustering algorithm for multi-channel interactive clustering;
[0011] Step 3: Intelligently check the clustering results through the twin neural network. The twin neural network consists of two sub-networks with the same structure but different parameters. The clustered data is processed by comparing the output differences of the two sub-networks to evaluate the consistency and accuracy of the clustering results.
[0012] Step 4: After the intelligent verification of the clustering results, the clustering results are fine-tuned according to the verification results of the twin neural network, and similar clusters are re-merged.
[0013] Furthermore, in step 1, the wide-domain time series feature analyzes and organizes the time data of user load at different time scales, decomposes it into different time units, and clarifies their respective numerical domain limits: the number of hours starts from 0 o'clock and ends at 23 o'clock, with a value of 24 time steps; the number of weeks starts from Monday and ends at Sunday, with a value of 7 time steps; the number of months starts from January and ends at December, with a value of 12 time steps; the number of days starts from the 1st and can reach up to the 365th in a year, with a value of 365 time steps.
[0014] Furthermore, in step 1, the measurement method of the dynamic time warping distance feature is specifically as follows:
[0015] Assume that the time series of historical user electricity consumption is Q, and the time series of newly input user electricity consumption is C, and construct the DTW distance between the two;
[0016] D(i,j)=d(q i ,c j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}
[0017] In the formula, The initial condition is D(1,1)=d(q1,c1). Find an optimal curved path W in the distance matrix B so that the path from d11 to dnm is the shortest, where the distance matrix B is:
[0018]
[0019] Curved path W = (ω1, ω2, ..., ω k ) r (i, j) defines the mapping between sequences Q and C, and the DTW distance is defined as:
[0020]
[0021] Where K is the length of the curved path W, and the extracted user power consumption characteristic value is D(Q, C).
[0022] Furthermore, in step 1, the feature extraction method of the Gaussian model parameter feature is specifically as follows:
[0023] Decompose the user's electricity consumption data into the superposition of several Gaussian probability density functions;
[0024] Assuming that the user's electricity consumption data conforms to the normal distribution, the distribution probability density function is:
[0025]
[0026] In the formula, u is the power sample value in the user's power consumption data, which obeys the probability distribution with mean μ and variance σ. Further, the model parameters are obtained:
[0027]
[0028]
[0029] For the time series E of user electricity consumption data W =||G W (input1)-G W (input2)||2, make a first-order difference and get I=(i1,i2,...,i n-1 ), so that i k =t k-1 -t k , the characteristic sequence characterizes the variation characteristics of electricity consumption; in order to achieve the stability of the time series, it is subjected to k-times difference processing until the sequence reaches a stable state. For each order of difference result, the corresponding Gaussian distribution characteristics are derived. Based on the original load sequence T and the first-order difference sequence I, Gaussian models (μ1,σ1 2 ) and (μ2,σ2 2 );
[0030] Furthermore, characteristic parameter sets are obtained, which not only reveal the average value and volatility of the sequence itself, but also reflect the average level and volatility of the sequence changes;
[0031] The Gaussian model parameters μ1, μ2, σ1 2 ,σ2 2 As the key feature value for predictive analysis.
[0032] Furthermore, in step 2, the specific steps of using the k-means++ clustering algorithm to perform multi-channel interactive clustering are:
[0033] First, the feature vectors of the wide-domain time channel, dynamic time warping channel, and Gaussian channel are fused and spliced in series to form a longer and more detailed feature vector;
[0034] Subsequently, an initial cluster center is determined from the dataset by random selection in the fused feature vector;
[0035] The k-means++ algorithm evaluates the possibility of each point that has not been selected as the center becoming a new cluster center. This possibility is positively correlated with the square of the distance of the point relative to the existing center point, so as to reduce the algorithm's dependence on random initial cluster centers and improve the quality of clustering.
[0036] Furthermore, in step three, the method for intelligently checking the clustering results through the twin neural network is:
[0037] 60% of the data in each category of the k user power consumption data clusters after clustering are selected for model training, where the data pairs consisting of user power consumption data in the same cluster are regarded as positive data pairs, and the label label is set to 1; and the data pairs consisting of user power consumption data belonging to different clusters are regarded as negative data pairs, and the label label is set to 0. At the same time, the ratio of the number of positive and negative data pairs in the training data is controlled to 1:1;
[0038] Finally, the clustering verification of the user electricity consumption data is carried out, and two data inputs of the k user electricity consumption data clusters after clustering are submitted to the twin neural network. If the two input user electricity consumption data belong to the same cluster, the twin neural network will set the label label of the pair of data to 1 during the verification process; if the two input user electricity consumption data do not belong to the same cluster, the twin neural network will set the label label of the pair of data to 0 during the verification process; at the same time, the ratio of the number of positive and negative data pairs is controlled to be 1:1, which means that the clustering result is accurate.
[0039] Furthermore, the twin neural network model adopts a fully convolutional neural network. The two inputs of the fully convolutional neural network are processed by neural networks with the same structure. The two networks use the fully convolutional neural network architecture and share the weight matrix W. The output layer of the network will output the feature vectors mapped by the two inputs, and then measure the similarity of the two feature vectors through the Euclidean distance, that is, the calculation formula is:
[0040] E W=||G W (input1)-G W (input2)||2
[0041] In the formula, E W is the Euclidean distance between two inputs to indicate their similarity, input1 and input2 are input 1 and input 2, G W (input1) and G W (input2) is output 1 and output 2, this similarity measure is E W Adjust the weight W through the back-propagation algorithm;
[0042] During the training phase, if two inputs belong to the same cluster, the model aims to minimize the similarity measure E W , that is, set the label label to 1; on the contrary, if the two inputs belong to different clusters, the model aims to maximize E W , that is, set the label label to 0.
[0043] Furthermore, in step 4, the clustering results are fine-tuned and the specific method of re-merging similar clusters is as follows:
[0044] According to the results of the twin neural network calibration, similar k-means++ clustering data and k-means++ clustering data with large separation differences are merged again;
[0045] For the clusters obtained by the k-means++ clustering algorithm, the twin neural network checks the similarity distribution within them;
[0046] If it is found that the user electricity consumption data in a certain cluster is significantly higher than that in other clusters in terms of similarity metric value E(W), then consider reallocating the data point to the cluster with the lowest similarity metric value E(W) to enhance the consistency of clustering;
[0047] Furthermore, if the similarity measure E(W) between the user's electricity consumption data and all k clusters is large and exceeds the preset similarity threshold, the data point will be identified as an abnormal point or noise point to facilitate subsequent abnormality detection or data cleaning.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The present invention significantly improves the accuracy of clustering by refining feature extraction and proposing multi-scale aggregation features. In particular, the use of a fused Gaussian model to extract residential user load characteristics not only enhances the ability to describe electricity consumption behavior, but also improves the accuracy of clustering.
[0050] 2. The data clustering method of the present invention effectively improves the model's generalization ability for different users' electricity consumption behaviors by introducing a twin neural network for intelligent verification. The two sub-networks of the FCN model have the same structure but independent parameters. This design allows the model to better capture and distinguish the subtle differences between different electricity consumption patterns, thereby improving the model's adaptability to new data and prediction accuracy.
[0051] 3. Compared with the traditional static clustering method, the method of the present invention has the ability of dynamic adjustment. After the clustering is completed, the clustering results are fine-tuned according to the verification results of the twin neural network through the post-processing optimization of the additional steps, including merging similar clusters and separating heterogeneous clusters with large differences. This dynamic adjustment mechanism not only improves the accuracy of the clustering results, but also enables the clustering results to better reflect the actual electricity consumption behavior and pattern changes.
[0052] 4. The present invention enhances the ability to detect abnormal points or noise points. During the cluster verification process, if the similarity metric values of the user's power consumption data and all clusters are large and exceed the preset threshold, the data point can be identified as an abnormality, providing a basis for data cleaning. This capability is crucial to maintaining data quality and improving the accuracy of power system analysis, and also provides a new technical means for fault detection and prevention of power grids. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of the data clustering method based on the multi-energy user control characteristics of the virtual microgrid of the present invention;
[0054] Figure 2 Schematic diagram of the twin neural network structure of the present invention;
[0055] Figure 3 Schematic diagram of the FCN convolutional network structure of the present invention;
[0056] Figure 4 This is a flow chart for verifying k-mean++ results for the twin neural network of the present invention. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0058] See also Figure 1-4 The present invention proposes a multi-energy user power consumption characteristic clustering method for virtual microgrid regulation, comprising the following steps:
[0059] Step 1: Extract the time-space characteristics of residential users' electricity consumption behavior through comprehensive and refined feature extraction. The three feature components of refined feature extraction are: wide-domain time series characteristics, dynamic time warping distance characteristics and Gaussian model parameter characteristics;
[0060] Step 2: The extracted spatiotemporal features are clustered using the k-means++ clustering algorithm for multi-channel interactive clustering;
[0061] Step 3: Intelligently check the clustering results through the twin neural network. The twin neural network consists of two sub-networks with the same structure but different parameters. The clustered data is processed by comparing the output differences of the two sub-networks to evaluate the consistency and accuracy of the clustering results.
[0062] Step 4: After the intelligent verification of the clustering results, the clustering results are fine-tuned according to the verification results of the twin neural network, and similar clusters are re-merged.
[0063] like Figure 1 As shown, Figure 1 The flowchart of the data clustering method based on the multi-user regulation characteristics of the virtual microgrid of the present invention is as follows. When the electricity users are clustered, the similarity of the same cluster is as high as possible, and the similarity of different clusters is as low as possible:
[0064] S1. Data preprocessing: cleaning the collected electricity consumption data, including removing noise and filling missing values;
[0065] S2, multi-scale feature extraction, decomposing the power consumption data into the superposition of several Gaussian probability density functions, extracting Gaussian model parameters, analyzing the time data of user load, extracting time series features, calculating the dynamic time warping (DTW) distance, and capturing changes in power consumption patterns;
[0066] S3, initial cluster center selection, apply k-means++ algorithm to strategically select initial cluster centers and optimize clustering efficiency;
[0067] S4. Clustering execution, using the k-means++ algorithm to cluster the aggregated feature data to form a preliminary clustering result;
[0068] S5. Clustering result verification: use the twin neural network to intelligently verify the clustering results and evaluate the consistency and accuracy of the clustering;
[0069] S6. Determine the consistency and accuracy of clustering. According to the verification result of the twin network, if the same cluster data is input into the twin neural network and the output is 1, and the non-same cluster data is input into the twin neural network and the output is 0, then the verification of the data is ended and the process goes to step nine; otherwise, proceed to the next step.
[0070] S7, post-processing optimization, reallocating the data to the most similar clusters, i.e., the clusters with the smallest similarity value EW;
[0071] S8, anomaly detection, if the similarity value EW in the previous step is still large, and THR is the set similarity threshold, it is identified as an abnormal point or noise point in the cluster, and data cleaning and anomaly processing are performed;
[0072] S9, feedback and iteration, by continuously repeating the procedures of S6-S8 until all data are verified and ended.
[0073] Furthermore, in step 1, the wide-domain time series feature analyzes and organizes the time data of user load at different time scales, decomposes it into different time units, and clarifies their respective numerical domain limits: the number of hours starts from 0 o'clock and ends at 23 o'clock, with a value of 24 time steps; the number of weeks starts from Monday and ends at Sunday, with a value of 7 time steps; the number of months starts from January and ends at December, with a value of 12 time steps; the number of days starts from the 1st and can reach up to the 365th in a year, with a value of 365 time steps.
[0074] Furthermore, in step 1, in order to capture the changes in electricity consumption patterns, a dynamic time warping distance feature measurement method is used, specifically:
[0075] Assume that the time series of historical user electricity consumption is Q, and the time series of newly input user electricity consumption is C, and construct the DTW distance between the two;
[0076] D(i,j)=d(q i ,c j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}
[0077] In the formula, The initial condition is D(1,1)=d(q1,c1). Find an optimal curved path W in the distance matrix B so that the path from d11 to dnm is the shortest, where the distance matrix B is:
[0078]
[0079] Curved path W = (ω1, ω2, ..., ω k ) r (i, j) defines the mapping between sequences Q and C, and the DTW distance is defined as:
[0080]
[0081] Where K is the length of the curved path W, and the extracted user power consumption characteristic value is D(Q, C).
[0082] Furthermore, in step 1, the feature extraction method of the Gaussian model parameter feature is specifically:
[0083] Decompose the user's electricity consumption data into the superposition of several Gaussian probability density functions;
[0084] Assuming that the user's electricity consumption data conforms to the normal distribution, the distribution probability density function is:
[0085]
[0086] In the formula, u is the power sample value in the user's power consumption data, which obeys the probability distribution with mean μ and variance σ. Further, the model parameters are obtained:
[0087]
[0088]
[0089] For the time series E of user electricity consumption data W =||G W (input1)-G W (input2)||2, make a first-order difference and get I=(i1,i2,...,i n-1 ), so that i k =t k-1 -t k , the characteristic sequence characterizes the variation characteristics of electricity consumption; in order to achieve the stability of the time series, it is subjected to k-times difference processing until the sequence reaches a stable state. For each order of difference result, the corresponding Gaussian distribution characteristics are derived. Based on the original load sequence T and the first-order difference sequence I, Gaussian models (μ1,σ1 2 ) and (μ2,σ2 2 );
[0090] Furthermore, characteristic parameter sets are obtained, which not only reveal the average value and volatility of the sequence itself, but also reflect the average level and volatility of the sequence changes;
[0091] The Gaussian model parameters μ1, μ2, σ1 2 ,σ2 2 As the key feature value for predictive analysis.
[0092] Furthermore, in step 2, the specific steps of using the k-means++ clustering algorithm to perform multi-channel interactive clustering are:
[0093] First, the feature vectors of the wide-domain time channel, dynamic time warping channel, and Gaussian channel are fused and spliced in series to form a longer and more detailed feature vector;
[0094] Subsequently, an initial cluster center is determined from the dataset by random selection in the fused feature vector;
[0095] The k-means++ algorithm evaluates the possibility of each point that has not been selected as the center becoming a new cluster center. This possibility is positively correlated with the square of the distance of the point relative to the existing center point, so as to reduce the algorithm's dependence on random initial cluster centers and improve the quality of clustering.
[0096] Furthermore, if Figure 2 As shown, Figure 2 This is a schematic diagram of the twin network structure of the present invention. When selecting a model for the twin neural network, a fully convolutional neural network (FCN) is selected. Unlike a conventional convolutional neural network (CNN), FCN replaces the final fully connected layer of CNN with a convolutional layer, so that it can process input data of different scales; this design makes FCN flexible in image recognition tasks. In addition, the parameter configuration of FCN is independent of the length of the input data, which makes transfer learning possible: first pre-training on a large-scale data set, and then fine-tuning on a small-scale data set for specific problems.
[0097] Furthermore, if Figure 3 As shown, Figure 3 It is a schematic diagram of the FCN convolutional network structure of the present invention. The FCN model adopted includes three convolution modules, each of which is composed of a one-dimensional convolution layer of different sizes, a batch normalization layer (BatchNormalization) and a ReLU activation function. The role of the batch normalization layer is to normalize the output of the previous layer to accelerate the network training process and increase the convergence speed. This allows the use of a larger learning rate during training, while reducing the risk of gradient explosion and disappearance, and helps to prevent overfitting. The model is finally classified and checked by a global pooling layer and an activation layer, in which the global pooling layer not only achieves dimensionality reduction, but also significantly reduces the number of network parameters, regularizes the network structure, and further prevents the occurrence of overfitting.
[0098] Furthermore, if Figure 4 As shown, Figure 4 This is a flow chart of the twin network verification k-mean++ result of the present invention. In step three, the method of intelligently verifying the clustering results through the twin neural network is:
[0099] 60% of the data in each category of the k user power consumption data clusters after clustering are selected for model training, where the data pairs consisting of user power consumption data in the same cluster are regarded as positive data pairs, and the label label is set to 1; and the data pairs consisting of user power consumption data belonging to different clusters are regarded as negative data pairs, and the label label is set to 0. At the same time, the ratio of the number of positive and negative data pairs in the training data is controlled to 1:1;
[0100] Finally, the clustering verification of the user electricity consumption data is carried out, and two data inputs of the k user electricity consumption data clusters after clustering are submitted to the twin neural network. If the two input user electricity consumption data belong to the same cluster, the twin neural network will set the label label of the pair of data to 1 during the verification process; if the two input user electricity consumption data do not belong to the same cluster, the twin neural network will set the label label of the pair of data to 0 during the verification process; at the same time, the ratio of the number of positive and negative data pairs is controlled to be 1:1, which means that the clustering result is accurate.
[0101] Furthermore, the twin neural network model adopts a fully convolutional neural network. The two inputs of the fully convolutional neural network are processed by neural networks with the same structure. The two networks use the fully convolutional neural network architecture and share the weight matrix W. The output layer of the network will output the feature vectors mapped by the two inputs, and then measure the similarity of the two feature vectors through the Euclidean distance, that is, the calculation formula is:
[0102] E W =||G W (input1)-G W (input2)||2
[0103] In the formula, E W is the Euclidean distance between two inputs to indicate their similarity, input1 and input2 are input 1 and input 2, G W (input1) and G W (input2) is output 1 and output 2, this similarity measure is E W Adjust the weight W through the back-propagation algorithm;
[0104] During the training phase, if two inputs belong to the same cluster, the model aims to minimize the similarity measure E W , that is, set the label label to 1; on the contrary, if the two inputs belong to different clusters, the model aims to maximize E W , that is, set the label label to 0.
[0105] Furthermore, in step 4, the clustering results are fine-tuned and the specific method of re-merging similar clusters is as follows:
[0106] According to the results of the twin neural network calibration, similar k-means++ clustering data and k-means++ clustering data with large separation differences are merged again;
[0107] For the clusters obtained by the k-means++ clustering algorithm, the twin neural network checks the similarity distribution within them;
[0108] If it is found that the user electricity consumption data in a certain cluster is significantly higher than that in other clusters in terms of similarity metric value E(W), then consider reallocating the data point to the cluster with the lowest similarity metric value E(W) to enhance the consistency of clustering;
[0109] Furthermore, if the similarity measure E(W) between the user's electricity consumption data and all k clusters is large and exceeds the preset similarity threshold, the data point will be identified as an outlier or noise point to facilitate subsequent anomaly detection or data cleaning.
[0110] In summary, the data clustering method of the present invention effectively improves the generalization ability of the model for different users' electricity consumption behaviors by introducing twin neural networks for intelligent verification; the two sub-networks of the FCN model have the same structure but independent parameters. This design allows the model to better capture and distinguish the subtle differences between different electricity consumption patterns, thereby improving the model's adaptability to new data and prediction accuracy.
[0111] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-energy user power consumption characteristics clustering method for virtual microgrid control, characterized in that: The following steps are involved: Step 1: Extract the time-space characteristics of residential users' electricity consumption behavior through comprehensive and refined feature extraction. The three feature components of refined feature extraction are: wide-domain time series characteristics, dynamic time warping distance characteristics and Gaussian model parameter characteristics; Step 2: The extracted spatiotemporal features are clustered using the k-means++ clustering algorithm for multi-channel interactive clustering; Step 3: Intelligently check the clustering results through the twin neural network. The twin neural network consists of two sub-networks with the same structure but different parameters. The clustered data is processed by comparing the output differences of the two sub-networks to evaluate the consistency and accuracy of the clustering results. Step 4: After the intelligent verification of the clustering results, the clustering results are fine-tuned according to the verification results of the twin neural network, and similar clusters are re-merged.
2. According to claim 1, a multi-energy user power consumption characteristic clustering method for virtual microgrid regulation is characterized by: In step 1, the wide-domain time series feature analyzes and organizes the time data of user load at different time scales, decomposes it into different time units, and clarifies their respective numerical domain limits: the number of hours starts from 0 o'clock and ends at 23 o'clock, with a value of 24 time steps; the number of weeks starts from Monday and ends at Sunday, with a value of 7 time steps; the number of months starts from January and ends at December, with a value of 12 time steps; the number of days starts from the 1st and can reach up to the 365th in a year, with a value of 365 time steps.
3. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: In step 1, the measurement method of the dynamic time warping distance feature is as follows: Assume that the time series of historical user electricity consumption is Q, and the time series of newly input user electricity consumption is C, and construct the DTW distance between the two; D(i,j)=d(q i ,c j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)} In the formula, The initial condition is D(1,1)=d(q1,c1). Find an optimal curved path W in the distance matrix B so that the path from d11 to dnm is the shortest, where the distance matrix B is: Curved path W = (ω1, ω2, ..., ω k ) r (i, j) defines the mapping between sequences Q and C, and the DTW distance is defined as: Where K is the length of the curved path W, and the extracted user power consumption characteristic value is D(Q, C).
4. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: In step 1, the feature extraction method of the Gaussian model parameter features is specifically as follows: Decompose the user's electricity consumption data into the superposition of several Gaussian probability density functions; Assuming that the user's electricity consumption data conforms to the normal distribution, the distribution probability density function is: In the formula, u is the power sample value in the user's power consumption data, which obeys the probability distribution with mean μ and variance σ. Further, the model parameters are obtained: For the time series E of user electricity consumption data W =||G W (input1)-G W (input2)||2, make a first-order difference and get I=(i1,i2,...,i n-1 ), so that i k =t k-1 -t k , the characteristic sequence characterizes the variation characteristics of electricity consumption; in order to achieve the stability of the time series, it is subjected to k-times difference processing until the sequence reaches a stable state. For each order of difference result, the corresponding Gaussian distribution characteristics are derived. Based on the original load sequence T and the first-order difference sequence I, Gaussian models (μ1,σ1 2 ) and (μ2,σ2 2 ); Furthermore, characteristic parameter sets are obtained, which not only reveal the average value and volatility of the sequence itself, but also reflect the average level and volatility of the sequence changes; The Gaussian model parameters μ1, μ2, σ1 2 ,σ2 2 As the key feature value for predictive analysis.
5. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: In step 2, the specific steps of using the k-means++ clustering algorithm for multi-channel interactive clustering are: First, the feature vectors of the wide-domain time channel, dynamic time warping channel, and Gaussian channel are fused and spliced in series to form a longer and more detailed feature vector; Subsequently, an initial cluster center is determined from the dataset by random selection in the fused feature vector; The k-means++ algorithm evaluates the possibility of each point that has not been selected as the center becoming a new cluster center. This possibility is positively correlated with the square of the distance of the point relative to the existing center point, so as to reduce the algorithm's dependence on random initial cluster centers and improve the quality of clustering.
6. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: In step three, the method of intelligently checking the clustering results through the twin neural network is: 60% of the data in each category of the k user power consumption data clusters after clustering are selected for model training, where the data pairs consisting of user power consumption data in the same cluster are regarded as positive data pairs, and the label label is set to 1; and the data pairs consisting of user power consumption data belonging to different clusters are regarded as negative data pairs, and the label label is set to 0. At the same time, the ratio of the number of positive and negative data pairs in the training data is controlled to 1:1; Finally, the clustering verification of the user electricity consumption data is carried out, and two data inputs of the k user electricity consumption data clusters after clustering are submitted to the twin neural network. If the two input user electricity consumption data belong to the same cluster, the twin neural network will set the label label of the pair of data to 1 during the verification process; if the two input user electricity consumption data do not belong to the same cluster, the twin neural network will set the label label of the pair of data to 0 during the verification process; at the same time, the ratio of the number of positive and negative data pairs is controlled to be 1:1, which means that the clustering result is accurate.
7. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: The twin neural network model uses a fully convolutional neural network. The two inputs of the fully convolutional neural network are processed by neural networks with the same structure. The two networks use the fully convolutional neural network architecture and share the weight matrix W. The output layer of the network will output the feature vectors mapped by the two inputs, and then measure the similarity of the two feature vectors through the Euclidean distance, that is, the calculation formula is: E W =||G W (input1)-G W (input2)||2 In the formula, E W is the Euclidean distance between two inputs to indicate their similarity, input1 and input2 are input 1 and input 2, G W (input1) and G W (input2) is output 1 and output 2, this similarity measure is E W Adjust the weight W through the back-propagation algorithm; During the training phase, if two inputs belong to the same cluster, the model aims to minimize the similarity measure E W , that is, set the label label to 1; On the contrary, if the two inputs belong to different clusters, the model aims to maximize E W , that is, set the label label to 0.
8. The method for clustering power consumption characteristics of multi-energy users for virtual microgrid control according to claim 1 is characterized by: In step 4, the clustering results are fine-tuned and the specific method of re-merging similar clusters is as follows: According to the results of the twin neural network calibration, similar k-means++ clustering data and k-means++ clustering data with large separation differences are merged again; For the clusters obtained by the k-means++ clustering algorithm, the twin neural network checks the similarity distribution within them; If it is found that the user electricity consumption data in a certain cluster is significantly higher than that in other clusters in terms of similarity metric value E(W), then consider reallocating the data point to the cluster with the lowest similarity metric value E(W) to enhance the consistency of clustering; Furthermore, if the similarity measure E(W) between the user's electricity consumption data and all k clusters is large and exceeds the preset similarity threshold, the data point will be identified as an outlier or noise point to facilitate subsequent anomaly detection or data cleaning.