Rural power grid typical scene generation method, device, equipment and medium

By introducing correlation coefficient and entropy weight method, combined with k-means clustering algorithm, typical scenarios of rural power grids are generated, and the problem that the existing technology cannot fully consider regional characteristics and user diversity is solved, and more efficient grid resource allocation and power supply stability are achieved.

CN119598113APending Publication Date: 2025-03-11STATE GRID SHANGHAI ENERGY INTERCONNECTION RES INST CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411452972.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing rural power grid data analysis methods cannot fully consider factors such as regional characteristics, user diversity, and dynamic changes, resulting in the inability to effectively optimize the power grid resource allocation and power supply stability.

Method used

By selecting attribute variables that characterize rural power grid scenarios, performing time-scale standardization processing, and generating time series vector data sets. Correlation coefficients are introduced to characterize the differential characteristics between samples, extract the set of feature variables, and determine the clustering center by using the entropy weight method, and use the k-means clustering algorithm to generate typical scenarios.

Benefits of technology

It has achieved a deep integration of power generation characteristics of power grid and user power consumption characteristics, provided a more scientific basis for grid planning and management, and improved the intelligence level of power grid management and the efficiency of resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119598113A_ABST
    Figure CN119598113A_ABST
Patent Text Reader

Abstract

The invention relates to a rural power grid typical scene generation method and device, equipment and a medium, and the method comprises the steps: selecting an attribute variable used for representing a rural power grid scene, carrying out the standardization processing of the attribute variable according to a time scale, and generating a to-be-clustered sample data set composed of a plurality of time sequence vectors; a correlation coefficient is introduced to represent the difference characteristic between samples in the to-be-clustered sample data set, and a characteristic variable set in the to-be-clustered sample data set is extracted based on the correlation coefficient; determining a proper clustering k value in combination with a clustering evaluation index, and selecting k initial clustering centers from the feature variable set by adopting a scene difference measurement method based on an entropy weight method; and based on the k initial clustering centers, clustering the to-be-clustered sample data set by using a k-means clustering algorithm to obtain k typical scenes of the rural power grid. According to the method, the power generation characteristics of the power grid and the power utilization characteristics of the users can be deeply fused, and a necessary premise is provided for rural power grid construction and planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rural power grid scenario planning, and in particular to a method, device, equipment and medium for generating a typical scenario of a rural power grid. Background Art

[0002] In the process of modernization, the construction and management of rural power grids face various challenges. With the development of rural economy, the demand for electricity is increasing day by day, and how to supply electricity efficiently and stably has become a key issue. However, traditional power grid management methods often cannot meet the needs of modern rural electricity consumption, especially when the power grid structure is complex and users are widely distributed, the optimal allocation of power resources is particularly important.

[0003] In recent years, with the development of big data technology and artificial intelligence, power grid management methods based on data analysis have gradually gained attention. Through systematic analysis of power users' electricity consumption behavior, geographical distribution and load characteristics, a scientific basis can be provided for the planning, dispatching and maintenance of power grids. Cluster analysis, as an effective data mining technology, can classify power users with similar characteristics, thereby achieving the rational allocation and optimization of power grid resources and improving the stability and economy of power supply.

[0004] However, the existing rural power grid data analysis methods still have some shortcomings, such as the inability to fully consider regional characteristics, user diversity, and dynamic changes. Therefore, a new scenario generation method is urgently needed to better adapt to the actual application needs of rural power grids and improve the intelligent level of power grid management. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for generating typical scenarios of rural power grids, which can deeply integrate the power generation characteristics of the power grid and the power consumption characteristics of users, providing a necessary prerequisite for the construction and planning of rural power grids.

[0006] The technical solution adopted by the present invention to solve the technical problem is: to provide a method for generating a typical scene of a rural power grid, comprising the following steps:

[0007] Select attribute variables used to characterize rural power grid scenarios, standardize them according to time scales, and generate a sample data set to be clustered consisting of multiple time series vectors;

[0008] Introducing a correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting a feature variable set in the sample data set to be clustered based on the correlation coefficient;

[0009] Determine a suitable clustering k value in combination with the clustering evaluation index, and select k initial clustering centers from the feature variable set by using a scene difference measurement method based on the entropy weight method;

[0010] Based on the k initial cluster centers, the k-means clustering algorithm is used to cluster the sample data set to be clustered, and k typical scenes of rural power grids are obtained.

