User electricity consumption characteristic clustering method and related device

Through multiple clustering and iterative calculations, combined with the attraction coefficient and step size factor adjustment, the clustering process of user electricity consumption characteristics data is optimized, and the problem of low clustering efficiency is solved and efficient clustering effect is achieved.

CN120011841BActive Publication Date: 2025-07-25SHENZHEN POWER SUPPLY BUREAU
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510489867.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-25
Estimated Expiration
2045-04-18

AI Technical Summary

Technical Problem

In the new power system, the clustering efficiency of user electricity characteristic data is low, and it is difficult to improve clustering efficiency while ensuring clustering accuracy.

Method used

By obtaining the user's electricity consumption characteristics data set, determining the number of clusters based on the electricity consumption scenario and user groups, performing multiple clustering and iterative calculations, determining the target clustering center set, and optimizing the clustering process using the attraction coefficient and step size factor adjustment strategy.

Benefits of technology

While ensuring clustering accuracy, clustering efficiency is improved, especially when processing large-scale user electricity consumption data, it reduces computing time and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011841B_ABST
    Figure CN120011841B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a method and related device for clustering user electricity consumption characteristics. The method includes: obtaining a user electricity consumption characteristics data set; determining p first clustering numbers; performing first clustering according to the p first clustering numbers; using the first clustering number corresponding to the target first clustering result as the target clustering number; determining d initial clustering center sets according to the target clustering number; performing second clustering according to the d initial clustering center sets; performing sub-location iterative calculation according to the d second clustering results; determining a target clustering center set according to the d third clustering results corresponding to the sub-location iterative calculation; and determining a target clustering result according to the distance between the user electricity consumption characteristics data set and the target clustering center set. By adopting the embodiments of the present invention, when clustering user electricity consumption characteristics data, the clustering efficiency can be improved while ensuring the clustering accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power technologies, and in particular, to a method and related device for clustering user electricity consumption characteristics. Background Art

[0002] In the context of the rapid construction of a new power system, accurate clustering analysis of user electricity consumption characteristics is crucial, which helps to optimize the resource allocation on the user side and improve the overall operation efficiency and stability of the power system.

[0003] However, user electricity consumption characteristic data often involves different electricity consumption scenarios and user groups, and it is difficult to accurately estimate the reasonable number of clusters, which in turn leads to low clustering efficiency. Therefore, how to improve the clustering efficiency while ensuring the clustering accuracy is an urgent problem to be solved. Summary of the Invention

[0004] To solve the above problems, embodiments of the present invention provide a method and related device for clustering user electricity consumption characteristics, which can improve the clustering efficiency while ensuring the clustering accuracy when clustering user electricity consumption characteristic data.

[0005] In a first aspect, embodiments of the present invention provide a method for clustering user electricity consumption characteristics, including:

[0006] Obtain user electricity consumption characteristic data of at least one user group in at least one electricity consumption scenario to obtain a user electricity consumption characteristic data set;

[0007] Determine p first clustering numbers according to the at least one electricity consumption scenario and the at least one user group;

[0008] Perform a first clustering on the user electricity consumption characteristic data set according to the p first clustering numbers to obtain p first clustering results;

[0009] Obtain a target first clustering result according to the p first clustering results;

[0010] Use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number;

[0011] Determine d initial cluster center sets according to the target clustering number; the number of initial cluster centers in each initial cluster center set is the target clustering number;

[0012] Perform a second clustering on the user electricity consumption characteristic data set according to each initial cluster center set in the d initial cluster center sets to obtain d second clustering results;

[0013] Perform times of position iterative calculation according to the d second clustering results to obtain the one corresponding to the Calculate d third clustering results corresponding to the position iteration for is the preset number of iterations;

[0014] According to the d third clustering results calculated by the th position iteration, determine the target clustering center set;

[0015] According to the distance between each data in the user power consumption characteristic dataset and each target clustering center in the target clustering center set, determine the target clustering result of the user power consumption characteristic dataset.

[0016] In a second aspect, an embodiment of the present invention provides a user power consumption characteristic clustering device, which includes an acquisition unit and a processing unit;

[0017] The acquisition unit is used to acquire user power consumption characteristic data of at least one user group in at least one power consumption scenario, and obtain a user power consumption characteristic dataset;

[0018] The processing unit is used to determine p first clustering numbers according to the at least one power consumption scenario and the at least one user group;

[0019] Perform a first clustering on the user power consumption characteristic dataset according to the p first clustering numbers to obtain p first clustering results;

[0020] Obtain a target first clustering result according to the p first clustering results;

[0021] Use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number;

[0022] Determine d initial clustering center sets according to the target clustering number; the number of initial clustering centers in each initial clustering center set is the target clustering number;

[0023] Perform a second clustering on the user power consumption characteristic dataset according to each initial clustering center set in the d initial clustering center sets to obtain d second clustering results;

[0024] Perform position iteration calculations according to the d second clustering results to obtain d third clustering results corresponding to the th position iteration calculation, where is the preset number of iterations;

[0025] According to the d third clustering results corresponding to the th position iteration calculation, determine the target clustering center set;

[0026] Determine the target clustering result of the user power consumption characteristic data set according to the distance between each data in the user power consumption characteristic data set and each target clustering center in the target clustering center set.

[0027] In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory. The processor is connected to the memory. The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method described in the first aspect.

[0028] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method described in the first aspect.

[0029] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute the method described in the first aspect.

[0030] Implementing the embodiments of the present application has the following beneficial effects:

[0031] In the embodiment of the present application, first obtain the user power consumption characteristic data of at least one user group in at least one power consumption scenario to obtain a user power consumption characteristic data set. Then, determine p first clustering numbers according to at least one power consumption scenario and at least one user group, and perform a first clustering on the user power consumption characteristic data set according to the p first clustering numbers to obtain p first clustering results. Then, obtain a target first clustering result according to the p first clustering results, and use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number. Next, determine d initial clustering center sets according to the target clustering number, where the number of initial clustering centers in each initial clustering center set is the target clustering number, and perform a second clustering on the user power consumption characteristic data set according to each initial clustering center set in the d initial clustering center sets to obtain d second clustering results. Then, perform subsequent position iteration calculations to obtain d third clustering results corresponding to the th position iteration calculation, where is a preset number of iterations. Next, according to the The d third clustering results corresponding to the position iteration calculation are obtained to determine the target clustering center set. Finally, according to the distances between each data in the user power consumption characteristic dataset and each target clustering center in the target clustering center set, the target clustering result of the user power consumption characteristic dataset is determined. Thus, p first clustering results are obtained through the p first clustering numbers, and the first clustering number of the target first clustering result among the p first clustering results is used as the target clustering number. By determining the target clustering number, the clustering accuracy during subsequent clustering can be ensured. Then, d second clustering results are obtained based on the target clustering number and the d initial clustering center sets, and position iteration calculation is performed according to the d second clustering results to determine the target clustering center set. The clustering accuracy is further improved through the position iteration calculation. Finally, according to the distances between each data in the user power consumption characteristic dataset and each target clustering center in the target clustering center set, the target clustering result is obtained, which can improve the clustering efficiency when clustering the user power consumption characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the drawings required for use in the embodiments of the present invention or the background art will be described below. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0033] Figure 1 It is a schematic structural diagram of a user power consumption characteristic clustering system provided by an embodiment of the present application;

[0034] Figure 2 It is a flowchart of a user power consumption characteristic clustering method provided by an embodiment of the present application;

[0035] Figure 3 It is a schematic diagram of a user power consumption characteristic dataset provided by an embodiment of the present application;

[0036] Figure 4 It is a schematic diagram of an initial clustering center set provided by an embodiment of the present application;

[0037] Figure 5 It is a schematic diagram of a target clustering result provided by an embodiment of the present application;

[0038] Figure 6 It is a schematic diagram of position update provided by an embodiment of the present application;

[0039] Figure 7 It is a schematic structural diagram of a user power consumption characteristic clustering device provided by an embodiment of the present application;

[0040] Figure 8It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0042] The terms "first", "second", "third", "fourth", etc. in the specification and claims of the present application and the accompanying drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally further include steps or modules not listed, or may optionally further include other steps or modules inherent to these processes, methods, products, or devices.

[0043] Referring to

[0044] Refer to Figure 1 , Figure 1 is a schematic architecture diagram of a user electricity consumption characteristic clustering system provided by an embodiment of the present application. As Figure 1 shown, the user electricity consumption characteristic clustering system includes a clustering model, which is used to cluster the user electricity consumption characteristic data set to obtain a target clustering result, and the clustering model can implement the user electricity consumption characteristic clustering method provided by the embodiment of the present application.

