A power consumption data clustering method, device, equipment and storage medium
Patent Information
- Application Number
- CN202611053492.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-13
AI Technical Summary
[0006]本申请的主要目的在于提供一种电力消费数据的聚类方法、装置、设备及存储介质,旨在解决如何提升数据稀缺条件下电力用户负荷模式识别的准确性与鲁棒性的技术问题
[0017]本申请提供了一种电力消费数据的聚类方法,本申请的方法包括:获取源域的电力消费数据和所述电力消费数据对应的聚类中心以及目标域电力消费数据;根据源域的所述电力消费数据和所述聚类中心以及所述目标域电力消费数据,构建分布对齐矩阵;根据所述分布对齐矩阵、所述目标域电力消费数据、预设投影矩阵以及预设聚类簇数量,构建包括目标域聚类约束、分布对齐约束以及特征选择约束的目标函数;对所述目标函数进行交替优化迭代求解,得到目标域电力消费数据的聚类分析结果。综上可知,本申请通过构建融合目标域聚类约束、分布对齐约束与特征选择约束的目标函数,并采用交替优化迭代求解,完成了对数据稀缺目标域的高效聚类,解决了因冷启动数据不足和高维特征冗余导致的聚类精度低、稳定性差的问题,提高了聚类分析的准确性和鲁棒性。
Smart Images