[0011] The introducing of the correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting the characteristic variables in the sample data set to be clustered based on the correlation coefficient, specifically includes:

[0012] According to the relationship between each time series vector in the sample data set to be clustered, the correlation coefficient between each time series vector in the sample data set to be clustered and other time series vectors is calculated to obtain a correlation coefficient matrix;

[0013] Clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters to obtain a plurality of clusters and a noise vector;

[0014] For each cluster formed, the correlation coefficient between all time series vectors in the subcategory is calculated, and the time series vector with the largest average correlation coefficient is selected as the typical feature vector of the cluster;

[0015] The noise vector and the typical feature vector are used as a feature variable set.

[0016] The step of clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters to obtain a plurality of clusters and a noise vector specifically includes:

[0017] Randomly selecting a time series vector from the sample data set to be clustered, and judging whether the selected time series vector is a core vector according to the correlation coefficient matrix, the set clustering radius and the minimum number of clusters;

[0018] If the selected time series vector is a core vector, when the density of the selected time series vector can reach the density of the original cluster, the original cluster is expanded, otherwise, a new cluster is formed;

[0019] If the selected time series vector is a non-core vector, determining whether the non-core vector is a boundary vector;

[0020] If the non-core vector is a boundary vector, and no other time series vector is density-reachable with the boundary vector, then the boundary vector is a "noise" vector;

[0021] The processing of each time series vector in the sample data set to be clustered is completed to obtain a number of clusters.

[0022] The basis for judging the core vector is that the absolute value of the neighborhood of the selected time series vector is not less than the minimum number of clusters, wherein the neighborhood of the selected time series vector refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the cluster radius; the basis for judging the boundary vector is that the non-core vector is a vector within the neighborhood of a core vector.

[0023] The correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered is calculated by Calculated, where c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

[0024] The method of determining a suitable cluster k value by combining the cluster evaluation index and selecting k initial cluster centers from the feature variables by using a scene difference measurement method based on the entropy weight method specifically includes:

[0025] Calculate the weight of each feature variable by combining permutation and combination entropy;

[0026] Calculate the Validity index value for different k values, and determine the k value corresponding to the minimum Validity index value as the appropriate clustering k value, where the Validity index value is the ratio of the intra-class distance to the inter-class distance;

[0027] Combined with the weight of each feature variable, the initial cluster center of the k-means algorithm is determined based on the difference degree measurement method between scenes.

[0028] The weight of each feature variable is calculated by combining the permutation and combination entropy, specifically including:

[0029] Count all permutations of any time series vector and calculate the probability of each permutation;

[0030] According to the probability of each permutation and combination, the permutation and combination entropy of the time series are calculated;

[0031] The weight of each characteristic variable in the time series vector is calculated according to the arrangement and combination entropy of the time series vector.

[0032] The step of combining the weight of each feature variable and determining the initial cluster center of the k-means algorithm based on the difference degree measurement method between scenes specifically includes:

[0033] Randomly select a sample from the feature variable set as the initial cluster center;

[0034] Combined with the weight of each feature variable, the minimum difference between each sample and the current existing cluster center is calculated; the probability of each sample being selected as the next cluster center is calculated according to the minimum difference, and the sample with the highest probability is selected as the next cluster center;

[0035] Repeat the previous step until k initial cluster centers are determined.

[0036] The technical solution adopted by the present invention to solve the technical problem is: to provide a rural power grid typical scene generation device, including:

[0037] A generation module is used to select attribute variables used to characterize rural power grid scenarios, and to standardize them according to the time scale to generate a sample data set to be clustered consisting of multiple time series vectors;

[0038] An extraction module, used for introducing a correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting a characteristic variable set in the sample data set to be clustered based on the correlation coefficient;

[0039] A selection module, used to determine a suitable cluster k value in combination with a cluster evaluation index, and select k initial cluster centers from the feature variable set by using a scene difference measurement method based on an entropy weight method;

[0040] The clustering module is used to cluster the sample data set to be clustered based on the k initial cluster centers using a k-means clustering algorithm to obtain k typical scenes of rural power grids.

[0041] The extraction module comprises:

[0042] A first calculation unit, configured to calculate the correlation coefficient between each time series vector in the sample data set to be clustered and other time series vectors according to the relationship between each time series vector in the sample data set to be clustered, so as to obtain a correlation coefficient matrix;

[0043] A clustering unit, used for clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters, to obtain a plurality of clusters and a noise vector;