[0045] Refer to Figure 2 , Figure 2 is a flowchart of a user electricity consumption characteristic clustering method provided by an embodiment of the present application. As Figure 2 shown, the user electricity consumption characteristic clustering method provided by the embodiment of the present application includes, but is not limited to, the following steps:

[0046] Step S101: Obtain user electricity consumption characteristic data of at least one user group in at least one electricity consumption scenario to obtain a user electricity consumption characteristic data set;

[0047] Step S102: Determine p first clustering numbers according to at least one electricity consumption scenario and at least one user group;

[0048] where p is the number of first clustering times;

[0049] Step S103: Perform first clustering on the user electricity consumption characteristic dataset according to the p first clustering numbers to obtain p first clustering results;

[0050] Step S104: Obtain the target first clustering result according to the p first clustering results;

[0051] Step S105: Take the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number;

[0052] Step S106: Determine d initial clustering center sets according to the target clustering number;

[0053] where the number of initial clustering centers in each initial clustering center set is the target clustering number;

[0054] Step S107: Perform second clustering on the user electricity consumption characteristic dataset according to each initial clustering center set in the d initial clustering center sets to obtain d second clustering results;

[0055] Step S108: Perform times of position iterative calculations according to the d second clustering results to obtain d third clustering results corresponding to the th position iterative calculation;

[0056] where is the preset number of iterations;

[0057] Step S109: Determine the target clustering center set according to the d third clustering results corresponding to the th position iterative calculation;

[0058] Step S110: Determine the target clustering result of the user electricity consumption characteristic dataset according to the distance between each data in the user electricity consumption characteristic dataset and each target clustering center in the target clustering center set.

[0059] In a possible embodiment, a user power consumption characteristic data set is obtained. The user power consumption characteristic data set includes at least one power consumption scenario and at least one user group. The user power consumption characteristic data set includes a plurality of user power consumption characteristic data. Each user power consumption characteristic data is composed of a 96-point curve of user power consumption, voltage, and current and its characteristic indicators, and each user power consumption characteristic data can be represented by a feature vector. Among the 96-point curves of user power consumption, voltage, and current, the characteristic indicators are used to reflect some key parameters and statistics of these curve characteristics. The characteristic indicators include, but are not limited to, power curve characteristic indicators, voltage curve characteristic indicators, and current curve characteristic indicators. The power curve characteristic indicators include at least one of the following: maximum value, minimum value, average value, peak-to-valley difference, load factor; the voltage curve characteristic indicators include at least one of the following: voltage deviation, maximum value, minimum value, average value, voltage fluctuation; and the current curve characteristic indicators include at least one of the following: maximum value, minimum value, average value, current unbalance degree, harmonic content.

[0060] In a possible embodiment, according to at least one power consumption scenario and at least one user group, p first clustering numbers are determined, where p is the first clustering times, and the first clustering times are used to indicate the number of times of performing the first clustering on the user power consumption characteristic data set. The first clustering number is used to indicate the number of first clustering centers in the first clustering result obtained each time of the first clustering, that is, the number of clustering categories. If the total number of power consumption scenarios of at least one power consumption scenario is relatively large, or the total number of user groups of at least one user group is relatively large, then a relatively large number of first clustering times can be determined. For example, the first reference clustering times = the first weight × the total number of power consumption scenarios + the second weight × the total number of user groups, and the first clustering times is the value obtained by rounding down or rounding up the first reference clustering times. The first weight and the second weight can take any number between 0 and 1. When both the first weight and the second weight are 1, the first clustering times can be the sum of the total number of power consumption scenarios and the total number of user groups. If the first clustering times is 3, then the first clustering number can be 1, 2, 3, or 2, 3, 4, or 3, 5, 7, and so on.

[0061] In a possible embodiment, according to p first clustering quantities, the user electricity consumption characteristic dataset is subjected to a first clustering to obtain p first clustering results. If the value of p is 3 and the p first clustering quantities are 2, 3, and 4 respectively, then the user electricity consumption characteristic dataset is subjected to three first clusterings, and the numbers of first clustering centers in the three obtained first clustering results are 2, 3, and 4 respectively, that is, the user electricity consumption characteristic dataset is divided into two categories, three categories, and four categories respectively. When performing the first clustering on the user electricity consumption characteristic dataset, a bottom-up clustering order or a top-down clustering order can be adopted. For example, when adopting the bottom-up clustering order, each clustering object, that is, each curve, is first taken as a separate category, the distances between every two curves are calculated, and the two curves with the smallest distance are merged into a new category until the current clustering category is the same as the first clustering quantity required for the current clustering, and then the clustering is stopped to obtain the first clustering result corresponding to the first clustering quantity required for the current clustering.

[0062] Exemplarily, referring to Figure 3 , Figure 3 is a schematic diagram of a user electricity consumption characteristic dataset provided by an embodiment of the present application. As Figure 3 shown in the user electricity consumption characteristic dataset, the user electricity consumption characteristic dataset includes the first curve to the sixth curve. When the value of p is 3, the p first clustering quantities can be 2, 3, and 4 respectively. When performing the first clustering on the user electricity consumption characteristic dataset, when the first clustering quantity is 4, the second curve and the third curve in the first curve to the sixth curve can be merged into a new category, and the fourth curve and the fifth curve in the first curve to the sixth curve can be merged into a new category, so that the first clustering result when the first clustering quantity is 4 is [the first curve, the second curve and the third curve, the fourth curve and the fifth curve, the sixth curve]; when the first clustering quantity is 3, the sixth curve and the fourth curve and the fifth curve can be merged into a new category, or the first curve and the second curve and the third curve can be merged into a new category, so that the first clustering result when the first clustering quantity is 3 is [the first curve, the second curve and the third curve, the fourth curve, the fifth curve and the sixth curve], or, [the first curve, the second curve and the third curve, the fourth curve and the fifth curve, the sixth curve], which is specifically determined according to the calculation result of the distance between every two curves; when the first clustering quantity is 2, the first clustering result when the first clustering quantity is 2 can be obtained as [the first curve, the second curve and the third curve, the fourth curve, the fifth curve and the sixth curve].

[0063] In a possible embodiment, based on p first clustering results, a target first clustering result is obtained, and the first clustering quantity corresponding to the target first clustering result among the p first clustering quantities is used as the target clustering quantity. First, a clustering analysis evaluation function is determined. Then, according to the clustering analysis evaluation function, the clustering analysis evaluation index of each first clustering result among the p first clustering results is determined, obtaining p clustering analysis evaluation indexes. The first clustering result corresponding to the maximum value among the p clustering analysis evaluation indexes is used as the target first clustering result, and the first clustering quantity corresponding to the target first clustering result among the p first clustering quantities is used as the target clustering quantity. For example, when the value of p is 3, the p first clustering quantities can be 2, 3, and 4 respectively. According to the clustering analysis evaluation function, the p clustering analysis evaluation indexes are determined to be 10, 20, and 15 respectively. Then, the first clustering result with the clustering analysis evaluation index of 20 is used as the target first clustering result, and the first clustering quantity corresponding to this target first clustering result, that is, 3, is used as the target clustering quantity.

[0064] In a possible embodiment, based on the target clustering quantity, d initial cluster center sets are determined, where the number of initial cluster centers in each initial cluster center set is the target clustering quantity. The d initial cluster center sets can be randomly selected or selected according to the data density in the user power consumption characteristic dataset to ensure that each initial cluster center in each initial cluster center set is as close as possible to the center points of different clustering categories. For example, when the target clustering quantity is 3, the three data regions with the highest data density in the user power consumption characteristic dataset can be determined first. Each initial cluster center set includes 3 initial cluster centers, which are respectively selected from the three data regions.

[0065] Exemplarily, refer to Figure 4 , Figure 4 which is a schematic diagram of an initial cluster center set provided by an embodiment of the present application. As Figure 4 shown, the distribution of multiple data in the user power consumption characteristic dataset is shown as hollow points in the figure. Each hollow point represents a user power consumption characteristic data. When the target clustering quantity is 3, the three data regions with the highest data density in the user power consumption characteristic dataset are the first data region, the second data region, and the third data region respectively. The 3 initial cluster centers respectively selected from the three data regions can be at any position in the three data regions. For example, three solid points in the figure can be selected as the 3 initial cluster centers. Among them, the initial cluster center in the first data region is the first initial cluster center, the initial cluster center in the second data region is the second initial cluster center, and the initial cluster center in the third data region is the third initial cluster center. The first initial cluster center, the second initial cluster center, and the third initial cluster center form an initial cluster center set.

