Method and system for preprocessing load data by using TRUST-TECH enhanced hierarchical K-means algorithm

By building a data hierarchical structure and utilizing TRUST-TECH optimization technology, the traditional K-means algorithm is improved, solving its limitations on large-scale data sets, and achieving higher quality clustering results.

CN120045963APending Publication Date: 2025-05-27GUIZHOU POWER GRID CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411877606.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When traditional K-means algorithms process large-scale data sets, the clustering results are sensitive to the initial center point and can only obtain a single local optimal solution, resulting in an unsatisfactory clustering effect.

Method used

A hierarchical K-means clustering algorithm enhanced by TRUST-TECH is proposed. By constructing a data hierarchical structure, the data set is simplified, the quality of the initial center point is improved, and the K-means clustering problem is transformed into a nonlinear constrained optimization problem, and the solution is used to use TRUST-TECH optimization technology.

Benefits of technology

It significantly improves the clustering effect, improves the quality of clustering results, can break out of a single local optimal solution, and search for more local optimal solutions, which is suitable for pre-processing of large-scale load data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045963A_ABST
    Figure CN120045963A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of load data preprocessing, in particular to a method and a system for preprocessing load data by using a TRUST-TECH enhanced hierarchical K-means clustering algorithm. Proposing an H-K-means algorithm on the basis of simplification of an original data set structure; an original K-means algorithm clustering problem is converted into a nonlinear constrained optimization problem based on an objective function, and a TRUST-TECH optimization technology is used for solving to realize an H-KTT algorithm. According to the algorithm, through data simplification, on the premise that original data set sample features are reserved to the maximum extent, the data volume is reduced as much as possible, so that the probability of obtaining a high-quality initial center point in a K-means random selection link is improved, and the clustering effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of load data preprocessing, and particularly relates to a method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm. Background Art

[0002] In the traditional K-means algorithm, the clustering result is very sensitive to the initial center points randomly selected in the dataset, and only a single local optimal solution can be obtained finally. Both of the above problems will become more and more serious as the scale of the dataset expands, resulting in unsatisfactory clustering effects. To solve the above problems and improve the clustering quality of the traditional K-means algorithm when dealing with large-scale datasets, this patent has completed the following work. First, in order to provide higher-quality initial center points for the traditional K-means algorithm, based on the simplification of the structure of the original dataset, the hierarchical K-means (H-K-means) algorithm is proposed. Second, in order to further improve the clustering effect of the H-K-means algorithm, the clustering problem of the original K-means algorithm is transformed into a non-linear constrained optimization problem based on the objective function, and the TRUST-TECH optimization technique is used for solution to implement the H-KTT algorithm. Among them, the TRUST-TECH technique is a high-performance non-linear optimization technique. For a given non-linear optimization problem, it can effectively break away from the bondage of a certain local optimal solution, jump out of the area where the local solution is located, and finally obtain multiple other local optimal solutions (even the global optimal solution) within the feasible region through layer-by-layer search, thereby significantly improving the quality of the optimization result.

[0003] This patent applies the H-K-means algorithm and the H-KTT algorithm to a large-scale AMI load dataset from the United States to test their effects. The actual results show that the H-K-means algorithm exhibits excellent performance in terms of clustering effect evaluation indicators, practical applications, and computational efficiency. Subsequently, the application of the H-KTT algorithm can further improve the quality of the clustering results of the H-K-means algorithm. Summary of the Invention

[0004] In view of the problems existing in the above-mentioned prior art, the present invention is proposed.

[0005] To solve the above technical problems, the present invention provides the following technical solution: a method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm, including: proposing the H-K-means algorithm based on the simplification of the structure of the original dataset;

[0006] The clustering problem of the original K-means algorithm is transformed into a non-linear constrained optimization problem based on the objective function, and the TRUST-TECH optimization technique is used for solution to implement the H-KTT algorithm.

[0007] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the H-K-means algorithm includes simplifying the original clustering problem by constructing a data hierarchical structure, and clustering each layer of the data set in turn to obtain the final result.

[0008] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the TRUST-TECH optimization technique constructs a corresponding dynamic system according to the optimized objective function, and uses the trajectory of the dynamic system to realize the search process of each new local optimal solution.

[0009] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the dynamic system includes making all local optimal solutions of the original non-linear optimization problem form a one-to-one correspondence with all equilibrium points of the dynamic system.

[0010] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the solution process of the TRUST-TECH optimization technique is based on the conversion of two key problems, converting the search for the local optimal solution of the original non-linear optimization problem into the search for the stable equilibrium point of a specific continuous non-linear dynamic system;

[0011] The search space of the original non-linear optimization problem is converted into the closure of the stable domain of all stable equilibrium points of the dynamic system.

[0012] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the implementation of the H-KTT algorithm includes, through the construction of the model, taking the clustering result obtained by the H-K-means algorithm as the initial point, that is, the local optimal solution of the 0th layer, and using the TRUST-TECH technique to complete the subsequent search to implement the H-KTT algorithm.

[0013] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for the load data preprocessing method described in the present invention, wherein: the non-linear constrained optimization problem includes optimization variables, an objective function, and constraint conditions;

[0014] The clustering information includes clustering information, the number of clustering samples, and the cluster center point;

[0015] The objective function is the sum of the distances from each sample to the cluster center point it belongs to;

[0016] The constraint conditions include variable value constraints and clustering information constraints;

[0017] By defining the optimization model, the K-means clustering problem is transformed into a non-linear constrained optimization problem. The clustering result obtained by the H-K-means algorithm is used as the initial point, that is, the local optimal solution of the 0th layer, and the subsequent search is completed using the TRUST-TECH technology, thereby realizing the H-KTT clustering algorithm.

[0018] As a preferred solution of the TRUST-TECH enhanced hierarchical K-means clustering algorithm described in the present invention for a load data preprocessing system, it includes: an H-K-means clustering algorithm module and an H-KTT optimization algorithm module;

[0019] The H-K-means clustering algorithm module includes proposing the H-K-means algorithm based on the simplification of the structure of the original data set;

[0020] The H-KTT optimization algorithm module includes transforming the clustering problem of the original K-means algorithm into a non-linear constrained optimization problem based on the objective function and using the TRUST-TECH optimization technology to solve it to realize the H-KTT algorithm.