[0044] The second calculation unit is used to calculate the correlation coefficient between all time series vectors in the subcategory for each formed cluster, and select the time series vector with the largest average correlation coefficient as the typical feature vector of the cluster;

[0045] A determination unit is used to use the noise vector and the typical feature vector as a feature variable set.

[0046] The clustering unit comprises:

[0047] A first judgment unit is used to randomly select a time series vector from the sample data set to be clustered, and judge whether the selected time series vector is a core vector according to the correlation coefficient matrix, the set clustering radius and the minimum number of clusters;

[0048] A first processing unit is used for, when the selected time series vector is a core vector, expanding the original cluster when the density of the selected time series vector can reach the density of the original cluster, otherwise, forming a new cluster;

[0049] A second judging unit, configured to judge whether the selected time series vector is a boundary vector when the non-core vector is a non-core vector;

[0050] The second processing unit is used for, when the non-core vector is a boundary vector and no other time series vector is density-reachable with the boundary vector, treating the boundary vector as a "noise" vector.

[0051] The basis for judging the core vector in the first judgment unit is that the absolute value of the neighborhood of the selected time series vector is not less than the minimum number of clusters, wherein the neighborhood of the selected time series vector refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the cluster radius; the basis for judging the boundary vector in the second judgment unit is that the non-core vector is a vector within the neighborhood of a core vector.

[0052] The first computing unit Calculate the correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered, where c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

[0053] The selection module comprises:

[0054] A weight calculation unit is used to calculate the weight of each feature variable in combination with permutation and combination entropy;

[0055] A K value determination unit is used to calculate the Validity index values ​​at different k values, and determine the k value corresponding to the minimum Validity index value as the appropriate clustering k value, wherein the Validity index value is the ratio of the intra-class distance to the inter-class distance;

[0056] The initial cluster center determination unit is used to determine the initial cluster center of the k-means algorithm based on the difference degree measurement method between scenes in combination with the weight of each feature variable.

[0057] The weight calculation unit comprises:

[0058] The third calculation unit is used to count all permutations and combinations of any time series vector and calculate the probability of each permutation and combination;

[0059] The fourth calculation unit is used to calculate the permutation and combination entropy of the time series according to the probability of each permutation and combination;

[0060] The fifth calculation unit calculates the weight of each characteristic variable in the time series vector according to the arrangement and combination entropy of the time series vector.

[0061] The initial cluster center determination unit comprises:

[0062] A selection unit is used to randomly select a sample from the feature variable set as the initial cluster center;

[0063] A cluster center selection unit, used to calculate the minimum difference between each sample and the current existing cluster center in combination with the weight of each feature variable, calculate the probability of each sample being selected as the next cluster center according to the minimum difference, and select the sample with the highest probability as the next cluster center;

[0064] The repeating unit is used to repeat the operation of the previous cluster center selection unit until k initial cluster centers are determined.

[0065] The technical solution adopted by the present invention to solve its technical problem is: to provide an electronic device, including a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for generating typical rural power grid scenarios when executing the computer program.

[0066] The technical solution adopted by the present invention to solve its technical problem is: providing a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned rural power grid typical scene generation method are implemented.

[0067] Beneficial Effects

[0068] Due to the adoption of the above-mentioned technical scheme, the present invention has the following advantages and positive effects compared with the prior art: the present invention determines the cluster center based on the improved algorithm, thereby avoiding the unstable clustering effect caused by the manual selection of the traditional cluster center, and shortens the clustering convergence time by extracting typical characteristic variables. The correlation coefficient introduced by the DBSCAN algorithm replaces the original algorithm based on Euclidean distance, thereby reducing the influence of the set cluster radius on the cluster and better processing multidimensional data. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 is a flow chart of a method for generating a typical rural power grid scenario according to a first embodiment of the present invention;

[0070] Figure 2 is a result diagram after the attribute variables selected in the embodiment of the present invention are standardized;

[0071] Figure 3 is a graph showing how the Validity value of the evaluation indicator changes with the number of clusters k in an embodiment of the present invention;

[0072] Figure 4 These are four typical scene graphs obtained by extracting the cluster centers of four clusters of clustering results in an embodiment of the present invention;

[0073] Figure 5 is a composite image of a typical scene of the first scene obtained by clustering results in an embodiment of the present invention and an original scene;

[0074] Figure 6 is a composite image of a typical scene of the second scene obtained by clustering results and an original scene in an embodiment of the present invention;

