Load identification method and system based on user collaboration, electronic device, and medium
By constructing a load feature sample dataset and labeling users using an improved CUSUM algorithm and a density-reachable threshold-based clustering algorithm, the problem of low load identification accuracy in existing technologies is solved, and accurate identification of user electrical equipment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-13
- Publication Date
- 2026-03-24
AI Technical Summary
Existing non-intrusive load identification methods have poor identification accuracy because it is difficult to obtain characteristic data of a single load during operation in advance. This is especially true in the context of energy-saving and diversified development of home appliances, where user load operation status is stable and switching behavior is infrequent.
A user-collaborative load identification method is adopted. An improved CUSUM algorithm is used to detect events and extract steady-state load features. Cluster analysis is performed by combining a density-reachable threshold-based clustering algorithm. A load feature sample dataset is constructed using the density-reachable threshold and the density change trend of data points within the cluster. Load identification is performed by user labeling.
It improves the accuracy of load identification, can identify clusters of arbitrary shapes in noisy environments, reduces sensitivity to input parameters, and achieves accurate identification of user electrical equipment.
Smart Images

Figure CN116089820B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of non-intrusive load identification, in particular, to a load identification method and system based on user cooperation, an electronic device and a computer readable storage medium. BACKGROUND
[0002] The current non-intrusive load identification method is to extract events caused by load state changes from the collected data, that is, to separate event waveforms caused by load operation from waveform data, and then to establish an analytical relationship between the event waveforms and the load operation after independent decomposition of the event waveforms, so as to realize load identification. Therefore, the effective matching between the event waveforms and the load operation needs to rely on the characteristic data of the single load operation obtained in advance. However, with the development of social economy, the household equipment of users develops towards energy saving and diversification, which leads to the increase of load diversity, and further leads to the increase of the diversification and complexity of data samples. At the same time, the load operation state of daily users is relatively stable, and the switching behavior is not frequent. Therefore, it is difficult to obtain the waveform and characteristics of a single load operation in advance, which leads to poor identification accuracy of the existing load identification method. SUMMARY
[0003] The present application provides a load identification method and system based on user cooperation, an electronic device and a computer readable storage medium, to solve the technical problem of poor identification accuracy of the existing load identification method due to the difficulty in obtaining characteristic data of a single load operation in advance.
[0004] According to one aspect of the present application, a load identification method based on user cooperation is provided, comprising the following contents:
[0005] Collecting voltage and current data at the user's incoming line, and using an improved CUSUM algorithm for event detection to extract steady-state load characteristics during load operation to construct a load characteristic sample data set;
[0006] Using a clustering algorithm based on a density reachable threshold to perform clustering analysis on the load characteristic sample data set to obtain a center feature vector of each cluster, and labeling each clustering sample in the form of user labeling;
[0007] When performing load identification, the feature vector of the load to be identified is extracted after detecting the occurrence of an event, the distance value between the feature vector of the load to be identified and the center feature vector of each cluster is calculated respectively, and the label appliance of the cluster with the smallest distance is selected as the identification result.
[0008] Further, the process of using a clustering algorithm based on a density reachable threshold to perform clustering analysis on the load characteristic sample data set comprises the following contents:
[0009] For the load feature sample dataset, a cluster is defined as the largest set of density-connected points. The k nearest neighbor data points to a certain sample data point are defined as the k nearest neighbors of that sample data point. The local density of each sample data point in the k nearest neighbors is calculated, thereby constructing the local density set of all sample data points.
[0010] Identify the attribution point of each sample data point and calculate the relative distance between the two points to construct a set of relative distances and a set of attribution points;
[0011] Using the median of the local density set as the local density metric threshold and the upper quartile of the relative distance set as the relative distance metric threshold, the sample dataset is traversed to determine whether each sample data point meets the conditions for being a cluster core point. If it does, it is marked as a cluster core point; otherwise, it is marked as a non-core point. Cluster core point sets and non-core point sets are constructed respectively.
[0012] The density threshold can be calculated based on the local density distribution of data points in the sample dataset.
[0013] The backbone structure of the initial cluster is constructed based on the density reachable threshold and the set of cluster core points;
[0014] Traverse the set of non-core points and merge each non-core point into the cluster to which its parent point belongs to obtain the initial cluster structure;
[0015] The initial cluster structure is split based on the density variation trend of data points within the cluster to obtain the final cluster structure.
[0016] Furthermore, the density achievable threshold is calculated based on the following formula:
[0017]
[0018] Among them, R T This indicates that the density can reach a threshold. Let represent the mean density of data points in the local density set, and λ represent the skewness coefficient of the density of data points in the local density set. Q3, Q2, and Q1 represent the upper quartile, median, and lower quartile of the data point density in the local density set, respectively.
[0019] Furthermore, the process of constructing the backbone structure of the initial cluster based on the density achievable threshold and the cluster core point set is as follows:
[0020] Randomly select a clustering core point x from the core point set. i If there exists a sequence of data points {x1, x2, ..., x...} m ,...,x p ∈D}, where x1=xi , x p = x j , D represents a sample data set, x j represents the jth k-neighbor point of the core point x i , the sequence satisfies that the local density of x m is greater than the density reachable threshold and x m+1 is the k-neighbor point of x m , all points in the sequence are cluster core points and are density reachable core points of the cluster core point x i , the cluster core point x i and the density reachable cluster core points thereof are divided into a cluster to generate a main stem of an initial cluster, the step is repeated, and the main stem structures of all initial clusters are obtained after traversing the core point set.
[0021] Further, the process of splitting the initial cluster structure based on the density change trend of the data points in the cluster includes the following contents:
[0022] The data points in each initial cluster are sorted in descending order of density, and the density difference between adjacent two data points in the descending sequence is calculated;
[0023] An adaptive threshold of the density difference based on the density distribution is calculated, and the outliers of the density difference in each initial cluster are found out through the adaptive threshold of the density difference;
[0024] The descending sequence is divided into several sub-sequences by taking the data points corresponding to the outliers as boundaries, so that each initial cluster is divided into several new clusters.
[0025] Further, before obtaining the center feature vector of each cluster, the following contents are further included:
[0026] The load features are screened, and a high-discriminative feature vector with the smallest difference between samples of the same category and the largest difference between samples of different categories is screened out.
[0027] Further, after obtaining the center feature vector of each cluster, the following contents are further included:
[0028] The weight value of each load feature in the high-discriminative feature vector is quantified by means of information entropy to obtain a feature weight value vector, and the center feature weight vector of each cluster is obtained by combining the center feature vector and the feature weight value vector of each cluster.
[0029] In addition, the application also provides a load identification system based on user cooperation, comprising:
[0030] The sample data acquisition module is configured to acquire voltage and current data at the user's incoming line, detect events by using an improved CUSUM algorithm, extract steady-state load characteristics during load operation, and construct a load characteristic sample data set;
[0031] The clustering analysis module is configured to perform clustering analysis on the load characteristic sample data set by using a clustering algorithm based on a density reachable threshold, obtain a center feature vector of each cluster, and label each clustering sample by using a user labeling method.
[0032] The load recognition module is configured to, during load recognition, extract a feature vector of a load to be recognized after detecting an event, calculate distance values between the feature vector of the load to be recognized and center feature vectors of each cluster, and select a label appliance of a cluster with the smallest distance as a recognition result.
[0033] In addition, the present application also provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the steps of the method described above by invoking the computer program stored in the memory.
[0034] In addition, the present application also provides a computer-readable storage medium for storing a computer program for load recognition based on user collaboration, wherein the computer program is configured to execute the steps of the method described above when running on a computer.
[0035] The present application has the following effects:
[0036] The load recognition method based on user collaboration has the following effects:
[0037] In addition, the user-cooperative load identification system of the present invention also has the above-mentioned advantages.
[0038] In addition to the objectives, features, and advantages described above, the present invention has other objectives, features, and advantages. The invention will now be described in further detail with reference to the figures. Attached Figure Description
[0039] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0040] Figure 1 This is a flowchart illustrating a preferred embodiment of the user-cooperative load identification method of the present invention.
[0041] Figure 2 yes Figure 1 A schematic diagram of the sub-process of step S2.
[0042] Figure 3 yes Figure 2 A schematic diagram of the sub-process of step S27.
[0043] Figure 4 This is a schematic diagram of the module structure of a user-cooperative load identification system according to another embodiment of the present invention. Detailed Implementation
[0044] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, the present invention can be implemented in many different ways as defined and covered below.
[0045] Understandable, such as Figure 1 As shown, a preferred embodiment of the present invention provides a load identification method based on user collaboration, including the following:
[0046] Step S1: Collect voltage and current data at the user's incoming line, and use the improved CUSUM algorithm to perform event detection, extract the steady-state load characteristics during load operation, and construct a load characteristic sample dataset;
[0047] Step S2: Use a clustering algorithm based on density reachable threshold to perform clustering analysis on the load feature sample dataset, obtain the central feature vector of each cluster, and assign labels to each cluster sample by user labeling.
[0048] Step S3: When performing load identification, after an event is detected, the feature vector of the load to be identified is extracted, the distance between the feature vector of the load to be identified and the center feature vector of each cluster is calculated, and the tagged appliance of the cluster with the smallest distance is selected as the identification result.
[0049] It is understood that the user-collaborative load identification method in this embodiment extracts the steady-state load characteristics during load operation after an event is detected to construct a load feature sample dataset. Then, a clustering algorithm based on a density reachability threshold is used to perform cluster analysis on the load feature sample dataset. Compared with the conventional k-means clustering algorithm, which is only applicable to convex datasets, this algorithm does not require pre-determining the number of clusters and can identify outliers during clustering. Thus, it can obtain clusters of arbitrary shapes in noisy environments. Compared with the existing DBSCAN clustering algorithm, this algorithm defines a density reachability adaptive threshold calculated based on the distribution of data points as a measure of reachability between core points. It can adaptively calculate the density reachability threshold, effectively solving the problem of poor clustering effect caused by the difficulty in determining the threshold value in the DBSCAN clustering algorithm. Furthermore, it uses the trend of data point density change within a cluster as the basis for deciding whether to split the cluster, which greatly reduces the sensitivity to input parameters. Even when the sample density is uneven and the difference in the cluster spacing is large, it can still obtain good clustering quality, greatly improving the accuracy of load identification, thereby enabling accurate identification of user electrical equipment.
[0050] It is understood that in step S1, voltage and current waveform data at the user's incoming line are collected, with the sampling frequency set to a minimum of 1kHz. An improved CUSUM algorithm is used for event detection. After a switching event is detected, steady-state load characteristics of the load equipment are extracted during its operation. By collecting data for a period of time T (generally one week), a load characteristic sample dataset can be constructed. The specific process of event detection using the improved CUSUM algorithm is prior art; please refer to the applicant's previously filed patent CN202110847311.1 for details. The specific process will not be elaborated here. Furthermore, the extracted steady-state load characteristics include electrical quantity characteristics such as active power, reactive power, current waveform characteristics, and current harmonics. For example, the calculation formulas for active power and reactive power are:
[0051]
[0052]
[0053] Where P, Q, U, and I represent active power, reactive power, voltage, and current, respectively, k represents the harmonic order, and U... k I represents the effective value of the k-th harmonic voltage. k This represents the effective value of the k-th harmonic current. This represents the phase angle difference of the k-th harmonic. Current waveform characteristics include current amplitude, root mean square value, crest coefficient, centerline slope, VI trajectory area, number of intersections, and harmonic characteristics. Among these, the current amplitude I...p =max(I(n)), 0≤n≤N, where n represents the current sampling point position, N is the total number of sampling points, and the root mean square value. Crest coefficient The slope of the centerline is the slope of the line connecting the highest and lowest points of the load VI trajectory, and the area of the VI trajectory is the total area of the voltage and current closed loop. area The number of intersection points is the number of intersection points of the VI trajectory. n The harmonic characteristics are the 3rd, 5th, and 7th harmonic content I3, I5, and I7, and the total distortion rate I. THD .
[0054] Optionally, in step S1, after each load is started, operational characteristic data of the user's load operation will also be collected, such as the switching duration, frequency, and duration of the load equipment, as well as the continuous and periodic operating characteristics of the load equipment. By combining the electrical quantity characteristic data collected at each sampling time with the operational characteristic data, a new feature vector F(i) = [f1, f2, ..., f m ], where m represents the number of features in the eigenvector.
[0055] It is understandable that by collecting the characteristics of electrical quantities and the operational characteristics of user loads, and combining the two to construct a new feature vector, and then performing cluster analysis and load identification based on the new feature vector, accurate analysis of user equipment categories can be achieved, further improving the accuracy of load identification.
[0056] It is understandable that after the data collection time reaches the time threshold T, load clustering analysis and user labeling begin. A clustering algorithm based on density-reachable thresholds is used to cluster the load feature sample dataset. User load classification is achieved based on feature vectors. Then, labels are assigned to each cluster sample through user labeling, ultimately achieving accurate identification of the user's electrical equipment category. Specifically, as follows... Figure 2 As shown, the process of performing cluster analysis on the load feature sample dataset using a density-based clustering algorithm includes the following:
[0057] Step S21: For the load feature sample dataset, a cluster is defined as the largest set of density-connected points. The k nearest neighbor data points to a certain sample data point are defined as the k nearest neighbors of that sample data point. The local density of each sample data point in the k nearest neighbors is calculated, thereby constructing the local density set of all sample data points.
[0058] Step S22: Identify the attribution point of each sample data point and calculate the relative distance between the two points to construct a set of relative distances and a set of attribution points;
[0059] Step S23: Use the median of the local density set as the local density metric threshold and the upper quartile of the relative distance set as the relative distance metric threshold. Traverse the sample dataset and determine whether each sample data point meets the conditions for being a cluster core point. If it meets the conditions, mark it as a cluster core point; otherwise, mark it as a non-core point. Construct the cluster core point set and the non-core point set respectively.
[0060] Step S24: Calculate the density achievable threshold based on the local density distribution of data points in the sample dataset;
[0061] Step S25: Construct the backbone structure of the initial cluster based on the density reachable threshold and the set of cluster core points;
[0062] Step S26: Traverse the set of non-core points and merge each non-core point into the cluster to which its home point belongs, to obtain the initial cluster structure;
[0063] Step S27: Based on the density change trend of data points within the cluster, the initial cluster structure is split to obtain the final cluster structure.
[0064] It is understandable that, given the high local density of cluster cores and their relatively large distances from other cluster cores, cores within the same cluster are density-reachable, and the density change trend of data points from high-density areas to low-density areas within a cluster is relatively smooth. However, the density of data points changes drastically when crossing clusters. This invention proposes a clustering algorithm based on a density reachability threshold, based on the distribution of data points in the sample dataset and the density change trend of data points within clusters. This algorithm defines an adaptive density reachability threshold based on data point distribution as a measure of reachability between cores and uses the density change trend of data points within clusters as a basis for deciding whether to split the cluster.
[0065] Specifically, defining a cluster as the largest set of density-connected points allows for the generation of clusters of arbitrary shapes in noisy environments, eliminates the need to predefine the number of clusters, and identifies outliers during clustering. The distance x from each sample data point is defined. i The k nearest neighbors are the k-nearest data points. Calculate x for each data point. i Local density ρ i , all ρ i This constitutes a local density set ρ.
[0066] The local density is calculated based on the following formula:
[0067]
[0068] Where k represents the sample data point x i The number of nearest neighbors, dis ij Represents sample data point xi Its j-th k nearest neighbor x j The distance between them.
[0069] Then, each sample data point x is identified within the k nearest neighbor range. i The point of belonging x O , where the point of belonging is x O The local density needs to be greater than x i The local density, and the distance from point x i If no point satisfies the above conditions within the k-nearest neighbor range, then a search is performed globally within the sample dataset. After finding the home point of each sample data point, the relative distance δ between the two points is calculated. i =||x i -x O ||2, all δ i Forming a set of relative distances δ, all belonging points x O This constitutes the set of belonging points.
[0070] The median of the local density set ρ is taken as the local density metric threshold ρ. T The upper quartile of the relative distance set δ is used as the relative distance metric threshold δ. T Iterate through each sample data point x in the sample dataset. i Determine the value of each point x. i Does it satisfy the conditions for being a cluster core point? The conditions for being a cluster core point are: Ω = {x} i |x i ∈D,ρ i >ρ T and δ i >δ T Let Ω represent the set of cluster core points and D represent the sample dataset. If the above conditions are met, the data point is marked as a cluster core point; otherwise, it is marked as a non-core point, thus constructing the set of cluster core points and the set of non-core points.
[0071] The skewness coefficient of a set of data characterizes the degree of skewness in the data distribution, and the density achievable threshold is closely related to the density distribution of points in the dataset. Therefore, this invention calculates the density achievable threshold based on the local density distribution of data points in the sample dataset. The specific calculation formula is as follows:
[0072]
[0073] Among them, R T This indicates that the density can reach a threshold. Let represent the mean density of data points in the local density set, and λ represent the skewness coefficient of the density of data points in the local density set. Q3, Q2, and Q1 represent the upper quartile, median, and lower quartile of the data point density in the local density set, respectively.
[0074] Then, the backbone structure of the initial cluster is constructed based on the density achievable threshold and the set of cluster core points. Specifically, a cluster core point x is randomly selected from the set of cluster core points Ω. i If there exists a sequence of data points {x1, x2, ..., x...} m ,...,x p ∈D}, where x1=x i x p =x j D represents the sample dataset, x j Represents the core point x i The j-th k-th nearest neighbor, the sequence satisfies x m The local density is greater than the density threshold R T And x m+1 For x m If the k-nearest neighbor is x, then all points in the sequence are cluster cores and all are cluster cores x. i The density can reach the core point, and the cluster core point x i The cluster cores that are reachable by density are grouped into a single cluster to generate the backbone of an initial cluster. Then, the remaining cluster cores in the set Ω of cluster cores are randomly selected and this step is repeated until the traversal is complete, thus obtaining the backbone structure of all initial clusters.
[0075] Next, the set of non-core points is traversed, and each non-core point is merged into the cluster of its parent point to obtain the initial cluster structure. Specifically, the set of non-core points is sorted in descending order of density, and then all non-core points are traversed, and each non-core point is merged into the cluster of its parent point to construct the initial cluster structure.
[0076] Finally, the initial cluster structure is split based on the density variation trend of data points within the cluster to obtain the final cluster structure. Specifically, as follows: Figure 3 As shown, the process of splitting the initial cluster structure based on the density variation trend of data points within the cluster includes the following:
[0077] Step S271: Sort the data points in each initial cluster in descending order of density, and calculate the density difference between two adjacent data points in the descending sequence;
[0078] Step S272: Calculate the density difference adaptive threshold based on the density distribution, and find outliers in the density difference values in each initial cluster using the density difference adaptive threshold;
[0079] Step S273: Using the data points corresponding to the outliers as boundaries, divide the descending sequence into several subsequences, thereby dividing each initial cluster into several new clusters.
[0080] It is understood that, in order to determine the rationality of the initial cluster, this invention takes a single initial cluster as a unit, arranges the data points in each initial cluster in descending order of density, and calculates the density difference ρ between two adjacent points in the descending series. j -ρ j+1 Next, calculate the density difference adaptive threshold based on the density distribution. The specific calculation formula is: ρ m-T =μρ m-ave , ρ m-T ρ represents the adaptive threshold for the density difference of the m-th cluster. m-ave Let μ represent the mean of all density differences in the m-th cluster, and μ represent a scaling factor used to amplify the mean density difference. All density differences are compared to an adaptive density difference threshold. If the density difference between any two adjacent points exceeds the adaptive threshold, this density difference is considered an outlier. Furthermore, using the data points corresponding to the outliers as boundaries, the descending sequence is divided into several subsequences, thus splitting the initial clusters into several new clusters. After splitting all the initial clusters, the final cluster structure is obtained. This invention divides the initial clusters by calculating an adaptive density difference threshold based on density distribution. Initial clusters with abnormal density changes within their clusters are divided into several sub-clusters at locations with large density fluctuations. The density change trend within the sub-clusters is stable, and the uniformity of the data point distribution within the cluster is relatively independent of the density change trend, not affecting the initial cluster segmentation process, thus greatly improving the clustering quality.
[0081] It is understood that, compared to the conventional k-means clustering algorithm, the density-reachable threshold-based clustering algorithm of this invention does not require pre-determining the number of clusters and can identify outliers during clustering, thus obtaining clusters of arbitrary shapes even in noisy environments. Compared to the existing DBSCAN clustering algorithm, this algorithm defines a density-reachable adaptive threshold calculated based on the distribution of data points as a measure of reachability between core points. This adaptively calculates the density-reachable threshold, effectively solving the problem of poor clustering performance caused by the difficulty in determining the threshold value in the DBSCAN clustering algorithm. Furthermore, it uses the trend of data point density changes within a cluster as a basis for deciding whether to split the cluster, greatly reducing the sensitivity to input parameters. Even when the sample density is uneven and the difference in cluster spacing is large, it can still obtain good clustering quality, significantly improving the accuracy of load identification and enabling precise identification of user electrical equipment.
[0082] Optionally, step S2 may include the following before obtaining the central feature vector of each cluster:
[0083] The load features are filtered to select high-discrimination feature vectors that have the smallest difference between samples of the same category and the largest difference between samples of different categories.
[0084] It is understandable that since the elements f in the feature vector F of each sampling point are not independent and many elements are correlated, the information represented by the features overlaps and is redundant. To further improve the accuracy and efficiency of load identification, this invention searches for high-discriminative features in the feature set space that minimize the differences between samples of the same category and maximize the differences between different samples, in order to construct a high-discriminative feature vector. Load identification is then performed based on this high-discriminative feature vector.
[0085] Specifically, each cluster after clustering is considered a type of load, and each cluster is assigned a number. For example, the Mth cluster is numbered ω. M The feature set of the Mth cluster in the sample dataset D is represented as F′(i)={f′1,f′2,...,f′ m There are m features in total. Based on the correlation between feature attributes, the feature set F′(i) is divided into multiple subsets F1′(i), F′2(i), ..., F′. ξ (i) Construct the intra-class scatter matrix. and the inter-class scatter matrix S b =(x s,1 -x s,2 (x) s,1 -x s,2 ) T Where C represents the number of categories, It represents the mean vector of the Mth class of samples, ξ M Represents category ω M The number of samples in the middle, x s,1 Let x represent the mean vector of the first class of samples. s,2 Let represent the mean vector of the second type of samples. The divergence values are calculated using the divergence matrix criterion function: λ i Representation matrix The eigenvalues, the subset F where J is the maximum value. i ′(i)={f′ i1 ,f′ i2 ,...,f′ il} is a high-discrimination feature vector.
[0086] Preferably, step S2, after obtaining the central feature vector of each cluster, also includes the following:
[0087] The weight value of each loading feature in the high-discrimination feature vector is quantified by information entropy to obtain the feature weight value vector. The central feature weight vector of each cluster is obtained by combining the central feature vector and the feature weight value vector of each cluster.
[0088] It is understandable that once a label is defined for the cluster center of each cluster, the feature subset F i ′(i)={f′ i1 ,f′ i2 ,...,f′ il The feature vector selected for user identification has varying degrees of information content in its representation of the workload, and different features also express different levels of workload information. Therefore, to further improve the accuracy of workload identification, this invention quantifies the feature weights of each workload by improving information entropy. Specifically, in the M-th class of samples, feature f′ in its high-discrimination feature vector is obtained using information entropy. il Information entropy h l :
[0089]
[0090] Where, α il This represents the proportion of the i-th sample in the l-th feature.
[0091] Then the feature information entropy redundancy d of the Mth class sample l =1-h l Therefore, feature f in the Mth class of samples l The weight value of ′ Thus, the feature weight vector of the Mth class sample is obtained.
[0092] Then, the feature weight vector of the Mth class sample... Its cluster center eigenvector By combining these, we obtain the central feature weight vector of the Mth class sample. Load identification is then performed based on the central feature weight vector.
[0093] It is understood that in step S3, during load identification, after a time interval of 2T, event detection and feature extraction are performed again to obtain a new feature vector F(x). This new feature vector F(x) is then multiplied by the feature weight vectors of different load categories to obtain the feature vector of the load to be identified. Then, calculate the vector distance between the obtained M feature vectors and the corresponding load category's central feature weight vector. For example, calculate... and The vector distance between them is:
[0094]
[0095] When the distance D between two vectors is minimized and less than the threshold, the tagged appliance corresponding to the load category M is the load identification result.
[0096] It is understood that the clustering algorithm of this invention is updated every 2T time intervals. When no new devices appear in the cluster during the user's identification process, the feature vectors of the previous and subsequent cluster centers are compared. If the similarity of the feature vectors of the previous and subsequent cluster centers is greater than a threshold, the user does not need to add new device labels, and the clustering model for that sample does not need to be updated. However, when an appliance feature sample does not meet the minimum number of Minpts in the DBSCAN clustering algorithm, it is considered as noise data or incorrect data in the terminal clustering process and is recorded. When the number of appliance feature samples exceeds the minimum number of Minpts, a new sample feature library is added, and the clustering is updated again, and the clustering result is calculated to obtain a new number of clusters M′. At this time, the user labels and records the new cluster center feature vectors, thereby achieving a high-accuracy identification effect for the user.
[0097] In addition, such as Figure 4 As shown, another embodiment of the present invention also provides a load identification system based on user collaboration, preferably employing the load identification method described above. The system includes:
[0098] The sample data acquisition module is used to collect voltage and current data at the user's incoming line, and uses an improved CUSUM algorithm to perform event detection, extracting steady-state load characteristics during load operation to construct a load characteristic sample dataset.
[0099] The clustering analysis module is used to perform clustering analysis on the load feature sample dataset using a density-based clustering algorithm, obtain the central feature vector of each cluster, and assign labels to each cluster sample by user labeling.
[0100] The load identification module is used to extract the feature vector of the load to be identified after an event is detected during load identification, calculate the distance between the feature vector of the load to be identified and the center feature vector of each cluster, and select the tagged appliance of the cluster with the smallest distance as the identification result.
[0101] It is understood that the user-collaborative load identification system in this embodiment extracts the steady-state load characteristics during load operation after an event is detected to construct a load feature sample dataset. Then, a clustering algorithm based on a density reachability threshold is used to perform cluster analysis on the load feature sample dataset. Compared with the conventional k-means clustering algorithm, which is only applicable to convex datasets, this algorithm does not require pre-determining the number of clusters and can identify outliers during clustering. Thus, it can obtain clusters of arbitrary shapes in noisy environments. Compared with the existing DBSCAN clustering algorithm, this algorithm defines a density reachability adaptive threshold calculated based on the distribution of data points as a measure of reachability between core points. It can adaptively calculate the density reachability threshold, effectively solving the problem of poor clustering effect caused by the difficulty in determining the threshold value in the DBSCAN clustering algorithm. Furthermore, it uses the trend of data point density change within a cluster as the basis for deciding whether to split the cluster, which greatly reduces the sensitivity to input parameters. Even when the sample density is uneven and the difference in the cluster spacing is large, it can still obtain good clustering quality, greatly improving the accuracy of load identification, thereby enabling accurate identification of user electrical equipment.
[0102] In addition, another embodiment of the present invention provides an electronic device including a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method described above by calling the computer program stored in the memory.
[0103] In addition, another embodiment of the present invention provides a computer-readable storage medium for storing a computer program for performing user-cooperative load identification, wherein the computer program executes the steps of the method described above when running on a computer.
[0104] Common computer-readable storage media include: floppy disks, flexible disks, hard disks, magnetic tapes, any other magnetic media, CD-ROMs, any other optical media, punch cards, paper tape, any other physical media with perforated patterns, random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), flash erasable programmable read-only memory (FLASH-EPROM), any other memory chips or cartridges, or any other media readable by a computer. Instructions may further be transmitted or received by a transmission medium. The term transmission medium can include any tangible or intangible medium used to store, encode, or carry instructions for machine execution, and includes digital or analog communication signals or intangible media that facilitate communication of such instructions. Transmission media include coaxial cables, copper wires, and optical fibers, which contain conductors for transmitting a bus of computer data signals.
[0105] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0107] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0110] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0111] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A load identification method based on user collaboration, characterized in that, Includes the following: Voltage and current data at the user's incoming line are collected, and an improved CUSUM algorithm is used for event detection to extract steady-state load characteristics during load operation in order to construct a load characteristic sample dataset. A clustering algorithm based on density reachable threshold is used to perform clustering analysis on the load feature sample dataset to obtain the central feature vector of each cluster, and the label is assigned to each cluster sample by user labeling. When performing load identification, after an event is detected, the feature vector of the load to be identified is extracted, the distance between the feature vector of the load to be identified and the central feature vector of each cluster is calculated, and the tagged appliance of the cluster with the smallest distance is selected as the identification result. The process of performing cluster analysis on the load feature sample dataset using a density-based clustering algorithm includes the following: For the load feature sample dataset, a cluster is defined as the largest set of density-connected points. The k nearest neighbor data points to a certain sample data point are defined as the k nearest neighbors of that sample data point. The local density of each sample data point in the k nearest neighbors is calculated, thereby constructing the local density set of all sample data points. Identify the attribution point of each sample data point and calculate the relative distance between the two points to construct a set of relative distances and a set of attribution points; Using the median of the local density set as the local density metric threshold and the upper quartile of the relative distance set as the relative distance metric threshold, the sample dataset is traversed to determine whether each sample data point meets the conditions for being a cluster core point. If it does, it is marked as a cluster core point; otherwise, it is marked as a non-core point. Cluster core point sets and non-core point sets are constructed respectively. The density achievable threshold is calculated based on the local density distribution of data points in the sample dataset; the density achievable threshold is calculated using the following formula: Among them, R T This indicates that the density can reach a threshold. Let represent the mean density of data points in the local density set, and λ represent the skewness coefficient of the density of data points in the local density set. Q3, Q2, and Q1 represent the upper quartile, median, and lower quartile of the data point density in the local density set, respectively. The backbone structure of the initial cluster is constructed based on the density reachable threshold and the set of cluster core points; Traverse the set of non-core points and merge each non-core point into the cluster to which its parent point belongs to obtain the initial cluster structure; The initial cluster structure is split based on the density variation trend of data points within the cluster to obtain the final cluster structure.
2. The load identification method based on user collaboration as described in claim 1, characterized in that, The process of constructing the backbone structure of the initial cluster based on the density reachable threshold and the set of cluster core points is as follows: Randomly select a clustering core point x from the core point set. i If there exists a sequence of data points {x1, x2, ..., x...} m ,...,x p ∈D}, where x1=x i x p =x j D represents the sample dataset, x j Represents the core point x i The j-th k-th nearest neighbor, the sequence satisfies x m The local density is greater than the density threshold and x m+1 For x m If the k-nearest neighbor is x, then all points in the sequence are cluster cores and all are cluster cores x. i The density can reach the core point, and the cluster core point x i The core points that are achievable by density are grouped into a cluster to generate the backbone of an initial cluster. This step is repeated to traverse the set of core points and obtain the backbone structure of all initial clusters.
3. The load identification method based on user collaboration as described in claim 1, characterized in that, The process of splitting the initial cluster structure based on the density change trend of data points within the cluster includes the following: Sort the data points in each initial cluster in descending order of density, and calculate the density difference between two adjacent data points in the descending sequence; Calculate the density difference adaptive threshold based on the density distribution, and use the density difference adaptive threshold to find outliers in the density difference values of each initial cluster; Using the data points corresponding to outliers as boundaries, the descending sequence is divided into several subsequences, thereby dividing each initial cluster into several new clusters.
4. The load identification method based on user collaboration as described in claim 1, characterized in that, The following is included before obtaining the central feature vector of each cluster: The load features are filtered to select high-discrimination feature vectors that have the smallest difference between samples of the same category and the largest difference between samples of different categories.
5. The load identification method based on user collaboration as described in claim 4, characterized in that, After obtaining the central feature vector of each cluster, the following is also included: The weight value of each loading feature in the high-discrimination feature vector is quantified by information entropy to obtain the feature weight value vector. The central feature weight vector of each cluster is obtained by combining the central feature vector and the feature weight value vector of each cluster.
6. A user-cooperative load identification system, employing the user-cooperative load identification method as described in any one of claims 1 to 5, characterized in that, include: The sample data acquisition module is used to collect voltage and current data at the user's incoming line, and uses an improved CUSUM algorithm to perform event detection, extracting steady-state load characteristics during load operation to construct a load characteristic sample dataset. The clustering analysis module is used to perform clustering analysis on the load feature sample dataset using a density-based clustering algorithm, obtain the central feature vector of each cluster, and assign labels to each cluster sample by user labeling. The load identification module is used to extract the feature vector of the load to be identified after an event is detected during load identification, calculate the distance between the feature vector of the load to be identified and the center feature vector of each cluster, and select the tagged appliance of the cluster with the smallest distance as the identification result.
7. An electronic device, characterized in that, The method includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps of the method as described in any one of claims 1 to 5 by calling the computer program stored in the memory.
8. A computer-readable storage medium for storing a computer program for performing user-cooperative load identification, characterized in that, The computer program, when run on a computer, performs the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Event detection method and system for periodic multi-state electric appliance, equipment and storage medium
CN113642421A
Non-invasive power load identification method
CN111327118A
Abnormal equipment detection method based on equipment communication data characteristics
CN113542060A
Clustering method and device of offshore platform load data, terminal and storage medium
CN115526235A