[0021] A computer device includes a memory and a processor. The memory stores a computer program. The feature is that when the processor executes the computer program, it implements the steps of any of the methods of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing methods.

[0022] A computer-readable storage medium stores a computer program. The feature is that when the computer program is executed by a processor, it implements the steps of any of the methods of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing methods.

[0023] The beneficial effects of the present invention: Based on constructing a data hierarchical structure, the present invention proposes a hierarchical K-means (H-K-means) clustering algorithm. Through data simplification, on the premise of maximizing the retention of the sample characteristics of the original data set, the data volume is reduced as much as possible, thereby increasing the probability of obtaining high-quality initial center points in the random selection link of K-means and improving the clustering effect.

[0024] Based on the TRUST-TECH non-linear optimization technique, a hierarchical KTT (H-KTT) clustering algorithm is proposed. This algorithm transforms the K-means clustering problem into a non-linear constrained optimization problem for a specific objective function and uses the TRUST-TECH technique for solution, so that it can jump out of the single local optimal solution obtained by the H-K-means algorithm and continue to search for more other local optimal solutions, further improving the clustering effect. Description of the Drawings

[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0026] Figure 1 Schematic diagram of the data hierarchical structure of the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method provided by an embodiment of the present invention.

[0027] Figure 2 Basic flowchart of constructing a simplified data set for the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method provided by an embodiment of the present invention.

[0028] Figure 3 Sample example diagram of the test data set for the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method provided by an embodiment of the present invention.

[0029] Figure 4 Schematic diagram of the clustering result of the H-K-means algorithm and the identification of abnormal samples for the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method provided by an embodiment of the present invention (K = 45, the horizontal axis is time, the unit is 15 min, and the vertical axis is the normalized load value).

[0030] Figure 5 Schematic diagram of the clustering result of the traditional K-means algorithm and the identification of abnormal samples for the TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method provided by an embodiment of the present invention (K = 45, the horizontal axis is time, the unit is 15 min, and the vertical axis is the normalized load value).

[0031] Figure 6Schematic diagram of the dataset sample at the highest level (L = 6) of the data hierarchical structure for the load data preprocessing method using the TRUST-TECH enhanced hierarchical K-means clustering algorithm provided by an embodiment of the present invention (the horizontal axis is time, with the unit of 15 minutes, and the vertical axis is the normalized load value).

[0032] Figure 7 Comparison of the H-K-means algorithm and the H-KTT algorithm for the load data preprocessing method using the TRUST-TECH enhanced hierarchical K-means clustering algorithm provided by an embodiment of the present invention based on the effect evaluation index in the dataset at the highest level (L = 6).

[0033] Figure 8 Comparison of the H-KTT, H-K-means algorithms and other common algorithms for the load data preprocessing method using the TRUST-TECH enhanced hierarchical K-means clustering algorithm provided by an embodiment of the present invention based on the effect evaluation index in the original dataset. Detailed implementation manners

[0034] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific implementation manners of the present invention will be given in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0035] Embodiment 1

[0036] Refer to Figure 1 - Figure 2 , which is the first embodiment of the present invention. This embodiment provides a load data preprocessing method using the TRUST-TECH enhanced hierarchical K-means clustering algorithm, including:

[0037] S1. Based on the simplification of the structure of the original dataset, the H-K-means algorithm is proposed.

[0038] It should be noted that in big data problems, the difficulties faced by the traditional K-means algorithm mainly stem from selecting a specified number of high-quality initial center points from a large number of samples. For any dataset, there must already be some "potential" classes formed by samples with relatively high similarity to each other within it. The initial center points of the K-means algorithm should be selected as actual samples that are as close as possible to the centers of these "potential" classes. However, as mentioned before, due to the large number of samples in big data problems, the probability of randomly searching for a few samples that meet the requirements in a given dataset is extremely low. But if it is possible to reduce the scale of the original dataset as much as possible while maintaining the overall characteristics of the dataset, simplifying the original clustering problem, then for the random selection of the K-means algorithm, the possibility of finding initial center points with strong enough representativeness will be significantly improved.

[0039] In a given dataset, if multiple samples with relatively high similarity to each other can be equivalently represented by a single representative sample, a new dataset containing several representative samples can be obtained. Its sample distribution is relatively similar to that of the original dataset, and the number of samples is lower than the original, which can achieve a certain degree of "simplification" of the original clustering problem to a certain extent. From this perspective, a hierarchical structure as shown in Figure 1 can be established based on the original dataset. The first layer, that is, the bottom layer, is the given original dataset, and each subsequent layer is composed of a "simplified" dataset constructed based on the dataset in the previous layer. Then, as the number of layers increases, the number of samples in the dataset gradually decreases while maintaining the original distribution characteristics until the top layer. Among them, the total number of layers L can be specified by the user. After the content of the original dataset is simplified, in the top layer, the random selection process of the K-means algorithm can more easily find the initial center points that meet the requirements.

[0040] On this basis, the Hierarchical K-means (H-K-means) algorithm can be implemented through the following steps:

[0041] The first stage: Construction of the data hierarchical structure

[0042] Step 1. Set the given original dataset as the first layer and start the subsequent steps from i = 2.

[0043] Step 2. Construct the dataset of the i-th layer based on the samples of the (i - 1)-th layer dataset (this step will be introduced in detail below).

[0044] Step 3. If i = L, go to the second stage (Step 4); otherwise, i = i + 1 and go to Step 2.

[0045] The second stage: Data clustering

[0046] Step 4. If \(i = L\), randomly select \(K\) samples from the \(i\)-th layer dataset; otherwise, take the \(K\) cluster centers of the clustering result in Step 5, and use the selected \(K\) samples as the initial centers for K-means clustering in the subsequent steps.

[0047] Step 5. Use the \(K\) samples obtained in Step 4 as the initial centers to perform K-means clustering on the \(i\)-th layer dataset. Specifically, in each iteration of the K-means algorithm, update the corresponding centers in the following way:

[0048]

[0049] where \(n\) k represents the number of samples in the \(k\)-th class in the \(i\)-th layer dataset, \(x\) p represents the \(p\)-th sample in this class, and \(r\) p represents the number of samples in the \((i - 1)\)-th layer dataset represented by \(x\) p Since the number of samples in the \((i - 1)\)-th layer dataset represented by different samples in the \(i\)-th layer dataset is different, using the corresponding numbers as weights for calculating the average value to update the centers can make the clustering result of the \(i\)-th layer dataset closer to the distribution of samples in the \((i - 1)\)-th layer dataset.