[0075] Figure 7 is a composite image of a typical scene of the third scene obtained by clustering results and an original scene in an embodiment of the present invention;

[0076] Figure 8 It is a composite image of a typical scene of the fourth scene obtained by clustering results and an original scene in an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0078] The first embodiment of the present invention relates to a method for generating typical scenarios of rural power grids. The method combines the improved density clustering (DBSCAN) and the improved k-means (k-means) clustering method. Compared with the traditional k-means clustering, the method can effectively extract a representative set of characteristic variables and determine the initial clustering center, thereby shortening the clustering convergence time and obtaining a more accurate clustering effect. Figure 1 As shown, the specific steps include:

[0079] Step 1: Select attribute variables used to characterize rural power grid scenarios, standardize them according to the time scale, and generate a sample data set to be clustered consisting of multiple time series vectors.

[0080] The attribute variables used to characterize the rural power grid scenario in this step may include the power generation side, line flow, and load. Assuming that the selected attribute variables are shown in Table 1, if the sampling frequency of the data set is once every 5 minutes, the time dimension of each attribute variable is 288. Take the standardization of 10kv active power variables as an example: for the i-th attribute variable, standardize its active power at each moment, and the active standard value is: in, is the 10kv active power standard value of the i-th attribute variable at time t, P 10kv(i,t) is the 10kv active power variable of the i-th attribute variable at time t.

[0081] Table 1 Selected attribute variables

[0082] variable meaning Number <![CDATA[P 10kv ]]> 10kv load and photovoltaic <![CDATA[n 10kv ]]> <![CDATA[P 35kv ]]> 35kv load and photovoltaic <![CDATA[n 35kv ]]> <![CDATA[P 110kv ]]> 110kv load and photovoltaic <![CDATA[n 110kv ]]> <![CDATA[P UC ]]> Urban civil load <![CDATA[n UC ]]> <![CDATA[P RC ]]> Rural civil load <![CDATA[n RC ]]>

[0083] After standardizing other variables, we get the 10kv active power data set S 10kv , 35kv level active power data set S 35kv , 110kv level active power data set S 110kv , Urban load active power data set S UC , Rural load active power data set S RC , we can get the sample data set to be clustered S = [S 10kv S 35kv S 110kv S UC S RC ].

[0084] Step 2, introduce the correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extract the characteristic variable set in the sample data set to be clustered based on the correlation coefficient, that is, based on the improved DBSCAN algorithm, filter the variables to be selected and extract the characteristic variables in the sample set. This step specifically includes:

[0085] According to the relationship between each time series vector in the sample data set to be clustered, the correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered is calculated to obtain a correlation coefficient matrix. The correlation coefficient between each time series vector and other time series vectors is calculated as follows:

[0086]

[0087] Among them, c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

[0088] The correlation coefficient matrix C formed in this step can be expressed as:

[0089] According to the obtained correlation coefficient matrix C and the set clustering radius E ps The time series vectors in the sample data set to be clustered are clustered using the minimum number of clusters MinPts to obtain several clusters and noise vectors. The details are as follows:

[0090] A time series vector is randomly selected from the sample data set to be clustered, and the correlation coefficient matrix C and the set clustering radius E are used to calculate the time series vector. ps The minimum number of clusters MinPts is used to determine whether the selected time series vector is a core vector. The core vector is determined based on the absolute value of the neighborhood of the selected time series vector being not less than the minimum number of clusters, that is, Among them, the neighborhood of the selected time series vector It refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the clustering radius, that is,

[0091] If the selected time series vector is a core vector, when the density of the selected time series vector can reach the density of the original cluster, the original cluster is expanded, otherwise, a new cluster is formed;

[0092] If the selected time series vector is a non-core vector, it is determined whether the non-core vector is a boundary vector; the basis for determining the boundary vector is that the non-core vector is a vector within the neighborhood of a core vector.

[0093] If the non-core vector is a boundary vector, and no other time series vector is density-reachable with the boundary vector, then the boundary vector is a "noise" vector;

[0094] The processing of each time series vector in the sample data set to be clustered is completed to obtain a number of clusters.

[0095] For each cluster formed, the correlation coefficient between all time series vectors in the subcategory is calculated, and the time series vector with the largest average correlation coefficient is selected as the typical feature vector of the cluster;

[0096] The noise vector and the typical feature vector are used as a feature variable set.

[0097] Step 3: Determine the appropriate cluster k value in combination with the cluster evaluation index, and select k initial cluster centers from the feature variable set using a scene difference measurement method based on the entropy weight method. This step specifically includes:

[0098] First, the weight of each feature variable is calculated by combining the permutation and combination entropy, specifically:

[0099] For any time series {S i (1),S i (2),…,S i (T)} are counted, and the probability p(π) of each permutation and combination is calculated as follows:

[0100]

[0101] Among them, π is a permutation, y is the number of times the permutation π appears in the sequence, (S i (j),S i (j+1),…,S i (j+n-1)) are the consecutive n samples in the sequence.

[0102] Calculate the permutation and combination entropy of the time series T as follows:

[0103]

[0104] Where PE(n) is the permutation and combination entropy of the time series T, and A is the set of all permutations and combinations of n samples.

[0105] Then, the weight w of each characteristic variable in the time series vector is calculated according to the arrangement and combination entropy of the time series vector. i , calculated as:

[0106]

[0107] Where, PE i is the permutation and combination entropy of the i-th sample in PE(n).

[0108] Then, the Validity index values ​​for different k values ​​are calculated, and the k value corresponding to the minimum Validity index value is determined as the appropriate clustering k value, where the Validity index value is the ratio of the intra-class distance to the inter-class distance.

[0109] Finally, combined with the weight of each feature variable, the initial clustering center of the k-means algorithm is determined based on the difference degree measurement method between scenes, specifically:

[0110] Randomly select a sample from the feature variable set as the initial cluster center;

[0111] Combine the weight of each feature variable and calculate the weight of each sample with the current existing O j The minimum difference between cluster centers; the probability of each sample being selected as the next cluster center is calculated based on the minimum difference, and the sample with the highest probability is selected as the next cluster center. The minimum difference D(t) is calculated as follows:

[0112]

[0113] Where P (i,t) represents the active power at the i-th sample time t, Indicates the Oth j The active power of the cluster center at time t.

[0114] The probability P of the next cluster center is calculated as:

[0115]

[0116] Repeat the previous step until k initial cluster centers are determined.

[0117] Step 4: Based on the k initial clustering centers, the k-means clustering algorithm is used to cluster the sample data set to be clustered, and k typical scenes of rural power grids are obtained. That is, according to the optimal number of clusters k and k initial clustering centers obtained in the previous step, the traditional k-means clustering algorithm is used to cluster the sample data set to be clustered, and k clusters are obtained. The center of each cluster is selected as the typical scene, and k typical scenes of rural power grids can be obtained.

[0118] To verify this implementation mode, the present invention is further described below through a specific example.

[0119] This example selects a rural power grid as the research object. The attribute variables include loads at multiple voltage levels and active power of photovoltaics in four seasons, specifically 10kv, 35kv, 110kv, urban civil loads and rural civil loads. The specific variables are shown in Table 1. The data of the selected variables are standardized to obtain a sample data set to be clustered. The results of the attribute variable standardization are shown in Table 1. Figure 2 shown.

[0120] Based on the improved DBSCAN algorithm, the sample data set to be clustered is filtered to extract the characteristic variables in the sample set. In this embodiment, the selected 32 sample vectors to be clustered are screened to obtain the characteristic vector set: four for 10kv, five for 35kv, four for 110kv, and six for civil loads, a total of nineteen.

[0121] A method for measuring the degree of difference between scenes based on entropy weight is used to calculate the probability of each vector in the feature variable set becoming a cluster center, and the number of clusters k is selected in combination with the evaluation index Validity index to determine k initial cluster centers. In this embodiment, Figure 3 The results of the change of the Validity index with the number of clusters k are shown. It can be seen that when k is 4, the Validity value is the smallest, and the clustering effect is optimal at this time.

[0122] The Validity index is used to determine the selection of 4 clusters. Combining the 4 initial cluster centers, the k-means clustering algorithm is used to cluster the sample set to obtain 4 typical scenarios. In this embodiment, 4 clusters are finally obtained, namely Figure 5 , Figure 6 , Figure 7 , Figure 8 The results shown in the figure show that the cluster center in each cluster is proposed, and four typical scenarios are obtained, such as Figure 4 shown.

[0123] It is not difficult to find that the present invention determines the cluster center based on the improved algorithm, which avoids the unstable clustering effect caused by the manual selection of traditional cluster centers. By extracting typical characteristic variables, the clustering convergence time can be shortened. The correlation coefficient introduced by the DBSCAN algorithm replaces the original algorithm based on Euclidean distance, which reduces the influence of the set cluster radius on the cluster and better processes multidimensional data.

