Power grid time sequence data aggregation method and system based on least bipartite graph matching

By applying the minimum binary graph matching algorithm in grid timing data aggregation, the structural relationship between years of data is captured, the problem of insufficient generalization ability in the existing methods is solved, a more stable and general representative cycle is achieved, and the accuracy of grid decisions is improved.

CN119961298APending Publication Date: 2025-05-09STATE GRID JIANGSU ECONOMIC RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411683633.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-05-09

AI Technical Summary

Technical Problem

The existing time-series data aggregation methods lack consideration of interannual relationships when processing power grid data, resulting in insufficient generalization capabilities of representative periods and failure to make full use of the continuity and trend information between data.

Method used

The method based on the least binary graph matching is adopted, and the structural relationship between the multi-year data is captured through the minimum binary graph matching algorithm, matching pattern groups are constructed, and a new time series data set is randomly generated for clustering, to obtain a more stable and general representative period.

Benefits of technology

It improves the generalization and stability of time-series data aggregation, enhances the generalization ability of representative periods, and better reflects the performance of data on unseen sample data, thereby improving the accuracy of grid planning and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119961298A_ABST
    Figure CN119961298A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid time sequence data aggregation method based on least bipartite graph matching, and the method comprises the following steps: 1) obtaining power grid time sequence data of multiple years, carrying out the data preprocessing, and detecting and eliminating an extreme value; 2) finding out time sequence data pairs with high similarity among different years by utilizing a least bipartite graph matching algorithm, and constructing a matching mode group; 3) randomly generating a new time series data set by using the matching pattern group, and clustering each data set to obtain an initial representative time period; and 4) combining the extreme time sequence data excluded in the preprocessing with the initial representative time period to obtain a final power grid time sequence data aggregation result. According to the method, clustering is carried out by constructing the matching pattern group and randomly generating the new time sequence data set, so that a representative time period aggregation result which is more stable and better in generalization is obtained. The method has obvious advantages in the aspect of improving generalization and stability of time series data aggregation, and is beneficial to improving the accuracy of decisions such as power grid planning and scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a method for aggregating power grid time series data based on minimum bipartite graph matching. Background Art

[0002] In the planning and operation of power systems, time series data aggregation is a key technology. It simplifies model analysis and improves computational efficiency by compressing a large amount of time series data into representative time periods. However, existing time series data aggregation methods have certain limitations when processing power grid data. First, most methods lack consideration of inter-annual relationships, resulting in insufficient generalization capabilities for representative time periods. Second, existing methods usually mix data from different years together for clustering, failing to fully utilize the continuity and trend information between data. In addition, existing methods mainly rely on raw data when evaluating the quality of representative time periods, failing to fully reflect their performance on unseen sample data. Therefore, it is necessary to study a new time series data aggregation method that can effectively mine inter-annual relationships and improve the generalization capabilities of representative time periods.

[0003] Existing time series data aggregation methods can be mainly divided into two categories: clustering-based methods and pattern recognition-based methods.

[0004] Clustering-based methods, such as K-Means and hierarchical clustering, divide time series data into multiple groups, and then select the center point from each group as the representative period. However, these methods have problems such as high computational complexity and easy to fall into local optimality when processing large-scale and high-dimensional data.

[0005] Methods based on pattern recognition, such as frequent pattern mining and sequential pattern mining, discover representative time periods by mining repeated patterns in data. However, these methods often ignore the temporal correlation between data, resulting in insufficient generalization ability of representative time periods.

[0006] Patent CN112214533A provides a method and device for aggregating time series data, which performs different segmentation and aggregation steps according to different data types. This method is particularly suitable for the field of smart ships, and aims to retain changing data segments while aggregating stable data segments to improve aggregation efficiency and accuracy. However, this method does not take into account the time characteristics of the data, and does not fully utilize the changing trajectory of time series data in multiple time intervals. Patent CN115065492A provides a secure aggregation method for power time series data communication, which combines re-encryption methods and differential privacy to achieve secure aggregation of power time series data, and focuses more on protecting data privacy. However, this method is completely based on the aggregation of historical data within the sample, but it has not been proven that the representative data obtained in this way can be used in future scenarios, so this method is unstable. Summary of the invention