[0050] Step 6. If \(i = 1\), output the clustering result obtained in Step 5 as the final result and end the algorithm; otherwise, \(i = i - 1\) and go back to Step 4.

[0051] The above is the overall process of the H-K-means algorithm. First, simplify the original clustering problem by constructing a data hierarchical structure, and then perform clustering on each layer dataset in turn to obtain the final result. Among them, Step 2 in the first stage is the most critical link in this algorithm. Its role is to simplify the dataset of the current layer, obtain a new dataset with similar structure but fewer sample numbers, and use it as the upper layer. To effectively achieve the purpose of "simplification", the following two requirements need to be specifically met in this step:

[0052] 1. Ensure a high similarity between the \((i - 1)\)-th layer dataset and the \(i\)-th layer dataset. In other words, each sample in the \((i - 1)\)-th layer dataset should be close enough to the corresponding representative sample in the \(i\)-th layer dataset.

[0053] 2. On the premise of meeting requirement (1), the number of samples contained in the \(i\)-th layer dataset should be as small as possible.

[0054] Based on the above requirements, the detailed process of Step 2 is as Figure 2 shown. The following analysis takes the \((i - 1)\)-th and \(i\)-th layers as examples.

[0055] To meet requirement 1, the process first uses the K-means algorithm to divide the samples in the (i - 1)-th layer dataset into Mi (the expected value of the number of samples in the i-th layer dataset, specified by the user) classes. For each class, the similarity between its members and the class center is evaluated using the θ metric defined by the following formula:

[0056]

[0057] where n represents the number of members in the class, x q represents the q-th sample in the class, and c represents the center point of the class. Obviously, if the members in the class are generally closer to the center point, that is, the similarity is higher, a smaller θ value will be generated, and vice versa. Therefore, for each class, if the corresponding metric is less than a pre-set threshold t i (specified by the user), then the class is considered acceptable, and the corresponding center point is regarded as the representative sample of all samples in the class and added to the i-th layer dataset. Otherwise, the class is considered unacceptable and will be further "split" into multiple subclasses, and the multiple center points obtained will be used as representative samples to join the i-th layer dataset, making the distance between each sample and its representative sample closer, that is, the similarity is higher.

[0058] To meet requirement 2, the "split" process of each class considered unacceptable will be tried multiple times. Taking the j-th class as an example, the number of subclasses for "split" will gradually decrease starting from k = n j until the corresponding θmax value is no longer less than t i , and the previous "split", that is, the last "split" that meets the similarity requirement, is taken as the final result. Among them, n j is the number of samples contained in the j-th class. At the same time, k of the k + 1 center points obtained from the previous "split" will be used as the initial center points for the current "split" process, so that the quality of the current "split" result is improved compared to randomly selecting the initial center points, and then, on the premise of meeting the similarity requirement, the number of subclasses, that is, the number of representative samples in the i-th layer dataset, is minimized.

[0059] In particular, in the first stage of this algorithm, the construction of the simplified dataset for each layer needs to be carried out according to the pre-set parameters (M i , t i ), and the selection of these parameters will vary depending on the type of data and has a certain subjective factor. A detailed discussion related to this will be given in the case analysis section.

[0060] S2. Transform the clustering problem of the original K-means algorithm into a non-linear constrained optimization problem based on the objective function, and use the TRUST-TECH optimization technique to solve it to implement the H-KTT algorithm.

[0061] It should be noted that the TRUST-TECH (Transformation Under Stability-reTainingEquilibria CHaracterization) optimization technique is a high-performance optimization technique based on dynamic systems that can be used to solve multiple local optimal solutions of non-linear optimization problems. Compared with most optimization algorithms that have been widely applied in various fields, the most obvious advantage of the TRUST-TECH optimization technique is that it can effectively break free from the bondage of local optimal solutions. That is, after obtaining a local optimal solution of the original problem through search, it can jump out of the region where this solution is located, continue to search for local optimal solutions in a circle around it, and based on each solution obtained, search in a circle around it again to obtain more local optimal solutions. Repeat the above process until enough (or even all) local optimal solutions are obtained. Finally, a high-quality local optimal solution (or even the global optimal solution) that meets the requirements can be found from all the solutions obtained through search. In this process, the search process for each new local optimal solution consists of the following two basic steps:

[0062] Step 1. Use a local algorithm (such as the interior point method) to calculate and obtain a local optimal solution.

[0063] Step 2. Jump out of the region where this local optimal solution is located and continue to search to obtain the next adjacent local optimal solution.

[0064] The TRUST-TECH optimization technique constructs a corresponding dynamic system according to the objective function to be optimized and uses the trajectory of this system to implement the above two steps. The basic purpose of constructing this dynamic system is: to establish a one-to-one correspondence between all local optimal solutions of the original non-linear optimization problem and all stable equilibrium points of this system. The solution process of the TRUST-TECH optimization technique is mainly based on the transformation of the following two key problems:

[0065] 1. Transform the search for local optimal solutions of the original non-linear optimization problem into the search for stable equilibrium points of a specific continuous non-linear dynamic system.

[0066] 2. Transform the search space of the original non-linear optimization problem into the closure of the stable domain of all stable equilibrium points of this dynamic system.

[0067] After completing the transformation of the above two problems, according to the relevant characteristics of the dynamic system, the TRUST-TECH optimization technique can effectively solve multiple stable equilibrium points of this system, that is, multiple local optimal solutions of the original problem.

[0068] For a general dynamical system, it is defined as follows:

[0069]

[0070] The curve formed by all solutions starting from x from time t = 0 is called a trajectory, and is specifically expressed as follows:

[0071] Φ(x,·):R→R n

[0072] And if the state vector satisfies:

[0073]

[0074] Then x s is called an equilibrium point of the system. If all the eigenvalues of the Jacobian matrix of f(x) at have non-zero real parts, then the equilibrium point is called hyperbolic; if all the eigenvalues have negative real parts, then is called a stable equilibrium point; otherwise is called an unstable equilibrium point. If k of all the eigenvalues have positive real parts, then is called a type-k equilibrium point. Subsequently, the stable manifolds of the equilibrium point and the unstable manifolds