[0124] A second embodiment of the present invention relates to a device for generating a typical rural power grid scenario, comprising:

[0125] A generation module is used to select attribute variables used to characterize rural power grid scenarios, and to standardize them according to the time scale to generate a sample data set to be clustered consisting of multiple time series vectors;

[0126] An extraction module, used for introducing a correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting a characteristic variable set in the sample data set to be clustered based on the correlation coefficient;

[0127] A selection module, used to determine a suitable cluster k value in combination with a cluster evaluation index, and select k initial cluster centers from the feature variable set by using a scene difference measurement method based on an entropy weight method;

[0128] The clustering module is used to cluster the sample data set to be clustered based on the k initial cluster centers using a k-means clustering algorithm to obtain k typical scenes of rural power grids.

[0129] The extraction module comprises:

[0130] A first calculation unit, configured to calculate the correlation coefficient between each time series vector in the sample data set to be clustered and other time series vectors according to the relationship between each time series vector in the sample data set to be clustered, so as to obtain a correlation coefficient matrix;

[0131] A clustering unit, used for clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters, to obtain a plurality of clusters and a noise vector;

[0132] The second calculation unit is used to calculate the correlation coefficient between all time series vectors in the subcategory for each formed cluster, and select the time series vector with the largest average correlation coefficient as the typical feature vector of the cluster;

[0133] A determination unit is used to use the noise vector and the typical feature vector as a feature variable set.

[0134] The clustering unit comprises:

[0135] A first judgment unit is used to randomly select a time series vector from the sample data set to be clustered, and judge whether the selected time series vector is a core vector according to the correlation coefficient matrix, the set clustering radius and the minimum number of clusters;

[0136] A first processing unit is used for, when the selected time series vector is a core vector, expanding the original cluster when the density of the selected time series vector can reach the density of the original cluster, otherwise, forming a new cluster;

[0137] A second judging unit, configured to judge whether the selected time series vector is a boundary vector when the non-core vector is a non-core vector;

[0138] The second processing unit is used for, when the non-core vector is a boundary vector and no other time series vector is density-reachable with the boundary vector, treating the boundary vector as a "noise" vector.

[0139] The basis for judging the core vector in the first judgment unit is that the absolute value of the neighborhood of the selected time series vector is not less than the minimum number of clusters, wherein the neighborhood of the selected time series vector refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the cluster radius; the basis for judging the boundary vector in the second judgment unit is that the non-core vector is a vector within the neighborhood of a core vector.

[0140] The first computing unit Calculate the correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered, where c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

[0141] The selection module comprises:

[0142] A weight calculation unit is used to calculate the weight of each feature variable in combination with permutation and combination entropy;

[0143] A K value determination unit is used to calculate the Validity index values ​​at different k values, and determine the k value corresponding to the minimum Validity index value as the appropriate clustering k value, wherein the Validity index value is the ratio of the intra-class distance to the inter-class distance;

[0144] The initial cluster center determination unit is used to determine the initial cluster center of the k-means algorithm based on the difference degree measurement method between scenes in combination with the weight of each feature variable.

[0145] The weight calculation unit comprises:

[0146] The third calculation unit is used to count all permutations and combinations of any time series vector and calculate the probability of each permutation and combination;

[0147] The fourth calculation unit is used to calculate the permutation and combination entropy of the time series according to the probability of each permutation and combination;

[0148] The fifth calculation unit calculates the weight of each characteristic variable in the time series vector according to the arrangement and combination entropy of the time series vector.

[0149] The initial cluster center determination unit comprises:

[0150] A selection unit is used to randomly select a sample from the feature variable set as the initial cluster center;

[0151] A cluster center selection unit, used to calculate the minimum difference between each sample and the current existing cluster center in combination with the weight of each feature variable, calculate the probability of each sample being selected as the next cluster center according to the minimum difference, and select the sample with the highest probability as the next cluster center;

[0152] The repeating unit is used to repeat the operation of the previous cluster center selection unit until k initial cluster centers are determined.

[0153] The third embodiment of the present invention relates to an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for generating typical rural power grid scenarios of the first embodiment when executing the computer program.

[0154] The fourth embodiment of the present invention relates to a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for generating a typical rural power grid scenario of the first embodiment are implemented.