[0007] The present invention aims to overcome the deficiencies of the above-mentioned prior art and provides a method for aggregating power grid time series data based on minimum bipartite graph matching. The method captures the structural relationship between multi-year data through minimum bipartite graph matching, thereby obtaining a more stable and universal representative period. The method is specifically implemented by the following technical solutions:

[0008] The power grid time series data aggregation method based on minimum bipartite graph matching comprises the following steps:

[0009] Step 1) Obtain multi-year power grid time series data, perform data preprocessing, and detect and exclude extreme values;

[0010] Step 2) Using the minimum bipartite graph matching algorithm, find time series data pairs with high similarity between different years and construct a matching pattern group;

[0011] Step 3) Using the matching pattern group, randomly generate new time series data sets, and cluster each data set to obtain the initial representative time period;

[0012] Step 4) The extreme time series data excluded in the preprocessing are merged with the initial representative period to obtain the final grid time series data aggregation result.

[0013] The further design of the minimum bipartite graph matching power grid time series data aggregation method is that the extreme values ​​are detected and excluded in the step 1), specifically including:

[0014] Step 1-1) inputting a data set, wherein the data set includes a power grid time series data set X1, ..., Xb including b years and an extreme value order Γ to be screened out;

[0015] Step 1-2) traverse the data of each year, calculate the Euclidean distance between each pair of observations in the data set according to formula (1), and store the results in the matrix DM. The size of the matrix DM is Ni×Ni, where Ni represents the day of the i-th year, i∈{1,2,…,b};

[0016]

[0017] In formula (1), d(x,y) represents the Euclidean distance between each pair of observations in a certain year, x i ,y i represents the time series data at the i-th moment of any two days in the year, and n represents the number of time series data contained in one day;

[0018] Step 1-3) Sort the distances between each observation and all other observations in ascending order to obtain a sorted distance vector DM', which has the same size as DM;

[0019] Step 1-4) For each observation, find the distance D between the current observation and the Γth nearest neighbor in the data set. If the distance D is greater than the distance between all other observations and their Γth nearest neighbors, mark the observation and its first Γ-1 nearest neighbors as extreme values ​​and exclude them from the original data set, and output the preprocessed data set.

[0020] A further design of the least bipartite graph matching power grid time series data aggregation method is that the matching pattern group is constructed in step 2), further comprising:

[0021] Step 2-1) Construct a bipartite graph, G = (U ∪ V, E), where U and V represent sets of non-intersecting vertices, and E represents a set of edges. Any edge in E will not have two endpoints in a set U or V at the same time. The power grid time series data sets of two adjacent years are represented as two sets U and V of the bipartite graph G = (U ∪ V, E). The nodes of the graph represent data points, and the edges represent the correlation between data points. U represents the set of observations Xi of the previous year, and V represents the set of observations Xi+1 of the next year. For each observation in set U, the Euclidean distance between any observation and each observation in set V is calculated, which is defined as the matching cost C of the two observations. uv ; will match the cost C uv As the weight of the edge, a weighted bipartite graph is formed;

[0022] Step 2-2) Determine the matching of the graph. For a bipartite graph with two disjoint sets U and V, construct the minimum bipartite graph weight matching problem according to formula (2). By solving formula (2), the best matching pattern of observations in the two data sets is obtained;

[0023]

[0024] In formula (2), z uv is a decision variable of binary type;

[0025] Step 2-3) storing the obtained matching patterns in a set families, where the set represents a matching pattern group, each matching pattern contains a pair of data points from two years, and the data point pairs have similar behaviors or characteristics in different years; adding unmatched observations to the extreme observation set, and updating the extreme observation set;