[0066] In a possible embodiment, according to each initial cluster center set among the d initial cluster center sets, the user power consumption characteristic dataset is subjected to a second clustering to obtain d second clustering results. First, for each initial cluster center set, all the data in the user power consumption characteristic dataset are partitioned into each initial cluster center according to the closest Euclidean distance. Each initial cluster center corresponds to a cluster. In each cluster, the sum of the distances from each data point to other data points in the current cluster is calculated, and the data point with the minimum sum of distances is selected as the new cluster center, that is, the new clustering center. The above steps are repeated until the clustering center does not change. At this time, the second clustering result corresponding to this initial cluster center set is obtained. Further, by sequentially performing the second clustering on the user power consumption characteristic dataset according to each initial cluster center set among the d initial cluster center sets, d second clustering results can be obtained.

[0067] In a possible embodiment, perform position iteration calculations according to the d second clustering results to obtain d third clustering results corresponding to the th position iteration calculation, where is a preset number of iterations. Each position iteration calculation result includes d reference cluster center sets. The d third clustering results correspond one-to-one with the d reference cluster center sets. Each third clustering result corresponds to a reference cluster center set. According to the d third clustering results corresponding to the th position iteration calculation, the target cluster center set is determined. According to the Euclidean distance between each data in the user power consumption characteristic dataset and each target cluster center in the target cluster center set, the target clustering result of the user power consumption characteristic dataset is determined. First, the objective function is determined. This objective function is used to measure the clustering effect of each second clustering result among the d second clustering results. The better the clustering effect, the higher the initial position iteration priority. The cluster center set corresponding to the second clustering result with a lower initial position iteration priority will move closer to the cluster center set corresponding to the second clustering result with a higher initial position iteration priority to obtain a new cluster center set, that is, the reference cluster center set. Since each position iteration calculation corresponds to d reference cluster center sets, after position iteration calculations, reference cluster center sets will be obtained. The reference cluster center set with the best clustering effect among the reference cluster center sets is used as the target cluster center set. Finally, according to the distances between each data in the user electricity consumption characteristic dataset and each target cluster center in the target cluster center set, the target cluster center to which each data belongs is determined, and then the target clustering result of the user electricity consumption characteristic dataset is obtained. Further, if each data in the user electricity consumption characteristic dataset and each target cluster center in the target cluster center set are represented in the form of feature vectors, then the calculation method for the distance between each data in the user electricity consumption characteristic dataset and each target cluster center in the target cluster center set can be as follows: For a first data in the user electricity consumption characteristic dataset and a first target cluster center in the target cluster center set, and the feature vector of the first data is , , and the feature vector of the first target cluster center is , , then the distance between the first data and the first target cluster center = .

[0068] Exemplarily, referring to Figure 5 , Figure 5 is a schematic diagram of a target clustering result provided by an embodiment of the present application. As Figure 5 shown, the distribution of multiple data in the user electricity consumption characteristic dataset is shown as hollow points in the figure. Each hollow point represents a user electricity consumption characteristic data. When the target clustering number is 3 and the target cluster center set is the first target cluster center, the second target cluster center, and the third target cluster center in Figure 5 , the distances between the first data in the figure and the first target cluster center, the second target cluster center, and the third target cluster center are the first distance, the second distance, and the third distance respectively. Among them, the second distance < the third distance < the first distance. From this, it can be obtained that the target cluster center to which the first data belongs is the second target cluster center. Furthermore, for each data in the user electricity consumption characteristic dataset, the target cluster center to which it belongs can be obtained, thereby obtaining the target clustering result of the user electricity consumption characteristic dataset.

[0069] In the embodiment of the present application, the first clustering method is used to pre-determine the clustering number and clustering center of the second clustering, so that when clustering the user electricity consumption characteristics data, especially when processing large-scale user electricity consumption data, it is not necessary to consume a large amount of computing time and resources, and the clustering efficiency can be improved while ensuring the clustering accuracy. And in step S108, a random adjustment strategy and an adaptive model update algorithm parameter, that is, the attraction coefficient and the step factor, are introduced to achieve more accurate, efficient, and stable clustering of user electricity consumption characteristics.

[0070] Optionally, in step S108, according to the d second clustering results, The secondary position iteration calculation is performed to obtain d third clustering results corresponding to the -th secondary position iteration calculation, which may include the following steps:

[0071] Step S201: For the k-th position iteration calculation in the -th secondary position iteration calculation, obtain the corresponding positions of the d second clustering results during the k-th position iteration calculation to obtain d initial positions; k is less than or equal to ;

[0072] Step S202: Determine the attraction coefficient and step size factor of the d second clustering results during the k-th position iteration calculation;

[0073] Step S203: According to the objective function and the d initial positions, determine the initial position iteration priority of the d second clustering results during the k-th position iteration calculation to obtain d initial position iteration priorities;

[0074] Step S204: According to the d initial position iteration priorities, determine the position iteration order of the d second clustering results during the k-th position iteration calculation;

[0075] Step S205: According to the d initial positions, attraction coefficients, step size factors, and d initial position iteration priorities, determine the reference position where the i-th second clustering result among the d second clustering results is attracted by the j-th second clustering result; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result;

[0076] Step S206: According to the position iteration order, determine the target quantity of the second clustering results whose initial position iteration priorities are higher than that of the i-th second clustering result among the d second clustering results;

[0077] Step S207: Determine the sorting position serial number of the j-th second clustering result in the position iteration order;

[0078] Step S208: According to the target quantity and the sorting position serial number, determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result;

[0079] Step S209: According to the reference position and the reference probability, determine the target position of the i-th second clustering result during the k-th position iteration calculation;

[0080] Step S210: According to the target positions of each of the d second clustering results during the k-th position iteration calculation, obtain d third clustering results corresponding to the k-th position iteration calculation.

[0081] In a possible embodiment, the maximum number of position iteration calculations for the k-th position iteration calculation, that is, the preset number of iterations, is denoted by It is represented that when the number of position iterations in the current iteration is less than or equal to the maximum number of position iterations, that is At this time, first, obtain the corresponding positions of the d second clustering results at the current position iteration to obtain d initial positions. Among them, the initial position of the i-th second clustering result at the k-th position iteration is obtained through Then, determine the attraction coefficient and step size factor of the d second clustering results at the current position iteration. Among them, the attraction coefficient of the i-th second clustering result at the k-th position iteration is obtained through The step size factor of the i-th second clustering result at the k-th position iteration is obtained through Specifically, the attraction coefficient of the i-th second clustering result at the k-th position iteration can be represented by the following formula:

[0082]

[0083] Among them, and are random numbers generated by uniform distribution. The step size factor of the i-th second clustering result at the k-th position iteration can be represented by the following formula:

[0084]

[0085] Among them, is the initial step size factor, is the maximum number of iterations.

[0086] In a possible embodiment, according to the objective function and the d initial positions, determine the initial position iteration priorities of the d second clustering results at the current position iteration to obtain d initial position iteration priorities. Among them, the objective function of the i-th second clustering result is obtained through The initial position iteration priority of the i-th second clustering result can be represented by the following formula:

[0087]

[0088] Among them, is the initial position iteration priority of the i-th second clustering result, is the iteration coefficient and can be set as a constant, is the Euclidean distance between the i-th second clustering result and the j-th second clustering result determined according to the d initial positions.

[0089] In a possible embodiment, the priorities of the d initial positions are iteratively processed to determine the position iteration order of the d second clustering results at the current position iteration. According to the position iteration order, the target number of those with initial position iteration priorities higher than the i-th second clustering result among the d second clustering results is determined, and the sorting position serial number of the j-th second clustering result in the position iteration order is determined, where the position iteration order is obtained by sorting the priorities of the d initial position iteration priorities from high to low, and the higher the priority in the position iteration order, the smaller the sorting position serial number.

[0090] In a possible embodiment, according to the reference position and the reference probability, the target position of the i-th second clustering result at the current position iteration is determined, and the target position may be the product of the reference position and the reference probability.

[0091] In the embodiments of the present application, as the number of iterations increases, it gradually tends to an aggregated state, and the distance between the d second clustering results gradually decreases to zero. Therefore, as the number of iterations increases, it will gradually approach a certain constant. However, in the embodiments of the present application, by randomly adjusting the attraction coefficient during the iteration process the global search ability is improved, avoiding falling into local optimal solutions and improving the clustering accuracy.

[0092] In the embodiments of the present application, the traditional step size factor remains unchanged during each iteration. In the embodiments of the present application, is adjusted, when it is larger, it can effectively enhance the global search ability, while when it is smaller, it is beneficial to improve the convergence speed of the iterative calculation and improve the clustering efficiency.

[0093] Optionally, in S205, according to the d initial positions, the attraction coefficient, the step size factor, and the d initial position iteration priorities, determining the reference position where the i-th second clustering result among the d second clustering results is attracted by the j-th second clustering result may include the following steps:

[0094] Step S301: Determine the interval distance between the i-th second clustering result and the j-th second clustering result according to the d initial positions;

[0095] Step S302: Determine the first position change amount according to the interval distance and the step size factor;

[0096] Step S303: Determine the second position change amount according to the interval distance and the attraction coefficient;

[0097] Step S304: Determine the reference position according to the initial position of the i-th second clustering result, the first position change amount, and the second position change amount.

[0098] In a possible embodiment, an interval distance between the i-th second clustering result and the j-th second clustering result is determined according to d initial positions. , and according to the interval distance and a step factor , a first position change amount is determined, and the first position change amount can be expressed by the following formula:

[0099] First position change amount =

[0100] wherein, is a random number subject to a Gaussian distribution.

[0101] In a possible embodiment, a second position change amount is determined according to the interval distance and an attraction coefficient , and the second position change amount can be expressed by the following formula:

[0102] Second position change amount =

[0103] wherein, is an iteration coefficient and can be set as a constant, is the Euclidean distance between the i-th second clustering result and the j-th second clustering result determined according to d initial positions.

[0104] In a possible embodiment, a reference position is determined according to the initial position, the first position change amount, and the second position change amount of the i-th second clustering result, wherein the reference position of the i-th second clustering result in the k-th position iteration can be expressed by the following formula:

[0105]

[0106] wherein, is the initial position of the i-th second clustering result in the k-th position iteration.

[0107] Exemplarily, referring to Figure 6 , Figure 6 is a schematic diagram of a position update provided by an embodiment of the present application. As Figure 6 shown, in the k-th position iteration, both the i-th second clustering result and the j-th second clustering result include multiple cluster centers, wherein, Figure 6 in and are a pair of corresponding cluster centers, that is, and are located in the same data area, is the initial position of one of the cluster centers of the j-th second clustering result in the k-th position iteration, is the initial position of one of the cluster centers of the i-th second clustering result in the k-th position iteration. Since the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result, will be attracted, thus generating a position update of the cluster center. In the figure, is in the k-th position iteration reference position, to The position update direction is shown by the arrow in the figure. If the reference probability calculated subsequently is 1, then this reference position is the target position of this cluster center in the i-th second clustering result.

[0108] Optionally, in S208, according to the target quantity and the sorting position serial number, determining the reference probability that the i-th second clustering result is attracted by the j-th second clustering result may include the following steps:

[0109] Step S401: Obtain the sorting and screening coefficient;

[0110] Step S402: Determine the sorting and screening threshold according to the sorting and screening coefficient and the value of d;

[0111] Step S403: If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is less than or equal to the sorting and screening threshold, or, if the target quantity is less than or equal to the sorting and screening threshold, the reference probability is the first preset probability;

[0112] Step S404: If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is greater than the sorting and screening threshold, determine the reference probability according to the difference between the target quantity and the sorting position serial number, the sorting and screening threshold, and the target quantity.

[0113] In a possible embodiment, the sorting and screening coefficient can be set to 0.1. According to the sorting and screening coefficient and the value of d, the sorting and screening threshold is determined to be 0.1D. If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is less than or equal to the sorting and screening threshold, or, if the target quantity is less than or equal to the sorting and screening threshold, the reference probability is the first preset probability. If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is greater than the sorting and screening threshold, determine the reference probability according to the difference between the target quantity and the sorting position serial number, the sorting and screening threshold, and the target quantity. Among them, the first preset probability can be set to 1, and the reference probability of the i-th second clustering result can be represented by the following formula:

[0114]

[0115] Among them, is the total number of the second clustering results, is the number of the second clustering results among the d second clustering results whose initial position iteration priority is higher than that of the th second clustering result, is the sorting position serial number of the initial position iteration priority of the jth second clustering result in the position iteration order of all d second clustering results, is to round down 0.1D.

[0116] Optionally, in step S109, calculating the corresponding d third clustering results according to the th position iteration to determine the target cluster center set may include the following steps:

[0117] Step S501: Obtain the k target positions of the corresponding d third clustering results calculated by the th position iteration;

[0118] Step S502: Determine the d target position iteration priorities of the corresponding d third clustering results calculated according to the objective function and the th position iteration based on the k target positions of the corresponding d third clustering results calculated by the th position iteration;

[0119] Step S503: Obtain the d initial position iteration priorities of each position iteration calculation among the d second clustering results in the th position iteration calculation;

[0120] Step S504: Obtain the highest position iteration priority according to the d target position iteration priorities of the corresponding d third clustering results calculated by the th position iteration and the d initial position iteration priorities of each position iteration calculation among the d second clustering results in the th position iteration calculation;

[0121] Step S505: Use the cluster center set of the third clustering result corresponding to the highest position iteration priority as the target cluster center set.

[0122] In a possible embodiment, the d target position iteration priorities of the kth position iteration calculation result may be the d initial position iteration priorities of the (k + 1)th position iteration calculation result, so as to simplify the calculation process of the d target position iteration priorities of each position iteration calculation result among the k position iteration calculation results.

[0123] In a possible embodiment, first determine the highest priority among the target position iteration priorities in each position iteration calculation result as the first target position iteration priority, and then select the highest priority from the k first target position iteration priorities filtered out as the second target position iteration priority.

[0124] Optionally, step S104 of obtaining the target first clustering result according to the p first clustering results may include the following steps:

[0125] Step S601: Obtain a clustering analysis evaluation function;

[0126] Step S602: Determine the clustering analysis evaluation index of each first clustering result among the p first clustering results according to the clustering analysis evaluation function, and obtain p clustering analysis evaluation indexes;

[0127] Step S603: Take the first clustering result corresponding to the maximum value among the p clustering analysis evaluation indexes as the target first clustering result.

[0128] In a possible embodiment, the clustering analysis evaluation function is used to reflect the quality of the clustering effect. According to the clustering analysis evaluation function, the clustering analysis evaluation index of each first clustering result among the p first clustering results can be determined, and p clustering analysis evaluation indexes are obtained. The larger the clustering analysis evaluation index, the better the clustering effect, and the first clustering result corresponding to the maximum value among the p clustering analysis evaluation indexes is taken as the target first clustering result.

[0129] Optionally, step S602 of determining the clustering analysis evaluation index of each first clustering result among the p first clustering results according to the clustering analysis evaluation function and obtaining p clustering analysis evaluation indexes may include the following steps:

[0130] Step S701: Obtain the first sample quantity of the user electricity consumption characteristic dataset;

[0131] Step S702: Determine the sample mean point according to the first sample quantity and the user electricity consumption characteristic dataset;

[0132] Step S703: Obtain w clusters of the reference first clustering result; the reference first clustering result is any one of the p first clustering results; w is a positive integer;

[0133] Step S704: Determine the second sample quantity and the sample center point of each of the w clusters, and obtain w second sample quantities and w sample center points;

[0134] Step S705: Determine the between-class scatter value of the reference first clustering result according to the w second sample quantities, the w sample center points and the sample mean point;

[0135] Step S706: Determine the within-class scatter value of the reference first clustering result according to the distances between each sample point in each of the w clusters and the sample center points.

[0136] Step S707: Determine the clustering analysis evaluation index of the reference first clustering result according to the clustering analysis evaluation function, the between-class scatter value, the within-class scatter value, the value of w, and the first sample quantity.

[0137] Step S708: Obtain p clustering analysis evaluation indexes according to the p first clustering results and the clustering analysis evaluation index of the reference first clustering result.

[0138] In a possible embodiment, obtain the first sample quantity of the user electricity consumption characteristic data set. The first sample quantity may be the total quantity of the user electricity consumption characteristic data in the user electricity consumption characteristic data set, and the first sample quantity is represented by N. According to the first sample quantity and the user electricity consumption characteristic data set, determine the sample mean point M, and the sample mean point M can be represented by a formula:

[0139]

[0140] Wherein, is the f-th user electricity consumption characteristic data in the user electricity consumption characteristic data set.

[0141] In a possible embodiment, obtain the w clusters of the reference first clustering result, where the reference first clustering result is any one of the p first clustering results. Determine the second sample quantity and the sample center point in each of the w clusters, and obtain w second sample quantities and w sample center points. The f-th cluster is represented by The number of second sample points in the f-th cluster is represented by The sample center point in the f-th cluster is represented by for representation.

[0142] In a possible embodiment, determine the between-class scatter value of the reference first clustering result according to the w second sample quantities, the w sample center points, and the sample mean point. The between-class scatter value can be represented by the following formula:

[0143]

[0144] Wherein, is the between-class scatter value, and W is the total number of the w clusters.

[0145] In a possible embodiment, determine the within-class scatter value of the reference first clustering result according to the distances between each sample point in each of the w clusters and the sample center point. The within-class scatter value can be represented by the following formula:

[0146]

[0147] Among them, is the discrete value within the class, is the g-th sample point in the cluster.

[0148] In a possible embodiment, according to the clustering analysis evaluation function, the between-class discrete value, the within-class discrete value, the value of w, and the first sample quantity, a clustering analysis evaluation index for referring to the first clustering result is determined, and the clustering analysis evaluation index can be expressed by the following formula:

[0149]

[0150] Among them, is the clustering analysis evaluation index.

[0151] In a possible embodiment, the calculation method of the objective function of the above-mentioned i-th second clustering result can be consistent with the calculation method of the clustering analysis evaluation index.

[0152] In a possible embodiment, for the user electricity consumption characteristic data of this solution in relevant electricity consumption scenarios, different electricity consumption scenarios can be residential electricity consumption scenarios, industrial electricity consumption scenarios, commercial electricity consumption scenarios, etc. For the user electricity consumption characteristic data, it can be represented by a feature vector. Each user electricity consumption characteristic data consists of the 96-point curves of the user electricity consumption power, voltage, and current and their characteristic indexes. Taking the voltage data as an example, the user electricity consumption characteristic data of one user can be expressed as [voltage1, voltage2, voltage3], and this feature vector represents the voltage data of this user at three different acquisition moments. Or, taking the voltage data and current data as an example, the user electricity consumption characteristic data of one user can be expressed as [voltage1, current1, voltage2, current2, voltage3, current3], and this feature vector represents the voltage data and current data of this user at three different acquisition moments.

[0153] For the clustering result data of this solution, taking the power data as an example, the user electricity consumption characteristic data of user 1 can be expressed as [power1, power2, power3], the user electricity consumption characteristic data of user 2 can be expressed as [power4, power5, power6], and the user electricity consumption characteristic data of user 3 can be expressed as [power7, power8, power9]. After the clustering method of this patent, the final clustering result can be [user 1 and user 2, user 3], that is, it is confirmed that user 1 and user 2 are one cluster, and user 3 is one cluster.

[0154] Further, taking the above-mentioned User 1, User 2, and User 3 as examples, the clustering process can be as follows: Determine three first clustering numbers, which are 1, 2, and 3 respectively. According to the three first clustering numbers, obtain three first clustering results. The three first clustering results cluster User 1, User 2, and User 3 into 1 category, 2 categories, and 3 categories respectively. Determine the clustering analysis evaluation index of each first clustering result among the three first clustering results, obtain 3 clustering analysis evaluation indexes, and take the first clustering number corresponding to the maximum value among the 3 clustering analysis evaluation indexes as the target clustering number. In the embodiments of the present application, the target clustering number can be 2. Next, determine multiple initial cluster center sets. The number of initial cluster centers in each initial cluster center set is 2. For one of the initial cluster center sets, its initial cluster centers can be expressed as [Power 11, Power 12, Power 13] and [Power 14, Power 15, Power 16]. Obtain multiple second clustering results according to the multiple initial cluster center sets. The multiple second clustering results can be expressed as at least one of the following three: [User 1 and User 2, User 3], [User 1, User 2 and User 3], [User 1 and User 3, User 2]. Perform several position iterative calculations, that is, for each second clustering result, if is 2, then for the first position iterative calculation, the above-mentioned initial cluster centers [Power 11, Power 12, Power 13] and [Power 14, Power 15, Power 16] can be updated to [Power 111, Power 121, Power 131] and [Power 141, Power 151, Power 161] respectively. According to the objective function, if the iterative priority of the updated cluster center set is the highest, then take the updated cluster center set as the target cluster center set. Finally, calculate the Euclidean distances between the power data of each user in [Power 1, Power 2, Power 3], [Power 4, Power 5, Power 6], and [Power 7, Power 8, Power 9] and the target cluster center set [Power 111, Power 121, Power 131] and [Power 141, Power 151, Power 161] respectively, and obtain six distances. If the distance between [Power 1, Power 2, Power 3] and the target cluster center [Power 111, Power 121, Power 131] is closer among the six distances, while the distances between [Power 4, Power 5, Power 6] and [Power 7, Power 8, Power 9] and [Power 141, Power 151, Power 161] are closer, then the target clustering result is [User 1, User 2 and User 3].

[0155] Regarding the technical effects that can be achieved by this solution, when clustering the user's electricity consumption characteristic data, this solution can improve the clustering efficiency while ensuring the clustering accuracy. Exemplarily, the traditional clustering method is to cluster the clustering data according to multiple different numbers of clusters. Therefore, when dealing with clustering data involving a large number of different electricity consumption scenarios and user groups, if it is necessary to perform position iteration on the clustering results corresponding to multiple different numbers of clusters to ensure the clustering accuracy, it will consume a large amount of computing time and resources, thereby reducing the clustering efficiency. In this solution, the target number of clusters is determined through pre-clustering, thus avoiding the need to perform position iteration on the clustering results corresponding to multiple different numbers of clusters. Only the clustering results corresponding to the target number of clusters need to be subjected to position iteration, which improves the clustering efficiency while ensuring the clustering accuracy. In addition, this patent introduces a random adjustment strategy and an adaptive model update algorithm parameter in the position iteration part to achieve more accurate, efficient, and stable clustering of the user's electricity consumption characteristics.

[0156] In a possible embodiment, after determining the target clustering result of the user's electricity consumption characteristic dataset, the user-side resource configuration is optimized according to the target clustering result to improve the overall operation efficiency and stability of the power system.

[0157] Exemplarily, based on the target clustering result, an electricity consumption behavior characteristic analysis and a load characteristic analysis are performed on at least one user group and at least one electricity consumption scenario corresponding to the user's electricity consumption characteristic data, and the electricity consumption behavior pattern and load characteristics of each user group in each electricity consumption scenario are obtained. Among them, the electricity consumption behavior pattern includes the electricity consumption power, electricity consumption duration, and electricity consumption frequency during peak, valley, and flat periods. For example, industrial users may have high-power electricity consumption requirements during specific periods on weekdays, while residential users show electricity consumption peaks at night and on holidays. Among them, the load characteristics include the load magnitude, load change rate, and power factor. For example, some commercial users may have a large inductive load, resulting in a low power factor, while some high-tech enterprises have high requirements for power quality and are more sensitive to load changes. Thus, according to the electricity consumption behavior pattern and load characteristics of each user group in each electricity consumption scenario, the configuration schemes of distributed energy devices and energy storage devices for different user groups, as well as the energy storage schemes of different user groups in different electricity consumption scenarios, can be determined.

[0158] Furthermore, according to the resource characteristics and energy storage characteristics of each user group's location, determine the types of distributed energy devices for each user group. For example, in areas with sufficient sunlight, large-scale solar photovoltaic power generation systems are configured for commercial buildings and industrial users. In remote areas rich in wind resources, small wind power generation devices are installed for rural users or independent industrial facilities. And, based on the historical electricity consumption data and load characteristics of each user group, calculate the installed capacity of distributed energy devices. For example, for industrial users with stable and large electricity loads, ensure that the installed capacity of distributed energy can meet their electricity demand during some peak periods. For residential users, based on the average household electricity power and roof area, reasonably configure the number of solar panels to achieve self-use of generated electricity and feed the surplus electricity back to the grid.

[0159] Furthermore, for the electricity demand of different user groups, select appropriate energy storage technologies. For example, for users such as financial data centers with extremely high requirements for response speed, use lithium battery energy storage systems. For industrial users pursuing low-cost and large-capacity energy storage, consider flow battery or lead-acid battery energy storage systems. For users mainly relying on renewable energy generation, such as distributed solar power plants, use lithium-ion battery energy storage systems to smooth the power generation fluctuations. By analyzing the peak-valley electricity difference and load fluctuation of users, determine the capacity of the energy storage system. For example, for industrial users with significant peak-valley differences, configure an energy storage system capable of storing peak load electricity for several hours to achieve peak shaving and valley filling. For residential users, configure a smaller-capacity energy storage device according to the peak-valley characteristics of household electricity use to cope with short-term power outages or manage peak-valley electricity price differences.