[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction method, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0159] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which 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 generating typical rural power grid scenarios, characterized in that: The following steps are involved: Select attribute variables used to characterize rural power grid scenarios, standardize them according to time scales, and generate a sample data set to be clustered consisting of multiple time series vectors; Introducing a correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting a feature variable set in the sample data set to be clustered based on the correlation coefficient; Determine a suitable clustering k value in combination with the clustering evaluation index, and select k initial clustering centers from the feature variable set by using a scene difference measurement method based on the entropy weight method; Based on the k initial cluster centers, the k-means clustering algorithm is used to cluster the sample data set to be clustered, and k typical scenes of rural power grids are obtained.

2. The method for generating typical rural power grid scenarios according to claim 1, characterized in that: The introducing of the correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting the characteristic variables in the sample data set to be clustered based on the correlation coefficient, specifically includes: According to the relationship between each time series vector in the sample data set to be clustered, the correlation coefficient between each time series vector in the sample data set to be clustered and other time series vectors is calculated to obtain a correlation coefficient matrix; according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters, the time series vectors in the sample data set to be clustered are clustered to obtain a plurality of clusters and a noise vector; For each cluster formed, the correlation coefficient between all time series vectors in the subcategory is calculated, and the time series vector with the largest average correlation coefficient is selected as the typical feature vector of the cluster; The noise vector and the typical feature vector are used as a feature variable set.

3. The method for generating typical rural power grid scenarios according to claim 2, characterized in that: The step of clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters to obtain a plurality of clusters and a noise vector specifically includes: Randomly selecting a time series vector from the sample data set to be clustered, and judging whether the selected time series vector is a core vector according to the correlation coefficient matrix, the set clustering radius and the minimum number of clusters; If the selected time series vector is a core vector, when the density of the selected time series vector can reach the density of the original cluster, the original cluster is expanded, otherwise, a new cluster is formed; If the selected time series vector is a non-core vector, determining whether the non-core vector is a boundary vector; If the non-core vector is a boundary vector, and no other time series vector is density-reachable with the boundary vector, then the boundary vector is a "noise" vector; The processing of each time series vector in the sample data set to be clustered is completed to obtain a number of clusters.

4. The method for generating typical rural power grid scenarios according to claim 3, characterized in that: The basis for judging the core vector is that the absolute value of the neighborhood of the selected time series vector is not less than the minimum number of clusters, wherein the neighborhood of the selected time series vector refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the cluster radius; the basis for judging the boundary vector is that the non-core vector is a vector within the neighborhood of a core vector.

5. The method for generating typical rural power grid scenarios according to claim 2, characterized in that: The correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered is calculated by Calculated, where c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

6. The method for generating typical rural power grid scenarios according to claim 1, characterized in that: The method of determining a suitable cluster k value by combining the cluster evaluation index and selecting k initial cluster centers from the feature variables by using a scene difference measurement method based on the entropy weight method specifically includes: Calculate the weight of each feature variable by combining permutation and combination entropy; Calculate the Validity index value for different k values, and determine the k value corresponding to the minimum Validity index value as the appropriate clustering k value, where the Validity index value is the ratio of the intra-class distance to the inter-class distance; Combined with the weight of each feature variable, the initial cluster center of the k-means algorithm is determined based on the difference degree measurement method between scenes.

7. The method for generating typical rural power grid scenarios according to claim 6, characterized in that: The weight of each feature variable is calculated by combining the permutation and combination entropy, specifically including: Count all permutations of any time series vector and calculate the probability of each permutation; According to the probability of each permutation and combination, the permutation and combination entropy of the time series are calculated; The weight of each characteristic variable in the time series vector is calculated according to the arrangement and combination entropy of the time series vector.

8. The method for generating typical rural power grid scenarios according to claim 6, characterized in that: The step of combining the weight of each feature variable and determining the initial cluster center of the k-means algorithm based on the difference degree measurement method between scenes specifically includes: Randomly select a sample from the feature variable set as the initial cluster center; Combined with the weight of each feature variable, the minimum difference between each sample and the current existing cluster center is calculated; the probability of each sample being selected as the next cluster center is calculated according to the minimum difference, and the sample with the highest probability is selected as the next cluster center; Repeat the previous step until k initial cluster centers are determined.