[0026] Step 2-4) Calculate the center point of each matching pattern in the first two data sets, and use the center points to form a set U in the bipartite graph. Use all observations in the third data set as another set V in the bipartite graph to construct a new bipartite graph, which contains the matching patterns of the first two data sets and the observations of the new data set. For each matching pattern center point in U, calculate the Euclidean distance between the center point and each observation in V as the matching cost, find the best matching pattern again, and update the matching pattern and extreme observation set. Repeat this process until all data sets are processed.

[0027] Step 2-5) Output the matching pattern group.

[0028] The further design of the least bipartite graph matching power grid time series data aggregation method is that the clustering in step 3) further includes:

[0029] Step 3-1) extracts the number of matching pattern groups m, randomly selects an observation from each matching pattern group, and combines the selected observations into a new data set Y, where the data set Y contains a new data set of m observations, each of which comes from a different matching pattern group; repeats this process n_itr times, where n_itr is defined by the user;

[0030] Step 3-2) Apply the K-Medoids algorithm to cluster each data set Y, divide the data points into k clusters, each cluster represents a representative time period, thereby obtaining multiple different representative time period sets;

[0031] Step 3-3) merging multiple clustering results from different data sets into a final clustering result;

[0032] Step 3-4) Calculate the center point of each cluster:

[0033] Step 3-5) takes the center point of each cluster as the initial representative period, obtains an initial representative period set spanning multiple years of data, and returns the result.

[0034] A further design of the minimum bipartite graph matching power grid time series data aggregation method is that the merging into a final clustering result in step 3-3) further includes: first, calculating a similarity matrix H for measuring the similarity between different matching pattern groups; then, using a hierarchical clustering algorithm to cluster the similarity matrix, thereby dividing the matching pattern groups into k clusters; finally, for each cluster, merging the samples of all matching pattern groups belonging to the cluster.

[0035] The further design of the minimum bipartite graph matching power grid time series data aggregation method is that the extreme time series data excluded in the preprocessing is merged with the initial representative period in the step 4), further comprising: step 4-1) for each excluded observation value, the distance between the observation value and each cluster centroid in the initial representative period matrix C is calculated, and the nearest cluster centroid is found, and the distance d' between the nearest cluster centroid and the farthest member in its cluster is calculated; if the distance between the excluded observation value and the nearest cluster centroid is less than d', the excluded observation value is merged into the cluster; otherwise, the observation value is retained as a separate cluster and added to C, and the observation value is regarded as an additional representative period;

[0036] Step 4-2) By merging the extreme observations with the initial representative period set, a final aggregation result representing the representative period is obtained and returned.

[0037] The present invention also provides a power system time series data aggregation system based on minimum bipartite graph matching, comprising:

[0038] An extreme value detection module, which identifies and excludes extreme values ​​based on the Euclidean distance between observations; a pattern matching module, which uses a minimum bipartite graph matching algorithm to find time series data pairs with high similarity between different years and construct a matching pattern group;

[0039] The clustering module uses the matching pattern group to randomly generate new time series data sets and clusters each data set to obtain the initial representative time period;

[0040] The post-processing module merges the extreme time series data excluded in the pre-processing with the initial representative period to obtain the final power grid time series data aggregation result including the representative period and the weight of each period.

[0041] The present invention also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is executed by a processor to implement the power grid time series data aggregation method based on minimum bipartite graph matching.

[0042] The advantages of the present invention are as follows:

[0043] Compared with similar time series data aggregation methods, the method of the present invention obtains more stable and generalized representative time period aggregation results by constructing matching pattern groups and randomly generating new time series data sets for clustering. At the same time, the minimum bipartite graph matching algorithm effectively extracts the cross-year relationship of the data and reflects the real structure of the data. Therefore, the method of the present invention has obvious advantages in improving the generalization and stability of time series data aggregation, which is conducive to improving the accuracy of decisions such as power grid planning and scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flowchart of a method for aggregating power grid time series data based on minimum bipartite graph matching provided in an embodiment of the present invention.

[0045] Figure 2 A module schematic diagram of a power grid time series data aggregation method based on minimum bipartite graph matching provided in an embodiment of the present invention.

[0046] Figure 3 is the best matching pair between the 2015 and 2016 observations.