[0075]

[0076]

[0077] as well as the stable domain A(xs) of the stable equilibrium point xs can be defined:

[0078]

[0079] From a topological perspective, the stable domain A(xs) is a connected invariant open set, and its boundary can be expressed as A(xs). And the open set is defined as the practical stability region of the equilibrium point xs, denoted as Ap(xs).

[0080] According to the previous theory, for any stable equilibrium point \(x_s\), if \(x_d\) is located on the stable boundary of \(x_s\) and then the equilibrium point \(x_d\) is located on the actual stable boundary of the equilibrium point \(x_s\) on \(A_p(x_s)\). In addition, if there exists an equilibrium point \(x\) of type \(k(k > 1)\), then there must exist an equilibrium point of type 1 and Meanwhile, we will define the equilibrium point of type 1 on

[0081] In practical applications, the optimization problems to be processed usually contain constraints. Without loss of generality, consider the following defined nonlinear constrained optimization problem:

[0082]

[0083] s.t. \(h\) i (x)=0, \(i = 1,\cdots,n\) ε

[0084] \(g\) j (x) \(\leq\) 0, \(j = 1,\cdots,n\) T

[0085] where \(C:\mathbb{R}\) n \(\to\mathbb{R}\) is a bounded function with a finite number of local optimal solutions in the interior of its feasible region. Combining the given equality constraint \(h(x)\) and inequality constraint \(g(x)\), the corresponding Lagrangian penalty function is defined as follows:

[0086]

[0087] where \(y\) and \(z\) are Lagrange multipliers, and \(s\) is a slack variable.

[0088] Generally, the optimal solution of the optimization problem can be obtained by calculating the stationary points of the penalty function, that is, solving the following nonlinear equations:

[0089]

[0090] When \(\mu\to0\), the solution of the above equations tends to a critical point \(x\) c of the optimization problem, and then a local optimal solution can be obtained. However, if we only start from an initial point and solve this problem, then finally only a local optimal solution can be obtained, and the algorithm ends, unable to jump out of the current region to complete the search for other local optimal solutions. Therefore, compared with directly solving this equation, we propose a dynamic system:

[0091]

[0092] where \(w=(x,y,z,s)\) T , \(F(w)=(L\) x ,L y ,L z ,L s ) T , based on this, we can obtain the following assumptions and theorems:

[0093] Assumption 1: For any bounded interval \([a,b]\), and for any relatively closed region \(K\) of \((L\) -1 ([a,b])\E L ) in the feasible region, we have:

[0094]

[0095] where

[0096] If each connected region in the feasible region of the optimization problem is a compact set, then Assumption 1 always holds. For most optimization problems in practical applications, the components of their feasible regions are compact sets. Therefore, Assumption 1 usually holds in most problems.

[0097] Theorem 1: If the optimization problem satisfies Assumption 1, then the dynamic system is completely stable.

[0098] For a general dynamic system, its global characteristics may be very complex, and its trajectories may be unbounded, or bounded but exhibit periodic or chaotic phenomena. If every trajectory of a dynamic system can converge to an equilibrium point (a stable equilibrium point or an unstable equilibrium point), then the system can be considered completely stable, and its analysis process will be relatively simple.

[0099] Theorem 2: If the optimization problem satisfies Assumption 1, and at the same time all the equilibrium points of the dynamic system are hyperbolic and finite in number, then each critical point of the optimization problem is a stable equilibrium point of the dynamic system; conversely, if \(x\) is a stable equilibrium point of the system, then \(x\) is an independent local optimal solution of the following optimization problem:

[0100]

[0101] Theorem 2 describes the relationship between the critical points of the optimization problem and the stable equilibrium points of the dynamic system. It shows that each critical point of the optimization problem can be determined by the stable equilibrium points of the system. Therefore, the calculation of the critical points of the optimization problem can be transformed into the search for the stable equilibrium points of the dynamic system.

[0102] Theorem 3: Let \(A\) p (x s) is the stable region of the stable equilibrium point x of the dynamic system s , and x i (i = 1, 2,...) are all the decomposition points of x s . If the dynamic system satisfies the following conditions:

[0103] 1. The equilibrium points on the stable boundary are all hyperbolic and finite in number.

[0104] 2. The stable manifolds and unstable manifolds of the equilibrium points on the stable boundary satisfy the transversality condition. Then the stable boundary is the set of the closed sets of the stable manifolds of x i , that is:

[0105]

[0106] Theorem 3 elaborates in detail the properties of the stable boundary of the dynamic system by using the decomposition points and their stable manifolds. The search process of the TRUST-TECH optimization technique will also be based on this property. Before introducing the steps of the TRUST-TECH optimization technique to search for multiple local optimal solutions, first, the relationship between the stable equilibrium points of the system and the decomposition points on its stable boundary can be obtained through the following theorem.

[0107] Theorem 4: Let be the stable region of the stable equilibrium point of the dynamic system, and satisfy the following conditions:

[0108] 1. The equilibrium points on the stable boundary are all hyperbolic and finite in number.

[0109] 2. The stable manifolds and unstable manifolds of the equilibrium points on the stable boundary satisfy the transversality condition.

[0110] On this basis, if x d is a decomposition point on the stable boundary , then there must exist one and only one stable equilibrium point such that the unstable manifold of x d converges to Conversely, if the set is non-empty, then this set must contain a decomposition point of the system.

[0111] Theorem 4 shows that for a decomposition point of a dynamical system, its unstable manifold converges to two stable equilibrium points. From the perspective of non-linear optimization problems, the two critical points of the original problem are connected by the unstable manifolds of the corresponding decomposition points. In other words, any decomposition point of the dynamical system can be regarded as a bridge connecting two stable equilibrium points. It should be noted that for a general dynamical system, the two conditions in Theorem 4 are generic properties.

[0112] In optimization problems, the challenge of obtaining multiple local optimal solutions lies in how to effectively jump out of the region where a local optimal solution is located and search along the direction where another local optimal solution is located. Specifically, we transform the process of jumping out of the region where a local optimal solution is located and searching along the direction where another local optimal solution is located into the process of jumping out of the stable domain of the corresponding stable equilibrium point in the dynamical system and entering the stable domain of another stable equilibrium point for search. Once the trajectory of the dynamical system falls into the stable domain of another stable equilibrium point, it will subsequently converge to this stable equilibrium point, that is, another local optimal solution of the non-linear optimization problem.