9. A device for generating typical rural power grid scenarios, characterized in that: include: A generation module is used to select attribute variables used to characterize rural power grid scenarios, and to standardize them according to the time scale to generate a sample data set to be clustered consisting of multiple time series vectors; An extraction module, used for introducing a correlation coefficient to characterize the difference characteristics between samples in the sample data set to be clustered, and extracting a characteristic variable set in the sample data set to be clustered based on the correlation coefficient; A selection module, used to determine a suitable cluster k value in combination with a cluster evaluation index, and select k initial cluster centers from the feature variable set by using a scene difference measurement method based on an entropy weight method; The clustering module is used to cluster the sample data set to be clustered based on the k initial cluster centers using a k-means clustering algorithm to obtain k typical scenes of rural power grids.

10. The rural power grid typical scene generation device according to claim 9, characterized in that: The extraction module comprises: A first calculation unit, configured to calculate the correlation coefficient between each time series vector in the sample data set to be clustered and other time series vectors according to the relationship between each time series vector in the sample data set to be clustered, so as to obtain a correlation coefficient matrix; A clustering unit, used for clustering the time series vectors in the sample data set to be clustered according to the obtained correlation coefficient matrix, the set clustering radius and the minimum number of clusters, to obtain a plurality of clusters and a noise vector; The second calculation unit is used to calculate the correlation coefficient between all time series vectors in the subcategory for each formed cluster, and select the time series vector with the largest average correlation coefficient as the typical feature vector of the cluster; A determination unit is used to use the noise vector and the typical feature vector as a feature variable set.

11. The rural power grid typical scene generation device according to claim 10, characterized in that: The clustering unit comprises: A first judgment unit is used to randomly select a time series vector from the sample data set to be clustered, and judge whether the selected time series vector is a core vector according to the correlation coefficient matrix, the set clustering radius and the minimum number of clusters; A first processing unit is used for, when the selected time series vector is a core vector, expanding the original cluster when the density of the selected time series vector can reach the density of the original cluster, otherwise, forming a new cluster; A second judging unit, configured to judge whether the selected time series vector is a boundary vector when the non-core vector is a non-core vector; The second processing unit is used for, when the non-core vector is a boundary vector and no other time series vector is density-reachable with the boundary vector, treating the boundary vector as a "noise" vector.

12. The rural power grid typical scene generation device according to claim 11, characterized in that: The basis for judging the core vector in the first judgment unit is that the absolute value of the neighborhood of the selected time series vector is not less than the minimum number of clusters, wherein the neighborhood of the selected time series vector refers to the set of time series vectors whose correlation coefficient with the selected time series vector is less than the cluster radius; the basis for judging the boundary vector in the second judgment unit is that the non-core vector is a vector within the neighborhood of a core vector.

13. The rural power grid typical scene generation device according to claim 11, characterized in that: The first computing unit Calculate the correlation coefficient between each time series vector and other time series vectors in the sample data set to be clustered, where c ij is the time series vector S i With the time series vector S j The correlation coefficient between i ,S j ) is the time series vector S i With the time series vector S j The covariance of is the time series vector S i The variance of .

14. The rural power grid typical scene generation device according to claim 9, characterized in that: The selection module includes: a weight calculation unit, which is used to calculate the weight of each feature variable in combination with the permutation and combination entropy; The K value determination unit is used to calculate the Validity index value for different k values, and determine the k value corresponding to the minimum Validity index value as the appropriate clustering k value, where the Validity index value is the ratio of the intra-class distance to the inter-class distance; the initial cluster center determination unit is used to determine the initial cluster center of the k-means algorithm based on the scene difference degree measurement method in combination with the weight of each feature variable.

15. The rural power grid typical scene generation device according to claim 14, characterized in that: The weight calculation unit comprises: The third calculation unit is used to count all permutations and combinations of any time series vector and calculate the probability of each permutation and combination; The fourth calculation unit is used to calculate the permutation and combination entropy of the time series according to the probability of each permutation and combination; The fifth calculation unit calculates the weight of each characteristic variable in the time series vector according to the arrangement and combination entropy of the time series vector.

16. The rural power grid typical scene generation device according to claim 14, characterized in that: The initial cluster center determination unit comprises: A selection unit is used to randomly select a sample from the feature variable set as the initial cluster center; A cluster center selection unit, used to calculate the minimum difference between each sample and the current existing cluster center in combination with the weight of each feature variable, calculate the probability of each sample being selected as the next cluster center according to the minimum difference, and select the sample with the highest probability as the next cluster center; The repeating unit is used to repeat the operation of the previous cluster center selection unit until k initial cluster centers are determined.

17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for generating a typical rural power grid scenario as described in any one of claims 1-8 are implemented.

18. 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 for generating a typical rural power grid scenario as described in any one of claims 1 to 8 are implemented.