[0047] Figure 4 A flowchart of a power grid time series data aggregation system based on minimum bipartite graph matching provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The technical solution of the present invention is described in detail below.

[0049] Embodiment 1

[0050] like Figure 1 As shown, the present invention proposes a method for aggregating power grid time series data based on minimum bipartite graph matching, which is characterized by comprising the following steps:

[0051] Step 1) Obtain multi-year power grid time series data, perform data preprocessing, detect and exclude extreme values, which specifically includes the following subdivision steps:

[0052] Step 1-1) Input dataset:

[0053] Contains the power grid time series data set X1,…,X b and the order Γ of extreme values ​​to be screened out.

[0054] Step 1-2) Calculate the distance between observations:

[0055] Traverse the data for each year, calculate the Euclidean distance between each pair of observations in the data set, and store the results in the matrix DM, the size of the matrix DM is N i ×N i . N i Represents the day of the i-th year, i∈{1,2,…,b}.

[0056] The calculation formula of Euclidean distance is: In the formula, d(x,y) represents the Euclidean distance between each pair of observations in a certain year, x i ,y i It represents the time series data at the i-th moment of any two days in the year, and n represents the number of time series data contained in one day.

[0057] Steps 1-3) Sort by distance:

[0058] For each observation, its distance to all other observations is sorted in ascending order to obtain a sorted distance vector DM', which is the same size as DM.

[0059] Steps 1-4) Identify extreme values:

[0060] For each observation, find the distance between it and the Γth nearest neighbor in the data set. If this distance is greater than the distance between all other observations and their Γth nearest neighbors, then mark the observation as an extreme value of the Γth order. At the same time, mark the observation and its first Γ-1 nearest neighbors as extreme values.

[0061] Steps 1-5) Eliminate extreme values:

[0062] The extreme values ​​of the highest Γ order are excluded from the original data set to obtain the preprocessed data set.

[0063] Steps 1-6) Output the preprocessed data set:

[0064] Output a preprocessed data set that has excluded Γ-order extreme value observations, thus providing more stable and accurate data for subsequent matching and clustering processes.

[0065] Step 2) Use the minimum bipartite graph matching algorithm to find time series data pairs with high similarity between different years and construct a matching pattern group, which specifically includes the following subdivision steps:

[0066] Step 2-1) Construct a bipartite graph based on the input data set, which contains the power grid time series data set X1,…,X b , and a dictionary exclude (containing the indices of the excluded observations in each data source):

[0067] Suppose a bipartite graph G = (U∪V,E) consists of two disjoint sets of vertices U and V, and a set of edges E, such that no edge in E has two endpoints in either set U or V at the same time.

[0068] The power grid time series data sets of two adjacent years are represented as two sets U and V of the bipartite graph G = (U∪V, E), where the nodes of the graph represent data points and the edges represent the correlation between data points. That is, U represents the set of observations X of the previous year. i , V represents the set of observations X in the next year i +1.

[0069] For each observation in set U, calculate the Euclidean distance between it and each observation in set V, defined as their matching cost C uv . Using these matching costs as edge weights, a weighted bipartite graph is constructed.

[0070] Step 2-2) Determine the matching of the graph:

[0071] For a bipartite graph with two disjoint sets U and V, the minimum bipartite graph weight matching problem (MBGM) can be formulated as

[0072]

[0073] In the formula, z uv is a binary decision variable indicating whether vertices u and v match (z uv =1) or does not match (z uv =0). C uv is the weight of the edge connecting vertices u and v, which is considered their matching cost. The constraint is to ensure that a node in U cannot be mapped to multiple nodes in V and vice versa.

[0074] Solve the minimum bipartite graph weighted matching problem (MBGM) and find the matching relationship between the nodes in the graph of each year and the nodes in the graph of another year, so that the sum of the edge weights between the matching pairs is minimized. The optimal match obtained is the best matching pattern observed in the two data sets.

[0075] Step 2-3) Update the matching pattern group and extreme values:

[0076] The found matching patterns are stored in a collection families, which is called a matching pattern group. Each matching pattern contains two pairs of data points from different years, which have similar behaviors or characteristics in different years. Unmatched observations are added to the extreme observation collection, and the collection of extreme observations is updated.

[0077] Step 2-3) Iteratively solve MBGM:

[0078] Calculate the center point of each matching pattern in the first two data sets (that is, the average of the observations in all matching patterns), and these center points constitute a set U in the bipartite graph. Take all the observations in the third data set as another set V in the bipartite graph, and construct a new bipartite graph that contains the matching patterns of the first two data sets and the observations of the new data set.

[0079] For each matching pattern center point in U, calculate the Euclidean distance between it and each observation in V. This distance is used as the matching cost to measure the similarity between two data points.

[0080] The MBGM algorithm is used to find the best matching mode again, and the matching mode and extreme observation set are updated.

[0081] Repeat this process until all data sets are processed and the matching pattern group is output. The output matching pattern group contains all year matching patterns, including the best matching pairs of observations between different years, which can be used to generate new data sets and used in subsequent clustering processes to extract representative periods.

[0082] Step 3) randomly generates a new time series data set by matching the pattern group, and clusters each data set to obtain the initial representative time period; specifically, the following subdivision steps are included:

[0083] Step 3-1) Randomly generate a new data set based on the input data set, which contains the power grid time series data set X1,…,X b , dictionary families (containing a list of observation indices for each matching pattern), as well as the number of clusters k and the number of iterations n_itr specified by the user;

[0084] Step 3-2) Randomly generate a new data set: The total number of extracted matching pattern groups is recorded as m, and an observation is randomly selected from each matching pattern group, and the selected observations are combined into a new data set Y. A new data set containing m observations is obtained, and each observation comes from a different matching pattern group. Repeat this process n_itr times, and create a new data set Y at each iteration. Here n_itr is a user-defined parameter that controls the complexity of the algorithm and the stability of the final result.

[0085] Step 3-3) Clustering each data set: Apply the K-Medoids algorithm to cluster each data set Y, divide the data points into k clusters, each cluster represents a representative time period, thereby obtaining multiple different representative time period sets.

[0086] The clustering labels obtained in each iteration are saved and stored in the label matrix L, where each row represents the result of a clustering process, each column represents a matching pattern group, and the element L(itr,j) in the matrix represents the number of the cluster assigned to the jth matching pattern group in the itrth clustering process.

[0087] Step 3-3) Merge clustering results: Merge multiple clustering results from different data sets into a final clustering result. First, calculate a similarity matrix H to measure the similarity between different matching pattern groups. Each element of the similarity matrix represents the frequency that two patterns from different matching pattern groups are assigned to the same cluster. Next, use a hierarchical clustering algorithm to cluster the similarity matrix, thereby dividing the matching pattern groups into k clusters. Finally, for each cluster, merge the samples of all matching pattern groups belonging to the cluster.

[0088] Step 3-3) Calculate the center of each cluster: For each cluster, average the observations of all data points belonging to the cluster to obtain the center point (or centroid) of the cluster. The center point here represents the typical behavior of the cluster and can be used as the representative period of the cluster.

[0089] Step 3-4) Return the initial representative period set: Take the center point of each cluster as the initial representative period, obtain the initial representative period set across multiple years of data, and return the result. These representative period sets can represent the typical features in the original data set and can be used in subsequent power grid planning and analysis.

[0090] Step 4) The extreme time series data excluded in the preprocessing are merged with the initial representative period to obtain the final grid time series data aggregation result.

[0091] Step 4-1) Process and exclude extreme values ​​based on the input data set, which contains the power grid time series data set X1,…,X b , the initial representative period matrix C, the labels labels, the user-specified number of clusters k, and the dictionary exclude (containing the index values ​​of the excluded observations in each data source).

[0092] For each excluded observation, calculate its distance to each cluster centroid in the initial representative period matrix C and find the cluster centroid that is closest. Calculate the distance d' between the nearest cluster centroid and the farthest member of its cluster. If the distance between the excluded observation and the nearest cluster centroid is less than d', merge it into that cluster. Otherwise, keep the observation as a separate cluster added to C, and these observations are treated as additional representative periods.

