User power consumption characteristic clustering method and related device
Through the method of optimizing the clustering center through multiple rounds of clustering and iterative computing, the problem of low clustering efficiency of user power characteristics data is solved, efficient and accurate clustering results are achieved, and the operation efficiency and stability of the power system are improved.
Patent Information
- Application Number
- CN202510489867.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-04-18
AI Technical Summary
In the new power system, the clustering efficiency of user electricity characteristic data is low, making it difficult to accurately estimate the reasonable number of clusters, which affects the operating efficiency and stability of the power system.
By obtaining the power consumption characteristic data of the user group in different power consumption scenarios, the initial cluster number is determined, and the cluster center is optimized through multiple rounds of clustering and iterative calculations to improve clustering accuracy and efficiency.
While ensuring clustering accuracy, clustering efficiency is significantly improved, user-side resource configuration is optimized, and the overall operating efficiency and stability of the power system are improved.
Smart Images

Figure CN120011841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric power technology, and in particular to a user electricity consumption characteristic clustering method and related devices. Background Art
[0002] Against the backdrop of rapid construction of new power systems, accurate cluster analysis of user electricity consumption characteristics is crucial, as it helps optimize user-side resource allocation and improve the overall operating efficiency and stability of the power system.
[0003] However, user electricity consumption characteristic data often involve different electricity consumption scenarios and user groups. The reasonable number of clusters is difficult to accurately estimate, which leads to low clustering efficiency. Therefore, how to improve clustering efficiency while ensuring clustering accuracy is an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above problems, the embodiments of the present invention provide a user power consumption characteristic clustering method and related devices, which can improve clustering efficiency while ensuring clustering accuracy when clustering user power consumption characteristic data.
[0005] In a first aspect, an embodiment of the present invention provides a method for clustering user electricity consumption characteristics, including: 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 data set; Determining p first cluster numbers according to the at least one electricity usage scenario and the at least one user group; Performing first clustering on the user power consumption characteristic data set according to the p first cluster numbers to obtain p first clustering results; Obtaining a target first clustering result according to the p first clustering results; The first cluster number corresponding to the target first clustering result in the p first cluster numbers is used as the target cluster number; According to the target number of clusters, d initial cluster center sets are determined; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, performing a second clustering on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: is the preset number of iterations; According to the said Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center set; The target clustering result of the user power consumption characteristic data set is determined 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.
[0006] In a second aspect, an embodiment of the present invention provides a user power consumption characteristic clustering device, the device comprising an acquisition unit and a processing unit; 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 to obtain a user power consumption characteristic data set; The processing unit is configured to determine a number of p first clusters according to the at least one power usage scenario and the at least one user group; Performing first clustering on the user power consumption characteristic data set according to the p first cluster numbers to obtain p first clustering results; Obtaining a target first clustering result according to the p first clustering results; The first cluster number corresponding to the target first clustering result in the p first cluster numbers is used as the target cluster number; According to the target number of clusters, d initial cluster center sets are determined; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, performing a second clustering on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: is the preset number of iterations; According to the said Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center set; The target clustering result of the user power consumption characteristic data set is determined 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.
[0007] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein 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 performs the method described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method as described in the first aspect.
[0009] 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, and the computer is operable to cause the computer to execute the method described in the first aspect.
[0010] Implementing the embodiments of the present application has the following beneficial effects: In an implementation manner of the present application, user power consumption characteristic data of at least one user group in at least one power consumption scenario is first obtained to obtain a user power consumption characteristic data set, and then, based on at least one power consumption scenario and at least one user group, p first clustering numbers are determined, and based on the p first clustering numbers, the user power consumption characteristic data set is first clustered to obtain p first clustering results, and then, based on the p first clustering results, a target first clustering result is obtained, and the first clustering number corresponding to the target first clustering result in the p first clustering numbers is used as the target clustering number, and then, based on the target clustering number, d initial clustering center sets are determined, wherein 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 in the d initial clustering center sets, a second clustering is performed on the user power consumption characteristic data set to obtain d second clustering results, and then, based on the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: To preset the number of iterations, next, according to the The d third clustering results corresponding to the position iteration calculation are determined to determine the target cluster center set. Finally, the target clustering result of the user power characteristic data set is determined according to the distance between each data in the user power characteristic data set and each target cluster center in the target cluster center set. Thus, p first clustering results are determined by p first clustering numbers, and the first clustering number of the target first clustering results in the p first clustering results is used as the target clustering number. By determining the target clustering number, the clustering accuracy in the subsequent clustering can be guaranteed. Then, d second clustering results are obtained according to the target clustering number and d initial clustering center sets, and the 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 by the position iteration calculation. Finally, the target clustering result is obtained according to the distance between each data in the user power characteristic data set and each target cluster center in the target cluster center set. When clustering the user power characteristic data, the clustering efficiency can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0012] Figure 1 It is a schematic diagram of the architecture of a user power consumption characteristic clustering system provided in an embodiment of the present application; Figure 2 is a flow chart of a method for clustering user electricity consumption characteristics provided in an embodiment of the present application; Figure 3 is a schematic diagram of a user power consumption characteristic data set provided in an embodiment of the present application; Figure 4 is a schematic diagram of an initial cluster center set provided in an embodiment of the present application; Figure 5 is a schematic diagram of a target clustering result provided in an embodiment of the present application; Figure 6 is a schematic diagram of a location update provided in an embodiment of the present application; Figure 7 It is a structural schematic diagram of a user power consumption characteristic clustering device provided in an embodiment of the present application; Figure 8 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0014] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. 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 optionally includes steps or modules that are not listed, or optionally includes other steps or modules inherent to these processes, methods, products or devices.
[0015] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0016] See also Figure 1 , Figure 1 is a schematic diagram of the architecture of a user power consumption characteristic clustering system provided in an embodiment of the present application, such as Figure 1 As shown, the user power consumption characteristic clustering system includes a clustering model, which is used to cluster the user power consumption characteristic data set to obtain a target clustering result. The clustering model can implement the user power consumption characteristic clustering method provided in the embodiment of the present application.
[0017] See also Figure 2 , Figure 2 is a flow chart of a method for clustering user power consumption characteristics provided in an embodiment of the present application, such as Figure 2 As shown, the user power consumption characteristic clustering method provided in the embodiment of the present application includes but is not limited to the following steps: Step S101: acquiring 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; Step S102: determining p first cluster numbers according to at least one power usage scenario and at least one user group; Where p is the first clustering number; Step S103: performing first clustering on the user power consumption characteristic data set according to the p first clustering quantities to obtain p first clustering results; Step S104: obtaining a target first clustering result according to the p first clustering results; Step S105: taking the first cluster number corresponding to the target first clustering result among the p first cluster numbers as the target cluster number; Step S106: Determine d initial cluster center sets according to the target number of clusters; Among them, the number of initial cluster centers in each initial cluster center set is the target cluster number; Step S107: performing a second clustering on the user power consumption characteristic data set according to each of the d initial clustering center sets to obtain d second clustering results; Step S108: Perform clustering based on the d second clustering results. The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation; in, is the preset number of iterations; Step S109: According to Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center set; Step S110: determining a 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.
[0018] In a possible embodiment, a user power consumption characteristic data set is obtained, and 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 multiple user power consumption characteristic data, and each user power consumption characteristic data is composed of a 96-point curve of the user's power consumption, voltage, and current and its characteristic index. Each user power consumption characteristic data can be represented by a characteristic vector. In the 96-point curve of the user's power consumption, voltage, and current, the characteristic index is used to reflect some key parameters and statistics of the characteristics of these curves. The characteristic index includes but is not limited to the power curve characteristic index, the voltage curve characteristic index, and the current curve characteristic index. The power curve characteristic index includes at least one of the following: maximum value, minimum value, average value, peak-to-valley difference, and load rate. The voltage curve characteristic index includes at least one of the following: voltage deviation, maximum value, minimum value, average value, and voltage fluctuation. The current curve characteristic index includes at least one of the following: maximum value, minimum value, average value, current imbalance, and harmonic content.
[0019] In a possible embodiment, according to at least one power usage scenario and at least one user group, p first clustering numbers are determined, wherein p is the first clustering number, the first clustering number is used to indicate the number of times the user power usage characteristic data set is first clustered, and the first clustering number is used to indicate the number of first clustering centers in the first clustering result obtained by each first clustering, that is, the number of clustering categories. If the total number of power usage scenarios of at least one power usage scenario is large, or the total number of user groups of at least one user group is large, then a large number of first clustering numbers can be determined, for example, the first reference clustering number = the first weight × the total number of power usage scenarios + the second weight × the total number of user groups, the first clustering number is the value of the first reference clustering number rounded down or rounded up, the first weight and the second weight can be any number between 0 and 1, when the first weight and the second weight are both 1, the first clustering number can be the sum of the total number of power usage scenarios and the total number of user groups. If the first clustering number is 3, then the first clustering number can be 1, 2, 3, or 2, 3, 4, or 3, 5, 7, and so on.
[0020] In a possible embodiment, the user power characteristics data set is first clustered according to the number of p first clusters to obtain p first clustering results. If the value of p is 3, and the number of p first clusters is 2, 3, and 4 respectively, then the user power characteristics data set is first clustered three times, and the number of first cluster centers in the three first clustering results obtained is 2, 3, and 4 respectively, that is, the user power characteristics data set is divided into two categories, three categories, and four categories respectively. When the user power characteristics data set is first clustered, a bottom-up clustering order or a top-down clustering order can be adopted. For example, when a bottom-up clustering order is adopted, each clustering object, that is, each curve, is first treated as a separate category, and the distance between each two curves is calculated. The two curves with the smallest distance are merged into a new category until the current cluster category is consistent with the number of first clusters required for the current clustering. Then, clustering is stopped to obtain the first clustering result corresponding to the number of first clusters required for the current clustering.
[0021] For example, see Figure 3 , Figure 3 is a schematic diagram of a user power consumption characteristic data set provided in an embodiment of the present application, such as Figure 3 The user power consumption characteristic data set shown in the figure includes the first to sixth curves. When the value of p is 3, the number of p first clusters can be 2, 3, and 4 respectively. When the user power consumption characteristic data set is first clustered, when the number of the first clusters is 4, the second curve and the third curve in the first to sixth curves can be merged into a new class, and the fourth curve and the fifth curve in the first to sixth curves can be merged into a new class, so that the first clustering result when the number of the first clusters 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 number of the first clusters is 3, the sixth curve can be merged into a new class. The first curve and the fourth curve and the fifth curve are merged into a new class, or the first curve and the second curve and the third curve can be merged into a new class, so that the first clustering result when the number of first clusters 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 each two curves; when the number of first clusters is 2, the first clustering result when the number of first clusters is 2 can be [the first curve, the second curve and the third curve, the fourth curve, the fifth curve and the sixth curve].
[0022] In a possible embodiment, a target first clustering result is obtained based on p first clustering results, and the first cluster number corresponding to the target first clustering result in the p first clustering numbers is used as the target clustering number, firstly, a cluster analysis evaluation function is determined, and then, based on the cluster analysis evaluation function, a cluster analysis evaluation index of each first clustering result in the p first clustering results is determined to obtain p cluster analysis evaluation indexes, and the first clustering result corresponding to the maximum value in the p cluster analysis evaluation indexes is used as the target first clustering result, and the first cluster number corresponding to the target first clustering result in the p first clustering numbers is used as the target clustering number. For example, when the value of p is 3, the p first clustering numbers can be 2, 3, and 4, respectively. According to the cluster analysis evaluation function, the p cluster analysis evaluation indexes are determined to be 10, 20, and 15, respectively. Then, the first clustering result with a cluster analysis evaluation index of 20 is used as the target first clustering result, and the first cluster number corresponding to the target first clustering result, that is, 3, is used as the target cluster number.
[0023] In a possible embodiment, d initial cluster center sets are determined based on the target number of clusters, wherein the number of initial cluster centers in each initial cluster center set is the target number of clusters. The d initial cluster center sets can be randomly selected or selected based on the density of data in the user power consumption characteristic data set to ensure that each initial cluster center in each initial cluster center set is as close as possible to the center point of different cluster categories. For example, when the target number of clusters is 3, the three data areas with the highest density of data in the user power consumption characteristic data set can be determined first, and each initial cluster center set includes 3 initial cluster centers, which are selected from the three data areas respectively.
[0024] For example, see Figure 4 , Figure 4 Schematic diagram of an initial cluster center set provided in an embodiment of the present application. Figure 4 As shown, the distribution of multiple data in the user power consumption characteristic data set is shown by the hollow points in the figure, and each hollow point represents a user power consumption characteristic data. When the target number of clusters is 3, the three data areas with the highest density of data in the user power consumption characteristic data set are the first data area, the second data area, and the third data area, respectively. The three initial clustering centers selected from the three data areas can be any positions in the three data areas. For example, the three solid points in the figure can be selected as the three initial clustering centers, among which the initial clustering center in the first data area is the first initial clustering center, the initial clustering center in the second data area is the second initial clustering center, and the initial clustering center in the third data area is the third initial clustering center. The first initial clustering center, the second initial clustering center, and the third initial clustering center constitute an initial clustering center set.
[0025] In a possible embodiment, according to each initial clustering center set in d initial clustering center sets, the user power consumption characteristic data set is subjected to a second clustering to obtain d second clustering results. First, for each initial clustering center set, all data in the user power consumption characteristic data set are divided into each initial clustering center with the closest Euclidean distance. Each initial clustering 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 smallest sum of distances is selected as the new cluster center, that is, the new cluster center. The above steps are repeated until the cluster center does not change. At this time, the second clustering result corresponding to the initial clustering center set is obtained. Furthermore, according to each initial clustering center set in the d initial clustering center sets, the user power consumption characteristic data set is subjected to a second clustering to obtain d second clustering results.
[0026] In a possible embodiment, according to the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: is the preset number of iterations. The iterative calculation result of each position includes d reference cluster center sets. The d third clustering results correspond to the d reference cluster center sets one by one. Each third clustering result corresponds to a reference cluster center set. The d third clustering results corresponding to the second position iteration calculation are used to determine the target cluster center set. The target clustering result of the user power consumption characteristic data set is determined based on the Euclidean distance between each data in the user power consumption characteristic data set and each target cluster center in the target cluster center set. First, the objective function is determined. The objective function is used to measure the clustering effect of each second clustering result in 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 low initial position iteration priority will move closer to the cluster center set corresponding to the second clustering result with a high initial position iteration priority to obtain a new cluster center set, which is the reference cluster center set. Since each position iteration calculation corresponds to d reference cluster center sets, in After iterative calculation of the position, we get A reference cluster center set, The reference cluster center set with the best clustering effect in the reference cluster center set is used as the target cluster center set. Finally, 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, the target cluster center to which each data belongs is determined, and then the target clustering result of the user power consumption characteristic data set is obtained. Furthermore, if each data in the user power consumption characteristic data set and each target cluster center in the target cluster center set are represented in the form of a feature vector, then the distance between each data in the user power consumption characteristic data set and each target cluster center in the target cluster center set can be calculated as follows: for the first data in a user power consumption characteristic data set and the first target cluster center in the target cluster center set, and the feature vector of the first data is [ , 】, the eigenvector of the first target cluster center is
,
[0027] For example, see Figure 5 , Figure 5 is a schematic diagram of a target clustering result provided in an embodiment of the present application. Figure 5 As shown, the distribution of multiple data in the user power consumption characteristic data set is shown in the hollow points in the figure. Each hollow point represents a user power consumption characteristic data. When the number of target clusters is 3, the target cluster center set is Figure 5 When the first target cluster center, the second target cluster center and the third target cluster center are calculated, the distances between the first data and the first target cluster center, the second target cluster center and the third target cluster center in the figure are the first distance, the second distance and the third distance respectively, wherein the second distance < the third distance < the first distance, thus, the target cluster center to which the first data belongs is the second target cluster center, and further, for each data in the user power consumption characteristic data set, its target cluster center can be obtained, thereby obtaining the target clustering result of the user power consumption characteristic data set.
[0028] In an embodiment of the present application, the first clustering method is used to predetermine the number of clusters and cluster centers of the second cluster, so that when clustering user power consumption characteristic data, especially when processing large-scale user power consumption data, there is no need to consume a lot of computing time and resources, and the clustering efficiency can be improved while ensuring the clustering accuracy. In step S108, a random adjustment strategy and an adaptive model are introduced to update the algorithm parameters, that is, the attraction coefficient and the step size factor, to achieve more accurate, efficient and stable clustering of user power consumption characteristics.
[0029] Optionally, step S108, performing The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation may include the following steps: Step S201: For The kth position iteration calculation in the position iteration calculation obtains the corresponding positions of the d second clustering results in the kth position iteration calculation, and obtains d initial positions; k is less than or equal to ; Step S202: determining the attraction coefficient and step length factor of the d second clustering results when iterating the calculation at the kth position; Step S203: determining the initial position iteration priorities of the d second clustering results in the kth position iteration calculation according to the objective function and the d initial positions, and obtaining the d initial position iteration priorities; Step S204: determining the position iteration order of the d second clustering results in the kth position iteration calculation according to the d initial position iteration priorities; Step S205: determining a 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 size factor and the iteration priority of the d initial positions; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result; Step S206: determining, according to the position iteration order, a target number of d second clustering results whose initial position iteration priority is higher than the i-th second clustering result; Step S207: determining the sorting position number of the j-th second clustering result in the position iteration sequence; Step S208: 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 sequence number; Step S209: determining 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; Step S210: obtaining d third clustering results corresponding to the k-th position iteration calculation according to the target position of each second clustering result in the k-th position iteration calculation among the d second clustering results.
[0030] In a possible embodiment, the maximum number of position iterations of k position iteration calculations, that is, the preset number of iterations, is used Indicates that when the number of iterations of the current position is less than or equal to the maximum number of iterations of the position, that is, When , first, obtain the corresponding positions of d second clustering results at the current position iteration, and obtain d initial positions, among which the initial position of the i-th second clustering result at the k-th position iteration is obtained by Then, the attraction coefficient and step size factor of the d second clustering results at the current position iteration are determined, where the attraction coefficient of the i-th second clustering result at the k-th position iteration is obtained by It is indicated that the step size factor of the i-th second clustering result at the k-th position iteration is Specifically, the attraction coefficient of the i-th second clustering result at the k-th position iteration is It can be expressed by the following formula:
[0031] in, and is a random number generated by uniform distribution. The step size factor of the i-th second clustering result at the k-th position iteration It can be expressed by the following formula:
[0032] in, is the initial step size factor, is the maximum number of iterations.
[0033] In a possible embodiment, according to the objective function and the d initial positions, the initial position iteration priorities of the d second clustering results in the current position iteration are determined to obtain d initial position iteration priorities, wherein the objective function of the i-th second clustering result is obtained by The starting position iteration priority of the i-th second clustering result can be expressed by the following formula:
[0034] in, is the starting position iteration priority of the i-th second clustering result, is the iteration coefficient, which can be set to 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.
[0035] In a possible embodiment, based on d initial position iteration priorities, the position iteration order of d second clustering results in the current position iteration is determined, based on the position iteration order, the target number of d second clustering results whose initial position iteration priority is higher than the i-th second clustering result is determined, and the sorting position number of the j-th second clustering result in the position iteration order is determined, wherein 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 number.
[0036] In a possible embodiment, the target position of the i-th second clustering result in the current position iteration is determined according to the reference position and the reference probability, and the target position may be the product of the reference position and the reference probability.
[0037] In the embodiment of the present application, as the number of iterations increases, the clustering state gradually approaches, and the distance between the d second clustering results gradually decreases to zero. Therefore, as the number of iterations increases, will gradually approach a certain constant. However, the embodiment of the present application randomly adjusts the attraction coefficient during the iteration process. , improve the global search capability, avoid falling into the local optimal solution, and improve the clustering accuracy.
[0038] In the embodiment of the present application, the traditional step size factor remains unchanged in each iteration. Make adjustments, When it is larger, it can effectively enhance the global search capability, while when it is smaller, it is beneficial to improve the convergence speed of iterative calculation and improve clustering efficiency.
[0039] Optionally, S205, determining a 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 size factor and the iteration priority of the d initial positions, may include the following steps: Step S301: determining the interval distance between the i-th second clustering result and the j-th second clustering result according to the d initial positions; Step S302: determining a first position change amount according to the interval distance and the step factor; Step S303: determining a second position change amount according to the interval distance and the attraction coefficient; Step S304: determining a 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.
[0040] In a possible embodiment, the interval distance between the i-th second clustering result and the j-th second clustering result is determined according to the d initial positions. , according to the interval distance and step factor , determine the first position change, which can be expressed by the following formula: First position change =
[0041] in, is a random number that follows a Gaussian distribution.
[0042] In a possible embodiment, according to the spacing distance and the attraction coefficient , determine the second position change, which can be expressed by the following formula: Second position change =
[0043] in, is the iteration coefficient, which can be set to 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.
[0044] In a possible embodiment, the reference position is determined according to the initial position, the first position change and the second position change of the i-th second clustering result, wherein the reference position of the i-th second clustering result in the k-th position iteration is It can be expressed by the following formula:
[0045] in, is the initial position of the i-th second clustering result in the k-th position iteration.
[0046] For example, see Figure 6 , Figure 6 is a schematic diagram of a location update provided by an embodiment of the present application. Figure 6 As shown, in the kth position iteration, the i-th second clustering result and the j-th second clustering result both include multiple clustering centers, where Figure 6 In and is a pair of corresponding cluster centers, that is and 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 Attract, resulting in the location update of the cluster center, as shown in the figure For the kth position iteration The reference position, arrive The position update direction is shown by the arrow in the figure. If the reference probability obtained by subsequent calculation is 1, then the reference position is the target position of the cluster center in the i-th second clustering result.
[0047] Optionally, S208, 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 sequence number, may include the following steps: Step S401: Obtain sorting and screening coefficients; Step S402: Determine the sorting and screening threshold value according to the sorting and screening coefficient and the value of d; Step S403: If the number of targets is greater than the sorting screening threshold, and the sorting position number is less than or equal to the sorting screening threshold, or the number of targets is less than or equal to the sorting screening threshold, the reference probability is the first preset probability; Step S404: If the number of targets is greater than the sorting and filtering threshold, and the sorting position number is greater than the sorting and filtering threshold, a reference probability is determined according to the difference between the number of targets and the sorting position number, the sorting and filtering threshold, and the number of targets.
[0048] In a possible embodiment, the sorting and filtering coefficient can be set to 0.1. According to the value of the sorting and filtering coefficient and d, the sorting and filtering threshold is determined to be 0.1D. If the number of targets is greater than the sorting and filtering threshold, and the sorting position number is less than or equal to the sorting and filtering threshold, or the number of targets is less than or equal to the sorting and filtering threshold, the reference probability is the first preset probability. If the number of targets is greater than the sorting and filtering threshold, and the sorting position number is greater than the sorting and filtering threshold, the reference probability is determined according to the difference between the number of targets and the sorting position number, the sorting and filtering threshold, and the number of targets. The first preset probability can be set to 1, and the reference probability of the i-th second clustering result is It can be expressed by the following formula:
[0049] in, is the total number of the second clustering results, The initial position iteration priority of the d second clustering results is higher than that of the first The number of second clustering results with higher second clustering results, is the initial position iteration priority of the jth second clustering result, and the sorting position number in the position iteration sequence of all d second clustering results. To round down 0.1D.
[0050] Optionally, step S109, according to Iteratively calculating the corresponding d third clustering results of the position and determining the target cluster center set may include the following steps: Step S501: Get the The k target positions of the corresponding d third clustering results are calculated iteratively; Step S502: 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; Step S503: Obtain d second clustering results The d initial position iteration priorities for each position iteration calculation in the position iteration calculation; Step S504: 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; Step S505: taking the cluster center set of the third clustering result corresponding to the highest position iteration priority as the target cluster center set.
[0051] 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+1th position iteration calculation result, thereby simplifying the calculation process of the d target position iteration priorities of each of the k position iteration calculation results.
[0052] In a possible embodiment, the target position iteration priority with the highest priority in each position iteration calculation result is first determined as the first target position iteration priority, and then the highest priority is selected from the screened k first target position iteration priorities as the second target position iteration priority.
[0053] Optionally, step S104, obtaining a target first clustering result according to the p first clustering results, may include the following steps: Step S601: obtaining a cluster analysis evaluation function; Step S602: determining a cluster analysis evaluation index for each of the p first clustering results according to the cluster analysis evaluation function, and obtaining p cluster analysis evaluation indexes; Step S603: taking the first clustering result corresponding to the maximum value among the p clustering analysis evaluation indicators as the target first clustering result.
[0054] In a possible embodiment, a 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 in p first clustering results can be determined to obtain p clustering analysis evaluation indexes. The larger the clustering analysis evaluation index is, the better the clustering effect is, and the first clustering result corresponding to the maximum value among the p clustering analysis evaluation indexes is used as the target first clustering result.
[0055] Optionally, step S602, determining a cluster analysis evaluation index of each of the p first clustering results according to the cluster analysis evaluation function to obtain p cluster analysis evaluation indexes, may include the following steps: Step S701: Obtaining a first sample quantity of a user power consumption characteristic data set; Step S702: determining a sample mean point according to the first sample quantity and the user power consumption characteristic data set; Step S703: obtaining w clusters of the reference first clustering result; the reference first clustering result is any first clustering result among the p first clustering results; w is a positive integer; Step S704: determining the second sample quantity and sample center point of each of the w clusters, and obtaining w second sample quantities and w sample center points; Step S705: determining the inter-class discrete value referring to the first clustering result according to the w second sample quantities, the w sample center points and the sample mean point; Step S706: determining the intra-class discrete value referring to the first clustering result according to the distance between each sample point of each cluster in the w clusters and the sample center point; Step S707: determining a cluster analysis evaluation index referring to the first clustering result according to the cluster analysis evaluation function, the inter-class discrete value, the intra-class discrete value, the value of w and the first sample quantity; Step S708: obtaining p cluster analysis evaluation indicators according to the p first clustering results and the cluster analysis evaluation indicators referring to the first clustering results.
[0056] In a possible embodiment, a first sample quantity of a user power consumption characteristic data set is obtained. The first sample quantity may be the total quantity of user power consumption characteristic data in the user power consumption characteristic data set. The first sample quantity is represented by N. According to the first sample quantity and the user power consumption characteristic data set, a sample mean point M is determined. The sample mean point M may be represented by the formula:
[0057] in, It is the f-th user power consumption characteristic data in the user power consumption characteristic data set.
[0058] In a possible embodiment, w clusters of the reference first clustering result are obtained, wherein the reference first clustering result is any first clustering result of the p first clustering results, the second sample quantity and sample center point of each cluster in the w clusters are determined, and w second sample quantities and w sample center points are obtained. The fth cluster is obtained by It is represented by the number of second sample points in the fth cluster. To represent, the sample center point in the fth cluster is represented by To express.
[0059] In a possible embodiment, according to the w second sample quantities, the w sample center points and the sample mean point, the inter-class discrete value referring to the first clustering result is determined, and the inter-class discrete value can be expressed by the following formula:
[0060] in, is the discrete value between classes, and W is the total number of w clusters.
[0061] In a possible embodiment, according to the distance between each sample point of each cluster in the w clusters and the sample center point, the intra-class discrete value referring to the first clustering result is determined, and the intra-class discrete value can be expressed by the following formula:
[0062] in, is the discrete value within the class, Cluster The g-th sample point in .
[0063] In a possible embodiment, according to the cluster analysis evaluation function, the inter-class discrete value, the intra-class discrete value, the value of w and the first sample quantity, a cluster analysis evaluation index referring to the first clustering result is determined, and the cluster analysis evaluation index can be expressed by the following formula:
[0064] in, It is the evaluation index of cluster analysis.
[0065] In a possible embodiment, the objective function of the i-th second clustering result is The calculation method of can be consistent with the calculation method of cluster analysis evaluation index.
[0066] In a possible embodiment, for the user power consumption characteristic data of the present solution in relevant power consumption scenarios, different power consumption scenarios may be residential power consumption scenarios, industrial power consumption scenarios, commercial power consumption scenarios, and the like. The user power consumption characteristic data may be represented by a feature vector, and each user power consumption characteristic data is composed of a 96-point curve of the user's power, voltage, and current and its characteristic indicators. Taking voltage data as an example, the user power consumption characteristic data of one user may be represented as [voltage 1, voltage 2, voltage 3], and the feature vector represents the voltage data of the user at three different collection times. Alternatively, taking voltage data and current data as an example, the user power consumption characteristic data of one user may be represented as [voltage 1, current 1, voltage 2, current 2, voltage 3, current 3], and the feature vector represents the voltage data and current data of the user at three different collection times.
[0067] For the clustering result data of this solution, taking power data as an example, the user power consumption characteristic data of user 1 can be expressed as [power 1, power 2, power 3], the user power consumption characteristic data of user 2 can be expressed as [power 4, power 5, power 6], and the user power consumption characteristic data of user 3 can be expressed as [power 7, power 8, power 9]. After the clustering method of this patent, the final clustering result can be [user 1 and user 2, user 3], that is, confirming that user 1 and user 2 are one cluster, and user 3 is one cluster.
[0068] Further, taking the above-mentioned user 1, user 2 and user 3 as an example, the clustering process may be: determining three first cluster numbers, the three first cluster numbers are 1, 2 and 3 respectively, and obtaining three first clustering results according to the three first cluster numbers, the three first clustering results clustering user 1, user 2 and user 3 into 1 category, 2 categories and 3 categories respectively, determining the clustering analysis evaluation index of each of the three first clustering results, obtaining 3 clustering analysis evaluation indexes, and taking the first cluster number corresponding to the maximum value of the 3 clustering analysis evaluation indexes as the target cluster number. In the embodiment of the present application, the target cluster The number can be 2, and then multiple initial cluster center sets are determined. 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]. Multiple second clustering results are obtained according to the multiple initial cluster center sets. The multiple second clustering results can be expressed as at least one of [user 1 and user 2, user 3], [user 1, user 2 and user 3], and [user 1 and user 3, user 2]. According to the multiple second clustering results, The position is iterated, that is, for each second clustering result, is 2, then for the first position iteration calculation, the above 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 iteration priority of the updated cluster center set is the highest, then the updated cluster center set is used as the target cluster center set, and finally [power 1, power 2, power 3], [power 4, power 5, power 6] and [power 7, power 8, power 9] are calculated respectively. The Euclidean distance between the power data of each user and the target cluster center set [power 111, power 121, power 131] and [power 141, power 151, power 161] is calculated to obtain six distances. If among the six distances, [power 1, power 2, power 3] is closer to the target cluster center [power 111, power 121, power 131], and [power 4, power 5, power 6] and [power 7, power 8, power 9] are closer to [power 141, power 151, power 161], then the target clustering result is [user 1, user 2 and user 3].
[0069] As for the technical effects that can be achieved by this solution, this solution can improve clustering efficiency while ensuring clustering accuracy when clustering user power consumption characteristic data. Exemplarily, the traditional clustering method is: clustering clustering data according to multiple different cluster numbers. Therefore, when it comes to clustering data of a large number of different power consumption scenarios and user groups, if it is necessary to perform position iteration on the clustering results corresponding to multiple different cluster numbers to ensure clustering accuracy, it will consume a lot of computing time and resources, thereby reducing clustering efficiency. In this solution, the target number of clusters is determined by pre-clustering, thereby avoiding the need to perform position iteration on the clustering results corresponding to multiple different cluster numbers. Only the clustering results corresponding to the target number of clusters need to be iterated, which improves clustering efficiency while ensuring clustering accuracy. In addition, this patent introduces random adjustment strategies and adaptive model update algorithm parameters in the position iteration part to achieve more accurate, efficient and stable clustering of user power consumption characteristics.
[0070] In a possible embodiment, after determining the target clustering result of the user power consumption characteristic data set, 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.
[0071] Exemplarily, according to the target clustering result, at least one user group and at least one power consumption scenario corresponding to the user power consumption characteristic data are subjected to power consumption behavior feature analysis and load characteristic analysis to obtain the power consumption behavior pattern and load characteristics of each user group in each power consumption scenario, wherein the power consumption behavior pattern includes the power consumption power, power consumption duration, and power consumption frequency during the peak and valley periods. For example, industrial users may have high power consumption demands during specific periods of working days, while residential users have peak power consumption at night and on holidays. Among them, the load characteristics include load size, load change rate, and power factor. For example, some commercial users may have large inductive loads, resulting in low power factors, while some high-tech enterprises have high requirements for power quality and are more sensitive to load changes. Therefore, according to the power consumption behavior pattern and load characteristics of each user group in each power consumption scenario, the configuration schemes of distributed energy equipment and energy storage equipment for different user groups, as well as the energy storage schemes for different user groups in different power consumption scenarios can be determined.
[0072] Furthermore, the types of distributed energy equipment for each user group are determined based on the resource characteristics and energy storage characteristics of the area where each user group is located. For example, in areas with sufficient sunlight, large-scale solar photovoltaic power generation systems are configured for commercial buildings and industrial users, while in remote areas with abundant wind resources, small wind power generation devices are installed for rural users or independent industrial facilities. In addition, the installed capacity of distributed energy equipment is calculated based on the historical electricity consumption data and load characteristics of each user group. For example, for industrial users with stable and large electricity loads, it is ensured that the installed capacity of distributed energy can meet their electricity demand during some peak hours. For residential users, the number of solar panels is reasonably configured based on the average household electricity power and roof area to achieve self-generation and self-use, and the surplus electricity is connected to the grid.
[0073] Furthermore, appropriate energy storage technologies are selected according to the electricity demand of different user groups. For example, for users such as financial data centers that have extremely high requirements for response speed, lithium battery energy storage systems are used. For industrial users who pursue low-cost, large-capacity energy storage, flow batteries or lead-acid battery energy storage systems can be considered. For users who mainly generate electricity from renewable energy, such as distributed solar power stations, lithium-ion battery energy storage systems are used to smooth power fluctuations. The capacity of the energy storage system is determined by analyzing the peak-valley power consumption difference and load fluctuation of users. For example, for industrial users with significant peak-valley differences, energy storage systems that can store peak load electricity for several hours are configured to achieve peak shaving and valley filling. For residential users, according to the peak-valley characteristics of household electricity consumption, smaller capacity energy storage equipment is configured to cope with short-term power outages or peak-valley price difference management of electricity charges.
[0074] In summary, in an implementation manner of the present application, user power consumption characteristic data of at least one user group in at least one power consumption scenario is first obtained to obtain a user power consumption characteristic data set, and then, based on at least one power consumption scenario and at least one user group, p first clustering numbers are determined, and based on the p first clustering numbers, the user power consumption characteristic data set is first clustered to obtain p first clustering results, and then, based on the p first clustering results, a target first clustering result is obtained, and the first clustering number corresponding to the target first clustering result in the p first clustering numbers is used as the target clustering number, and then, based on the target clustering number, d initial clustering center sets are determined, wherein 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 in the d initial clustering center sets, a second clustering is performed on the user power consumption characteristic data set to obtain d second clustering results, and then, based on the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: To preset the number of iterations, next, according to the The d third clustering results corresponding to the position iteration calculation are determined to determine the target cluster center set. Finally, the target clustering result of the user power characteristic data set is determined according to the distance between each data in the user power characteristic data set and each target cluster center in the target cluster center set. Thus, p first clustering results are determined by p first clustering numbers, and the first clustering number of the target first clustering results in the p first clustering results is used as the target clustering number. By determining the target clustering number, the clustering accuracy in the subsequent clustering can be guaranteed. Then, d second clustering results are obtained according to the target clustering number and d initial clustering center sets, and the 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 by the position iteration calculation. Finally, the target clustering result is obtained according to the distance between each data in the user power characteristic data set and each target cluster center in the target cluster center set. When clustering the user power characteristic data, the clustering efficiency can be improved.
[0075] The method of the embodiment of the present invention is described in detail above, and the device of the embodiment of the present invention is provided below.
[0076] See also Figure 7 , Figure 7 Schematic diagram of a device for clustering user power consumption characteristics provided in an embodiment of the present application. Figure 7 As shown, the user power consumption characteristic clustering device 800 includes an acquisition unit 801 and a processing unit 802; An 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 data set; The processing unit 802 is configured to determine a number of p first clusters according to at least one power usage scenario and at least one user group; According to the p first clustering numbers, the user power consumption characteristic data set is first clustered to obtain p first clustering results; According to the p first clustering results, the target first clustering result is obtained; The first cluster number corresponding to the target first cluster result among the p first cluster numbers is used as the target cluster number; According to the target number of clusters, determine d initial cluster center sets; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, a second clustering is performed on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation; According to Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center 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, the target clustering result of the user power consumption characteristic data set is determined.
[0077] In a possible embodiment, after performing the clustering according to the d second clustering results, The position is iterated and the result is the same as the first In terms of the d third clustering results corresponding to the position iteration calculation, the processing unit 802 is specifically configured to: against The kth position iteration calculation in the position iteration calculation obtains the corresponding positions of the d second clustering results in the kth position iteration calculation, and obtains d initial positions; k is less than or equal to ; Determine the attraction coefficient and step size factor of the d second clustering results at the k-th position iteration calculation; According to the objective function and the d initial positions, the initial position iteration priorities of the d second clustering results in the k-th position iteration calculation are determined to obtain the d initial position iteration priorities; According to the d initial position iteration priorities, determining the position iteration order of the d second clustering results in the kth position iteration calculation; According to the d initial positions, the attraction coefficient, the step factor and the iteration priority of the d initial positions, 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; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result; According to the position iteration order, determine the target number of the d second clustering results whose initial position iteration priority is higher than the i-th second clustering result; Determine the sorting position number of the j-th second clustering result in the position iteration order; According to the number of targets and the sequence number of the sorted positions, determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result; According to the reference position and the reference probability, determine the target position of the i-th second clustering result in the k-th position iteration calculation; According to the target position of each second clustering result in the k-th position iteration calculation among the d second clustering results, d third clustering results corresponding to the k-th position iteration calculation are obtained.
[0078] In a possible embodiment, in determining the 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 priority of the d initial positions, the processing unit 802 is specifically configured to: According to the d initial positions, determine the interval distance between the i-th second clustering result and the j-th second clustering result; Determine the first position change amount according to the interval distance and the step factor; Determine the second position change amount according to the interval distance and the attraction coefficient; 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.
[0079] In a possible embodiment, in 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 sequence number, the processing unit 802 is specifically configured to: Get the sorting and filtering coefficient; Determine the sorting and screening threshold value according to the sorting and screening coefficient and the value of d; If the number of targets is greater than the sorting screening threshold, and the sorting position number is less than or equal to the sorting screening threshold, or the number of targets is less than or equal to the sorting screening threshold, the reference probability is the first preset probability; If the number of targets is greater than the sorting filter threshold, and the sorting position number is greater than the sorting filter threshold, the reference probability is determined based on the difference between the number of targets and the sorting position number, the sorting filter threshold, and the number of targets.
[0080] In a possible embodiment, according to 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: Get the The k target positions of the corresponding d third clustering results are calculated iteratively; 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; Get d second clustering results in The d initial position iteration priorities for each position iteration calculation in the position iteration calculation; 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; The cluster center set of the third clustering result corresponding to the highest position iteration priority is used as the target cluster center set.
[0081] 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: Get the cluster analysis evaluation function; 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; The first clustering result corresponding to the maximum value among the p clustering analysis evaluation indicators is taken as the target first clustering result.
[0082] 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: Obtaining a first sample quantity of a user power consumption characteristic data set; Determine a sample mean point according to the first sample quantity and the user power consumption characteristic data set; Obtain w clusters referring to the first clustering result; the reference first clustering result is any first clustering result among the p first clustering results; w is a positive integer; Determine the second sample quantity and sample center point of each cluster in the w clusters, and obtain w second sample quantities and w sample center points; Determine the inter-class discrete value referring to the first clustering result according to the w second sample quantities, the w sample center points and the sample mean point; Determine the intra-class discrete value referring to the first clustering result according to the distance between each sample point of each cluster in the w clusters and the sample center point; Determine a cluster analysis evaluation index referring to the first clustering result according to the cluster analysis evaluation function, the inter-class discrete value, the intra-class discrete value, the value of w and the first sample quantity; According to the p first clustering results and the clustering analysis evaluation index with reference to the first clustering results, p clustering analysis evaluation indexes are obtained.
[0083] See also Figure 8 , Figure 8 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 900 includes a transceiver 901, a processor 902 and a memory 903, which are connected via 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. The electronic device 900 can be the above-mentioned user power characteristics clustering device 800, and the processor 902 can be the above-mentioned acquisition unit 801 and processing unit 802.
[0084] The processor 902 is used to read the computer program in the memory 903 and perform the following operations: 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 data set; Determine p first cluster numbers according to at least one electricity usage scenario and at least one user group; According to the p first clustering numbers, the user power consumption characteristic data set is first clustered to obtain p first clustering results; According to the p first clustering results, the target first clustering result is obtained; The first cluster number corresponding to the target first cluster result among the p first cluster numbers is used as the target cluster number; According to the target number of clusters, determine d initial cluster center sets; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, a second clustering is performed on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation; According to Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center 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, the target clustering result of the user power consumption characteristic data set is determined.
[0085] In a possible embodiment, after performing the clustering according to the d second clustering results, The position is iterated and the result is the same as the first In terms of calculating the d third clustering results corresponding to the position iteration, the processor 902 is specifically configured to perform the following operations: against The kth position iteration calculation in the position iteration calculation obtains the corresponding positions of the d second clustering results in the kth position iteration calculation, and obtains d initial positions; k is less than or equal to ; Determine the attraction coefficient and step size factor of the d second clustering results at the k-th position iteration calculation; According to the objective function and the d initial positions, the initial position iteration priorities of the d second clustering results in the k-th position iteration calculation are determined to obtain the d initial position iteration priorities; According to the d initial position iteration priorities, determining the position iteration order of the d second clustering results in the kth position iteration calculation; According to the d initial positions, the attraction coefficient, the step factor and the iteration priority of the d initial positions, 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; the initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result; According to the position iteration order, determine the target number of the d second clustering results whose initial position iteration priority is higher than the i-th second clustering result; Determine the sorting position number of the j-th second clustering result in the position iteration order; According to the number of targets and the sequence number of the sorted positions, determine the reference probability that the i-th second clustering result is attracted by the j-th second clustering result; According to the reference position and the reference probability, determine the target position of the i-th second clustering result in the k-th position iteration calculation; According to the target position of each second clustering result in the k-th position iteration calculation among the d second clustering results, d third clustering results corresponding to the k-th position iteration calculation are obtained.
[0086] In a possible embodiment, in determining the 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 priority of the d initial positions, the processor 902 is specifically configured to perform the following operations: According to the d initial positions, determine the interval distance between the i-th second clustering result and the j-th second clustering result; Determine the first position change amount according to the interval distance and the step factor; Determine the second position change amount according to the interval distance and the attraction coefficient; 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.
[0087] In a possible embodiment, in 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 sequence number, the processor 902 is specifically configured to perform the following operations: Get the sorting and filtering coefficient; Determine the sorting and screening threshold value according to the sorting and screening coefficient and the value of d; If the number of targets is greater than the sorting screening threshold, and the sorting position number is less than or equal to the sorting screening threshold, or the number of targets is less than or equal to the sorting screening threshold, the reference probability is the first preset probability; If the number of targets is greater than the sorting filter threshold, and the sorting position number is greater than the sorting filter threshold, the reference probability is determined based on the difference between the number of targets and the sorting position number, the sorting filter threshold, and the number of targets.
[0088] In a possible embodiment, according to In terms of calculating the d third clustering results corresponding to the position iteration, and determining the target cluster center set, the processor 902 is specifically configured to perform the following operations: Get the The k target positions of the corresponding d third clustering results are calculated iteratively; 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; Get d second clustering results in The d initial position iteration priorities for each position iteration calculation in the position iteration calculation; 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; The cluster center set of the third clustering result corresponding to the highest position iteration priority is used as the target cluster center set.
[0089] In a possible embodiment, in terms of obtaining a target first clustering result according to the p first clustering results, the processor 902 is specifically configured to perform the following operations: Get the cluster analysis evaluation function; 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; The first clustering result corresponding to the maximum value among the p clustering analysis evaluation indicators is taken as the target first clustering result.
[0090] 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 processor 902 is specifically configured to perform the following operations: Obtaining a first sample quantity of a user power consumption characteristic data set; Determine a sample mean point according to the first sample quantity and the user power consumption characteristic data set; Obtain w clusters referring to the first clustering result; the reference first clustering result is any first clustering result among the p first clustering results; w is a positive integer; Determine the second sample quantity and sample center point of each cluster in the w clusters, and obtain w second sample quantities and w sample center points; Determine the inter-class discrete value referring to the first clustering result according to the w second sample quantities, the w sample center points and the sample mean point; Determine the intra-class discrete value referring to the first clustering result according to the distance between each sample point of each cluster in the w clusters and the sample center point; Determine a cluster analysis evaluation index referring to the first clustering result according to the cluster analysis evaluation function, the inter-class discrete value, the intra-class discrete value, the value of w and the first sample quantity; According to the p first clustering results and the clustering analysis evaluation index with reference to the first clustering results, p clustering analysis evaluation indexes are obtained.
[0091] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement part or all of the steps of any user power consumption characteristic clustering method recorded in the above method embodiments.
[0092] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute part or all of the steps of any user power consumption characteristic clustering method recorded in the above method embodiments.
[0093] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0094] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0095] In the 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 only schematic, such as the division of the modules, which is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or module can be electrical or other forms.
[0096] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0097] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software program modules.
[0098] If the 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, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0099] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A user electricity consumption characteristics clustering method, characterized in that: include: 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 data set; the user power consumption characteristic data is used to reflect power consumption, voltage and current; Determining p first cluster numbers according to the at least one electricity usage scenario and the at least one user group; Performing first clustering on the user power consumption characteristic data set according to the p first cluster numbers to obtain p first clustering results; Obtaining a target first clustering result according to the p first clustering results; The first cluster number corresponding to the target first clustering result in the p first cluster numbers is used as the target cluster number; According to the target number of clusters, d initial cluster center sets are determined; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, performing a second clustering on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: is the preset number of iterations; According to the said Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center set; The target clustering result of the user power consumption characteristic data set is determined 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.
2. The method according to claim 1, characterized in that The step of performing the following steps according to the d second clustering results is: The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation include: Regarding the The kth position iteration calculation in the kth position iteration calculation obtains the corresponding positions of the d second clustering results at the kth position iteration calculation to obtain d initial positions; k is less than or equal to ; Determine the attraction coefficient and step size factor of the d second clustering results when iteratively calculating at the kth position; Determine, according to the objective function and the d initial positions, the initial position iteration priorities of the d second clustering results during the k-th position iteration calculation, to obtain d initial position iteration priorities; Determining, according to the d initial position iteration priorities, a position iteration order of the d second clustering results during the k-th position iteration calculation; Determining a reference position at which an i-th second clustering result among the d second clustering results is attracted by a 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 initial position iteration priority of the j-th second clustering result is higher than that of the i-th second clustering result; Determining, according to the position iteration order, a target number of the d second clustering results whose initial position iteration priority is higher than the i-th second clustering result; Determine the sorting position number of the j-th second clustering result in the iteration order of the position; Determining, according to the target quantity and the sorting position sequence number, a reference probability that the i-th second clustering result is attracted by the j-th second clustering result; Determining, according to the reference position and the reference probability, a target position of the i-th second clustering result during the k-th position iteration calculation; According to the target position of each second clustering result in the k-th position iteration calculation among the d second clustering results, d third clustering results corresponding to the k-th position iteration calculation are obtained.
3. The method according to claim 2, characterized in that The determining, according to the d initial positions, the attraction coefficient, the step size factor and the iteration priority of the d initial positions, 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 comprises: Determine, according to the d initial positions, a spacing distance between the i-th second clustering result and the j-th second clustering result; Determine a first position change according to the interval distance and the step factor; Determining a second position change amount according to the interval distance and the attraction coefficient; The reference position is determined according to the initial position of the i-th second clustering result, the first position change, and the second position change.
4. The method according to claim 2, characterized in that The determining, according to the target quantity and the sorting position sequence number, a reference probability that the i-th second clustering result is attracted by the j-th second clustering result includes: Get the sorting and filtering coefficient; Determining a sorting and screening threshold value according to the sorting and screening coefficient and the value of d; If the number of targets is greater than the sorting screening threshold, and the sorting position number is less than or equal to the sorting screening threshold, or the number of targets is less than or equal to the sorting screening threshold, the reference probability is the first preset probability; If the target quantity is greater than the sorting and filtering threshold, and the sorting position number is greater than the sorting and filtering threshold, the reference probability is determined according to the difference between the target quantity and the sorting position number, the sorting and filtering threshold, and the target quantity.
5. The method according to any one of claims 2 to 4, characterized in that: According to the said The corresponding d third clustering results are calculated iteratively for each position, and the target cluster center set is determined, including: Get the The k target positions of the corresponding d third clustering results are calculated iteratively; According to the objective function and the The k target positions of the d third clustering results corresponding to the position iteration calculation are determined to determine the k target positions of the d third clustering results. The d target position iteration priorities of the d third clustering results corresponding to the position iteration calculation; Get the d second clustering results in The d initial position iteration priorities for each position iteration calculation in the position iteration calculation; According to the said The d target position iteration priorities of the d third clustering results corresponding to the position iteration calculation are calculated, and the d second clustering results are calculated 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; The cluster center set of the third clustering result corresponding to the highest position iteration priority is used as the target cluster center set.
6. The method according to claim 1, characterized in that The step of obtaining a target first clustering result according to the p first clustering results includes: Get the cluster analysis evaluation function; Determining a cluster analysis evaluation index for each of the p first clustering results according to the cluster analysis evaluation function, to obtain p cluster analysis evaluation indexes; The first clustering result corresponding to the maximum value of the p clustering analysis evaluation indicators is used as the target first clustering result.
7. The method according to claim 6, characterized in that The step of determining the cluster analysis evaluation index of each of the p first clustering results according to the cluster analysis evaluation function to obtain p cluster analysis evaluation indexes comprises: Acquire 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; Obtain w clusters of the reference first clustering result; the reference first clustering result is any first clustering result among the p first clustering results; w is a positive integer; Determine the second sample quantity and sample center point of each cluster in the w clusters to obtain w second sample quantities and w sample center points; Determine the inter-class discrete value of the reference first clustering result according to the w second sample quantities, the w sample center points and the sample mean point; Determine the intra-class discrete value of the reference first clustering result according to the distance between each sample point of each cluster in the w clusters and the sample center point; Determine the cluster analysis evaluation index of the reference first clustering result according to the cluster analysis evaluation function, the inter-class discrete value, the intra-class discrete value, the value of w and the first sample quantity; The p clustering analysis evaluation indicators are obtained according to the p first clustering results and the clustering analysis evaluation indicators of the reference first clustering results.
8. A user power consumption characteristic clustering device, characterized in that: The device comprises an acquisition unit and a processing unit; 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 to obtain a user power consumption characteristic data set; The processing unit is configured to determine a number of p first clusters according to the at least one power usage scenario and the at least one user group; Performing first clustering on the user power consumption characteristic data set according to the p first cluster numbers to obtain p first clustering results; Obtaining a target first clustering result according to the p first clustering results; The first cluster number corresponding to the target first clustering result in the p first cluster numbers is used as the target cluster number; According to the target number of clusters, d initial cluster center sets are determined; the number of initial cluster centers in each initial cluster center set is the target number of clusters; According to each of the d initial cluster center sets, performing a second clustering on the user power consumption characteristic data set to obtain d second clustering results; According to the d second clustering results, The position is iterated and the result is the same as the first The d third clustering results corresponding to the position iteration calculation are as follows, where: is the preset number of iterations; According to the said Iterate the calculation of the corresponding d third clustering results at the second position to determine the target cluster center set; The target clustering result of the user power consumption characteristic data set is determined 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.
9. An electronic device, characterized in that: include: A processor and a memory, wherein 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 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
FA-FFCM-based station terminal load prediction method
CN112766566A
Client electricity consumption behavior analysis method and system
CN114219241A
Park energy distribution method and system based on multi-element load clustering
CN116957265A
Power distribution network load cluster division method based on improved FA-K-means algorithm
CN117333034A
Power customer appeal hotspot analysis method and system based on user behavior pattern clustering
CN118861695A