Figure CN122903942A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of smart grids and power data analysis, and in particular to a method, apparatus, device and storage medium for clustering power consumption data. Background Technology
[0002] In the fields of smart grids and power data analysis, efficient clustering of massive user electricity consumption data is a key technology for achieving accurate user profiling, load forecasting, and demand-side management. Currently, commonly used electricity consumption data clustering methods, such as FCM (Fuzzy C-means clustering), can achieve good results in scenarios with sufficient data.
[0003] However, in actual business operations, the "cold start" problem is frequently encountered, such as in newly built residential areas or newly expanded power supply areas (i.e., the target domain), where historical data from smart meters is extremely scarce. In such scenarios, traditional clustering methods, lacking sufficient target domain samples, are prone to problems such as sensitivity to cluster center initialization and convergence to local optima, leading to a significant decrease in clustering accuracy and poor stability. To alleviate the data scarcity problem, current technologies attempt to introduce transfer learning, utilizing knowledge from mature regions with abundant data (i.e., the source domain) to assist in target domain clustering. For example, methods such as TCA (Transfer Component Analysis) are used to align the data distributions of the source and target domains. However, such methods only focus on single distribution alignment and fail to address the noise and redundancy issues in high-dimensional power features. Power consumption data typically contains a large number of time periods and statistical features, many of which (such as stable load periods) contribute little to user pattern discrimination or are even noise. Existing transfer methods lack the ability to automatically identify key features, causing the model to be interfered with by redundant information, and the interpretability and robustness of clustering results remain limited.
[0004] Furthermore, current technical solutions typically handle transfer alignment, feature selection, and clustering tasks separately or optimize them in isolation, failing to form an organically unified framework. This fragmented approach makes it difficult to adaptively select the most discriminative electricity consumption features while transferring knowledge, thus failing to adequately address the problems caused by the scarcity of target domain data and the redundancy of high-dimensional features.
[0005] Therefore, how to improve the accuracy and robustness of user power data clustering analysis under conditions of data scarcity is an urgent problem to be solved. Summary of the Invention
[0006] The main purpose of this application is to provide a method, apparatus, device and storage medium for clustering electricity consumption data, aiming to solve the technical problem of how to improve the accuracy and robustness of electricity user load pattern recognition under data scarcity conditions.
[0007] To achieve the above objectives, this application proposes a clustering method for electricity consumption data, the method comprising: Obtain the power consumption data of the source domain, the cluster centers corresponding to the power consumption data, and the power consumption data of the target domain; Based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain, a distribution alignment matrix is constructed; Based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters, an objective function is constructed that includes target domain clustering constraints, distribution alignment constraints, and feature selection constraints. The objective function is solved iteratively by alternating optimization to obtain the clustering analysis results of the electricity consumption data in the target domain.
[0008] In one embodiment, the step of constructing an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, a preset projection matrix, and a preset number of clusters includes: Based on the preset projection matrix, the preset number of clusters, and the membership matrix and cluster centers in the target domain electricity consumption data, construct the target domain clustering constraints; Based on the distribution alignment matrix and the preset projection matrix, a distribution alignment constraint is constructed; Based on the transpose of the preset projection matrix, feature selection constraints are constructed; The objective function is obtained by weighted summation of the target domain clustering constraint, the distribution alignment constraint, and the feature selection constraint.
[0009] In one embodiment, the step of constructing feature selection constraints based on the transpose of the preset projection matrix includes: Calculate the length of the first vector of each row vector in the transpose of the preset projection matrix; The lengths of all calculated row vectors are summed, and the sum is used as a feature selection constraint.
[0010] In one embodiment, the step of iteratively optimizing the objective function to obtain the clustering analysis results of the target domain electricity consumption data includes: In each iteration, two variables to be optimized in the objective function are fixed in sequence, and the remaining variables to be optimized are iteratively updated according to the fixed variables to be optimized. The variables to be optimized include the membership matrix, cluster center and projection matrix. When the change in the objective function after iterative update is less than a preset threshold or the current iteration number is greater than or equal to the preset maximum iteration number, the iteration stops and the membership matrix, cluster centers, and projection matrix after iterative optimization are output. Cluster analysis was performed based on the iteratively optimized membership matrix, cluster centers, and projection matrix to obtain the cluster analysis results of the target domain electricity consumption data.
[0011] In one embodiment, the step of sequentially fixing two variables to be optimized in the objective function in each iteration, and iteratively updating the remaining variables to be optimized based on the fixed variables to be optimized, includes: In each iteration, the projection matrix and cluster center are fixed, and the target domain electricity consumption data is projected according to the projection matrix to obtain the projected target domain sample. The membership matrix is updated according to the distance of the projected target domain sample to the cluster center. With the membership matrix and projection matrix fixed, weighting coefficients are obtained by exponentiation of each element in the membership matrix, and the cluster centers are updated based on the weighting results of the membership matrix. With the membership matrix and cluster centers fixed, the projection matrix is updated based on the joint gradient of the target domain clustering constraint, distribution alignment constraint, and feature selection constraint in the objective function.
[0012] In one embodiment, the clustering analysis result includes classification labels, and the step of performing clustering analysis based on the iteratively optimized membership matrix, cluster centers, and projection matrix to obtain the clustering analysis result of the target domain electricity consumption data includes: Calculate the second vector length of each row vector in the transpose of the iteratively optimized projection matrix, and determine the importance score of each original feature in the target domain electricity consumption data based on the second vector length; Based on the importance score, features with an importance score higher than a preset threshold are selected from the original features of the target domain electricity consumption data to form a subset of key features; Based on the iteratively optimized membership matrix and cluster centers, the cluster of each sample in the target domain electricity consumption data is determined, and combined with the key feature subset, a classification label containing the target domain electricity consumption data is generated.
[0013] In one embodiment, the step of constructing a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain includes: Calculate the first inner product matrix between the target domain samples based on the target domain electricity consumption data; Based on the electricity consumption data of the source domain and the source domain samples in the cluster center, calculate the second inner product matrix between the source domain samples; Based on the power consumption data of the target domain and the power consumption data of the source domain, calculate the cross inner product matrix between the target domain and the source domain; Construct a distribution alignment matrix based on the first inner product matrix, the second inner product matrix, and the cross inner product matrix.
[0014] Furthermore, to achieve the above objectives, this application also proposes a clustering device for electricity consumption data, the device comprising: The data acquisition module is used to acquire the power consumption data of the source domain, the cluster centers corresponding to the power consumption data, and the power consumption data of the target domain. The distribution alignment matrix construction module is used to construct a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain. The objective function construction module is used to construct an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters. The clustering analysis module is used to perform alternating optimization and iterative solution of the objective function to obtain the clustering analysis results of the target domain electricity consumption data.
[0015] In addition, to achieve the above objectives, this application also proposes a clustering device for electricity consumption data, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the electricity consumption data clustering method described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the clustering method for electricity consumption data as described above.
[0017] This application provides a clustering method for electricity consumption data. The method includes: acquiring electricity consumption data of a source domain, cluster centers corresponding to the electricity consumption data, and electricity consumption data of a target domain; constructing a distribution alignment matrix based on the electricity consumption data of the source domain, the cluster centers, and the electricity consumption data of the target domain; constructing an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, a preset projection matrix, and a preset number of clusters; and performing alternating optimization and iterative solution on the objective function to obtain the clustering analysis results of the target domain electricity consumption data. In summary, this application, by constructing an objective function that integrates target domain clustering constraints, distribution alignment constraints, and feature selection constraints, and employing alternating optimization and iterative solution, achieves efficient clustering of data-scarce target domains, solving the problems of low clustering accuracy and poor stability caused by insufficient cold-start data and high-dimensional feature redundancy, and improving the accuracy and robustness of clustering analysis. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating the first embodiment of the clustering method for electricity consumption data in this application; Figure 2 A flowchart illustrating the second embodiment of the clustering method for electricity consumption data in this application; Figure 3 A flowchart illustrating the third embodiment of the clustering method for electricity consumption data in this application; Figure 4 This is a schematic diagram of the module structure of the electricity consumption data clustering device according to an embodiment of this application; Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the clustering method for electricity consumption data in this application embodiment.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] It should be noted that the executing entity in this embodiment can be a clustering system for electricity consumption data, or a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the aforementioned clustering function for electricity consumption data. This embodiment does not specifically limit this. The following uses a clustering system for electricity consumption data as an example to describe this embodiment and the following embodiments.
[0025] Based on this, embodiments of this application provide a clustering method for electricity consumption data, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the clustering method for electricity consumption data in this application.
[0026] In this embodiment, the clustering method for electricity consumption data includes steps S10 to S40: Step S10: Obtain the power consumption data of the source domain, the cluster center corresponding to the power consumption data, and the power consumption data of the target domain.
[0027] It should be noted that the source domain refers to a mature power supply area with sufficient data and years of operation, such as urban residential or commercial areas where smart meters have been deployed for more than three years. The power consumption data of the source domain includes a set of source domain samples, where each sample is a multi-dimensional power load feature vector, containing power consumption characteristics such as 24-hour load curves, daily power consumption, and peak-valley differences. The cluster centers of the source domain are the set of cluster centers obtained after pre-clustering of the source domain samples, with each cluster center corresponding to a user's power consumption pattern (e.g., residential, commercial, industrial). The target domain power consumption data refers to the set of unlabeled power consumption samples from newly connected areas (e.g., newly built residential areas or newly expanded power supply areas), where the number of target domain samples is much smaller than the number of source domain samples.
[0028] Step S20: Construct a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain.
[0029] It should be noted that, in order to effectively utilize source domain knowledge, it is necessary to measure and reduce the distributional difference between the source and target domains in the feature space. To this end, the system constructs a distribution alignment matrix. The distribution alignment matrix measures the distributional difference between the source and target domains in the original feature space and forms the basis for subsequent Maximum Mean Discrepancy (MMD) distribution alignment. This matrix is constructed by performing an inner product operation on samples from the source and target domains, and it encodes the differences in first- and second-order statistics between the two domains.
[0030] In one feasible implementation, step S20 specifically includes: Step S201: Calculate the first inner product matrix between the target domain samples based on the target domain samples in the target domain electricity consumption data.
[0031] It should be noted that the first inner product matrix is used to capture the similarity structure between samples within the target domain. Specifically, suppose the target domain contains... The target domain sample set is represented as X = { samples, where X is the sample set of the target domain. }, where each sample (d-dimensional real space). The formula for calculating the first inner product matrix is: (Formula 1) in, and Let i and j represent the i-th and j-th samples in the target domain, respectively. This matrix represents the transpose of the j-th target domain sample. It is used to represent the autocovariance structure of the target domain samples in the original feature space.
[0032] Step S202: Calculate the second inner product matrix between the source domain samples based on the power consumption data of the source domain and the source domain samples in the cluster center.
[0033] It should be noted that source domain samples can be obtained directly from the electricity consumption data of the source domain, or representative points can be derived from the cluster centers of the source domain. Let the source domain contain... The set of samples in the source domain is represented as (samples). = { The formula for calculating the second inner product matrix is: (Formula 2) in, and Let i and j represent the i-th and j-th samples in the source domain, respectively. This matrix represents the transpose of the j-th source domain sample. It is used to represent the autocovariance structure of the source domain samples in the original feature space.
[0034] Step S203: Calculate the cross inner product moment between the target domain and the source domain based on the power consumption data of the target domain and the power consumption data of the source domain.
[0035] It should be noted that the cross inner product matrix is used to capture the cross-correlation between the source and target domains. Its calculation method is as follows: (Formula 3) Step S204: Construct a distribution alignment matrix based on the first inner product matrix, the second inner product matrix, and the cross inner product matrix.
[0036] It should be noted that in this step, the system will combine the first inner product matrix, the second inner product matrix, and the cross inner product matrix based on the definition of MMD to construct the final distribution alignment matrix. The specific formula is: (Formula 4) Wherein, the distribution alignment matrix It is a d×d matrix that integrates the distribution difference information of the source domain and the target domain.
[0037] Step S30: Based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters, construct an objective function that includes target domain clustering constraints, distribution alignment constraints, and feature selection constraints.
[0038] It should be noted that the preset projection matrix It is a linear transformation matrix that maps the original d-dimensional feature space to an r-dimensional shared subspace, where The preset number of clusters C represents the number of user categories expected to be divided in the target domain, such as residential, commercial, and industrial electricity consumption types. The target domain clustering constraint is used to ensure that the target domain samples form compact clusters around the cluster centers in the projected subspace; the distribution alignment constraint is used to minimize the distribution difference between the source domain and the target domain after projection; the feature selection constraint is used to induce row sparsity in the projection matrix, thereby automatically selecting the most discriminative electricity consumption features.
[0039] Additionally, it should be noted that the preset projection matrix H is initialized to satisfy the orthogonality constraint. The random matrix is denoted by I, where I represents the r×r identity matrix. Orthogonal constraints ensure that the projection transformation preserves the Euclidean distance relationship between data points, avoiding degeneracy (such as all samples projecting to the same point). The preset number of clusters C is determined according to business needs; for example, setting it to 5 corresponds to 5 typical user electricity consumption patterns.
[0040] Step S40: Perform alternating optimization and iterative solution on the objective function to obtain the clustering analysis results of the target domain electricity consumption data.
[0041] It should be noted that since the objective function is jointly nonconvex with respect to the membership matrix U, cluster centers V, and projection matrix H, but convex with respect to a single fixed variable, the system employs an alternating optimization strategy in this step. That is, in each iteration, two variables are fixed sequentially, and the third variable is updated until convergence. Furthermore, it should be noted that the clustering analysis results refer to the predicted label for the user electricity consumption pattern category (e.g., residential, commercial) to which each unlabeled electricity sample in the target domain belongs, and the key discriminative feature subset (e.g., load values during specific peak hours) selected through row sparsity filtering of the projection matrix, used to represent the core electricity consumption behavior patterns of different clusters.
[0042] This embodiment provides a clustering method for electricity consumption data. The method includes: acquiring electricity consumption data from a source domain, cluster centers corresponding to the electricity consumption data, and electricity consumption data from a target domain; constructing a distribution alignment matrix based on the electricity consumption data from the source domain, the cluster centers, and the electricity consumption data from the target domain; constructing an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, a preset projection matrix, and a preset number of clusters; and performing alternating optimization and iterative solving on the objective function to obtain the clustering analysis results of the target domain electricity consumption data. In summary, this embodiment, by constructing an objective function that integrates target domain clustering constraints, distribution alignment constraints, and feature selection constraints, and employing alternating optimization and iterative solving, achieves efficient clustering of data-scarce target domains, solving the problems of low clustering accuracy and poor stability caused by insufficient cold-start data and high-dimensional feature redundancy, thus improving the accuracy and robustness of clustering analysis.
[0043] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 , Figure 2 This is a flowchart illustrating the second embodiment of the clustering method for electricity consumption data in this application. Step S30 includes: Step S301: Construct target domain clustering constraints based on the preset projection matrix, the preset number of clusters, and the membership matrix and cluster centers in the target domain power consumption data.
[0044] It should be noted that the target domain clustering constraint is used to ensure that the sample points of the target domain electricity consumption data are closely distributed around their respective cluster centers in the low-dimensional subspace after projection transformation, forming a clear cluster structure. This constraint term is constructed based on the fuzzy C-means clustering model. Specifically, let the preset projection matrix be... , where r is the dimension of the projected subspace and d is the original feature dimension. The preset number of clusters is C (e.g., C=5, corresponding to user types such as residential, commercial, industrial, agricultural, and public service). The target domain electricity consumption data includes... There are samples, denoted as X={ }, each sample The system defines the membership matrix of the target domain as U = ,in The fuzzy membership degree of the j-th target domain sample belonging to the i-th cluster is expressed as follows: and [0,1]. The target domain cluster centers are defined as V={ }
[0045] The mathematical expression for the clustering constraints of the target domain is: (Formula 5) Where m is a preset fuzziness index (m>1), used to control the degree of fuzziness in the clustering results. Refers to the original sample The coordinates in the shared subspace after transformation by the projection matrix H Let be the position of the i-th cluster center in the shared subspace.
[0046] It is understandable that the physical meaning of this target domain clustering constraint term is: by minimizing the sum of the weighted squared distances of all target domain samples to their respective cluster centers, the projected target domain samples form the most compact distribution around each cluster center in the shared subspace, thereby achieving an effective division of the electricity consumption patterns of target domain users.
[0047] Step S302: Construct distribution alignment constraints based on the distribution alignment matrix and the preset projection matrix.
[0048] It should be noted that the distribution alignment constraint is used to minimize the distribution difference between the source and target domain data in the shared subspace after mapping by the projection matrix H. This constraint is constructed based on the maximum mean difference (MMD) theory, and by transferring clustering knowledge from the source domain (data-rich region) to the target domain (data-scarce region), it solves the problems of cluster center initialization sensitivity and convergence difficulty caused by insufficient samples in the target domain. Specifically, according to the distribution alignment matrix constructed in the first embodiment... The mathematical expression for the distribution alignment constraint constructed by the preset projection matrix H is as follows: (Formula 6) in, The preset alignment weights are used to control the influence of the distribution alignment term on the overall objective function (e.g., =0.5). It is understandable that the distribution alignment weight coefficient... The value of needs to be adjusted according to the degree of difference in the actual data distribution: when the difference in distribution between the source domain and the target domain is large, it can be appropriately increased. To enhance alignment; when the two domains are relatively similar, the alignment can be appropriately reduced. To avoid the loss of local structural information in the target domain due to over-alignment.
[0049] Step S303: Construct feature selection constraints based on the transpose of the preset projection matrix.
[0050] It should be noted that in this step, the feature selection constraint is used to induce row sparsity in the projection matrix, automatically identifying and eliminating redundant features and noisy dimensions (such as load values or abnormal fluctuation indicators in irrelevant time segments) in the electricity consumption data, thereby retaining the key features most discriminative for the clustering task. This constraint employs... Norm regularization implementation, distinct from traditional norm or Norm regularization Norms can simultaneously sparsify the rows of the projection matrix, making them more suitable for the group sparse feature selection problem in high-dimensional electricity consumption data in this application.
[0051] In one feasible implementation, step S303 specifically includes: Step A10: Calculate the first vector length of each row vector in the transpose of the preset projection matrix.
[0052] It should be noted that the preset projection matrix Its transpose matrix . Each row corresponds to one original feature dimension. For The k-th row is denoted as a vector. Its first vector length refers to the length of the row vector. Norm, calculated using the following formula: (Formula 7) in, The k-th row of the projection matrix H represents the first row of the projection matrix H. Column elements. This length reflects the overall contribution strength of the k-th original feature across all dimensions of the shared subspace. It can be understood that when the projection weights of a certain original feature k across all dimensions of the shared subspace are small, its corresponding row vector length... If the value approaches zero, it indicates that the feature contributes little to the cross-domain clustering task and should be removed; conversely, if... A larger value indicates that this feature plays an important role in distinguishing different electricity consumption patterns and should be retained.
[0053] Step A20: Sum the lengths of all the calculated row vectors and use the sum as a feature selection constraint.
[0054] It should be noted that in this step, the system sums the calculated lengths of the d row vectors (each length corresponding to an original feature) to obtain... Norm: (Formula 8) in, These are preset sparse weights used to adjust the degree of feature sparsity.
[0055] Understandably, the physical meaning of this constraint lies in: minimizing The norm encourages multiple row vectors of the projection matrix to simultaneously approach zero, thus achieving row sparsity. This means the model can automatically compress the projection weights of a large number of non-critical electricity consumption features (such as time segments during stable load periods) to near zero, retaining only the significant weights of a few key discriminative features (such as morning and evening peak hours, peak-to-valley differences, etc.). This row sparsity mechanism not only reduces computational complexity but also enhances the interpretability of clustering results, enabling cluster centers to more clearly reflect specific electricity consumption patterns (such as morning and evening peak periods, continuous nighttime periods, etc.).
[0056] Step S304: Perform a weighted summation of the target domain clustering constraint, the distribution alignment constraint, and the feature selection constraint to obtain the objective function.
[0057] It should be noted that in this step, the system will weight and combine the above three constraints to construct a unified comprehensive objective function, achieving joint optimization of the clustering task, distribution alignment task, and feature selection task. The specific formula of the objective function is as follows: (Formula 9) The constraints of the objective function include: , , min{U,V,H} represents the joint minimization optimization of three variables: membership matrix U, cluster centers V, and projection matrix H. This represents the orthogonality constraint of the projection matrix. This constraint ensures that the projection transformation preserves the Euclidean distance relationship between data points and avoids degenerate solutions (such as all samples projecting to the same point). Additionally, it should be noted that m... , All of these are preset hyperparameters, which can be optimized on the validation set through methods such as grid search.
[0058] In this embodiment, target domain clustering, distribution alignment, and feature selection are integrated into a unified optimization objective, and a method is adopted. The norm enables row sparsification of the projection matrix, completing the automatic identification and removal of redundant features in high-dimensional power consumption data. At the same time, it uses source domain knowledge to assist target domain clustering, solving the problem of information loss caused by the fragmented processing of transfer alignment, feature selection and clustering tasks in existing technologies. This improves the accuracy, robustness and interpretability of power user load pattern recognition under data scarcity conditions.
[0059] Based on the first and second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating the third embodiment of the clustering method for electricity consumption data in this application. Step S40 includes: Step S401: In each iteration, two variables to be optimized in the objective function are fixed in sequence, and the remaining variables to be optimized in the variables to be optimized are iteratively updated according to the fixed variables to be optimized. The variables to be optimized include the membership matrix, cluster centers and projection matrix.
[0060] It should be noted that, because the constructed objective function is jointly non-convex with respect to the membership matrix U, cluster centers V, and projection matrix H—meaning that optimizing all three variables simultaneously results in multiple local minima—it is difficult to directly obtain the global optimum. However, when any two variables are fixed, the objective function becomes convex with respect to the remaining single variable, indicating the existence of a unique optimal solution. Therefore, this embodiment employs an alternating optimization strategy, fixing two variables sequentially in each iteration and solving for the optimal value of the remaining variable, gradually approaching the global optimum through multiple iterations.
[0061] In one feasible implementation, step S401 specifically includes: Step B10: In each iteration, fix the projection matrix and cluster center, project the target domain electricity consumption data according to the projection matrix to obtain the projected target domain sample, and update the membership matrix according to the distance from the projected target domain sample to the cluster center.
[0062] It should be noted that in this step, the system fixes the projection matrix H and cluster centers V of the current iteration, focusing the optimization objective on updating the membership matrix U. The specific implementation process is as follows: First, based on the projection matrix H of the current iteration, for each sample in the target domain electricity consumption data... Perform a projection transformation to obtain the projected sample. Then, the projection of the samples to each cluster center is calculated. Euclidean distance square Where t represents the iteration number. Based on the optimization theory of fuzzy C-means, the membership degree can be obtained by introducing the Lagrange multiplier method to solve the constrained minimization problem. Update formula: (Formula 10) in, Let be the fuzzy membership degree of the j-th target domain sample to the i-th cluster after the t-th iteration update.
[0063] Understandably, the physical meaning of this formula is that for each target domain sample in the target domain electricity consumption data, the closer it is to each cluster center, the higher its membership degree; conversely, the farther the distance, the lower the membership degree.
[0064] Step B20: Fix the membership matrix and projection matrix, perform exponentiation on each element in the membership matrix to obtain weighting coefficients, and update the cluster centers based on the weighting results of the membership matrix.
[0065] It should be noted that in this step, the system will fix the projection matrix. and the updated membership matrix The cluster centers V are then updated. By fixing U and H, the objective function is convex. Taking the partial derivative of the objective function and setting it to zero, we can obtain the update formula for the cluster centers: (Formula 11) in, Let i be the i-th cluster center after the t-th iteration update.
[0066] Understandably, this formula represents the new cluster centers. It is all projected samples The weighted average is calculated by weighting the corresponding membership degree to the power of m. This means that the sample with the higher probability of belonging to the i-th cluster (i.e., the sample with the higher probability of belonging to the i-th cluster) is considered to belong to the i-th cluster. The larger the membership degree, the greater its influence on updating the cluster center position; conversely, samples with lower membership degrees contribute less to center updates. This weighted averaging mechanism ensures that cluster centers reflect dense regions of samples within a cluster, thereby guaranteeing cluster compactness.
[0067] Step B30: Fix the membership matrix and cluster centers, and update the projection matrix according to the joint gradient of the target domain clustering constraint, distribution alignment constraint and feature selection constraint in the objective function.
[0068] It should be noted that in this step, the system will fix the membership matrix. and cluster center Update the projection matrix H. At this point, the optimization problem is transformed into one with orthogonal constraints. and The matrix optimization problem of norm regularization. First, by constructing a method for approximation... The diagonal auxiliary matrix D for the norm gradient is defined by the following: (Formula 12) in, This represents the k-th diagonal element of the diagonal matrix D. Indicates the transpose of the projection matrix The k-th row vector corresponds to the original k-th feature dimension.
[0069] Then, the system calculates the joint gradient of the objective function with respect to the projection matrix H. This gradient consists of contributions from the target domain clustering constraints, distribution alignment constraints, and feature selection constraints. The projection matrix H is then updated using gradient descent. The specific formula is: (Formula 13) Where W represents the intermediate weight matrix derived from the membership matrix. This represents the matrix obtained by raising the membership matrix to the power of m. Let represent the projection matrix after the (t+1)th iteration update. Let represent the projection matrix for the t-th iteration. This represents the preset learning rate, used to control the step size of gradient descent, and D is a diagonal auxiliary matrix.
[0070] Additionally, it should be noted that in order to ensure the projection matrix satisfies the orthogonality constraint... (This constraint is used to maintain the Euclidean distance relationship between data points and avoid degeneracy.) After each gradient update, the system performs orthogonalization correction on H. Specifically, this can be achieved using QR decomposition (orthogonal triangular decomposition) or SVD (singular value decomposition). Understandably, orthogonalization correction ensures that the projection matrix always satisfies the orthogonal constraint, thereby guaranteeing the numerical stability and convergence of the algorithm.
[0071] Step S402: When the change in the objective function after iterative update is less than a preset threshold or the current iteration number is greater than or equal to the preset maximum iteration number, stop the iteration and output the membership matrix, cluster centers, and projection matrix after iterative optimization.
[0072] It should be noted that the preset threshold is used to determine whether the change in the objective function value between two consecutive iterations is small enough to determine whether the algorithm has converged. The preset maximum number of iterations is denoted as T_max (e.g., set to 100 times), used to prevent the algorithm from getting stuck in an infinite loop when it fails to converge in special cases. After each iteration, the system calculates the absolute difference between the current objective function value and the objective function value of the previous iteration. If this difference is less than the preset threshold, or the current iteration number t is greater than or equal to the preset maximum number of iterations T_max, the iteration process stops, and the membership matrix after iteration optimization is output. Cluster Center and projection matrix .
[0073] Step S403: Perform cluster analysis based on the iteratively optimized membership matrix, cluster centers, and projection matrix to obtain the cluster analysis results of the target domain electricity consumption data.
[0074] It should be noted that after iterative convergence, the system obtains the optimal membership matrix. Cluster Center and projection matrix This step aims to generate the final clustering analysis results of the target domain electricity consumption data based on these optimized parameters, including the classification labels of each sample and a subset of key classification features.
[0075] In one feasible implementation, step S403 specifically includes: Step C10: Calculate the second vector length of each row vector in the transpose of the iteratively optimized projection matrix, and determine the importance score of each original feature in the target domain electricity consumption data based on the second vector length.
[0076] It should be noted that in this sub-step, the system will base its decisions on the learned optimal projection matrix. Perform feature importance assessment. Because The role of norm regularization The norm of many rows approaches zero, and the corresponding original features are automatically removed. Specifically, first, the optimal projection matrix is calculated. transpose matrix Each row of the transpose matrix corresponds to a feature dimension in the original d-dimensional feature space. For the k-th original feature, extract... The k-th row vector is denoted as Next, calculate the length of the second vector of this row vector, which serves as the importance score for the corresponding original feature. The specific calculation formula is as follows: (Formula 14) in, This represents the importance score of the k-th original feature. Denotes the optimized projection matrix. The kth row Column elements, where r represents the dimension of the shared subspace.
[0077] Understandably, the physical meaning of this importance score lies in... The larger the value, the greater the projection weight of the k-th original feature in each dimension of the shared subspace, indicating that the feature contributes a high degree of information to the cross-domain clustering task. A value close to zero indicates that the projection weight of the feature is very small in all subspace dimensions, suggesting that the feature is redundant or noise and does not make a substantial contribution to the clustering task.
[0078] Step C20: Based on the importance score, select features with an importance score higher than a preset threshold from the original features of the target domain electricity consumption data to form a subset of key features.
[0079] It should be noted that in this step, the system constructs a subset of key features based on the importance scores of each feature, following a preset filtering strategy. Filtering strategies include thresholding, proportional analysis, and inflection point analysis. Thresholding involves setting a preset threshold and classifying features with importance scores greater than that threshold as key features. Proportional analysis involves sorting features by importance score from highest to lowest and selecting the top P% (e.g., 20%) of features as the key feature subset. Inflection point analysis involves plotting an inflection point on the importance scores and selecting the score corresponding to the inflection point of the curve as the key feature. For example, in one experiment, the system automatically reset the load feature weights for the period from 03:00 to 05:00 AM to extremely low (…). ≈0), while significantly increasing the weight of morning and evening peak hours (08:00-09:00, 18:00-20:00). (larger), to conform to the differences in typical electricity consumption behavior between residential and commercial users.
[0080] Step C30: Based on the iteratively optimized membership matrix and cluster centers, determine the cluster of each sample in the target domain electricity consumption data, and combine the key feature subset to generate a classification label containing the target domain electricity consumption data.
[0081] It should be noted that in this sub-step, the system assigns a final cluster label to each electricity consumption sample in the target domain based on the optimal membership matrix and cluster centers. Specifically, firstly, for the j-th target domain sample... Extract its optimal membership matrix The j-th column vector in The cluster index corresponding to the maximum value in the formula is used as the classification label for that sample. The specific formula is: (Formula 15) in, The clustering result label represents the j-th target domain sample (e.g., 1 represents residential type, 2 represents commercial type, 3 represents industrial type, etc.). This represents the element in the i-th row and j-th column of the optimized membership matrix.
[0082] Finally, the system will assign a classification label to each sample. The clustering results are integrated with the selected key feature subsets to generate a complete clustering analysis. These results include a user grouping report (listing the electricity consumption pattern categories to which each target domain sample belongs), a list of key features (explaining the most important time segments or statistical indicators distinguishing different electricity consumption patterns), and a cluster center visualization (showing the typical electricity load curve shapes for each user category). Understandably, this clustering analysis, which combines classification labels with key feature subsets, offers higher business interpretability and decision support value compared to traditional clustering methods that only output cluster labels. Power company operators can leverage these key feature subsets to gain a deeper understanding of the differences in electricity consumption behavior among different user groups, thereby developing targeted demand-side response strategies and personalized energy efficiency management solutions.
[0083] In this embodiment, the complex joint nonconvex optimization problem is decomposed into three alternating iterative convex subproblems, and the projection matrix is updated using a strategy of gradient descent combined with orthogonalization correction. At the same time, automatic feature selection and importance assessment are achieved based on the row sparsity of the projection matrix. This completes efficient clustering and deep interpretable analysis of the target domain power consumption data, solving the technical problems in the prior art such as cluster center drift, high-dimensional feature redundancy interference, and lack of interpretability of clustering results caused by data scarcity. It significantly improves the accuracy, robustness, and service availability of power user load pattern recognition under data scarcity conditions.
[0084] This application also provides a clustering device for electricity consumption data; please refer to [reference needed]. Figure 4 The clustering device for the electricity consumption data includes: Data acquisition module 10 is used to acquire power consumption data of the source domain, cluster centers corresponding to the power consumption data, and power consumption data of the target domain. The distribution alignment matrix construction module 20 is used to construct a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain. The objective function construction module 30 is used to construct an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain power consumption data, the preset projection matrix, and the preset number of clusters. Clustering analysis module 40 is used to perform alternating optimization and iterative solution of the objective function to obtain the clustering analysis results of the target domain electricity consumption data.
[0085] The electricity consumption data clustering device provided in this application, employing the electricity consumption data clustering method in the above embodiments, can solve the technical problem of how to improve the accuracy and robustness of user electricity data clustering analysis under data scarcity conditions. Compared with the prior art, the beneficial effects of the electricity consumption data clustering device provided in this application are the same as those of the electricity consumption data clustering method provided in the above embodiments, and other technical features in the electricity consumption data clustering device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0086] In one embodiment, the distribution alignment matrix construction module 20 is further configured to: calculate a first inner product matrix between target domain samples based on target domain samples in the target domain power consumption data; calculate a second inner product matrix between source domain samples based on the power consumption data of the source domain and the source domain samples in the cluster centers; calculate a cross inner product matrix between the target domain and the source domain based on the power consumption data of the target domain and the power consumption data of the source domain; and construct a distribution alignment matrix based on the first inner product matrix, the second inner product matrix, and the cross inner product matrix.
[0087] In one embodiment, the objective function construction module 30 is further configured to construct target domain clustering constraints based on a preset projection matrix, a preset number of clusters, and the membership matrix and cluster centers in the target domain power consumption data; construct distribution alignment constraints based on the distribution alignment matrix and the preset projection matrix; construct feature selection constraints based on the transpose of the preset projection matrix; and perform a weighted summation of the target domain clustering constraints, the distribution alignment constraints, and the feature selection constraints to obtain the objective function.
[0088] In one embodiment, the objective function construction module 30 is further configured to calculate the first vector length of each row vector in the transpose of the preset projection matrix; sum the vector lengths of all the calculated row vectors, and use the summation result as a feature selection constraint.
[0089] In one embodiment, the clustering analysis module 40 is further configured to, in each iteration, sequentially fix two variables to be optimized in the objective function, and iteratively update the remaining variables to be optimized based on the fixed variables, wherein the variables to be optimized include a membership matrix, cluster centers, and a projection matrix; when the change in the objective function after the iterative update is less than a preset threshold or the current iteration number is greater than or equal to a preset maximum iteration number, the iteration is stopped, and the membership matrix, cluster centers, and projection matrix after iterative optimization are output; clustering analysis is performed based on the iteratively optimized membership matrix, cluster centers, and projection matrix to obtain the clustering analysis results of the target domain electricity consumption data.
[0090] In one embodiment, the clustering analysis module 40 is further configured to, in each iteration, fix the projection matrix and cluster centers, project the target domain electricity consumption data according to the projection matrix to obtain projected target domain samples, and update the membership matrix according to the distance from the projected target domain samples to the cluster centers; fix the membership matrix and projection matrix, perform exponentiation on each element in the membership matrix to obtain weighting coefficients, and update the cluster centers according to the weighting result of the membership matrix; fix the membership matrix and cluster centers, and update the projection matrix according to the joint gradient of the target domain clustering constraints, distribution alignment constraints, and feature selection constraints in the objective function.
[0091] In one embodiment, the clustering analysis module 40 is further configured to calculate the second vector length of each row vector in the transpose of the iteratively optimized projection matrix, and determine the importance score of each original feature in the target domain electricity consumption data based on the second vector length; based on the importance score, select features with an importance score higher than a preset threshold from the original features of the target domain electricity consumption data to form a key feature subset; determine the cluster of each sample in the target domain electricity consumption data based on the iteratively optimized membership matrix and cluster centers, and generate a classification label containing the target domain electricity consumption data by combining the key feature subset.
[0092] This application provides a clustering device for electricity consumption data, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the electricity consumption data clustering method in the first embodiment described above.
[0093] The following is for reference. Figure 5The diagram illustrates a structural schematic of a clustering device suitable for implementing the power consumption data embodiments of this application. The power consumption data clustering device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The clustering device for electricity consumption data shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0094] like Figure 5 As shown, the electricity consumption data clustering device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the electricity consumption data clustering device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touch screens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the power consumption data clustering device to communicate wirelessly or wiredly with other devices to exchange data. While the figure shows power consumption data clustering devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0095] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0096] The electricity consumption data clustering device provided in this application, employing the electricity consumption data clustering method described in the above embodiments, can solve the technical problem of how to improve the accuracy and robustness of user electricity data clustering analysis under data scarcity conditions. Compared with the prior art, the beneficial effects of the electricity consumption data clustering device provided in this application are the same as those of the electricity consumption data clustering method provided in the above embodiments, and other technical features in this electricity consumption data clustering device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0097] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0098] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0099] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the clustering method for electricity consumption data in the above embodiments.
[0100] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0101] The aforementioned computer-readable storage medium may be included in the electricity consumption data clustering device; or it may exist independently and not be assembled into the electricity consumption data clustering device.
[0102] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by a clustering device for electricity consumption data, the clustering device for electricity consumption data causes the following: it acquires electricity consumption data from a source domain, cluster centers corresponding to the electricity consumption data, and electricity consumption data from a target domain; it constructs a distribution alignment matrix based on the electricity consumption data from the source domain, the cluster centers, and the electricity consumption data from the target domain; it constructs an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, a preset projection matrix, and a preset number of clusters; and it performs alternating optimization and iterative solving of the objective function to obtain the clustering analysis results of the target domain electricity consumption data.
[0103] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0104] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0105] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0106] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described clustering method for electricity consumption data. This addresses the technical problem of how to improve the accuracy and robustness of user electricity data clustering analysis under conditions of data scarcity. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the electricity consumption data clustering method provided in the above embodiments, and will not be elaborated upon here.
[0107] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A clustering method for electricity consumption data, characterized in that, The method includes: Obtain the power consumption data of the source domain, the cluster centers corresponding to the power consumption data, and the power consumption data of the target domain; Based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain, a distribution alignment matrix is constructed; Based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters, an objective function is constructed that includes target domain clustering constraints, distribution alignment constraints, and feature selection constraints. The objective function is solved iteratively by alternating optimization to obtain the clustering analysis results of the electricity consumption data in the target domain.
2. The method as described in claim 1, characterized in that, The step of constructing an objective function that includes target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters includes: Based on the preset projection matrix, the preset number of clusters, and the membership matrix and cluster centers in the target domain electricity consumption data, construct the target domain clustering constraints; Based on the distribution alignment matrix and the preset projection matrix, a distribution alignment constraint is constructed; Based on the transpose of the preset projection matrix, feature selection constraints are constructed; The objective function is obtained by weighted summation of the target domain clustering constraint, the distribution alignment constraint, and the feature selection constraint.
3. The method as described in claim 2, characterized in that, The step of constructing feature selection constraints based on the transpose of the preset projection matrix includes: Calculate the length of the first vector of each row vector in the transpose of the preset projection matrix; The lengths of all calculated row vectors are summed, and the sum is used as a feature selection constraint.
4. The method as described in claim 1, characterized in that, The steps of performing alternating optimization and iterative solution of the objective function to obtain the clustering analysis results of the target domain electricity consumption data include: In each iteration, two variables to be optimized in the objective function are fixed in sequence, and the remaining variables to be optimized are iteratively updated according to the fixed variables to be optimized. The variables to be optimized include the membership matrix, cluster center and projection matrix. When the change in the objective function after iterative update is less than a preset threshold or the current iteration number is greater than or equal to the preset maximum iteration number, the iteration stops and the membership matrix, cluster centers, and projection matrix after iterative optimization are output. Cluster analysis was performed based on the iteratively optimized membership matrix, cluster centers, and projection matrix to obtain the cluster analysis results of the target domain electricity consumption data.
5. The method as described in claim 4, characterized in that, The step of fixing two variables to be optimized in the objective function in each iteration, and iteratively updating the remaining variables to be optimized based on the fixed variables, includes: In each iteration, the projection matrix and cluster center are fixed. The target domain electricity consumption data is projected according to the projection matrix to obtain the projected target domain sample. The membership matrix is updated according to the distance from the projected target domain sample to the cluster center. With the membership matrix and projection matrix fixed, weighting coefficients are obtained by exponentiation of each element in the membership matrix, and the cluster centers are updated based on the weighting results of the membership matrix. With the membership matrix and cluster centers fixed, the projection matrix is updated based on the joint gradient of the target domain clustering constraint, distribution alignment constraint, and feature selection constraint in the objective function.
6. The method as described in claim 4, characterized in that, The clustering analysis results include classification labels. The steps for obtaining the clustering analysis results of the target domain electricity consumption data by performing clustering analysis based on the iteratively optimized membership matrix, cluster centers, and projection matrix include: Calculate the second vector length of each row vector in the transpose of the iteratively optimized projection matrix, and determine the importance score of each original feature in the target domain electricity consumption data based on the second vector length; Based on the importance score, features with an importance score higher than a preset threshold are selected from the original features of the target domain electricity consumption data to form a subset of key features; Based on the iteratively optimized membership matrix and cluster centers, the cluster of each sample in the target domain electricity consumption data is determined, and combined with the key feature subset, a classification label containing the target domain electricity consumption data is generated.
7. The method according to any one of claims 1 to 6, characterized in that, The step of constructing a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain includes: Calculate the first inner product matrix between the target domain samples based on the target domain electricity consumption data; Based on the electricity consumption data of the source domain and the source domain samples in the cluster center, calculate the second inner product matrix between the source domain samples; Based on the power consumption data of the target domain and the power consumption data of the source domain, calculate the cross inner product matrix between the target domain and the source domain; Construct a distribution alignment matrix based on the first inner product matrix, the second inner product matrix, and the cross inner product matrix.
8. A clustering device for electricity consumption data, characterized in that, The device includes: The data acquisition module is used to acquire the power consumption data of the source domain, the cluster center corresponding to the power consumption data, and the power consumption data of the target domain. The distribution alignment matrix construction module is used to construct a distribution alignment matrix based on the power consumption data of the source domain, the cluster centers, and the power consumption data of the target domain. The objective function construction module is used to construct an objective function including target domain clustering constraints, distribution alignment constraints, and feature selection constraints based on the distribution alignment matrix, the target domain electricity consumption data, the preset projection matrix, and the preset number of clusters. The clustering analysis module is used to perform alternating optimization and iterative solution of the objective function to obtain the clustering analysis results of the target domain electricity consumption data.
9. A clustering device for electricity consumption data, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the clustering method for electricity consumption data as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the clustering method for electricity consumption data as described in any one of claims 1 to 7.