[0093] Step 4-1) Update the representative period: By merging the extreme observations with the initial representative period set, the final aggregation result, i.e., the representative period, is obtained. Create an empty vector W to store the weight of each cluster, i.e., the number of observations contained in each cluster. Traverse each cluster, calculate the number of observations in each cluster, and store it in the vector W.

[0094] Step 4-2) Return the final representative period: Return the updated cluster centroid C and weight vector W, where C contains the final representative period and W identifies the number of observations contained in each cluster. These periods not only contain the typical characteristics of the data, but also take into account the influence of extreme observations, thus more comprehensively reflecting the overall characteristics of the data, thereby improving the generalization ability and accuracy of the representative period.

[0095] The method schematic diagram of the embodiment of the present invention is as follows Figure 2As shown. In order to verify the effectiveness of the grid time series data aggregation method based on minimum bipartite graph matching proposed in the present invention, the proposed method is compared with the K-Medoids method. The data used include hourly wind power generation data sets of eight wind farms in Alberta and hourly electricity demand data of Alberta from 2015 to 2020. The first three years are regarded as in-sample data, while the next three years are regarded as out-of-sample data.

[0096] Figure 3 The best matching pair graph between the observations in 2015 and 2016 is shown. Each year starts from the first day of January and ends on the last day of December of the same year. The horizontal axis is the number of days in the first year 2015, and the vertical axis is the number of days in the next year 2016. The point at coordinate (j, j') represents the observation X on the jth day of 2015. 2015,j and the observed value X on the j'th day of 2016 2016,j' Matching. Draw two vertical lines and two horizontal lines 90 days (about three months) from the beginning / end of the year. Let's assume that the middle 6 months are summer and the remaining 6 months are winter. From the observation results, since most of the observation data in the summer (winter) of the first year are mapped to the observation data in the summer (winter) of the second year, the mapping process performs reasonably. This result shows that the proposed matching process can extract seasonality in the entire matching process.

[0097] Table 1 Improvement of the method of the present invention relative to the K-Medoids method (%)

[0098]

[0099] Table 1 shows the error improvements of the four features of the out-of-sample year mean μ, standard deviation σ, maximum hourly rise rate ramp+, and maximum hourly decrease rate ramp- for 2018, 2019, and 2020. As shown in Table 1, the method proposed in the present invention can improve the observed mean of wind power data by about 8.7-13.4%. This is because the proposed method can obtain representative cycles that are well dispersed in the data space. Note that the proposed method has lower improvements on load data because load data is not as unstable as wind power data. The proposed method shows significant improvements in the maximum rise and fall of wind power data, and can well capture data points with large ramp rise / fall.

[0100] Table 2 NRMS error (%)

[0101]

[0102] Table 2 gives the NRMS errors of the annual duration curve DC and the annual rise duration curve RDC for K-Medoids and the proposed method. Note that the errors corresponding to the load RDC are generally lower because the load data have a smoother profile compared to wind power, so the overall shape of the centroid is almost the same as the original data. On the other hand, the value of the load curve represented by the centroid may be affected by other data sources under study. The proposed method can show seasonality in the entire mapping process (see Figure 3 ), so it creates a series of observations from the same season that can produce a better replica of the load annual duration curve DC.

[0103] In summary, the grid time series data aggregation method based on minimum bipartite graph matching proposed in the present invention has better performance in extracting general behaviors from data sets. It can better replicate the mean, standard deviation, maximum ramp-up / ramp-down, annual duration curve, and ramp-up duration curve of wind power data and load data.

[0104] Embodiment 2

[0105] like Figure 4 As shown, the present invention proposes a power grid time series data aggregation system based on minimum bipartite graph matching, which can identify and utilize the data change trend across years to obtain a more generalizable representative time period. At the same time, the system can better capture the typical behavior of the data, such as the volatility of wind speed and load, thereby improving the prediction accuracy of the model. The system includes four modules, namely: extreme value detection module, pattern matching module, clustering module, and post-processing module.

[0106] The extreme value detection module identifies and excludes extreme values ​​in each year's data based on the Euclidean distance between observations, such as abnormal data caused by abnormal weather or equipment failure, which helps to improve the accuracy and stability of the subsequent matching process.

[0107] The pattern matching module uses the minimum bipartite graph matching algorithm to find time series data pairs with high similarity between different years and construct a matching pattern group. Specifically, by solving the minimum bipartite graph weighted matching problem (MBGM), the data of two consecutive years are matched to find the best one-to-one matching pattern, which helps to capture the evolution trend and seasonal changes of data between different years.

[0108] The clustering module first generates new data sets based on matching patterns and clusters each data set to obtain the initial representative period. Each data set contains samples randomly selected from different matching patterns. Secondly, the K-Medoids clustering algorithm is used to cluster each data set to obtain multiple clustering results. Finally, a voting mechanism is used to integrate multiple clustering results into a final clustering result to obtain the initial representative period.

[0109] The post-processing module merges the previously excluded extreme values ​​with the initial representative period and re-adds them to the clustering results, and updates the representative period to ensure that extreme events are properly considered. The final clustering results are output, including the representative period and the weight of each period (i.e. the number of observation days included).

[0110] Embodiment 3

[0111] This embodiment provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement a power grid time series data aggregation method based on minimum bipartite graph matching.

[0112] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for aggregating power grid time series data based on minimum bipartite graph matching, characterized in that The steps include: Step 1) Obtain multi-year power grid time series data, perform data preprocessing, and detect and exclude extreme values; Step 2) Using the minimum bipartite graph matching algorithm, find time series data pairs with high similarity between different years and construct a matching pattern group; Step 3) Using the matching pattern group, randomly generate new time series data sets, and cluster each data set to obtain the initial representative time period; Step 4) The extreme time series data excluded in the preprocessing are merged with the initial representative period to obtain the final grid time series data aggregation result.

