Power load curve clustering method and device, equipment and storage medium
The improved gray wolf optimization algorithm and K-medoids algorithm are used to cluster power load curve data, which solves the problem of complex parameter settings, improves the accuracy and efficiency of clustering results, and improves the optimal dispatching strategy of the power system.
Patent Information
- Application Number
- CN202410904636.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-09-10
AI Technical Summary
Clustering methods for processing power load data in the prior art have the problem of complex parameter settings, making it difficult to obtain effective clustering results easily.
The improved gray wolf optimization algorithm and K center point algorithm are used to cluster the power load curve data set within the preset number of clusters through an iterative process. The improved gray wolf optimization algorithm is used to optimize the number of clusters and distance calculation functions. , combined with K-medoids algorithm for clustering.
While simplifying parameter settings, it improves the accuracy and efficiency of clustering results, reduces clustering errors, and improves the effectiveness of power system optimization dispatch strategies.
Smart Images

Figure CN118626892A
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of smart grid technology, and in particular to a method, device, equipment and storage medium for clustering power load curves. Background Art
[0002] With the continuous development of intelligent and systematic power grid companies, data collection has become more efficient, but it has also brought challenges of increased data complexity and diversity, which in turn has brought difficulties to subsequent data analysis and feature mining. Processing and analyzing power load data through clustering methods can better grasp the volatility, main trends and other regular characteristics of load data. Using clustering methods to analyze power load data can better understand load fluctuations and trends, laying the foundation for load forecasting. This helps power grid companies formulate more effective power distribution, power generation plans and sales strategies, and achieve refined management.
[0003] The existing classic clustering methods for power load data include clustering based on partitioning method - K-means clustering algorithm (k-means clustering algorithm, k-means), hierarchical clustering and density-based clustering methods. Although these traditional methods are widely used and easy to understand, in the process of processing power load data, the way the above clustering algorithms process power load data has problems such as complex parameter settings. Summary of the invention
[0004] The present invention provides a power load curve clustering method, device, equipment and storage medium to solve the problem of complex parameter settings in the prior art for processing power load data.
[0005] According to one aspect of the present invention, a method for clustering power load curves is provided, the method comprising:
[0006] Obtaining power load curve data set;
[0007] Determine the range of cluster numbers;
[0008] Within the range of the number of clusters, the power load curve data set is iterated by clustering using the improved grey wolf optimization algorithm and the K center point algorithm, and when the number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output.
[0009] According to another aspect of the present invention, there is provided a power load curve clustering device, the device comprising:
[0010] An acquisition module, used for acquiring a power load curve data set;
[0011] A determination module, used to determine the range of cluster number;
[0012] The iteration module is used to iterate the clustering of the power load curve data set by improving the grey wolf optimization algorithm and the K center point algorithm within the range of the number of clusters, and output the clustering result when the number of iterations is greater than or equal to the maximum number of iterations.
[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device comprising: at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the power load curve clustering method described in any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the power load curve clustering method described in any embodiment of the present invention when executed.
[0017] A method, device, equipment and storage medium for clustering electric load curves in an embodiment of the present invention, the method comprising: obtaining an electric load curve data set; determining a range of cluster numbers; within the range of cluster numbers, iterating clustering the electric load curve data set by using an improved gray wolf optimization algorithm and a K center point algorithm, and outputting a clustering result when the number of iterations is greater than or equal to a maximum number of iterations. The method sets a range of cluster numbers, and within the range of cluster numbers, iterates clustering the electric load curve data set by using an improved gray wolf optimization algorithm and a K center point algorithm, and finally outputs a clustering result. The method can obtain a clustering result while allowing the user to easily set a range of parameters, thereby solving the problem of complex parameter settings in the prior art method of processing electric load data.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0020] Figure 1A schematic diagram of a flow chart of a power load curve clustering method provided in the first embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a process flow of a gray wolf optimization algorithm provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a flow chart of a K center point algorithm provided in an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of a process flow of an improved gray wolf optimization algorithm provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of a process for optimizing clustering parameters by improving the gray wolf optimization algorithm provided by an embodiment of the present invention;
[0025] Figure 6 A schematic diagram of the overall flow of an improved grey wolf optimization algorithm provided by an embodiment of the present invention;
[0026] Figure 7 An optimal fitness curve diagram obtained based on IGWO-Kmedoids clustering provided in an embodiment of the present invention;
[0027] Figure 8 A schematic diagram of a result based on IGWO-Kmedoids clustering provided in an embodiment of the present invention;
[0028] Fig. 9 A schematic diagram of the structure of a power load curve clustering device provided in Embodiment 3 of the present invention;
[0029] Fig.10 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only an embodiment of a part of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work should belong to the scope of protection of the present invention. It should be understood that the various steps recorded in the method implementation of the present invention can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, any variations of the terms "including" and "having" are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.
[0035] Embodiment 1
[0036] Figure 1 A flow chart of a power load curve clustering method provided in Embodiment 1 of the present invention is provided. The method can be applicable to the case of clustering power load data. The method can be executed by a power load curve clustering device, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device. In this embodiment, the electronic device includes but is not limited to: computers and other devices.
[0037] like Figure 1 As shown, a power load curve clustering method provided in Embodiment 1 of the present invention includes the following steps:
[0038] S110: Obtain a power load curve data set.
[0039] The power load curve data set may be a data set of a power load curve, which refers to a curve graph describing the change of load (or demand) in a power system over time. The load curve may reflect the power consumption of the power system in different time periods, usually expressed in hours.
[0040] In this embodiment, the power load curve data set may be obtained by obtaining the power load data and then processing it, or the power load curve data set may be directly obtained, which is not limited in this embodiment.
[0041] S120: Determine the range of the number of clusters.
[0042] The range of the number of clusters may be a preset range of categories of power load curves that need to be clustered, and the range of the number of clusters may be user-defined.
[0043] In this embodiment, the range of the number of clusters may be preset. For example, if the category of the power load curve is determined to be 4 categories, the number of clusters in the range may be set to 3 to 6.
[0044] S130. Within the range of the number of clusters, iteratively cluster the power load curve data set by using the improved grey wolf optimization algorithm and the K center point algorithm, and when the number of iterations is greater than or equal to the maximum number of iterations, output the clustering result.
[0045] Among them, the Improved Grey Wolf Optimizer (IGWO) is an optimization and improvement of the original Grey Wolf Optimizer (GWO). GWO is a meta-heuristic optimization algorithm based on swarm intelligence that simulates the social hierarchy and hunting behavior of gray wolves. The K-Medoids clustering algorithm (K-Medoids) is a clustering method based on object features. It regards each data point as an object and clusters it according to the characteristics of the object. The maximum number of iterations can be the highest number of iterations for clustering the power load curve data set. When the number of iterations exceeds the maximum number of iterations, the iteration should be terminated. The clustering results can be used to determine how many categories the power load curve data set is divided into, as well as the categories.
[0046] In this embodiment, the categories of clustering results are limited to the range of cluster numbers. During the iteration process, the power load curve data set can be iterated by clustering using the improved gray wolf optimization algorithm and the K center point algorithm until the number of iterations is greater than or equal to the maximum number of iterations, and then the clustering results are output. Figure 2 A schematic diagram of a gray wolf optimization algorithm provided by an embodiment of the present invention, Figure 3A schematic diagram of a flow chart of a K center point algorithm provided in an embodiment of the present invention;
[0047] A power load curve clustering method provided in a first embodiment of the present invention includes: obtaining a power load curve data set; determining a cluster number range; within the cluster number range, iterating clustering the power load curve data set by using an improved gray wolf optimization algorithm and a K center point algorithm, and outputting a clustering result when the number of iterations is greater than or equal to a maximum number of iterations. The method sets a cluster number range, iterates clustering the power load curve data set by using an improved gray wolf optimization algorithm and a K center point algorithm within the cluster number range, and finally outputs a clustering result. The method can obtain a clustering result while allowing the user to easily set a parameter range, thereby solving the problem of complex parameter setting in the prior art method of processing power load data.
[0048] Based on the above embodiment, a variant embodiment of the above embodiment is proposed. It should be noted that in order to make the description concise, only the differences from the above embodiment are described in the variant embodiment.
[0049] In one embodiment, the method of obtaining a power load curve data set includes: obtaining multiple groups of power load data collected based on preset time intervals; deleting abnormal data in each group of power load data, and filling the missing data in each group of power load data by cubic spline interpolation to obtain multiple groups of filled power load data; standardizing the multiple groups of filled power load data to obtain multiple groups of standardized power load data; and performing dimensionality reduction processing on the multiple groups of standardized power load data to obtain a power load curve data set.
[0050] Among them, power load data may refer to data on the change of power consumption over time in a power system. The power load data may be collected at preset time intervals, and the preset time intervals may be custom set, such as being set to collect data every hour. Abnormal data may be data that is obviously abnormal or erroneous in the power load data. Cubic Spline Interpolation (CIS) is a process of mathematically deriving a curve function group by solving a group of three moment equations through a smooth curve of a series of shape value points. Missing data may be missing data in the power load data.
[0051] In this embodiment, the power load data of users in various industries at various time points in a certain place can be collected. The power load data may include historical loads and corresponding load types, and the load types may be active power and reactive power. The power load data collected in hours is sorted out, and after removing the abnormal data, the missing data is filled using the cubic spline interpolation method, and then the data can be standardized using a normalization method. For example, the normalization method may be a standard score (Z-score). After that, the standardized power load data may be subjected to dimensionality reduction processing, and the dimensionality reduction processing method may be dimensionality reduction through principal component analysis (PCA). The principal component analysis method can convert high-dimensional data into low-dimensional data through linear transformation, and the most important information in the data can be captured by retaining the principal component with the largest variance.
[0052] Exemplarily, the preset sampling time interval can be 1h, and a total of 24 sampling points are collected in one day to obtain the required power load data and other relevant information of a certain area, which may include the subdivision of district and county names, user number, name, type, etc., load type and date information (including specific time and sampling time point), etc. For abnormal data, it is deleted after inspection and processing, and then the missing data is filled by cubic spline interpolation, that is, the missing values are supplemented according to the degree of correlation between the missing data points. After the data is filled, the z-score method is used to standardize the data. The method is to scale the data proportionally so that it falls into a specific interval, so it is also called standard deviation standardization. This method gives the mean and standard deviation of the original data to standardize the data. For example, the following formula is used for standardization to gather all data around 0 with a variance of 1:
[0053]
[0054] Among them, j is a feature or a column in the input dataset matrix, μ j is the mean of all values of feature j, σ j is the standard deviation of feature j, and x is the data sample value in the data set.
[0055] In one embodiment, the method of filling the missing data in each set of power load data by cubic spline interpolation includes: determining the first-order derivative of the cubic spline interpolation function corresponding to each set of power load data; differentiating the first-order derivative based on the two-point Hermite difference to obtain the cubic spline interpolation function; and calculating and filling the missing data in each set of power load data based on the cubic spline interpolation function.
[0056] Among them, Two-Point Hermite Interpolation is a mathematical interpolation method used to construct a polynomial function between two known points.
[0057] In this embodiment, after deleting the abnormal data in the power load data, for each set of power load data, the missing data can be filled using the cubic spline interpolation method, which mainly uses a low-order polynomial to approximate the data values in a small interval defined, and fills in the missing values by fitting a smooth curve through discrete data.
[0058] Exemplarily, for n known data points in each set of power load data, the first-order derivative at each node is assumed to be:
[0059] S′(x k )=m k , k = 0, 1, ..., n;
[0060] Among them, x k is the k nodes in the power load data, S'(x k ) is the cubic spline function of the power load data. Then, using two-point Hermite interpolation, the expression of the spline interpolation function S(x) in a small interval is:
[0061]
[0062] Among them, x k is the kth node value, y k f(x k ), m k is the coefficient, h k is the interpolation basis function. Thus, we can find a set of functions S(x) that are cubic polynomials and differentiable in each small interval, set constraints to get a set of equations, and substitute the interpolation points to solve the corresponding values.
[0063] In one embodiment, the dimension reduction processing is performed on the standardized multiple sets of power load data to obtain a power load curve data set, including: generating a power load data matrix based on the standardized multiple sets of power load data; zero-meaning the power load data matrix to obtain a covariance matrix; combining the eigenvectors corresponding to the eigenvalues of the covariance matrix into an eigenvector matrix; multiplying the preset reduced dimension row matrix of the eigenvector matrix with the power load data matrix to obtain a power load data matrix; and using the power load data matrix as the power load curve data set.
[0064] Among them, the power load data matrix can be a structured form for representing and analyzing power system load data. This matrix usually contains information of multiple dimensions and can intuitively display the time and spatial distribution characteristics of load data. Zero mean is a commonly used data preprocessing method, which is used to make the mean of data zero and unify the scale range of data. The preset dimensionality reduction dimension can be the preset dimension that needs to be reduced for power load data, and the preset dimensionality reduction dimension can be a custom setting.
[0065] In this embodiment, a power load data matrix can be generated by using multiple sets of standardized power load data, and the power load data matrix can be zero-meaned to obtain a covariance matrix. The eigenvectors corresponding to the eigenvalues of the covariance matrix can be combined into an eigenvector matrix. According to a preset dimensionality reduction number K, the first K row matrices of the eigenvector matrix are multiplied by the power load data matrix to obtain the power load data matrix, and the power load data matrix is used as a power load curve data set.
[0066] For example, if there are m samples and the dimension is 24, then multiple sets of power load data are organized into a matrix of m*24 dimensions:
[0067]
[0068] Zero the mean of each row of the matrix, that is, subtract the mean of this row, and calculate the covariance matrix S:
[0069]
[0070] Among them, A is the difference matrix after load data centering, is the mean. Find the eigenvalue of the covariance matrix S and orthogonalize it, and then calculate the eigenvector corresponding to the eigenvalue:
[0071]
[0072] Among them, λ is an arbitrary number, I is the n-dimensional identity matrix, A is the matrix of n-order eigenvectors, and α is the n-dimensional non-zero column vector.
[0073] After combining the eigenvectors into a matrix, take the eigenvectors corresponding to the first K largest eigenvalues of the set dimensionality reduction number K to form the projection matrix W, and then multiply the projection matrix and the original data matrix to obtain the matrix after dimensionality reduction:
[0074] Y′=W·Y;
[0075] Among them, W is the projection matrix and Y is the original data matrix.
[0076] Furthermore, in the dimensionality reduction process, the principal component dimension can be determined according to the user's judgment, and a corresponding threshold ε can be set so that the dimension K can be selected when the above conditions are met.
[0077] In one embodiment, within the range of the number of clusters, the power load curve data set is iteratively clustered by using the improved gray wolf optimization algorithm and the K center point algorithm, and when the number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output, including: determining the current optimal number of clusters and the distance calculation function from the range of the number of clusters by using the improved gray wolf optimization algorithm; determining the current cluster center point according to the current optimal number of clusters by using the K center point algorithm, and clustering the power load curve data set in combination with the distance calculation function to obtain the clustering result; if the current number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output; otherwise, the iteration is continued.
[0078] The current optimal number of clusters may be the optimal number of clusters in the current iteration. The distance calculation function may be a function used to calculate the distance between data points. The current cluster center point may be the center point currently used for clustering.
[0079] In this embodiment, the fitness values of different individuals can be calculated by improving the gray wolf optimization algorithm, and the current optimal number of clusters and the distance calculation function can be determined according to the fitness values. Then, the current cluster center point can be determined according to the current optimal number of clusters by the K center point algorithm, and the distance calculation function can be used to calculate the distance between the remaining points and the current cluster center point, so as to cluster the power load curve data set and obtain the clustering result. If the current number of iterations is greater than or equal to the maximum number of iterations, the clustering result can be output, otherwise the iteration continues. In this embodiment, the number of clusters and the distance calculation function can be optimized in the clustering process through IGWO.
[0080] For example, Figure 4 A schematic diagram of a flow chart of an improved gray wolf optimization algorithm provided by an embodiment of the present invention, Figure 5A flow chart of optimizing clustering parameters by an improved gray wolf optimization algorithm provided by an embodiment of the present invention. First, the improved gray wolf optimization algorithm is initialized, and the range of hyperparameters is set. The hyperparameters include the number of populations and the maximum number of iterations. Then, the iteration is started, and it is checked whether the maximum number of iterations is reached. A new population is generated using crossover and mutation operations. In this process, a new distance calculation function is generated to adapt to different data distributions, and individuals of the population with higher fitness are selected (i.e., retained) according to the fitness (i.e., the optimal number of clusters and the optimal distance calculation function are determined); then, K data points are randomly selected as the initial cluster center points, and each data point is assigned to the cluster represented by the center point closest to it. For each cluster, the sum of the distances from all data points in the cluster to other data points is calculated, and the data point with the smallest sum of distances is selected as the new center point until convergence or the maximum number of iterations is reached, and finally the final cluster division result is output.
[0081] The criterion function is as follows:
[0082]
[0083] Among them, p is the data sample point in space, o i Represents cluster C j The center point of the data set, E represents the sum of squares of deviations of all sample points in the data set. The sample represents the data in the power load curve data set.
[0084] The formula for the sum of squared distances between any sample point and the cluster center point in space is defined as follows:
[0085]
[0086] Where: X is the cluster sample, p j It is a cluster C j = 1, 2, ..., k center points. d(X,C) represents the sum of the squares of the distances from all objects in the class to their respective center points. The replacement process of the center point is as follows:
[0087]
[0088] During each iteration of this embodiment, the improved grey wolf optimization algorithm calculates the fitness value and allocates the remaining sample points according to the allocation strategy.
[0089] Furthermore, after clustering is completed and the clustering results are obtained, the quality of the clustering results can be determined by calculating the Silhouette Coefficient (SC):
[0090]
[0091] Among them, a(i) represents the cohesion of the sample point, which is calculated as follows:
[0092]
[0093] The value range of SC is [-1, 1]. The closer the calculated result is to 1, the more accurate the clustering result is.
[0094] In one embodiment, the type of clustering result of the power load curve data set includes at least one or more of a bimodal type, a trimodal type, a multimodal type and a peak avoidance type.
[0095] Among them, the bi-peak load is mainly composed of users in the agriculture, general industry and commerce industries. They use more electricity during the day, and there will be some decline in the noon period due to lunch breaks and fewer people. The tri-peak load mainly includes residential users, and there are corresponding peak periods in the morning, noon and evening. The multi-peak load is mainly composed of users in the agricultural irrigation and drainage industry. Agricultural irrigation and drainage mainly uses electricity to drive water pumps for pumping water, drainage, drinking water irrigation and other agricultural water resources allocation. In order to minimize the waste of electricity resources, multi-peak loads will be generated. Peak-avoiding loads include users in industries such as industry and non-industrial industries. In order to reduce electricity costs, they choose to work at night.
[0096] In this embodiment, the types of power load curve data sets can be divided into four categories, namely, a double-peak type, a triple-peak type, a multi-peak type, and a peak-avoiding type.
[0097] In one embodiment, the improved gray wolf optimization algorithm is an algorithm improved by using dimensional learning-based hunting search and the gray wolf optimization algorithm.
[0098] Among them, Dimension learning-based hunting (DLH) is an optimization algorithm based on dimensional learning. It optimizes the problem by mapping the problem into a high-dimensional space, learning the feature representation of the problem, and using hunting behavior to search the solution space.
[0099] In this embodiment, GWO can be improved based on DLH to obtain an improved grey wolf optimization algorithm. Figure 6 A schematic diagram of the overall flow of an improved grey wolf optimization algorithm provided by an embodiment of the present invention.
[0100] For example, in the original GWO, for each wolf, a new location is generated with the help of Pop's three leader wolves, which is integrated with the DLH search strategy, considering that the individual hunting of wolves is learned by their neighbors, and GWO is improved.
[0101] GWO divides the wolf pack into four classes and sets a random value A in the exploration phase. When the absolute value of A is greater than 1, the wolf is forced to stay away from the prey; when the absolute value of A is less than 1, the wolf is forced to approach the prey. After finding the prey, the wolf pack begins to hunt the prey. Model the hunting behavior:
[0102] D=|C·X P (t)-X(t)|
[0103] X(t+1)=X P (t)-A·D;
[0104] Among them, t represents the current iteration number, A and C are coefficients, and X p is the location of the prey, and X(t) is the location of the t-generation gray wolf. The calculation methods of A and C are as follows:
[0105] A=2a·r1-a
[0106] C=2r1
[0107]
[0108] Where r1, r2 are random values in [0, 1]. To simulate approaching prey, A is a random value in the interval [-a, a], where a decreases from 2 to 0 during the iteration.
[0109] The final stage is the attack on prey. Hunting is usually led by alpha wolf, and β wolf and δ wolf will occasionally participate in hunting. The mathematical model of the gray wolf individual tracking the location of prey is described as follows:
[0110] D α =|C1·XX
[0111] D β =|C2·X β -X|
[0112] D δ =|C3·X δ -X|;
[0113] Among them, D α , D β and D δ Respectively represent the distances between α wolf, β wolf and δ wolf and other individuals; X α , X β and X δ Represent the current positions of α wolf, β wolf and δ wolf respectively; C1, C2 and C3 are random numbers, and X is the current position of the gray wolf individual.
[0114] Improved by using DLH search strategy and GWO fusion:
[0115] Ri(t)=Xi(t)-Xi- GWO (t+1);
[0116] N i (t) = {X j (t) | D i (X i (t),X j (t))≤R i (t),X j (t)∈Pop};
[0117] Where X i-GWO,d The d dimension (t+1) is obtained by using i A random neighborhood X selected from (t) n,d (t) and the random wolf X selected from Pop random,d (t) is used to calculate.
[0118]
[0119] Then, if the fitness value of the selected candidate is less than X i (t), then X is updated by the selected candidate i (t), otherwise, X i (t) remains unchanged until a predefined number of iterations is reached.
[0120] The embodiments of the present invention provide several specific implementation methods based on the technical solutions of the above embodiments.
[0121] As a specific implementation method of this embodiment, Figure 7 An optimal fitness curve diagram obtained by IGWO-Kmedoids clustering is provided in an embodiment of the present invention. In the power load curve clustering method based on IGWO-Kmedoids, the effectiveness of the IGWO optimization algorithm is first verified. During the clustering process, the optimal fitness of the algorithm is calculated and a curve diagram is generated, such as Figure 7 As shown in the figure, the final optimal individual fitness value is 0.9287, and the algorithm approaches the optimal value many times when searching for the best value, indicating that the IGWO algorithm has a strong global optimization ability.
[0122] Then a clustering simulation experiment is conducted. Figure 8 A schematic diagram of the results of IGWO-Kmedoids clustering provided by an embodiment of the present invention, the experimental results are as follows Figure 8As shown. The load curve data set is divided into four categories, namely, bimodal, trimodal, multimodal and peak-avoiding. According to the obtained clustering results, it can be clearly seen how many specific categories the users of each industry are divided into, in the form of similar load curves being divided into the same category, and this embodiment can also verify the clustering effect by calculating the clustering index, and can also set a control group to further illustrate the feasibility of the clustering algorithm.
[0123] From the above detailed scheme, it can be seen that the present invention provides a power load curve clustering method based on IGWO-Kmedoids, and uses the intelligent optimization algorithm IGWO to optimize the parameters of the K-medoids clustering algorithm, which has the following beneficial effects:
[0124] The load data set is processed by using methods such as interpolation, standardization and PCA, which can improve the algorithm's operation speed while ensuring the clustering effect. By integrating the IGWO algorithm, the key parameters of the K-medoids clustering algorithm are optimized, which improves the computational efficiency of clustering. The IGWO algorithm draws on the hierarchy and hunting strategy of the gray wolf group to seek the global optimal solution. This mechanism accelerates the convergence of the algorithm to the optimal or near-optimal clustering center, thereby effectively shortening the number of algorithm iterations and the time required for the clustering process. In addition, by selecting the number of clusters and the distance calculation function of the K-medoids algorithm, the selection of the initial center point of the cluster is further optimized, the clustering error is reduced, the accuracy of the clustering effect and the clustering speed are improved, and the effectiveness and rationality of the power system optimization dispatching strategy can be significantly improved.
[0125] Embodiment 2
[0126] Fig. 9 This is a schematic diagram of the structure of a power load curve clustering device provided in Embodiment 3 of the present invention. The device can be applicable to clustering power load data, wherein the device can be implemented by software and / or hardware and is generally integrated on an electronic device.
[0127] like Fig. 9 As shown, the device comprises:
[0128] An acquisition module 210 is used to acquire a power load curve data set;
[0129] A determination module 220, used to determine the range of the number of clusters;
[0130] The iteration module 230 is used to iterate the clustering of the power load curve data set by using the improved grey wolf optimization algorithm and the K center point algorithm within the range of the number of clusters, and output the clustering result when the number of iterations is greater than or equal to the maximum number of iterations.
[0131] The present embodiment provides a power load curve clustering device, the device comprising: an acquisition module for acquiring a power load curve data set; a determination module for determining a cluster number range; an iteration module for iterating clustering the power load curve data set within the cluster number range by using an improved gray wolf optimization algorithm and a K center point algorithm, and outputting a clustering result when the number of iterations is greater than or equal to a maximum number of iterations. By setting a cluster number range, the power load curve data set is iterated by using an improved gray wolf optimization algorithm and a K center point algorithm within the cluster number range, and finally the clustering result is output, so that the clustering result can be obtained while allowing the user to easily set the parameter range, thereby solving the problem of complex parameter setting in the prior art method of processing power load data.
[0132] Furthermore, the acquisition module 210, wherein the acquisition of the power load curve data set includes:
[0133] Acquire multiple groups of power load data collected based on preset time intervals;
[0134] Abnormal data in each set of power load data are deleted, and missing data in each set of power load data are filled by cubic spline interpolation method to obtain multiple sets of filled power load data;
[0135] Standardizing the filled multiple sets of power load data to obtain multiple sets of standardized power load data;
[0136] The standardized multiple groups of power load data are processed by dimensionality reduction to obtain the power load curve data set.
[0137] Furthermore, the method of filling the missing data in each set of power load data by using the cubic spline interpolation method includes:
[0138] Determine the first derivative of the cubic spline interpolation function corresponding to each set of power load data;
[0139] Derivative the first-order derivative based on the two-point Hermite difference to obtain the cubic spline interpolation function;
[0140] The missing data in each set of power load data is calculated and filled based on the cubic spline interpolation function.
[0141] Furthermore, the standardized multiple groups of power load data are subjected to dimensionality reduction processing to obtain a power load curve data set, including:
[0142] Generate an electric load data matrix according to the standardized multiple groups of electric load data;
[0143] Zero-meaning the power load data matrix to obtain a covariance matrix;
[0144] Combining eigenvectors corresponding to the eigenvalues of the covariance matrix into an eigenvector matrix;
[0145] Multiplying the preset reduced dimension row matrix of the eigenvector matrix by the power load data matrix to obtain a power load data matrix;
[0146] The power load data matrix is used as a power load curve data set.
[0147] Furthermore, the iteration module 230 includes:
[0148] Determine the current optimal number of clusters and distance calculation function from the range of the number of clusters by improving the Grey Wolf Optimization Algorithm;
[0149] Determine the current cluster center point according to the current optimal cluster number by using the K center point algorithm, and cluster the power load curve data set in combination with the distance calculation function to obtain a clustering result;
[0150] If the current number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output; otherwise, the iteration continues.
[0151] Furthermore, the types of clustering results of the power load curve data set include at least one or more of a bimodal type, a trimodal type, a multimodal type and a peak-avoiding type.
[0152] Furthermore, the improved gray wolf optimization algorithm is an algorithm improved by using hunting search based on dimensional learning and the gray wolf optimization algorithm.
[0153] The above-mentioned power load curve clustering device can execute the power load curve clustering method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0154] Embodiment 3
[0155] Fig.10 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0156] like Fig.10As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0157] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0158] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the power load curve clustering method.
[0159] In some embodiments, the power load curve clustering method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the power load curve clustering method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the power load curve clustering method in any other appropriate manner (e.g., by means of firmware).
[0160] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0162] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0164] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0165] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0166] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0167] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A power load curve clustering method, characterized in that: The method comprises: Obtaining power load curve data set; Determine the range of cluster numbers; Within the range of the number of clusters, the power load curve data set is iterated by clustering using the improved grey wolf optimization algorithm and the K center point algorithm, and when the number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output.
2. The method according to claim 1, characterized in that The step of obtaining a power load curve data set includes: Acquire multiple groups of power load data collected based on preset time intervals; Abnormal data in each set of power load data are deleted, and missing data in each set of power load data are filled by cubic spline interpolation method to obtain multiple sets of filled power load data; Standardizing the filled multiple sets of power load data to obtain multiple sets of standardized power load data; The standardized multiple groups of power load data are processed by dimensionality reduction to obtain the power load curve data set.
3. The method according to claim 2, characterized in that The method of filling the missing data in each set of power load data by using the cubic spline interpolation method includes: Determine the first-order derivative of the cubic spline interpolation function corresponding to each set of power load data; Derivative the first-order derivative based on the two-point Hermite difference to obtain the cubic spline interpolation function; The missing data in each set of power load data is calculated and filled based on the cubic spline interpolation function.
4. The method according to claim 2, characterized in that: The dimensionality reduction process is performed on the standardized multiple groups of power load data to obtain a power load curve data set, including: Generate an electric load data matrix according to the standardized multiple groups of electric load data; Zero-meaning the power load data matrix to obtain a covariance matrix; Combining eigenvectors corresponding to the eigenvalues of the covariance matrix into an eigenvector matrix; Multiplying the preset reduced dimension row matrix of the eigenvector matrix by the power load data matrix to obtain a power load data matrix; The power load data matrix is used as a power load curve data set.
5. The method according to claim 1, characterized in that The method of iterating clustering the power load curve data set by improving the grey wolf optimization algorithm and the K center point algorithm within the range of the number of clusters, and outputting the clustering result when the number of iterations is greater than or equal to the maximum number of iterations, includes: Determine the current optimal number of clusters and distance calculation function from the range of the number of clusters by improving the Grey Wolf Optimization Algorithm; Determine the current cluster center point according to the current optimal cluster number by using the K center point algorithm, and cluster the power load curve data set in combination with the distance calculation function to obtain a clustering result; If the current number of iterations is greater than or equal to the maximum number of iterations, the clustering result is output; otherwise, the iteration continues.
6. The method according to claim 1, characterized in that The types of clustering results of the power load curve data set include at least one or more of a bimodal type, a trimodal type, a multimodal type and a peak avoidance type.
7. The method according to claim 1, characterized in that The improved gray wolf optimization algorithm is an algorithm improved by using hunting search based on dimensional learning and the gray wolf optimization algorithm.
8. A power load curve clustering device, characterized in that: The device comprises: An acquisition module, used for acquiring a power load curve data set; A determination module, used to determine the range of cluster number; The iteration module is used to iterate the clustering of the power load curve data set by improving the grey wolf optimization algorithm and the K center point algorithm within the range of the number of clusters, and output the clustering result when the number of iterations is greater than or equal to the maximum number of iterations.
9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the power load curve clustering 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 computer instructions, and the computer instructions are used to enable a processor to implement the power load curve clustering method according to any one of claims 1 to 7 when executed.
Citation Information
Cited By
Power consumption demand automatic response method based on energy consumption subentry measurement
CN119494523A
Automatic Response Method for Electricity Demand Based on Sub - item Energy Consumption Metering
CN119494523B