[0160] In summary, in the embodiment of this application, first obtain the user electricity consumption characteristic data of at least one user group in at least one electricity consumption scenario to obtain a user electricity consumption characteristic data set. Then, according to at least one electricity consumption scenario and at least one user group, determine p first clustering numbers, and based on the p first clustering numbers, perform the first clustering on the user electricity consumption characteristic data set to obtain p first clustering results. Then, according to the p first clustering results, obtain the target first clustering result, and use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number. Next, according to the target clustering number, determine d initial clustering center sets, where the number of initial clustering centers in each initial clustering center set is the target clustering number, and based on each initial clustering center set among the d initial clustering center sets, perform the second clustering on the user electricity consumption characteristic data set to obtain d second clustering results. Then, perform the nth position iterative calculation to obtain the d third clustering results corresponding to the nth position iterative calculation, where n is the preset number of iterations. Next, according to the nth The d third clustering results corresponding to the position iteration calculation are obtained to determine the target cluster center set. Finally, according to the distances between each data in the user power consumption characteristic dataset and each target cluster center in the target cluster center set, the target clustering result of the user power consumption characteristic dataset is determined. Thus, p first clustering results are obtained through the p first clustering numbers, and the first clustering number of the target first clustering result among the p first clustering results is used as the target clustering number. By determining the target clustering number, the clustering accuracy during subsequent clustering can be guaranteed. Then, d second clustering results are obtained according to the target clustering number and the d initial cluster center sets, and position iteration calculation is performed based on the d second clustering results to determine the target cluster center set. The clustering accuracy is further improved through the position iteration calculation. Finally, according to the distances between each data in the user power consumption characteristic dataset and each target cluster center in the target cluster center set, the target clustering result is obtained, which can improve the clustering efficiency when clustering the user power consumption characteristics.

[0161] The method of the embodiment of the present invention is described in detail above. Below, an apparatus of the embodiment of the present invention is provided.

[0162] Refer to Figure 7 , Figure 7 is a schematic structural diagram of a user power consumption characteristic clustering apparatus provided by an embodiment of the present application. As Figure 7 shown, the user power consumption characteristic clustering apparatus 800 includes an acquisition unit 801 and a processing unit 802;

[0163] The acquisition unit 801 is configured to acquire user power consumption characteristic data of at least one user group in at least one power consumption scenario to obtain a user power consumption characteristic dataset;

[0164] The processing unit 802 is configured to determine p first clustering numbers according to at least one power consumption scenario and at least one user group;

[0165] Perform first clustering on the user power consumption characteristic dataset according to the p first clustering numbers to obtain p first clustering results;

[0166] Obtain a target first clustering result according to the p first clustering results;

[0167] Use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number;

[0168] Determine d initial cluster center sets according to the target clustering number; the number of initial cluster centers in each initial cluster center set is the target clustering number;

[0169] Perform second clustering on the user power consumption characteristic dataset according to each initial cluster center set in the d initial cluster center sets to obtain d second clustering results;

[0170] Perform times of position iteration calculations according to the d second clustering results, and obtain d third clustering results corresponding to the th position iteration calculation;

[0171] According to the d third clustering results corresponding to the th position iteration calculation, determine the target clustering center set;

[0172] According to the distances between each data in the user power consumption characteristic dataset and each target clustering center in the target clustering center set, determine the target clustering result of the user power consumption characteristic dataset.

[0173] In a possible embodiment, when performing times of position iteration calculations according to the d second clustering results and obtaining d third clustering results corresponding to the th position iteration calculation, the processing unit 802 is specifically configured to:

[0174] For the kth position iteration calculation in the times of position iteration calculations, obtain the corresponding positions of the d second clustering results during the kth position iteration calculation, and obtain d initial positions; k is less than or equal to ;

[0175] Determine the attraction coefficient and step factor of the d second clustering results during the kth position iteration calculation;

[0176] According to the objective function and the d initial positions, determine the initial position iteration priorities of the d second clustering results during the kth position iteration calculation, and obtain d initial position iteration priorities;

[0177] According to the d initial position iteration priorities, determine the position iteration order of the d second clustering results during the kth position iteration calculation;

[0178] According to the d initial positions, attraction coefficient, step factor, and d initial position iteration priorities, determine the reference position where the ith second clustering result among the d second clustering results is attracted by the jth second clustering result; the initial position iteration priority of the jth second clustering result is higher than that of the ith second clustering result;

[0179] According to the position iteration order, determine the target number of the second clustering results with an initial position iteration priority higher than that of the ith second clustering result among the d second clustering results;

[0180] Determine the sorting position serial number of the jth second clustering result in the position iteration order;

[0181] Determine the reference probability that the \(i\)-th second clustering result is attracted by the \(j\)-th second clustering result according to the target quantity and the sorting position serial number;

[0182] Determine the target position of the \(i\)-th second clustering result during the \(k\)-th position iteration calculation according to the reference position and the reference probability;

[0183] Obtain \(d\) third clustering results corresponding to the \(k\)-th position iteration calculation according to the target positions of each of the \(d\) second clustering results during the \(k\)-th position iteration calculation.

[0184] In a possible embodiment, in terms of determining the reference position that the \(i\)-th second clustering result among the \(d\) second clustering results is attracted by the \(j\)-th second clustering result according to the \(d\) initial positions, the attraction coefficient, the step factor, and the iteration priority of the \(d\) initial positions, the processing unit 802 is specifically configured to:

[0185] Determine the interval distance between the \(i\)-th second clustering result and the \(j\)-th second clustering result according to the \(d\) initial positions;

[0186] Determine the first position change amount according to the interval distance and the step factor;

[0187] Determine the second position change amount according to the interval distance and the attraction coefficient;

[0188] Determine the reference position according to the initial position, the first position change amount, and the second position change amount of the \(i\)-th second clustering result.

[0189] In a possible embodiment, in terms of determining the reference probability that the \(i\)-th second clustering result is attracted by the \(j\)-th second clustering result according to the target quantity and the sorting position serial number, the processing unit 802 is specifically configured to:

[0190] Obtain the sorting and screening coefficient;

[0191] Determine the sorting and screening threshold according to the sorting and screening coefficient and the value of \(d\);

[0192] If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is less than or equal to the sorting and screening threshold, or the target quantity is less than or equal to the sorting and screening threshold, the reference probability is the first preset probability;

[0193] If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is greater than the sorting and screening threshold, determine the reference probability according to the difference between the target quantity and the sorting position serial number, the sorting and screening threshold, and the target quantity.

[0194] In a possible embodiment, in terms of according to the In terms of determining the target cluster center set by calculating the d third clustering results corresponding to the position iteration, the processing unit 802 is specifically configured to:

[0195] Get the The k target positions of the corresponding d third clustering results are calculated iteratively;

[0196] According to the objective function and The k target positions of the corresponding d third clustering results are calculated iteratively to determine the The d target position iteration priorities of the d third clustering results corresponding to the position iteration calculation;

[0197] Get d second clustering results in The d initial position iteration priorities for each position iteration calculation in the position iteration calculation;

[0198] According to The d target position iteration priorities of the d third clustering results corresponding to the position iteration calculation, and the d second clustering results in The d initial position iteration priorities in each position iteration calculation in the position iteration calculation are used to obtain the highest position iteration priority;

[0199] The cluster center set of the third clustering result corresponding to the highest position iteration priority is used as the target cluster center set.

[0200] In a possible embodiment, in obtaining a target first clustering result according to the p first clustering results, the processing unit 802 is specifically configured to:

[0201] Get the cluster analysis evaluation function;

[0202] Determine a cluster analysis evaluation index for each of the p first clustering results according to the cluster analysis evaluation function, and obtain p cluster analysis evaluation indexes;

[0203] The first clustering result corresponding to the maximum value among the p clustering analysis evaluation indicators is taken as the target first clustering result.

[0204] In a possible embodiment, in determining the cluster analysis evaluation index of each of the p first clustering results according to the cluster analysis evaluation function to obtain the p cluster analysis evaluation indexes, the processing unit 802 is specifically used to:

[0205] Obtaining a first sample quantity of a user power consumption characteristic data set;

[0206] Determine a sample mean point according to the first sample quantity and the user power consumption characteristic data set;

[0207] Obtain w clusters of the reference first clustering result; the reference first clustering result is any one of the p first clustering results; w is a positive integer;

[0208] Determine the second sample quantity and the sample center point of each of the w clusters, obtaining w second sample quantities and w sample center points;

[0209] Determine the between-class scatter value of the reference first clustering result according to the w second sample quantities, the w sample center points, and the sample mean point;

[0210] Determine the within-class scatter value of the reference first clustering result according to the distance between each sample point in each of the w clusters and the sample center point;

[0211] Determine the clustering analysis evaluation index of the reference first clustering result according to the clustering analysis evaluation function, the between-class scatter value, the within-class scatter value, the value of w, and the first sample quantity;

[0212] Obtain p clustering analysis evaluation indexes according to the p first clustering results and the clustering analysis evaluation index of the reference first clustering result.

[0213] Refer to Figure 8 , Figure 8 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 8 shown, the electronic device 900 includes a transceiver 901, a processor 902, and a memory 903, which are connected through a bus 904. The memory 903 is used to store computer programs and data, and can transmit the data stored in the memory 903 to the processor 902. Among them, the electronic device 900 can be the above-mentioned user power consumption characteristic clustering device 800, and the processor 902 can be the above-mentioned obtaining unit 801 and processing unit 802.