2. The method for aggregating power grid time series data based on minimum bipartite graph matching according to claim 1, characterized in that Detecting and eliminating extreme values ​​in step 1) specifically includes: Step 1-1) inputting a data set, wherein the data set includes a power grid time series data set X1, ..., Xb including b years and an extreme value order Γ to be screened out; Step 1-2) traverse the data of each year, calculate the Euclidean distance between each pair of observations in the data set according to formula (1), and store the results in the matrix DM. The size of the matrix DM is Ni×Ni, where Ni represents the day of the i-th year, i∈{1,2,…,b}; In formula (1), d(x,y) represents the Euclidean distance between each pair of observations in a certain year, x i ,y i represents the time series data at the i-th moment of any two days in the year, and n represents the number of time series data contained in one day; Step 1-3) Sort the distances between each observation and all other observations in ascending order to obtain a sorted distance vector DM', which has the same size as DM; Step 1-4) For each observation, find the distance D between the current observation and the Γth nearest neighbor in the data set. If the distance D is greater than the distance between all other observations and their Γth nearest neighbors, mark the observation and its first Γ-1 nearest neighbors as extreme values ​​and exclude them from the original data set, and output the preprocessed data set.

3. The method for aggregating power grid time series data based on minimum bipartite graph matching according to claim 1, characterized in that The step 2) constructs a matching pattern group, further comprising: Step 2-1) Construct a bipartite graph, G = (U ∪ V, E), where U and V represent sets of non-intersecting vertices, and E represents a set of edges. Any edge in E will not have two endpoints in a set U or V at the same time. The power grid time series data sets of two adjacent years are represented as two sets U and V of the bipartite graph G = (U ∪ V, E). The nodes of the graph represent data points, and the edges represent the correlation between data points. U represents the set of observations Xi of the previous year, and V represents the set of observations Xi+1 of the next year. For each observation in set U, the Euclidean distance between any observation and each observation in set V is calculated, which is defined as the matching cost C of the two observations. uv ; will match the cost C uv As the weight of the edge, a weighted bipartite graph is formed; Step 2-2) Determine the matching of the graph. For a bipartite graph with two disjoint sets U and V, construct the minimum bipartite graph weight matching problem according to formula (2). By solving formula (2), the best matching pattern of observations in the two data sets is obtained; In formula (2), z uv is a decision variable of binary type; Step 2-3) storing the obtained matching patterns in a set families, where the set represents a matching pattern group, each matching pattern contains a pair of data points from two years, and the data point pairs have similar behaviors or characteristics in different years; adding unmatched observations to the extreme observation set, and updating the extreme observation set; Step 2-4) Calculate the center point of each matching pattern in the first two data sets, and use the center points to form a set U in the bipartite graph. Use all observations in the third data set as another set V in the bipartite graph to construct a new bipartite graph, which contains the matching patterns of the first two data sets and the observations of the new data set. For each matching pattern center point in U, calculate the Euclidean distance between the center point and each observation in V as the matching cost, find the best matching pattern again, and update the matching pattern and extreme observation set. Repeat this process until all data sets are processed. Step 2-5) Output the matching pattern group.