[0113] Based on the above principle, the basic process of the TRUST-TECH optimization technique for searching for local optimal solutions in the surrounding area (the first layer) according to a known (the 0th layer) local optimal solution xs0 of the optimization problem can be summarized as follows:

[0114] Step 0. Initialize the set of decomposition points Vd = Φ, and the set of local optimal solutions in the first layer Vs = Φ.

[0115] Step 1. Construct the corresponding dynamical system.

[0116] Step 2. Generate a series of search directions P 1 , P 2 , …, P n , and search in the direction away from xs0, and set i = 1.

[0117] Step 3. For the search direction P i , find the escape point located at the intersection of the search direction and the stable boundary .

[0118] Step 4. If the escape point in step (3) exists, denoted as x ei , then another corresponding stable equilibrium point (local optimal solution) also exists (according to Theorem 3, this escape point must be located on the stable manifold of a decomposition point); otherwise, go to step (10).

[0119] Step 5. Starting from the escape point x eiNumerical integration of the dynamic system is started to obtain the trajectory of points along the direction of the stable manifold of the corresponding decomposition point until a point where the vector modulus value in the dynamic system is equal to 0 (or approximately equal to 0).

[0120] Step 6. Calculate the corresponding decomposition point using the minimum gradient point obtained in step (5), denoted as x di . Among them, the decomposition point x di connects the initial stable equilibrium point x s 0 and intersects with another stable boundary at the stable equilibrium point .

[0121] Step 7. Check whether the decomposition point x di already exists in the decomposition point set V d . If it exists, go to step (10); otherwise, set V d = V d ∪ x di , and proceed to the next step.

[0122] Step 8. Let x 0i = x s 0 + (1 + ε)(x di - x s 0 ), where ε is selected as a relatively small value. Starting from x 0i , perform numerical integration on the dynamic system until its trajectory reaches a demarcation point, denoted as x fi .

[0123] Step 9. Starting from the demarcation point x fi , use a local algorithm (such as the interior point method) to search for the local optimal solution x di corresponding to the decomposition point x si , and set V s = V s ∪ x si .

[0124] Step 10. Let i = i + 1. If i > n, the algorithm ends and the first-layer local optimal solution is obtained; otherwise, go to step (3).

[0125] Through the above steps, the TRUST-TECH optimization technique can effectively break free from the bondage of the region where the local optimal solution xs0 is located, and then search for the local optimal solutions in the surrounding circle (the first layer). At the same time, this method also has another advantage, that is, during the search process, it can effectively avoid calculating duplicate local optimal solutions. According to Theorem 4, the unstable manifold of the decomposition point xdi connects the initial local optimal solution xs0 and the target local optimal solution xsi. Obviously, after starting from the initial local optimal solution xs0, different search directions will lead to obtaining different escape points on the stable boundary If multiple escape points are all on the stable manifold of the same decomposition point, then starting from them will inevitably lead to obtaining the same decomposition point, and then obtaining the same new stable equilibrium point (local optimal solution) after steps (8) and (9). Therefore, in step (7), the existence of the current decomposition point x di is checked. If this decomposition point has been found and utilized before, steps (8) and (9) are directly omitted, thereby avoiding calculating and obtaining duplicate new stable equilibrium points (local optimal solutions), and improving the search efficiency of the TRUST-TECH optimization technique to a certain extent.

[0126] Theoretically speaking, after completing the above steps, the TRUST-TECH optimization technique can start from each obtained first-layer local optimal solution and use the above steps again to further complete the search for the second-layer and even more-layer local optimal solutions. Usually, the number of search layers of the TRUST-TECH optimization technique can be set by the user and adjusted appropriately according to the actual effect.

[0127] Furthermore, the H-KTT clustering algorithm based on the TRUST-TECH technique;

[0128] For complex nonlinear optimization problems, the TRUST-TECH technique can accurately search for multiple (or even all) local optimal solutions in the feasible region, thus significantly improving the optimization effect. And for a given data set, K-means clustering essentially also belongs to a nonlinear optimization problem. Therefore, by constructing a model, transforming the K-means clustering problem into a nonlinear constrained optimization problem based on the objective function, and using the TRUST-TECH technique to solve it to implement the H-KTT algorithm, it will surely bring further improvement to the clustering effect.

[0129] Assume that the given data set contains a total of n samples, the dimension of the data in each sample is d, and the number of clusters is k. Then the corresponding nonlinear constrained optimization problem model can be defined as follows:

[0130] Optimization variable

[0131] Clustering information

[0132] The clustering information variables are a series of discrete variables in the matrix shown below:

[0133]

[0134] Among them, the variable in the \(i\)-th row and \(j\)-th column represents the belonging of the \(j\)-th sample to the \(i\)-th cluster, and the value is 0 or 1. 1 means belonging, and 0 means not belonging.

[0135] Number of clustering samples:

[0136] The number-of-clustering-samples variable is a series of discrete variables in the vector shown below:

[0137] [x k×n+1 ,x k×n+2 ,......x k×n+k 1×k

[0138] Among them, the \(i\)-th variable represents the number of samples included in the \(i\)-th cluster, and the value is any integer between \([1,k]\).

[0139] Cluster center point:

[0140] The cluster-center-point variable is a series of continuous variables in the matrix shown below:

[0141]

[0142] Among them, the variable in the \(i\)-th row and \(j\)-th column represents the value of the \(j\)-th dimension of the \(i\)-th cluster center point.

[0143] Objective function

[0144] Generally, the objective function of K-means clustering is the sum of the distances from each sample to its belonging cluster center point. Taking the Euclidean distance as an example (i.e., mean square error, MSE index), the form of the corresponding objective function is as follows:

[0145]

[0146] Among them, \(D mj represents the value of the \(j\)-th dimension of the \(m\)-th sample. In addition, in the problem of clustering power system load curves, there are also many other evaluation indicators for clustering effects, and their focuses mainly consider the needs of practical applications. Therefore, in relevant practical applications, the corresponding objective function can be defined according to the currently selected evaluation indicator, and the detailed discussion related to this will be given in the case analysis section.

[0147] Constraint conditions

[0148] Variable value constraints

[0149] ​Clustering information variable value constraints. Such variables can only take values of 0 or 1, i.e.:

[0150] x i (1 - x i ) = 0 i = 1, …, n×k

[0151] Clustering sample number variable value constraints. Summing the corresponding clustering information variables gives the number of samples in the cluster, i.e.:

[0152]

[0153] Cluster center point variable value constraints. Multiplying each sample by the corresponding clustering information and taking the average gives the value of the cluster center point, i.e.:

[0154]

[0155] where D il represents the value of the l-th dimension of the i-th sample.

[0156] Clustering information constraints

[0157] In the K-means clustering problem, any sample can only belong to one cluster at any given time, cannot belong to multiple clusters simultaneously, nor can it belong to no cluster. Therefore, it is necessary to impose constraints on the clustering information variables, i.e.:

[0158]

[0159] Through the definition of the above optimization model, the K-means clustering problem can be effectively transformed into a non-linear constrained optimization problem. Based on previous work, the clustering results obtained by the H-K-means algorithm are used as the initial point, i.e., the local optimal solution at the 0-th layer, and the TRUST-TECH technique is used to complete the subsequent search, thereby implementing the H-KTT clustering algorithm.

[0160] Example 2

[0161] Reference Figure 3 - Figure 8 , the first embodiment of the present invention. This embodiment provides a TRUST-TECH enhanced hierarchical K-means clustering algorithm for load data preprocessing method, including:

[0162] Normally, in the load curve clustering problem, each sample is a daily load curve of a certain power user, and this curve can be composed of measurement values (active power, reactive power, electrical energy, etc.) with a time interval of 15 minutes or 1 hour recorded by an intelligent meter.

[0163] Under normal circumstances, the clustering effect of load samples is mainly evaluated based on the compactness within each class and the differences between different classes. The higher the compactness and differences, the more ideal the clustering effect. Moreover, whether it is the compactness or differences of clustering, their measurement methods rely on various forms of distance values. Therefore, based on the given problem model, the following three distances between load samples need to be predefined:

[0164] The distance between two load samples :

[0165]

[0166] The distance between a load sample (or class center point) and a class Ωk:

[0167]

[0168] The internal distance of a class Ωk:

[0169]

[0170] The clustering effect of load curves can be evaluated through the following five effectiveness indicators commonly used in previous research works:

[0171] 1. Mean index adequacy (MIA) indicator

[23] :

[0172]

[0173] 2. Scatter index (SI) indicator

[49] :

[0174]

[0175] Among them,

[0176] 3. Similarity matrix index (SMI) indicator

[14] :

[0177]

[0178] 4. Clustering dispersion indicator (CDI) indicator

[23] :

[0179]

[0180] 5. Ratio of within cluster sum of squares to between cluster variation (WCBCR) index

[50] :

[0181]

[0182] Among them, the MIA index is used to measure the tightness of each class in the clustering result by the distance values between the members in each class and their corresponding class centers. In applications such as demand response and electricity price planning, power companies always hope to find user groups with as high similarity as possible, so that the operation plan formulated for this group (such as: raising or lowering the electricity price at a certain time period) can act on each user in it most fully. Therefore, the MIA index is suitable for selecting appropriate target users for applications such as demand response and electricity price planning. The SI and SMI indexes are used to measure the differences between various classes in the clustering result by the distance values between the sample centers of each class. In the actual operation of the power system, managers often need to have a relatively clear understanding of various behaviors of users in the network. For large-scale systems with strong diversity in electricity consumption behaviors, effectively distinguishing various forms of samples among them is of great significance for examining the stability and diversity of user load behaviors and the identification of abnormal samples in the dataset. Therefore, the SI and SMI indexes are suitable for the evaluation of user diversity and stability and the identification of abnormal samples. The CDI and WCBCR indexes consider both the tightness and difference factors at the same time. Compared with other indexes, they can provide a more comprehensive effect evaluation and have strong practicability.

[0183] The above 5 evaluation indexes have been widely adopted in the research field of load curve clustering problems. Obviously, for the same dataset, if clustering results have been obtained using different algorithms respectively, the comparison of clustering effects can be realized according to the calculated values of the evaluation indexes, and then the advantages and disadvantages of the algorithm performance can be reflected. In addition, according to the specific forms of the above index definitions, it is not difficult to find that in addition to objective factors such as algorithm performance, the values of each index are also affected by the number of clusters K. Among them, the values of the MIA, SI, CDI, and WCBCR indexes all decrease with the increase of the number of clusters K, while the SMI index is the opposite. Therefore, when comparing the effects of multiple clustering algorithms, it is necessary to be based on the same number of clusters K to ensure the validity of the obtained conclusions.

[0184] The dataset used in the test analysis consists of AMI active power load data of some users in a certain west coast city in the United States. Its basic situation is as follows:

[0185] 1. It contains a total of 86 residential users.

[0186] 2. The time span is from September 2012 to April 2013, a total of 7 months and 217 days.

[0187] 3. It contains a total of 18,662 daily load curves.

[0188] 4. The sampling interval of each daily load curve is 15 minutes and it contains 96 data in total, that is, the data dimension is 96 - dimensional.

[0189] As Figure 3 shown are 30 sample examples randomly selected from this dataset for readers' reference. It is found through observation that the shapes of the load samples are quite diverse, usually manifested as different periods of peak and trough electricity consumption during a day. In addition, there are also a small number of abnormal samples with strong amplitude volatility in the dataset (as shown in sample 9).

[0190] Compare the recognition of abnormal samples in the dataset by different algorithms. First, taking K = 45 as an example, the most ideal clustering results of the H - K - means algorithm and the traditional K - means algorithm in their respective 100 parallel tests for abnormal sample recognition are respectively as Figure 4 、 Figure 5 shown. Among them, most categories are composed of normal - shaped ordinary samples, and each has different peak and trough periods. Since there are many samples in this category, they are represented in the form of class center points and standard deviation curves in the figure for the convenience of readers. At the same time, the clustering results also include a small number of categories with smaller scales, which are the recognized and isolated abnormal samples, and the samples in this category are represented in their actual shapes. Observing the clustering results of the H - K - means algorithm, a total of 48 abnormal samples are recognized and isolated in its categories #3, #4, #5, #6, #7, #9, #12, #13, #19, #21, #27, #30, #32, #33, #34, #36 and #43, accounting for about 64.9% of the total. While the traditional K - means algorithm only recognizes and isolates 7 abnormal samples in its categories #23 and #27, accounting for about 9.5% of the total.

[0191] Considering other clustering algorithms and the number of clusters \(K\), the detailed comparison of the effects of various clustering algorithms based on outlier sample recognition is shown in Table 1. Although the number of clusters \(K\) tested by each algorithm before was between 20 and 50, since outlier samples are isolated in the form of small-scale classes, and choosing too small a number of clusters is not conducive to the generation of small-scale classes. Therefore, in the comparison, we only focus on the clustering results when the number of clusters \(K\) is relatively large (from 35 to 50). In the comparison, when the number of clusters \(K\) changes, the H-K-means algorithm always maintains a significantly better and very stable outlier sample recognition effect than other algorithms. Among them, the optimal recognition rates of each algorithm are 0% (0 / 74) for the fuzzy K-means algorithm, 14.86% (11 / 74) for the traditional K-means algorithm, 18.92% (14 / 74) for the K-means++ algorithm, 32.43% (24 / 74) for the WFA-K-means algorithm, and 13.51% (10 / 74) for the Developed K-means algorithm. When \(K = 49\), the recognition effect of the H-K-means algorithm is the most ideal, up to 74.32% (55 / 74). In addition, for the H-K-means algorithm with different data hierarchical structures, similar to before, when the number of layers \(L\) is 6, the effect is the best, further verifying the rationality of the selection of the optimal number of layers \(L_{opt}\) of the data hierarchical structure.

[0192] Table 1. Comparison of the number of outlier samples recognized by the H-K-means algorithm and other common algorithms in the original dataset

[0193]

[0194] The main reason why the H-K-means algorithm can achieve the above effects is that in the original large-scale dataset, the number of outlier samples is relatively scarce compared to the normal samples with smooth shape changes. Therefore, it is difficult for the traditional K-means algorithm and other related improved algorithms to select them during the process of choosing the initial center points, resulting in the inability to generate corresponding small-scale classes or single-sample classes in the final results. For the H-K-means algorithm, the characteristics of outlier samples can be retained during the data "simplification" process. Thus, among the few samples in the highest-level dataset, there will still be a certain number of samples with outlier characteristics. The 210 samples in the highest-level (the 6th layer) dataset of the data hierarchical structure of the H-K-means algorithm are as Figure 6 shown, and the existence of about 20 samples with abnormal shapes significantly increases the probability of finding outlier samples during the initial center point selection process, thereby significantly improving the final outlier sample recognition effect.

[0195] In addition to the above evaluation metrics and actual effects, computational efficiency is also an important aspect in evaluating the performance of clustering algorithms. The comparison of the computational efficiency of various clustering algorithms based on the average time, the longest time, and the shortest time consumed in parallel testing is shown in Table 2, where each data is a relative value referring to the corresponding results of the traditional K-means algorithm. All tests were completed under the conditions of a Microsoft Windows 7 system, a 3.10 GHz processor, and 3.24 GB of RAM. The actual running times of the traditional K-means algorithm were 12.0260 seconds on average, 23.6230 seconds at the longest, and 6.2330 seconds at the shortest. It can be found from the comparison that the computational speeds of the fuzzy K-means algorithm and K-means++ are significantly slower than those of other algorithms, while the H-K-means algorithm maximally retains the advantage of the traditional K-means algorithm in terms of computational speed and is minimally affected by the value of the number of layers L of the data hierarchical structure.

[0196] In summary, the H-K-means algorithm based on the data hierarchical structure demonstrates excellent performance in terms of clustering effect, practical application, and computational efficiency compared to the traditional K-means algorithm and various other improved K-means algorithms. It should be noted that in this chapter, only the contribution of the H-K-means algorithm to practical applications is analyzed using anomaly sample recognition as an example, and the corresponding clustering results also have considerable utilization value for other practical applications. Related research will be continued in future work.

[0197] Table 2. Comparison of the H-K-means algorithm and other common algorithms based on computational time

[0198]

[0199] The H-K-means algorithm significantly improves the clustering effect through data simplification. However, as analyzed in the previous text, the clustering process of each layer of the dataset is essentially the traditional K-means algorithm. Since there are relatively similar sample characteristics between adjacent layers of the dataset in the data hierarchical structure, the clustering result of the highest layer dataset will closely affect the remaining layers. Therefore, on the one hand, in the H-K-means algorithm, the traditional K-means algorithm can only obtain a single local optimal solution during the clustering process of the highest layer dataset, and there is still room for improvement in the quality of its final result. At the same time, on the other hand, if the clustering result of the highest layer dataset can be improved, the corresponding effect will very likely be transmitted layer by layer through the data hierarchical structure and ultimately act on the original dataset at the bottom layer, achieving a further improvement in the clustering effect.

[0200] Combined with the above theory, the clustering problem of the highest-level (L = 6) dataset in the data hierarchical structure is transformed into a non-linear optimization problem, and the TRUST-TECH technique is used to solve it to obtain a higher-quality local optimal solution (and even a global optimal solution). Subsequently, this result is applied to the datasets of the remaining layers to implement the H-KTT clustering algorithm. Among them, the initial point searched by the TRUST-TECH technique is set as the optimal solution obtained by the H-K-means algorithm in 100 parallel tests. In addition, considering the requirements of specific problems, the objective functions of the non-linear optimization problem can be respectively selected as the above 5 clustering effect evaluation indicators, namely the MIA indicator, the SI indicator, the SMI indicator, the CDI indicator, and the WCBCR indicator, and these are used to replace the MSE indicator. In addition, considering the computational complexity factor, the search layer of the TRUST-TECH technique is set to 1 layer.

[0201] As Figure 7 shown is the comparison of various indicators in the clustering of the highest-level (L = 6) dataset by the H-K-means algorithm and the H-KTT algorithm, that is, the comparison of the objective function values of the non-linear optimization problem before and after the optimization by the TRUST-TECH technique. Obviously, the application of the TRUST-TECH technique has significantly improved the quality of the local optimal solutions of the H-K-means algorithm. On this basis, the center points of each class in the obtained clustering results are used as the initial center points for the clustering of the next-level dataset and are gradually advanced downward, and finally the clustering results of the H-KTT algorithm for the bottom-layer original dataset are obtained.

[0202] As Figure 8 shown is the comparison of various indicators in the clustering of the bottom-layer original dataset by the H-K-means algorithm, the H-KTT algorithm, and other algorithms. It can be observed that although the H-K-means algorithm has achieved significantly better clustering results than other algorithms before, the application of the H-KTT algorithm can still further improve each evaluation indicator. Specifically, the improvement degree of the H-KTT algorithm (compared with the traditional K-means algorithm) is 14.43% for the MIA indicator, 44.42% for the SI indicator, 1.27% for the SMI indicator, 33.40% for the CDI indicator, and 37.76% for the WCBCR indicator, and all these values are higher than the improvement degree of the H-K-means algorithm given in the previous subsection. Compared with other indicators, the improvement effect of the H-KTT algorithm on the MIA indicator and the CDI indicator is particularly prominent, and further improvements of 6.10% and 10.12% are respectively obtained on the basis of the results of the H-K-means algorithm. Obviously, the H-KTT algorithm is more suitable for improving the compactness of each class in the clustering results.

[0203] The continuous growth of system scale has gradually transformed the clustering problem of load curves into a big data problem, leading to extremely low efficiency or even difficulty in implementing many previously common classical clustering algorithms. In contrast, due to its inherent speed advantage, the traditional K-means algorithm is widely used in big data problems in various fields. However, the clustering effect of the traditional K-means algorithm highly depends on the selection of the initial center points and can only obtain a single local optimal solution in the end. When the scale of the dataset increases, the above defects will be more serious, ultimately resulting in an unsatisfactory clustering effect.

[0204] This patent is dedicated to improving the clustering effect of the traditional K-means algorithm when dealing with big data problems. The specific work is as follows:

[0205] 1. Based on constructing a data hierarchical structure, a hierarchical K-means (H-K-means) clustering algorithm is proposed. By data simplification, this algorithm reduces the data volume as much as possible while retaining the sample characteristics of the original dataset to the greatest extent, thereby increasing the probability of obtaining high-quality initial center points in the random selection process of K-means and improving the clustering effect.

[0206] 2. Based on the TRUST-TECH nonlinear optimization technology, a hierarchical KTT (H-KTT) clustering algorithm is proposed. This algorithm transforms the K-means clustering problem into a nonlinear constrained optimization problem for a specific objective function and uses the TRUST-TECH technology to solve it, so as to jump out of the single local optimal solution obtained by the H-K-means algorithm and continue to search for more local optimal solutions, further improving the clustering effect.

[0207] Embodiment 3

[0208] The third embodiment of the present invention is different from the previous two embodiments in that:

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

[0210] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a defined sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or used in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0211] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then stored in a computer memory.

[0212] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0213] Embodiment 4