[0214] The processor 902 is used to read the computer program in the memory 903 and perform the following operations:

[0215] Obtain the user power consumption characteristic data of at least one user group in at least one power consumption scenario, obtaining a user power consumption characteristic data set;

[0216] Determine p first clustering quantities according to at least one power consumption scenario and at least one user group;

[0217] Perform a first clustering on the user power consumption characteristic data set according to the p first clustering quantities, obtaining p first clustering results;

[0218] Obtain a target first clustering result according to the p first clustering results;

[0219] Use the first clustering quantity corresponding to the target first clustering result among the p first clustering quantities as the target clustering quantity;

[0220] Determine d initial cluster center sets according to the target number of clusters; the number of initial cluster centers in each initial cluster center set is the target number of clusters;

[0221] Perform a second clustering on the user power consumption characteristic data set according to each initial cluster center set in the d initial cluster center sets, and obtain d second clustering results;

[0222] Perform times of position iterative calculations according to the d second clustering results, and obtain d third clustering results corresponding to the th position iterative calculation;

[0223] According to the d third clustering results corresponding to the th position iterative calculation, determine the target cluster center set;

[0224] Determine the target clustering result of the user power consumption characteristic data set according to the distance between each data in the user power consumption characteristic data set and each target cluster center in the target cluster center set.

[0225] In a possible embodiment, in performing times of position iterative calculations according to the d second clustering results and obtaining d third clustering results corresponding to the th position iterative calculation, the processor 902 is specifically configured to perform the following operations:

[0226] For the th position iterative calculation in the times of position iterative calculations, obtain the corresponding positions of the d second clustering results in the kth position iterative calculation, and obtain d initial positions; k is less than or equal to

[0227] Determine the attraction coefficient and step factor of the d second clustering results in the kth position iterative calculation;

[0228] According to the objective function and the d initial positions, determine the initial position iteration priorities of the d second clustering results in the kth position iterative calculation, and obtain d initial position iteration priorities;

[0229] According to the d initial position iteration priorities, determine the position iteration order of the d second clustering results in the kth position iterative calculation;

[0230] According to the d initial positions, attraction coefficients, step factors, and d initial position iteration priorities, determine the reference position where the ith second clustering result in the d second clustering results is attracted by the jth second clustering result; the initial position iteration priority of the jth second clustering result is higher than that of the ith second clustering result;

[0231] Determine the target quantity in the d second clustering results whose initial position iteration priority is higher than that of the i-th second clustering result according to the position iteration order;

[0232] Determine the sorting position serial number of the j-th second clustering result in the position iteration order;

[0233] Determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result according to the target quantity and the sorting position serial number;

[0234] Determine the target position of the i-th second clustering result in the k-th position iteration calculation according to the reference position and the reference probability;

[0235] Obtain d third clustering results corresponding to the k-th position iteration calculation according to the target positions of each second clustering result in the d second clustering results in the k-th position iteration calculation.

[0236] In a possible embodiment, in terms of determining the reference position at which the i-th second clustering result in the d second clustering results is attracted by the j-th second clustering result according to the d initial positions, the attraction coefficient, the step factor, and the d initial position iteration priorities, the processor 902 is specifically configured to perform the following operations:

[0237] Determine the interval distance between the i-th second clustering result and the j-th second clustering result according to the d initial positions;

[0238] Determine the first position change amount according to the interval distance and the step factor;

[0239] Determine the second position change amount according to the interval distance and the attraction coefficient;

[0240] Determine the reference position according to the initial position, the first position change amount, and the second position change amount of the i-th second clustering result.

[0241] In a possible embodiment, in terms of determining the reference probability that the i-th second clustering result is attracted by the j-th second clustering result according to the target quantity and the sorting position serial number, the processor 902 is specifically configured to perform the following operations:

[0242] Obtain the sorting and screening coefficient;

[0243] Determine the sorting and screening threshold according to the sorting and screening coefficient and the value of d;

[0244] If the target quantity is greater than the sorting and screening threshold, and the sorting position serial number is less than or equal to the sorting and screening threshold, or, if the target quantity is less than or equal to the sorting and screening threshold, the reference probability is the first preset probability;

[0245] If the number of targets is greater than the sorting and screening threshold, and the sorting position serial number is greater than the sorting and screening threshold, determine the reference probability according to the difference between the number of targets and the sorting position serial number, the sorting and screening threshold, and the number of targets.

[0246] In a possible embodiment, in terms of calculating the corresponding d third clustering results according to the th position iteration and determining the target clustering center set, the processor 902 is specifically configured to perform the following operations:

[0247] Obtain the k target positions of the corresponding d third clustering results calculated by the th position iteration;

[0248] According to the objective function and the k target positions of the corresponding d third clustering results calculated by the th position iteration, determine the d target position iteration priorities of the corresponding d third clustering results calculated by the th position iteration;

[0249] Obtain the d initial position iteration priorities of each position iteration calculation in the th position iteration calculation of the d second clustering results;

[0250] According to the d target position iteration priorities of the corresponding d third clustering results calculated by the th position iteration, and the d initial position iteration priorities of each position iteration calculation in the th position iteration calculation of the d second clustering results, obtain the highest position iteration priority;

[0251] Use the clustering center set of the third clustering result corresponding to the highest position iteration priority as the target clustering center set.

[0252] In a possible embodiment, in terms of obtaining the target first clustering result according to the p first clustering results, the processor 902 is specifically configured to perform the following operations:

[0253] Obtain the clustering analysis evaluation function;

[0254] According to the clustering analysis evaluation function, determine the clustering analysis evaluation index of each first clustering result among the p first clustering results, and obtain p clustering analysis evaluation indexes;

[0255] Use the first clustering result corresponding to the maximum value among the p clustering analysis evaluation indexes as the target first clustering result.

[0256] In a possible embodiment, in terms of determining the clustering analysis evaluation index of each first clustering result among the p first clustering results according to the clustering analysis evaluation function and obtaining p clustering analysis evaluation indexes, the processor 902 is specifically configured to perform the following operations:

[0257] Obtain the first sample quantity of the user's electricity consumption characteristic dataset;

[0258] Determine the sample mean point according to the first sample quantity and the user's electricity consumption characteristic dataset;

[0259] Obtain w clusters of the reference first clustering result; the reference first clustering result is any one of the p first clustering results; w is a positive integer;

[0260] Determine the second sample quantity and the sample center point of each of the w clusters to obtain w second sample quantities and w sample center points;

[0261] Determine the between-class scatter value of the reference first clustering result according to the w second sample quantities, the w sample center points and the sample mean point;

[0262] Determine the within-class scatter value of the reference first clustering result according to the distance between each sample point in each of the w clusters and the sample center point;

[0263] Determine the clustering analysis evaluation index of the reference first clustering result according to the clustering analysis evaluation function, the between-class scatter value, the within-class scatter value, the value of w and the first sample quantity;

[0264] Obtain p clustering analysis evaluation indexes according to the p first clustering results and the clustering analysis evaluation index of the reference first clustering result.

[0265] An embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any one of the user electricity consumption characteristic clustering methods described in the foregoing method embodiments.

[0266] An embodiment of the present application also provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the user electricity consumption characteristic clustering methods described in the foregoing method embodiments.

[0267] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0268] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not elaborated in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0269] In several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or modules can be in electrical or other forms.

[0270] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0271] In addition, in each embodiment of the present application, the functional modules can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software program modules.

[0272] If the above integrated module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. And the aforementioned memory includes: USB flash drives, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), mobile hard disks, magnetic disks, or optical discs and other media that can store program codes.

[0273] The above has introduced the embodiments of the present application in detail. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

Claims