4. The method for aggregating power grid time series data based on minimum bipartite graph matching according to claim 3 is characterized in that The clustering in step 3) further includes: Step 3-1) extracts the number of matching pattern groups m, randomly selects an observation from each matching pattern group, and combines the selected observations into a new data set Y, where the data set Y contains a new data set of m observations, each of which comes from a different matching pattern group; repeats this process n_itr times, where n_itr is defined by the user; Step 3-2) Apply the K-Medoids algorithm to cluster each data set Y, divide the data points into k clusters, each cluster represents a representative time period, thereby obtaining multiple different representative time period sets; Step 3-3) merging multiple clustering results from different data sets into a final clustering result; Step 3-4) Calculate the center point of each cluster: Step 3-5) takes the center point of each cluster as the initial representative period, obtains an initial representative period set spanning multiple years of data, and returns the result.

5. The method for aggregating power grid time series data based on minimum bipartite graph matching according to claim 4, characterized in that The step 3-3) is merged into a final clustering result, further comprising: first, calculating a similarity matrix H for measuring the similarity between different matching pattern groups; then, clustering the similarity matrix using a hierarchical clustering algorithm, thereby dividing the matching pattern groups into k clusters; finally, for each cluster, merging the samples of all matching pattern groups belonging to the cluster.

6. The method for aggregating power grid time series data based on minimum bipartite graph matching according to claim 1, characterized in that The step 4) further comprises: merging the extreme time series data excluded in the preprocessing with the initial representative time period; Step 4-1) For each excluded observation, calculate the distance between the observation and each cluster centroid in the initial representative period matrix C, find the nearest cluster centroid, and calculate the distance d' between the nearest cluster centroid and the farthest member in its cluster; if the distance between the excluded observation and the nearest cluster centroid is less than d', merge the excluded observation into the cluster; otherwise, retain the observation as a separate cluster and add it to C, and the observation is regarded as an additional representative period; Step 4-2) By merging the extreme observations with the initial representative period set, a final aggregation result representing the representative period is obtained and returned.

7. A power system time series data aggregation system based on minimum bipartite graph matching, characterized in that: include: An extreme value detection module, which identifies and excludes extreme values ​​based on the Euclidean distance between observations; A pattern matching module, which uses a minimum bipartite graph matching algorithm to find time series data pairs with high similarity between different years and construct a matching pattern group; The clustering module uses the matching pattern group to randomly generate new time series data sets and clusters each data set to obtain the initial representative time period; The post-processing module merges the extreme time series data excluded in the pre-processing with the initial representative period to obtain the final power grid time series data aggregation result including the representative period and the weight of each period.

8. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and the computer program is executed by a processor to implement the power grid time series data aggregation method based on minimum bipartite graph matching as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Time series data aggregation method and device

    CN112214533A

  • Secure aggregation method and system for power time series data communication

    CN115065492A