[0214] The fourth embodiment of the present invention provides a TRUST-TECH enhanced hierarchical K-means clustering algorithm for a load data preprocessing system, characterized by including an H-K-means clustering algorithm module and an H-KTT optimization algorithm module;

[0215] The H-K-means clustering algorithm module includes proposing the H-K-means algorithm based on the simplification of the structure of the original data set;

[0216] The H-KTT optimization algorithm module includes transforming the clustering problem of the original K-means algorithm into a non-linear constrained optimization problem based on an objective function, and using the TRUST-TECH optimization technique for solution to implement the H-KTT algorithm.

[0217] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. TRUST-TECH enhanced hierarchical K-means clustering algorithm is used for load data preprocessing method, which is characterized by: include, Based on the simplification of the original data set structure, the HK-means algorithm is proposed; The original K-means algorithm clustering problem is transformed into a nonlinear constrained optimization problem based on the objective function, and the TRUST-TECH optimization technology is used to solve it to implement the H-KTT algorithm.

2. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 1, characterized in that: The HK-means algorithm includes simplifying the original clustering problem by constructing a data hierarchical structure, clustering each layer of data set in turn and obtaining the final result.

3. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 2, characterized in that: The TRUST-TECH optimization technology constructs a corresponding power system according to the optimized objective function, and uses the trajectory of the power system to realize the search process of each new local optimal solution.

4. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 3, characterized in that: The power system includes a one-to-one correspondence between all local optimal solutions of the original nonlinear optimization problem and all equilibrium points of the power system.

5. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 4, characterized in that: The solution process of TRUST-TECH optimization technology is based on the conversion of two key problems, which converts the search for the local optimal solution of the original nonlinear optimization problem into the search for the stable equilibrium point of a specific continuous nonlinear dynamic system; The search space of the original nonlinear optimization problem is converted into the closure of the stable domain of all stable equilibrium points of the dynamic system.

6. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 5, characterized in that: The implementation of the H-KTT algorithm includes, through the construction of a model, taking the clustering result obtained by the HK-means algorithm as the initial point, that is, the local optimal solution of the 0th layer, and using the TRUST-TECH technology to complete the subsequent search to implement the H-KTT algorithm.

7. The method for preprocessing load data using the TRUST-TECH enhanced hierarchical K-means clustering algorithm as claimed in claim 6, characterized in that: The nonlinear constrained optimization problem includes optimization variables, objective functions, and constraint conditions; The clustering information includes clustering information, the number of cluster samples, and cluster center points; The objective function is the sum of the distances from each sample to the center point of the group to which it belongs; The constraints include variable value constraints and clustering information constraints; By defining the optimization model, the K-means clustering problem is transformed into a nonlinear constrained optimization problem. The clustering result obtained by the HK-means algorithm is used as the initial point, that is, the local optimal solution of the 0th layer, and the TRUST-TECH technology is used to complete the subsequent search, thereby realizing the H-KTT clustering algorithm.

8. A system for load data preprocessing method based on the TRUST-TECH enhanced hierarchical K-means clustering algorithm according to any one of claims 1 to 7, characterized in that: Including HK-means clustering algorithm module and H-KTT optimization algorithm module; The HK-means clustering algorithm module includes proposing the HK-means algorithm based on the simplification of the original data set structure; The H-KTT optimization algorithm module includes converting the original K-means algorithm clustering problem into a nonlinear constrained optimization problem based on the objective function, and solving it using the TRUST-TECH optimization technology to implement the H-KTT algorithm.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.