Method for constructing load identification model of unsupervised fluctuation mode and load identification method
By performing pattern detection, time-frequency conversion and clustering on the load data, a training data set with mixed labels is generated, which solves the problem of insufficient training samples of load recognition models in the prior art and improves the recognition accuracy.
Patent Information
- Application Number
- CN202510398725.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-01
AI Technical Summary
Existing load monitoring technologies are difficult to effectively identify the complex waveforms of electrical appliances in low-frequency load fluctuations, resulting in insufficient training samples for identification models and low label accuracy, which in turn affects the load recognition accuracy.
By performing pattern detection of the total electricity consumption data of the sample, fluctuation mode and non-fluctuation mode data are obtained, time-frequency conversion and clustering are performed, target overlapping data is generated, and the initial recognition model is used to train the load recognition model to generate a training data set with mixed labels.
The training effect and generalization ability of the load recognition model are improved, the problem of insufficient training samples is solved, the diversity and representativeness of the recognition model is ensured, and the recognition accuracy is improved.
Smart Images

Figure CN119917956B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of load monitoring, and particularly to a method for constructing a load recognition model with an unsupervised fluctuation pattern and a load recognition method. Background Art
[0002] With the rapid development of the electronic intelligent control industry, the operation modes of electrical appliances such as variable-frequency air conditioners, induction cookers, washing machines, and televisions have become increasingly complex. Their power waveforms will show regular reciprocating fluctuations in some operating states, and the same electrical appliance will also produce completely different fluctuation patterns in different operating states. The low-frequency load fluctuation patterns often exhibit the following characteristics: there is a certain difference between the waveforms of each cycle of the load fluctuation pattern observed at the low-frequency time scale, the fluctuating operation mode will be superimposed with the transient process to produce a large distortion, and different fluctuation patterns may be superimposed on each other.
[0003] Due to the short fluctuation period of electrical appliances and the characteristics of low-frequency load fluctuation patterns, the existing load monitoring technology is difficult to completely segment such load fluctuation patterns from the total load power consumption data, resulting in an increase in the error of load imprint extraction. Consequently, there are insufficient training samples and low label accuracy in the training process of the recognition model, and the load recognition accuracy is low. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method for constructing a load recognition model with an unsupervised fluctuation pattern and a load recognition method.
[0005] According to a first aspect of the present invention, there is provided a method for constructing a load recognition model with an unsupervised fluctuation pattern, including: performing pattern detection on the total sample power consumption data to obtain sample fluctuating pattern load data and sample non-fluctuating pattern load data, where the sample fluctuating pattern load data is load data that shows a fluctuating pattern over time; performing time-frequency conversion on the sample fluctuating pattern load data to obtain sample spectrum feature data; performing clustering processing on the sample spectrum feature data to obtain a target clustering result, where the target clustering result includes sample target feature data and initial labels, and the initial labels are the labels of the clustering clusters where the sample target feature data is located, and the label of each clustering cluster represents the type of electrical equipment; linearly superimposing the sample target feature data and the sample non-fluctuating pattern load data to obtain sample target overlapping data; processing the sample target overlapping data using an initial recognition model to obtain a sample device recognition result; training the initial recognition model based on the sample device recognition result and a mixed label corresponding to the sample target overlapping data to obtain a trained recognition model, where the mixed label is determined based on the initial labels corresponding to the sample target feature data.
[0006] Optionally, linearly superimpose the sample target feature data and the sample non-fluctuation mode load data to obtain the sample target overlap data, including: intercepting the sample non-fluctuation mode load data based on the first preset window length to obtain at least one sample non-fluctuation mode section data; performing event detection on the at least one sample non-fluctuation mode section data to determine the sample steady-state section load data and the sample transient section load data; linearly superimposing the sample target feature data, the sample steady-state section load data, and the sample transient section load data to obtain the sample target overlap data.
[0007] Optionally, the sample target overlap data includes the first sample overlap data, the second sample overlap data, the third sample overlap data, and the fourth sample overlap data; among them, linearly superimposing the sample target feature data, the sample steady-state section load data, and the sample transient section load data to obtain the sample target overlap data includes: linearly superimposing multiple sample target feature data without repeated time series sections based on the overlap ratio parameter to obtain the sample initial overlap data; linearly superimposing the sample initial overlap data and the sample steady-state section load data to obtain the first sample overlap data; linearly superimposing the sample initial overlap data and the sample transient section load data to obtain the second sample overlap data; linearly superimposing the sample target feature data and the sample steady-state section load data to obtain the third sample overlap data; linearly superimposing the sample target feature data and the sample transient section load data to obtain the fourth sample overlap data.
[0008] Optionally, performing clustering processing on the sample spectral feature data to obtain the target clustering result, including: determining the distances between multiple sample spectral feature data; performing clustering processing on the sample spectral feature data based on the distances between the multiple sample spectral feature data to obtain multiple initial clustering results and the gap statistics between the clusters in each initial clustering result; determining the initial clustering result corresponding to the largest gap statistic among the multiple gap statistics as the target clustering result.
[0009] Optionally, the sample target feature data is determined based on the following operations: determining the sample sequences corresponding to the multiple clusters according to the distances between the multiple sample spectral feature data in each cluster and the cluster center in the target clustering result; selecting a preset number of sample spectral feature data from the sample sequences corresponding to the multiple clusters based on the preset screening rule and determining them as the sample candidate feature data; intercepting data on the sample fluctuation mode load data based on the timestamps corresponding to the sample candidate feature data and the second preset window length to obtain the sample target feature data, where the timestamp represents the starting moment of the sample candidate feature data.
[0010] Optionally, before clustering the sample spectral feature data, it further includes: processing the sample spectral feature data using an encoder to obtain sample deep feature data.
[0011] Optionally, performing time-frequency conversion on the sample fluctuation pattern load data to obtain sample spectral feature data includes: determining M moments corresponding to the sample fluctuation pattern load data; for the m-th moment among the M moments, determining the m-th moment as the window center point, where m M, m, and M are all positive integers; based on the window center point and the third preset window length, intercepting data on the sample fluctuation pattern load data to obtain sample intercepted data corresponding to the m-th moment; for the M moments, processing the sample intercepted data using short-time Fourier transform to obtain M sample spectral feature data.
[0012] Optionally, performing pattern detection on the sample total electricity consumption data to obtain sample fluctuation pattern load data and sample non-fluctuation pattern load data includes: intercepting data on the sample total electricity consumption data based on the fourth preset window length and the preset step size to obtain at least one sample window data; determining the short-time energy value and the zero-crossing rate value of each of the at least one sample window data; determining the maximum short-time energy value among the at least one short-time energy value as the reference threshold; according to the reference threshold and the preset threshold, determining the first threshold. When the short-time energy value of the sample window data is greater than the first threshold and the zero-crossing rate value is greater than or equal to the preset second threshold, determining the sample window data as sample fluctuation pattern load data; when the short-time energy value of the sample window data is less than or equal to the first threshold and the zero-crossing rate value is less than the preset second threshold, determining the sample window data as sample non-fluctuation pattern load data.
[0013] Optionally, processing the sample target overlap data using the initial recognition model to obtain the sample device recognition result includes: performing time-frequency conversion on the sample target overlap data to obtain a sample spectrogram; performing grayscale processing on the sample spectrogram to obtain a sample grayscale image, and processing the sample grayscale image using the initial recognition model to obtain the sample device recognition result.
[0014] The second aspect of the present invention provides a load recognition method, including: performing pattern detection on the total electricity consumption data to obtain fluctuation pattern load data and non-fluctuation pattern load data; performing time-frequency conversion on the fluctuation pattern load data to obtain spectral feature data; processing the spectral feature data using a recognition model to obtain a device recognition result, where the recognition model is determined according to the above construction method.
[0015] The method for constructing a load recognition model of unsupervised fluctuation patterns and the load recognition method provided by the present invention perform time-frequency conversion on the sample fluctuation pattern load data, thereby mapping the sample fluctuation pattern load data with complex time-scale characteristics and fluctuation amplitude characteristics to a high-dimensional feature space to form sample spectrum feature data with significant feature representation capabilities; then, combined with clustering processing, the sample target clustering results with typical fluctuation patterns in the clustering center region are effectively extracted, and the sample target feature data with typical fluctuation patterns and the sample non-fluctuation pattern load data are superimposed to generate multi-type, sufficient, and sample target overlapping data with mixed labels. Without relying on labeled information data samples, the richness of the training dataset significantly improves the training effect and generalization ability of the recognition model. It not only solves the problem of insufficient training samples but also ensures the diversity and representativeness of the training samples, improving the recognition accuracy of the recognition model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Through the following description of the embodiments of the present invention with reference to the accompanying drawings, the above and other objects, features, and advantages of the present invention will become clearer.
[0017] Figure 1 The flowchart of the method for constructing a load recognition model of unsupervised fluctuation patterns according to an embodiment of the present invention is shown.
[0018] Figure 2 An example diagram of an encoder and a decoder according to an embodiment of the present invention is shown.
[0019] Figure 3 The flowchart of the load recognition method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present invention. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0021] The terms used herein are merely for describing specific embodiments and are not intended to limit the present invention. The terms "including", "comprising", etc. used herein indicate the presence of features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0023] In cases where expressions similar to "at least one of A, B, and C, etc." are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0024] Embodiments of the present invention provide a method for constructing an unsupervised fluctuation pattern load recognition model and a load recognition method. The method includes: performing pattern detection on the total sample power consumption data to obtain sample fluctuation pattern load data and sample non-fluctuation pattern load data; performing time-frequency conversion on the sample fluctuation pattern load data to obtain sample spectrum feature data; performing clustering processing on the sample spectrum feature data to obtain a target clustering result; linearly superimposing the sample target feature data and the sample non-fluctuation pattern load data to obtain sample target overlapping data; processing the sample target overlapping data using an initial recognition model to obtain sample device recognition results; and training the initial recognition model based on the sample device recognition results and the mixed labels corresponding to the sample target overlapping data to obtain a trained recognition model.
[0025] In the technical solution of the present invention, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. And the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, etc., all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0026] It should be noted that the serial numbers of the various operations in the following methods are only used as representations of the operations for description, and should not be regarded as indicating the execution order of the various operations. Unless explicitly stated, the method does not need to be executed exactly in the order shown.
[0027] Figure 1 The flowchart of the method for constructing an unsupervised fluctuation pattern load recognition model according to an embodiment of the present invention is shown.
[0028] As Figure 1As shown, the method for constructing a load recognition model of unsupervised fluctuation patterns includes operations S110 to S160.
[0029] In operation S110, pattern detection is performed on the total sample power consumption data to obtain sample fluctuating pattern load data and sample non-fluctuating pattern load data.
[0030] Optionally, the total sample power consumption data is the total power time series change data collected at the power supply entrance of the power user, and the total power time series includes the power time series change data consumed by different electrical devices respectively. For example, the electrical devices can be rice cookers, televisions, etc.
[0031] Optionally, the sample fluctuating pattern load data is load data that shows a fluctuating pattern over time. The load data is the relevant information on the electrical energy consumed by electrical devices in the power system during a certain period.
[0032] For example, the heat preservation mode of a rice cooker generates load data that shows a fluctuating pattern. In the heat preservation mode of the rice cooker, the internal heating element will work intermittently, and the heat preservation power will be adjusted according to the change of the heat preservation time to maintain the temperature of the food and reduce energy consumption.
[0033] Optionally, the sample non-fluctuating pattern load data is load data that does not show a fluctuating pattern over time. For example, it can show an increasing pattern or a transient pattern over time. The load data generated when turning on a television and entering the normal working state shows an increasing pattern, and the process of a certain electrical device transitioning from one steady state to another due to a switching operation shows a transient pattern.
[0034] Optionally, the waveforms and amplitudes of the sample fluctuating pattern load data generated by different electrical devices are different. The sample fluctuating pattern load data can be the load data of one electrical device extracted during a certain period, or it can be composed of the load data generated by different electrical devices during the same period.
[0035] In operation S120, time-frequency conversion is performed on the sample fluctuating pattern load data to obtain sample spectral feature data.
[0036] Optionally, the sample fluctuating pattern load data is time series data. In the sample fluctuating pattern load data, taking the data point corresponding to each moment as the center point of the Hamming sliding window, the short-time Fourier transform algorithm is used to perform time-frequency conversion on the sample fluctuating pattern load data to obtain sample spectral feature data.
[0037] Optionally, the sample spectral feature data is spectrogram feature data that contains different scale information.
[0038] In operation S130, clustering processing is performed on the sample spectral feature data to obtain the target clustering result.
[0039] Optionally, an unsupervised deep clustering algorithm can be used to cluster the sample spectral feature data to obtain multiple clustering results, and each clustering result corresponds to multiple clusters.
[0040] Optionally, a target clustering result is determined from the multiple clustering results. Based on the rule of screening the sample spectral feature data close to the cluster center, sample spectral feature data is selected from multiple clusters of the target clustering result as sample target feature data.
[0041] Optionally, the sample target feature data represents the sample spectral feature data with a typical fluctuation pattern in the region close to the cluster center.
[0042] Optionally, the target clustering result includes sample target feature data and an initial label, where the initial label is the label of the cluster where the sample target feature data is located, and the label of each cluster represents the type of the electrical device.
[0043] In operation S140, the sample target feature data and the sample non-fluctuating pattern load data are linearly superimposed to obtain sample target overlapping data.
[0044] Optionally, multiple sample target feature data can be linearly superimposed first, and then the superimposed sample target feature data and the sample target feature data before superimposition are linearly superimposed with the sample non-fluctuating pattern load data respectively to obtain sample target overlapping data.
[0045] Optionally, the sample target overlapping data is diverse training data marked with a mixed label.
[0046] In operation S150, the initial recognition model is used to process the sample target overlapping data to obtain a sample device recognition result.
[0047] Optionally, the initial recognition model can be constructed based on a neural network (Residual Network with 50 layers, ResNet50). The initial recognition model can also be constructed based on a convolutional neural network or a visual graph network.
[0048] Optionally, the sample target overlapping data is input into the initial recognition model, and a sample device recognition result is output. The sample device recognition result is a prediction result for identifying the type of the electrical device to which the sample target overlapping data belongs.
[0049] In operation S160, the initial recognition model is trained based on the sample device recognition result and the mixed label corresponding to the sample target overlapping data to obtain a trained recognition model.
[0050] Optionally, the mixed label is determined based on the initial label corresponding to the sample target feature data.
[0051] For example, if the sample target overlapping data is obtained by linearly superimposing the sample target feature data a before superposition and the sample non-fluctuating mode load data, then the initial label of the sample target feature data a is the mixed label of the sample target overlapping data; if the sample target overlapping data is obtained by linearly superimposing the sample target feature data after superposition and the sample non-fluctuating mode load data, and the sample target feature data after superposition is obtained by superimposing the sample target feature data b and the sample target feature data c, then the mixed label of the sample target overlapping data includes the initial label of the sample target feature data b and the initial label of the sample target feature data c.
[0052] Optionally, calculate the loss value between the sample device recognition result and the mixed label according to the loss function, adjust the parameters of the initial recognition model based on the loss value, and perform the next round of training until the loss value meets the loss condition and then stop training to obtain the trained recognition model.
[0053] Optionally, in the initial recognition model, the convolutional layer in the residual unit uses a 3×3 convolutional kernel, and the skip connection uses a 1×1 convolutional kernel. The momentum stochastic gradient descent optimizer is used for training, and the momentum is set to 0.9. During the training process, the training data is randomly flipped left and right with a probability of 12.5% to improve the robustness of the model.
[0054] Optionally, due to the time-frequency conversion of the sample fluctuating mode load data, the sample fluctuating mode load data with complex time-scale features and fluctuating amplitude features is mapped to a high-dimensional feature space, forming sample spectral feature data with significant feature representation ability; then, combined with clustering processing, the sample target clustering result with typical fluctuating modes in the clustering center region is effectively extracted, and the sample target feature data with typical fluctuating modes and the sample non-fluctuating mode load data are superimposed to generate multi-type, sufficient, and sample target overlapping data with mixed labels. Without relying on the labeled information data samples, the richness of the training dataset significantly improves the training effect and generalization ability of the recognition model. It not only solves the problem of insufficient training samples but also ensures the diversity and representativeness of the training samples, improving the recognition accuracy of the recognition model.
[0055] Optionally, perform pattern detection on the total sample power consumption data to obtain sample fluctuating pattern load data and sample non-fluctuating pattern load data, including: intercept data of the total sample power consumption data based on a fourth preset window length and a preset step size to obtain at least one sample window data; determine the short-time energy value and the zero-crossing rate value of each of the at least one sample window data; determine the maximum short-time energy value among the at least one short-time energy values as a reference threshold; determine a first threshold according to the reference threshold and a preset threshold; in the case where the short-time energy value of the sample window data is greater than the first threshold and the zero-crossing rate value is greater than or equal to a preset second threshold, determine the sample window data as sample fluctuating pattern load data; in the case where the short-time energy value of the sample window data is less than or equal to the first threshold and the zero-crossing rate value is less than the preset second threshold, determine the sample window data as sample non-fluctuating pattern load data.
[0056] Optionally, the fourth preset window length may be 60 seconds, and the preset step size is 1 second.
[0057] For example, intercept window data of the total sample power consumption data based on a 60-second window length and a 1-second step size to obtain at least one sample window data, and perform preprocessing on the sample window data to obtain preprocessed sample window data. The start times of different sample window data are 1 second apart, and the time period length of each sample window data is 60 seconds.
[0058] In one embodiment, the preprocessing process is as shown in formula (1):
[0059] (1);
[0060] Wherein, represents the sample window data at the t-th second after preprocessing, represents the sample window data at the t-th second before preprocessing, u represents the power mean of the sample window data at the t-th second before preprocessing, and the sample window data at the t-th second represents that the start time of this sample window data is the t-th second.
[0061] Optionally, determine the short-time energy value and the zero-crossing rate value of each of the at least one preprocessed sample window data.
[0062] In one embodiment, the short-time energy value E is calculated as shown in formula (2):
[0063] (2);
[0064] Wherein, represents the sample window data at the t-th second after preprocessing.
[0065] In one embodiment, the zero-crossing rate value ZCR is calculated as shown in formula (3):
[0066] (3);
[0067] Wherein, representing the sign function, if the input value in the sign function is a non - negative number, the sign function value is taken as 1, otherwise - 1, representing the sample window data at the (t - 1)th second after pre - processing.
[0068] Optionally, select the maximum short - time energy value from the short - time energy values corresponding to each of at least one pre - processed sample window data, and determine 0.2 times the maximum short - time energy value as the reference threshold.
[0069] Optionally, the preset threshold can be 5, and the first threshold can be in parallel connection through an "OR" gate according to the preset threshold and the reference threshold. That the short - time energy value of the sample window data is greater than the first threshold represents that the short - time energy value of this sample window data is greater than the reference threshold or the preset threshold.
[0070] Optionally, the preset second threshold can be 2. When the short - time energy value of the sample window data is greater than the first threshold and the zero - crossing rate value is greater than or equal to the preset second threshold, determine this sample window data as the sample fluctuation mode load data.
[0071] Optionally, that the short - time energy value of the sample window data is less than or equal to the first threshold represents that the short - time energy value of this sample window data is less than or equal to the reference threshold and the preset threshold simultaneously.
[0072] Optionally, when the short - time energy value of the sample window data is less than or equal to the first threshold and the zero - crossing rate value is less than the preset second threshold, determine this sample window data as the sample non - fluctuation mode load data.
[0073] Optionally, it is possible to merge and connect multiple sample fluctuation mode load data with overlapping time periods to obtain the merged sample fluctuation mode load data; merge and connect multiple sample non - fluctuation mode load data with overlapping time periods to obtain the merged sample non - fluctuation mode load data.
[0074] For example, the time period of sample fluctuation mode load data 1 is from 0 second to 60 seconds, the time period of sample fluctuation mode load data 2 is from 2 seconds to 62 seconds, and there is an overlapping time period from 2 seconds to 60 seconds between sample fluctuation mode load data 1 and sample fluctuation mode load data 2. Therefore, merge and connect sample fluctuation mode load data 1 and sample fluctuation mode load data 2 to obtain sample fluctuation mode load data with a time period from 0 second to 62 seconds.
[0075] Optionally, perform time-frequency conversion on the sample fluctuation pattern load data to obtain sample spectral feature data, including: determining M moments corresponding to the sample fluctuation pattern load data; for the m-th moment among the M moments, determining the m-th moment as the window center point, where m M, m, and M are all positive integers; based on the window center point and the third preset window length, perform data truncation on the sample fluctuation pattern load data to obtain sample truncated data corresponding to the m-th moment; for the M moments, use the short-time Fourier transform to process the sample truncated data to obtain M sample spectral feature data.
[0076] Optionally, use the data points corresponding to each moment among the M moments as the window center points of the Hamming sliding window respectively. Based on the window center point and the third preset window length, perform data truncation on the sample fluctuation pattern load data to obtain sample truncated data corresponding to each moment, thereby obtaining M sample truncated data.
[0077] Optionally, for the m-th moment, based on the window center point and the third preset window length, perform window data truncation on the sample fluctuation pattern load data to obtain sample truncated data corresponding to the m-th moment, and use the short-time Fourier transform to process the sample truncated data to obtain sample spectral feature data corresponding to the m-th moment.
[0078] Optionally, use the short-time Fourier transform algorithm to process the M sample truncated data respectively to obtain M sample spectral feature data.
[0079] Optionally, the sample spectral feature data is a 64-dimensional feature spectral vector, which contains spectral information of different scales from 1 / 64 Hz to 1 Hz.
[0080] Optionally, introduce the short-time Fourier transform algorithm to map the sample fluctuation pattern load data with complex time-scale characteristics and fluctuation amplitude characteristics to a high-dimensional feature space through time-frequency domain conversion, form sample spectral feature data with significant feature representation ability, effectively capture the non-stationary characteristics in the sample fluctuation pattern load data, provide high-quality data input for the subsequent training of the initial recognition model, and then significantly enhance the extraction ability of the recognition model for the key load characteristics with fluctuation patterns, realizing high-precision load recognition.
[0081] Optionally, perform clustering processing on the sample spectral feature data to obtain the target clustering result, including: determining the distances between multiple sample spectral feature data; based on the distances between multiple sample spectral feature data, perform clustering processing on the sample spectral feature data to obtain multiple initial clustering results and the gap statistics between the clusters in each initial clustering result; determine the initial clustering result corresponding to the maximum gap statistic among the multiple gap statistics as the target clustering result.
[0082] Optionally, the Euclidean distance function is used to calculate the distances between every two sample spectral feature data among multiple sample spectral feature data.
[0083] Optionally, the number of clusters is initialized to k = 2, and the distances between multiple sample spectral feature data are processed using the K-means clustering algorithm to cluster the sample spectral feature data, obtaining an initial clustering result corresponding to the number of clusters being 2.
[0084] Optionally, the initial clustering result corresponding to the number of clusters being 2 includes two clusters, and the gap statistic between the two clusters is calculated and determined as the gap statistic corresponding to the number of clusters being 2.
[0085] Optionally, during the iterative clustering process, each time the number of clusters k increases by 1, the gap statistic corresponding to the number of clusters k is calculated, the maximum gap statistic is identified from multiple gap statistics, the iteration is stopped, and the initial clustering result corresponding to the maximum gap statistic is determined as the target clustering result.
[0086] In one embodiment, the gap statistic Gap(k) corresponding to the number of clusters k is calculated as shown in formula (4):
[0087] (4);
[0088] where represents the within-cluster sum of squared errors of the initial clustering result corresponding to the number of clusters k, and E represents the data expectation, which is determined by Monte Carlo sampling.
[0089] In one embodiment, the within-cluster sum of squared errors corresponding to the number of clusters k is calculated as shown in formula (5):
[0090] (5);
[0091] where represents the number of sample spectral feature data in cluster r, represents the cumulative sum of the distances from the sample spectral feature data in cluster r to the cluster center.
[0092] In one embodiment, the cumulative sum of distances corresponding to cluster r is calculated as shown in formula (6):
[0093] (6);
[0094] where represents the index set of the sample spectral feature data in cluster r, represents the cluster center in cluster r the distance from the sample spectral feature data corresponding to the m-th moment, Characterize the cumulative sum of the distances from the sample spectral feature data in the clustering cluster r to the cluster center.
[0095] Optionally, the sample target feature data is determined based on the following operations: According to the distances between the multiple sample spectral feature data and the cluster center in each clustering cluster in the target clustering result, determine the sample sequences corresponding to the multiple clustering clusters respectively; Based on a preset screening rule, select the sample spectral feature data with a preset sample quantity from the sample sequences corresponding to the multiple clustering clusters respectively and determine them as sample candidate feature data; Based on the time stamp corresponding to the sample candidate feature data and the second preset window length, perform data interception on the sample fluctuation pattern load data to obtain the sample target feature data, where the time stamp characterizes the starting moment of the sample candidate feature data.
[0096] Optionally, the target clustering result includes k clustering clusters, and each clustering cluster includes multiple sample spectral feature data and a cluster center.
[0097] Optionally, for each clustering cluster, calculate the distances between each sample spectral feature data and the cluster center, sort the multiple sample spectral feature data in ascending order based on the distances, and determine the sample sequence corresponding to this clustering cluster. The sample sequence includes the ordered sample spectral feature data.
[0098] Optionally, the preset screening rule can be to screen in sequence from the first sorting position in each clustering cluster, select the sample spectral feature data with a preset sample quantity from the sample sequences corresponding to the multiple clustering clusters respectively and determine them as sample candidate feature data. The sample spectral feature data at the first sorting position represents the sample spectral feature data with the smallest distance from the cluster center.
[0099] For example, the preset sample quantity can be 25% of the total number of samples in each clustering cluster. The total number of samples in clustering cluster 1 is 100, and the total number of samples in clustering cluster 2 is 40. Screen out the first 25% of the sample spectral feature data in sequence from the first sorting position in each clustering cluster, and a total of 35 sample candidate feature data are obtained.
[0100] Optionally, the sample candidate feature data represents the load data close to the cluster center and having a typical waveform pattern.
[0101] Optionally, the time stamp corresponding to the sample candidate feature data characterizes the starting moment of the sample candidate feature data. For example, the starting moment of the sample candidate feature data is t, and the second preset window length is 64 seconds. Then, taking the starting moment t as the window center point, intercept 32 sample points on the left side of the window center and 31 sample points on the right side of the window center to obtain 64 sample points to form the sample target feature data .
[0102] Optionally, before clustering the sample spectral feature data, it further includes: processing the sample spectral feature data with an encoder to obtain sample deep feature data.
[0103] Optionally, before clustering the sample spectral feature data, a second-order tensor autoencoder is built using a fully connected layer (ReLU), and the sample spectral feature data is mapped and dimension-reduced using the second-order tensor autoencoder to obtain sample deep feature data.
[0104] Optionally, the sample deep feature data is dimension-reduced feature data.
[0105] For example, the sample spectral feature data is 64-dimensional feature data, and the sample deep feature data is 8-dimensional feature data.
[0106] Optionally, after obtaining the low-dimensional sample deep feature data, clustering processing is performed on the sample deep feature data to obtain a clustering result.
[0107] Figure 2 An example diagram of an encoder and a decoder according to an embodiment of the present invention is shown.
[0108] As Figure 2 shown, the encoder includes 4 fully connected layers (ReLU), and the number of neurons in the 4 fully connected layers are [64, 128, 64, 8] respectively. The decoder is symmetric to the structure of the encoder. The decoder also includes 4 fully connected layers (ReLU), and the number of neurons in the 4 fully connected layers are [8, 64, 128, 64] respectively. The encoder is responsible for dimension-reducing and mapping the input data to the feature space, and the decoder is responsible for re-dimension-raising the dimension-reduced data in the feature space. During the training process of the encoder, it is necessary to evaluate the similarity according to the input data of the encoder and the output data of the decoder, so as to adjust the parameters to obtain the trained encoder and decoder. The number of rounds (Batch size) in the training process of the decoder and the encoder is set to 100, the learning rate (Learning rate) is set to 0.03, and the gradient decay parameter (Grad decay) is set to 0.8. Processing the sample spectral feature data with the trained encoder to obtain sample deep feature data ensures the accuracy of data dimension reduction.
[0109] Optionally, based on the combination of the second-order tensor autoencoder and the clustering algorithm, unsupervised clustering of the sample spectral feature data is realized, and samples of pure typical fluctuation patterns in the clustering center region are effectively extracted.
[0110] Optionally, linearly superimpose the sample target feature data and the sample non-fluctuating mode load data to obtain sample target overlapping data, including: intercepting the sample non-fluctuating mode load data based on a first preset window length to obtain at least one sample non-fluctuating mode segment data; performing event detection on the at least one sample non-fluctuating mode segment data to determine sample steady-state segment load data and sample transient segment load data; linearly superimposing the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data to obtain sample target overlapping data.
[0111] Optionally, use a non-intrusive load event detection algorithm to locate the position of the load event in the sample non-fluctuating mode segment data. If there is a load event, determine this sample non-fluctuating mode segment data as sample transient segment load data; otherwise, determine this sample non-fluctuating mode segment data as sample steady-state segment load data.
[0112] Optionally, the sample transient segment load data represents data with a large difference in power values at the start time and the end time, and the sample steady-state segment load data represents data with a small difference in power values at the start time and the end time.
[0113] Optionally, randomly discard some of the sample steady-state segment load data so that the number of samples of the sample steady-state segment load data is approximately the same as the number of samples of the sample transient segment load data.
[0114] Optionally, linearly superimpose the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data to obtain sample target overlapping data.
[0115] Optionally, the sample target overlapping data includes first sample overlapping data, second sample overlapping data, third sample overlapping data, and fourth sample overlapping data; among them, linearly superimposing the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data to obtain sample target overlapping data includes: linearly superimposing multiple sample target feature data without repeated time series segments based on an overlapping ratio parameter to obtain sample initial overlapping data; linearly superimposing the sample initial overlapping data and the sample steady-state segment load data to obtain first sample overlapping data; linearly superimposing the sample initial overlapping data and the sample transient segment load data to obtain second sample overlapping data; linearly superimposing the sample target feature data and the sample steady-state segment load data to obtain third sample overlapping data; linearly superimposing the sample target feature data and the sample transient segment load data to obtain fourth sample overlapping data.
[0116] Optionally, the time lengths of the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data are all the same.
[0117] Optionally, multiple sample target feature data without repeated time series segments are linearly superimposed according to the overlapping ratio parameter to obtain initial sample overlapping data. The initial sample overlapping data represents data that aliases different typical fluctuation patterns.
[0118] For example, if the time period length of the sample target feature data is 64 seconds, the time period of sample target feature data 1 is from 1 second to 64 seconds, and the time period of sample target feature data 2 is from 65 seconds to 128 seconds, and there is no repeated time period between sample target feature data 1 and sample target feature data 2, then the power value at the 1st second in sample target feature data 1 and the power value at the 1st second in sample target feature data 2 are aligned and superimposed to obtain the power superimposed value at the 1st second; other data points are aligned and superimposed in sequence, so as to obtain initial sample overlapping data with a time period length of 64 seconds.
[0119] Optionally, the initial sample overlapping data and the sample steady-state segment load data are linearly superimposed to obtain the first sample overlapping data. The first sample overlapping data is data that mixes multiple typical fluctuation patterns and steady-state patterns. The linear superposition process is as in the above example and will not be elaborated here.
[0120] Optionally, the initial sample overlapping data and the sample transient segment load data are linearly superimposed to obtain the second sample overlapping data. The second sample overlapping data is data that mixes multiple typical fluctuation patterns and transient patterns. The linear superposition process is as in the above example and will not be elaborated here.
[0121] Optionally, the sample target feature data and the sample steady-state segment load data are linearly superimposed to obtain the third sample overlapping data. The third sample overlapping data is data that mixes typical fluctuation patterns and steady-state patterns. The linear superposition process is as in the above example and will not be elaborated here.
[0122] Optionally, the sample target feature data and the sample transient segment load data are linearly superimposed to obtain the fourth sample overlapping data. The fourth sample overlapping data is data that mixes typical fluctuation patterns and transient patterns. The linear superposition process is as in the above example and will not be elaborated here.
[0123] Optionally, the overall overlapping rate can be set to 75%, and each type of sample target overlapping data is marked with a corresponding mixed label.
[0124] Optionally, by superimposing load samples with typical fluctuation patterns, steady-state patterns, and transient patterns, multi-type, sufficient, and sample target overlapping data with mixed labels are generated. The enrichment of the training dataset significantly improves the training effect and generalization ability of the recognition model. It not only solves the problem of insufficient samples but also ensures the diversity and representativeness of the training data, providing reliable data support for the analysis and recognition of mixed multi-type patterns and complex load data.
[0125] Optionally, process the sample target overlapping data using the initial recognition model to obtain the sample device recognition result, including: performing time-frequency conversion on the sample target overlapping data to obtain a sample spectrogram; performing grayscale processing on the sample spectrogram to obtain a sample grayscale image, and using the initial recognition model to process the sample grayscale image to obtain the sample device recognition result.
[0126] Optionally, re-perform time-frequency conversion on the sample target overlapping data using the short-time Fourier transform algorithm to obtain a sample spectrogram, and the sample spectrogram can be a 64×64 dimensional feature vector.
[0127] Optionally, perform grayscale processing on the sample spectrogram to convert it into a 64×64 dimensional sample grayscale image. Use the initial recognition model to process the sample grayscale image to obtain the sample device recognition result.
[0128] Optionally, the present invention selects a measured data set, and the data set includes the total power consumption data of different electrical devices. Identify the measured data set according to the load identification method of the present invention and the existing method to obtain the recognition accuracy.
[0129] Table 1 shows the comparison effect of load identification based on the method of the present invention and the existing method.
[0130] Table 1 Comparison effect
[0131]
[0132] Optionally, it can be seen from Table 1 that the method proposed by the present invention can achieve a recognition accuracy similar to that of the existing method without relying on labeled information data samples. In addition, when facing the situation of mixed operation of different fluctuation modes generated by multiple electrical devices running simultaneously, compared with the existing method, the method proposed by the present invention usually has a higher recognition accuracy.
[0133] Optionally, since the present invention converts the power time series waveform information within a certain window into a spectrogram, it can utilize the powerful processing ability of the deep neural network for image samples to better extract the load characteristics in the fluctuation mode data and complete the recognition. The present invention is applicable to most electrical devices with obvious power fluctuation characteristics, and only requires low-frequency power data of about 1 Hz to complete the recognition task, which is easy to be integrated and deployed with the existing method and improves the overall performance. Therefore, the present invention has a wide application prospect in residential, commercial and even industrial users.
[0134] Figure 3 Shows a flowchart of the load identification method according to an embodiment of the present invention.
[0135] As Figure 3As shown, the load identification method includes operations S310 to S330.
[0136] In operation S310, pattern detection is performed on the total power consumption data to obtain fluctuating pattern load data and non-fluctuating pattern load data.
[0137] In operation S320, time-frequency conversion is performed on the fluctuating pattern load data to obtain spectral feature data.
[0138] In operation S330, the spectral feature data is processed using an identification model to obtain an equipment identification result.
[0139] Optionally, the total power consumption data is the total power time series change data collected at the power supply inlet of the power user, and the total power time series includes the power time series change data consumed by different electrical devices respectively. Pattern detection is performed on the total power consumption data to obtain fluctuating pattern load data and non-fluctuating pattern load data.
[0140] Optionally, the fluctuating pattern load data is load data that presents a fluctuating pattern over time, and the non-fluctuating pattern load data is load data that does not present a fluctuating pattern over time.
[0141] Optionally, the short-time Fourier transform algorithm is used to perform time-frequency conversion on the fluctuating pattern load data to obtain spectral feature data. The spectral feature data is spectral map feature data that includes information on different scales.
[0142] Optionally, the identification model can be constructed based on a neural network (Residual Network with 50 layers, ResNet50). The spectral feature data is input into the identification model, and an equipment identification result is output. The equipment identification result is the prediction result of identifying the type of electrical device to which the spectral feature data belongs.
[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.
[0144] The embodiments of the present invention have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present invention.
Claims
1. A method for constructing a load recognition model of unsupervised fluctuation patterns, characterized in that, The method includes: Performing pattern detection on the total sample power consumption data to obtain sample fluctuating pattern load data and sample non-fluctuating pattern load data, where the sample fluctuating pattern load data is load data that exhibits a fluctuating pattern over time; Performing time-frequency conversion on the sample fluctuating pattern load data to obtain sample spectral feature data; Performing clustering processing on the sample spectral feature data to obtain a target clustering result, where the target clustering result includes sample target feature data and an initial label, and the initial label is the label of the clustering cluster where the sample target feature data is located, and the label of each clustering cluster characterizes the type of electrical equipment; Based on a first preset window length, intercepting the sample non-fluctuating pattern load data to obtain at least one sample non-fluctuating pattern segment data; Performing event detection on at least one of the sample non-fluctuating pattern segment data to determine sample steady-state segment load data and sample transient segment load data; Performing linear superposition on the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data to obtain sample target overlapping data; Processing the sample target overlapping data using an initial recognition model to obtain a sample device recognition result; Training the initial recognition model based on the sample device recognition result and a mixed label corresponding to the sample target overlapping data to obtain a trained recognition model, where the mixed label is determined based on the initial label corresponding to the sample target feature data.
2. The method according to claim 1, characterized in that, The sample target overlapping data includes first sample overlapping data, second sample overlapping data, third sample overlapping data, and fourth sample overlapping data; Among them, the performing linear superposition on the sample target feature data, the sample steady-state segment load data, and the sample transient segment load data to obtain sample target overlapping data includes: Performing linear superposition on multiple sample target feature data without repeated time series segments based on an overlapping ratio parameter to obtain sample initial overlapping data; Performing linear superposition on the sample initial overlapping data and the sample steady-state segment load data to obtain the first sample overlapping data; Performing linear superposition on the sample initial overlapping data and the sample transient segment load data to obtain the second sample overlapping data; Performing linear superposition on the sample target feature data and the sample steady-state segment load data to obtain the third sample overlapping data; Performing linear superposition on the sample target feature data and the sample transient segment load data to obtain the fourth sample overlapping data.
3. The method according to claim 1, wherein The performing clustering processing on the sample spectral feature data to obtain a target clustering result includes: Determining the distances between multiple sample spectral feature data; Based on the distances between multiple sample spectral feature data, performing clustering processing on the sample spectral feature data to obtain multiple initial clustering results and the gap statistic between clustering clusters in each initial clustering result; Determining the initial clustering result corresponding to the maximum gap statistic among the multiple gap statistics as the target clustering result.
4. The method according to claim 3, wherein The sample target feature data is determined based on the following operations: According to the distances between multiple pieces of the sample spectral feature data in each clustering cluster in the target clustering result and the cluster center, determine sample sequences corresponding to the multiple clustering clusters respectively; Based on a preset screening rule, select a preset number of the sample spectral feature data from the sample sequences corresponding to the multiple clustering clusters respectively and determine them as sample candidate feature data; Based on the timestamps corresponding to the sample candidate feature data and a second preset window length, perform data interception on the sample fluctuation pattern load data to obtain the sample target feature data, where the timestamp represents the starting moment of the sample candidate feature data.
5. The method according to claim 3, wherein Before performing clustering processing on the sample spectral feature data, it further includes: Process the sample spectral feature data using an encoder to obtain sample deep feature data.
6. The method according to claim 1, characterized in that The performing time-frequency conversion on the sample fluctuation pattern load data to obtain sample spectral feature data includes: Determine M moments corresponding to the sample fluctuation pattern load data; For the m-th moment among M moments, determine the m-th moment as the center point of the window, where m and M, m, and M are all positive integers; Based on the window center point and a third preset window length, perform data interception on the sample fluctuation pattern load data to obtain sample intercepted data corresponding to the m-th moment; For M moments, process the sample intercepted data using short-time Fourier transform to obtain M pieces of sample spectral feature data.
7. The method according to claim 1, wherein The performing pattern detection on the total sample power consumption data to obtain sample fluctuation pattern load data and sample non-fluctuation pattern load data includes: Based on a fourth preset window length and a preset step size, perform data interception on the total sample power consumption data to obtain at least one sample window data; Determine the short-time energy value and zero-crossing rate value of each of the at least one sample window data; Determine the maximum short-time energy value among the at least one short-time energy values as the reference threshold; According to the reference threshold and a preset threshold, determine a first threshold; In the case where the short-time energy value of the sample window data is greater than the first threshold and the zero-crossing rate value is greater than or equal to a preset second threshold, determine the sample window data as sample fluctuation pattern load data; In the case where the short-time energy value of the sample window data is less than or equal to the first threshold and the zero-crossing rate value is less than the preset second threshold, determine the sample window data as sample non-fluctuation pattern load data.
8. The method according to claim 1, wherein The processing the sample target overlapping data using an initial recognition model to obtain a sample device recognition result includes: Perform time-frequency conversion on the sample target overlapping data to obtain a sample spectrogram; Perform grayscale processing on the sample spectrogram to obtain a sample grayscale image; Process the sample grayscale image using an initial recognition model to obtain the sample device recognition result.
9. A load identification method, characterized in that The method includes: Perform pattern detection on the total power consumption data to obtain fluctuation pattern load data and non-fluctuation pattern load data; Perform time-frequency conversion on the fluctuation pattern load data to obtain spectral feature data; Process the spectral feature data using a recognition model to obtain a device recognition result, where the recognition model is determined according to the construction method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Medium and long term power load prediction method and system based on improved seasonal ARIMA model
CN116995668A
Power load prediction method, model training method, electronic equipment and storage medium
CN119051005A