1. A method for clustering user electricity consumption characteristics, characterized in that Including: Obtain user electricity consumption characteristic data of at least one user group in at least one electricity consumption scenario to obtain a user electricity consumption characteristic data set; the user electricity consumption characteristic data is used to reflect electricity consumption power, voltage, and current. Determine p first clustering numbers according to the at least one electricity consumption scenario and the at least one user group. Perform first clustering on the user electricity consumption characteristic data set according to the p first clustering numbers to obtain p first clustering results. Obtain a target first clustering result according to the p first clustering results. Use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number. Determine d initial clustering center sets according to the target clustering number; the number of initial clustering centers in each initial clustering center set is the target clustering number. Perform second clustering on the user electricity consumption characteristic data set according to each initial clustering center set among the d initial clustering center sets to obtain d second clustering results. Perform times of position iterative calculations according to the d second clustering results, and obtain d third clustering results corresponding to the th position iterative calculation, where is the preset number of iterations; According to the d third clustering results corresponding to the position iteration of the th time are calculated, and a target clustering center set is determined; Determine the target clustering result of the user electricity consumption characteristic data set according to the distance between each data in the user electricity consumption characteristic data set and each target clustering center in the target clustering center set. The target clustering result is used to determine the electricity consumption behavior patterns and load characteristics of the at least one user group in the at least one electricity consumption scenario, so as to determine the types of distributed energy devices and the capacities of distributed energy storage devices corresponding to each user group. Among them, performing times of position iterative calculations according to the d second clustering results to obtain d third clustering results corresponding to the th position iterative calculation, specifically including: For the k-th position iteration calculation in the secondary position iteration calculation, obtain the corresponding positions of the d second clustering results in the k-th position iteration calculation, and obtain d initial positions; k is less than or equal to ; Determine the attraction coefficient and step factor of the d second clustering results during the k-th position iteration calculation. Determine the initial position iteration priority of the d second clustering results during the k-th position iteration calculation according to the objective function and the d initial positions, and obtain d initial position iteration priorities. Determine the position iteration order of the d second clustering results during the k-th position iteration calculation according to the d initial position iteration priorities. Determine the reference position where the i-th second clustering result among the d second clustering results is attracted by the j-th second clustering result according to the d initial positions, the attraction coefficient, the step factor, and the d initial position iteration priorities; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result. Determine the target number of the d second clustering results whose initial position iteration priority is higher than that of the i-th second clustering result according to the position iteration order. Determine the sorting position serial number of the j-th second clustering result in the position iteration order. Determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result according to the target number and the sorting position serial number. Determine the target position of the i-th second clustering result during the k-th position iteration calculation according to the reference position and the reference probability. Obtain d third clustering results corresponding to the k-th position iteration calculation according to the target positions of each second clustering result among the d second clustering results during the k-th position iteration calculation.

2. The method according to claim 1, wherein Determining a reference position at which the \(i\)-th second clustering result among the \(d\) second clustering results is attracted by the \(j\)-th second clustering result according to the \(d\) initial positions, the attraction coefficient, the step factor, and the iteration priorities of the \(d\) initial positions includes: Determining a separation distance between the \(i\)-th second clustering result and the \(j\)-th second clustering result according to the \(d\) initial positions; Determining a first position change amount according to the separation distance and the step factor; Determining a second position change amount according to the separation distance and the attraction coefficient; Determining the reference position according to the initial position of the \(i\)-th second clustering result, the first position change amount, and the second position change amount; 3. The method according to claim 1, characterized in that Determining a reference probability at which the \(i\)-th second clustering result is attracted by the \(j\)-th second clustering result according to the target quantity and the sorting position serial number includes: Obtaining a sorting and screening coefficient; Determining a sorting and screening threshold according to the sorting and screening coefficient and the value of \(d\); If the target quantity is greater than the sorting and screening threshold and the sorting position serial number is less than or equal to the sorting and screening threshold, or if the target quantity is less than or equal to the sorting and screening threshold, the reference probability is a first preset probability; If the target quantity is greater than the sorting and screening threshold and the sorting position serial number is greater than the sorting and screening threshold, determining the reference probability according to the difference between the target quantity and the sorting position serial number, the sorting and screening threshold, and the target quantity; 4. The method according to any one of claims 1-3, characterized in that, The corresponding d third clustering results are calculated according to the th position iteration, and a target clustering center set is determined, including: Obtain the k target positions of the d third clustering results corresponding to the According to the objective function and the k target positions of d third clustering results corresponding to the th position iteration are calculated, and the d target position iteration priorities of d third clustering results corresponding to the th position iteration are determined; Obtain the d initial position iteration priorities during each position iteration calculation among the position iteration calculations of the d second clustering results; According to the d target position iteration priorities corresponding to the d third clustering results calculated by the ith position iteration, and the d initial position iteration priorities of the d second clustering results in each position iteration calculation during the ith position iteration calculation are obtained to get the highest position iteration priority; Taking the set of cluster centers of the third clustering result corresponding to the highest position iteration priority as the target set of cluster centers; 5. The method according to claim 1, wherein Obtaining a target first clustering result according to the \(p\) first clustering results includes: Obtaining a clustering analysis evaluation function; Determining a clustering analysis evaluation index for each of the \(p\) first clustering results according to the clustering analysis evaluation function, obtaining \(p\) clustering analysis evaluation indexes; Taking the first clustering result corresponding to the maximum value among the \(p\) clustering analysis evaluation indexes as the target first clustering result; 6. The method according to claim 5, wherein Determining a clustering analysis evaluation index for each of the \(p\) first clustering results according to the clustering analysis evaluation function, obtaining \(p\) clustering analysis evaluation indexes, includes: Obtaining a first sample quantity of the user power consumption characteristic data set; Determining a sample mean point according to the first sample quantity and the user power consumption characteristic data set; Obtaining \(w\) clusters of a reference first clustering result; the reference first clustering result is any one of the \(p\) first clustering results; \(w\) is a positive integer; Determining a second sample quantity and a sample center point for each of the \(w\) clusters, obtaining \(w\) second sample quantities and \(w\) sample center points; Determining an inter-class dispersion value of the reference first clustering result according to the \(w\) second sample quantities, the \(w\) sample center points, and the sample mean point; Determining an intra-class dispersion value of the reference first clustering result according to the distance between each sample point in each of the \(w\) clusters and the sample center point; Determine the clustering analysis evaluation index of the reference first clustering result according to the clustering analysis evaluation function, the between-class scatter value, the within-class scatter value, the value of w, and the number of the first samples. Obtain the p clustering analysis evaluation indexes according to the p first clustering results and the clustering analysis evaluation index of the reference first clustering result.

7. A user electricity consumption characteristic clustering device, characterized in that, The device includes an acquisition unit and a processing unit. The acquisition unit is configured to obtain user power consumption characteristic data of at least one user group in at least one power consumption scenario, so as to obtain a user power consumption characteristic data set. The processing unit is configured to determine p first clustering numbers according to the at least one power consumption scenario and the at least one user group. Perform a first clustering on the user power consumption characteristic data set according to the p first clustering numbers, so as to obtain p first clustering results. Obtain a target first clustering result according to the p first clustering results. Use the first clustering number corresponding to the target first clustering result among the p first clustering numbers as the target clustering number. Determine d initial clustering center sets according to the target clustering number; the number of initial clustering centers in each initial clustering center set is the target clustering number. Perform a second clustering on the user power consumption characteristic data set according to each initial clustering center set among the d initial clustering center sets, so as to obtain d second clustering results. Perform times of position iteration calculations according to the d second clustering results, and obtain d third clustering results corresponding to the th position iteration calculation, where is the preset number of iterations; According to the d third clustering results corresponding to the position iteration of the Determine the target clustering result of the user power consumption characteristic data set according to the distance between each data in the user power consumption characteristic data set and each target clustering center in the target clustering center set, where the target clustering result is used to determine the power consumption behavior pattern and load characteristic of the at least one user group in the at least one power consumption scenario, so as to determine the type of distributed energy device and the capacity of distributed energy storage device corresponding to each user group. Among them, in performing times of position iterative calculations according to the d second clustering results to obtain d third clustering results corresponding to the th position iterative calculation, the processing unit is specifically configured to: For the k-th position iteration calculation in the subsequent position iteration calculations, obtain the corresponding positions of the d second clustering results in the k-th position iteration calculation, to obtain d initial positions; k is less than or equal to Determine the attraction coefficient and the step factor of the d second clustering results during the k-th position iteration calculation. Determine the initial position iteration priority of the d second clustering results during the k-th position iteration calculation according to the objective function and the d initial positions, so as to obtain d initial position iteration priorities. Determine the position iteration order of the d second clustering results during the k-th position iteration calculation according to the d initial position iteration priorities. Determine the reference position where the i-th second clustering result among the d second clustering results is attracted by the j-th second clustering result according to the d initial positions, the attraction coefficient, the step factor, and the d initial position iteration priorities; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result. Determine the target number of the d second clustering results whose initial position iteration priority is higher than that of the i-th second clustering result according to the position iteration order. Determine the sorting position serial number of the j-th second clustering result in the position iteration order. Determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result according to the target number and the sorting position serial number. Determine the target position of the i-th second clustering result during the k-th position iteration calculation according to the reference position and the reference probability; Obtain d third clustering results corresponding to the k-th position iteration calculation according to the target positions of each second clustering result among the d second clustering results during the k-th position iteration calculation.

8. An electronic device, characterized in that, Comprising: A processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Power customer appeal hotspot analysis method and system based on user behavior pattern clustering

    CN118861695A