Power grid operation mode extraction method and device, terminal equipment and storage medium

By extracting time series features, dimensionality reduction and clustering of power grid data, a scientific grid operation mode extraction method is formed, which solves the problems of artificial dependence and rough management in the existing technology, and improves the extraction accuracy and adaptability.

CN119249183AActive Publication Date: 2025-01-03GUANGDONG POWER GRID CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411267876.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-01-03
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

The extraction of existing power grid operation modes mainly relies on manual labor, lack of unified and scientific extraction standards, resulting in rough management and difficult to characterize complex operating scenarios.

Method used

By obtaining the output data of the generator set, the cross-sectional flow data and the load data, extracting time series features, dimensionality reduction optimization and clustering, a scientific extraction method for the operation of the power grid is formed.

Benefits of technology

It improves the accuracy of the extraction of power grid operation mode, reduces manual intervention, adapts to complex scenarios of large power systems, and forms a complete feature extraction chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249183A_ABST
    Figure CN119249183A_ABST
Patent Text Reader

Abstract

The invention discloses a power grid operation mode extraction method and apparatus, a terminal device and a storage medium. The method comprises the steps of obtaining power operation data of a to-be-extracted power grid; time sequence features are extracted according to the power operation data, and power sequence features are extracted; performing dimension reduction optimization according to the power time sequence characteristics to obtain target power time sequence characteristics; clustering the target power time sequence features to obtain a power data clustering result; and taking a clustering center corresponding to a power data clustering result as a power grid operation mode of the to-be-extracted power grid. By implementing the method, more accurate time sequence characteristics are provided, then dimension reduction optimization is performed on the power time sequence characteristics, the method adapts to a complex operation scene in a large-scale power system of a power grid, the clustering center corresponding to the power data clustering result is taken as a power grid operation mode, manual intervention is reduced, and the power grid operation efficiency is improved. A complete chain is formed from time sequence feature extraction, dimensionality reduction and clustering to gradually extract the power grid operation mode, and the power grid operation mode extraction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a method, device, terminal equipment and storage medium for extracting power grid operation modes. Background Art

[0002] In recent years, the intelligent era has developed rapidly. As a national basic energy support industry, the power industry has accelerated its pace and entered the big data era of the power industry ahead of schedule. As a result, the production and operation mode of my country's power system has undergone major changes. The improvement of scientific and technological levels and the continuous deepening of power system reform have enabled my country's power grid structure and operation control methods to be continuously improved, ensuring the safe and stable operation of the power grid. With the large-scale access of new energy sources such as wind power and photovoltaics and the rapid advancement of ultra-high voltage and regional power grid interconnection, while enhancing the level of safe and stable operation of the power grid, it has also led to more complex and changeable power grid operation modes, and put forward more refined requirements for the management of power grid operation modes. The extraction of traditional power grid operation modes mainly relies on manual extraction. The power grid operation mode is obtained by manual extraction based on the operator's own operation experience and historical operation database. There is a lack of unified and scientific extraction standards and it is highly subjective. And limited by the management level of the operator, the classification of the extraction method is relatively rough, which makes it difficult to characterize the complex operation scenarios in large-scale interconnected power systems. Summary of the invention

[0003] The embodiments of the present invention provide a method, apparatus, terminal device and storage medium for extracting the operation mode of a power grid, which can effectively solve the problem that the prior art mainly relies on manual extraction of the operation mode of the power grid and lacks a unified and scientific extraction standard.

[0004] An embodiment of the present invention provides a method for extracting a power grid operation mode, comprising:

[0005] Acquire the power operation data of the power grid to be extracted; the power operation data includes: generator set output data, section flow data and load data;

[0006] Extracting time series features according to the power operation data to obtain power time series features;

[0007] Performing dimensionality reduction optimization according to the power time series characteristics to obtain target power time series characteristics;

[0008] Clustering the target power time series features to obtain a final power data clustering result;

[0009] The cluster center corresponding to the final power data clustering result is used as the power grid operation mode of the power grid to be extracted.

[0010] Furthermore, extracting time series features according to the power operation data to obtain power time series features includes:

[0011] According to the power operation data and a preset sliding window length, slidingly find a plurality of power operation data subsequences of the power operation data;

[0012] According to the power operation data and the plurality of power operation data subsequences, a distance value between the power operation data and each power operation data subsequence corresponding to the power operation data is calculated;

[0013] Identification is performed based on the power operation data, a plurality of power operation data subsequences, the distance value, and a preset distance threshold to obtain a power time series feature.

[0014] Furthermore, according to the power operation data, the plurality of power operation data subsequences, the distance value and the preset distance threshold, identification is performed to obtain power time series features, including:

[0015] Calculating information gain according to a plurality of power operation data subsequences, the distance value and a preset distance threshold;

[0016] When the information gain is the largest, the separation point corresponding to the maximum information gain is taken as the target separation point;

[0017] According to the target separation point and the plurality of power operation data subsequences, determining the power operation data subsequence that meets the target separation point as a target time sequence;

[0018] A shape factor conversion is performed according to the target time series and the power operation data to extract power time series features.

[0019] Furthermore, dimension reduction optimization is performed according to the power time series characteristics to obtain target power time series characteristics, including:

[0020] According to the power time series characteristics and a preset kernel function, the power time series characteristics are mapped to a high-dimensional space, and a principal component analysis is performed on the mapped power time series characteristics in the high-dimensional space to obtain a preliminary dimension-reduced time series characteristic;

[0021] The initial dimension-reduced time series features are randomly divided into action sets and environment state sets;

[0022] According to the action set and the environment state set, repeatedly performing iterative optimization until the current cumulative reward value is less than the previous cumulative reward value, thereby obtaining a final action set and a final environment state set;

[0023] Determine the target power time series characteristics according to the final action set and the final environment state set;

[0024] Wherein, the iterative optimization includes:

[0025] Update the Q value table according to the current action set and the current environment state set; the current action set and the current environment state set during the first iterative optimization are the action set and the environment state set respectively;

[0026] Calculate the current cumulative reward value based on the current action set and environment state set;

[0027] Compare the current cumulative reward value with the previous cumulative reward value;

[0028] When it is determined that the current cumulative reward value is less than the previous cumulative reward value, the current action set and the current environment state set are used as the final action set and the final environment state set;

[0029] When it is determined that the current cumulative reward value is greater than the previous cumulative reward value, the Q value table is updated according to the cumulative reward value; and the current action set and the current environment state set are updated according to the updated Q value table.

[0030] Furthermore, the target power time series features are clustered to obtain a final power data clustering result, including:

[0031] Randomly selecting a number of target power time series features as initial clustering centers according to the target power time series features;

[0032] According to the initial cluster center and the target power time series characteristics, the clustering operation is repeatedly performed until a preset cost function converges, thereby obtaining a final power data clustering result;

[0033] The clustering operation includes:

[0034] According to the current cluster center and the target power time series feature, the target power time series feature is allocated to the current cluster center that is closest to the target power time series feature, so as to obtain a plurality of time series feature clusters;

[0035] Taking a number of time series feature clusters as the current power data clustering results; the current cluster center when the clustering operation is first performed is the initial cluster center;

[0036] Calculate the cost function according to the current cluster center corresponding to the current power data clustering result and the target power time series characteristics;

[0037] When it is determined that the cost function converges, the current power data clustering result is used as the final power data clustering result;

[0038] When it is determined that the cost function does not converge, a Bayesian score value is calculated based on a number of time series feature clusters, the number corresponding to the target power time series feature, and a preset likelihood function; and the current number of cluster centers is updated based on the Bayesian score value and a preset score threshold;

[0039] Update the current cluster center according to the current number of cluster centers and several time series feature clusters.

[0040] Furthermore, before extracting the time series features according to the power operation data to obtain the power time series features, it also includes: preprocessing the power operation data to obtain the final power operation data;

[0041] Preprocessing the power operation data to obtain final power operation data includes:

[0042] Processing missing values ​​on the power operation data to obtain power operation data after removing missing values;

[0043] Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values;

[0044] According to the abnormal value of power operation and the preset linear interpolation function, the power operation correction value is calculated;

[0045] The power operation correction value is filled into the power operation data after removing the missing value to obtain the final power operation data.

[0046] As an improvement of the above solution, another embodiment of the present invention provides a device for extracting a power grid operation mode, including:

[0047] The power data acquisition module is used to acquire the power operation data of the power grid to be extracted; the power operation data includes: generator set output data, section flow data and load data;

[0048] A power time series feature extraction module, used to extract time series features according to the power operation data to obtain power time series features;

[0049] A feature dimension reduction module, used to perform dimension reduction optimization according to the power time series feature to obtain a target power time series feature;

[0050] A power data clustering module, used for clustering the target power time series features to obtain a final power data clustering result;

[0051] The operation mode extraction module is used to use the cluster center corresponding to the final power data clustering result as the power grid operation mode of the power grid to be extracted.

[0052] Furthermore, it also includes: a data preprocessing module, used to preprocess the power operation data to obtain final power operation data;

[0053] Preprocessing the power operation data to obtain final power operation data includes:

[0054] Processing missing values ​​on the power operation data to obtain power operation data after removing missing values;

[0055] Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values;

[0056] According to the power operation abnormal value and the preset linear interpolation function, the power operation correction value is calculated; the power operation correction value is filled into the power operation data after the missing value is removed to obtain the final power operation data.

[0057] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements a method for extracting a power grid operation mode as described in the above embodiment.

[0058] Another embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for extracting a power grid operation mode described in the above embodiment.

[0059] By implementing the present invention, at least the following beneficial effects are achieved:

[0060] The present invention provides a method, device, terminal equipment and storage medium for extracting the operation mode of a power grid, wherein the method can obtain the power operation data of a power grid to be extracted; the power operation data includes: generator set output data, section flow data and load data; extracting time series features according to the power operation data to obtain power time series features; performing dimensionality reduction optimization according to the power time series features to obtain target power time series features; clustering the target power time series features to obtain final power data clustering results; and using the cluster center corresponding to the final power data clustering results as the power grid operation mode of the power grid to be extracted. By extracting the time series features of the power operation data of the power grid, the power time series features that reflect the dynamic characteristics of the power grid operation are obtained, providing more accurate time series features for the subsequent extraction of the power grid operation mode; then the power time series features are optimized by dimensionality reduction to adapt to the complex operation scenarios of large-scale power systems in the power grid, avoid the limitations of the power grid operation mode extraction, and improve the accuracy of the power grid operation mode extraction; after clustering the target power time series features, the cluster center corresponding to the power data clustering result is used as the power grid operation mode to reduce manual intervention, and gradually extract the power grid operation mode from the complete chain formed from time series feature extraction, dimensionality reduction and clustering, thereby improving the accuracy of the power grid operation mode extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a flow chart of a method for extracting a power grid operation mode provided by an embodiment of the present invention;

[0062] Figure 2 It is a structural schematic diagram of a device for extracting a power grid operation mode provided by an embodiment of the present invention;

[0063] Figure 3 It is another flow chart of a method for extracting a power grid operation mode provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] See also Figure 1 , is a flow chart of a method for extracting a power grid operation mode provided by an embodiment of the present invention, comprising:

[0066] S1. Acquire the power operation data of the power grid to be extracted; the power operation data includes: generator set output data, section flow data and load data;

[0067] S2. Extracting time series features according to the power operation data to obtain power time series features;

[0068] S3. Performing dimensionality reduction optimization according to the power time series characteristics to obtain target power time series characteristics;

[0069] S4, clustering the target power time series features to obtain a final power data clustering result;

[0070] S5. The cluster center corresponding to the final power data clustering result is used as the power grid operation mode of the power grid to be extracted.

[0071] Specifically, the power operation data includes many parameters, such as generator set output data, section flow data, load data, transformer tap position and compensator input amount. If all power operation data are used as characteristic variables to characterize the operation mode of the power grid without selection, a large amount of data will be redundant. In this embodiment, the power operation data includes generator set output data, section flow data and load data. As the source of the entire power production system, the power generation side, factors such as the startup combination mode and operation mode of the generator set will have an impact on the operation mode of the entire power grid. In particular, with the rapid development of distributed power generation and the continuous access of new energy, the operation of the generator set has an increasingly obvious impact on the operation mode of the entire power grid. On the one hand, the rapid development of distributed power generation has affected the system's demand for the construction of centralized power plants and long-distance transmission lines, and has gradually transformed the power grid from a radial power grid to a network that is distributed throughout the power source and interacts with users, making the operation mode of the power grid more complicated; on the other hand, new energy power generation mainly based on wind and light has obvious volatility and randomness due to the greater impact of environmental factors. The access of new energy is likely to lead to frequent changes in the power grid flow, making the voltage adjustment and protection configuration of the power system increasingly difficult, and bringing challenges to the safe and stable operation of the power system. Among the many influencing factors, the output of the generator set has the most obvious impact on the operation mode of the power grid. Therefore, when selecting the attribute variables that characterize the operation mode of the power grid, the output data of the generator set on the power generation side should be taken into account.

[0072] Sectional flow data directly reflects the power flow in a specific area of ​​the power grid. By analyzing the section flow data, it can be determined whether there are unreasonable phenomena such as overload and power reverse transmission in the power grid, providing data support for adjusting the operation mode. Secondly, the safety and reliability of the power grid are directly related to the stability of power supply and the user's power experience. Sectional flow data can reveal the weak links and potential risk points in the power grid, such as the overload risk of key lines and voltage stability problems, so as to formulate safety strategies and emergency measures in a targeted manner and improve the ability of the power grid to resist failures and recover. In addition, section flow data provides basic information for the economic dispatch and optimized operation of the power grid. By analyzing the section flow, the power grid structure can be optimized, the power generation output can be adjusted, the load balance can be achieved, the network loss can be reduced, and the energy utilization efficiency can be improved, so as to achieve the purpose of economic operation. Therefore, section flow data is irreplaceable for evaluating the operating status of the existing power grid, planning future power supply plans, and ensuring the safety, reliability and economic operation of the power grid.

[0073] The operating characteristics of the power grid under various load conditions are an important part of the research and analysis of the power grid operation mode. From the perspective of the load level, its level directly determines the output level of the generator set on the power generation side of the system, which in turn affects the power flow distribution of the system; from the perspective of the type of load, different types of loads have different effects on the power grid. For example, when electric locomotives, large motors, arc furnaces and other equipment are started, impact loads and harmonics will be caused, which will affect the stable operation of transmission equipment and systems. Therefore, load data is an important attribute variable in the extraction of power grid operation mode.

[0074] In a preferred embodiment of the present invention, after obtaining the power operation data of the power grid to be extracted, the time series features are extracted according to the power operation data to obtain the power time series features. The power time series features represent the features that describe the time changes of power extracted from the time series data (power operation data) of the power grid. By identifying unique shape fragments in the time series, it is possible to capture subtle and critical change patterns in the operation of the power grid, providing a more detailed pattern recognition capability than traditional statistical features. Then, dimensionality reduction optimization is performed based on the power time series features to obtain the target power time series features, and then the target power time series features are clustered to obtain the final power data clustering results; finally, the cluster center corresponding to the final power data clustering result is used as the power grid operation mode of the power grid to be extracted.

[0075] The existing power grid operation mode extraction mainly relies on manual extraction, mainly relying on the operation experience of the operators themselves, relevant national industry regulations and historical operation databases. Manual extraction lacks unified and scientific extraction standards, is highly subjective, and has limited management and scientific levels, resulting in a relatively rough classification of operation modes, making it difficult to characterize the various complex operation scenarios that have emerged in large-scale interconnected power systems with the access of new energy systems and power market reforms. The embodiment of the present invention combines three technologies: time series feature analysis, dimensionality reduction and clustering, forming a complete analysis chain from feature extraction to recognition, and realizing rapid extraction of power grid operation modes.

[0076] Preferably, extracting time series features according to the power operation data to obtain power time series features includes:

[0077] According to the power operation data and a preset sliding window length, slidingly find a plurality of power operation data subsequences of the power operation data;

[0078] According to the power operation data and the plurality of power operation data subsequences, a distance value between the power operation data and each power operation data subsequence corresponding to the power operation data is calculated;

[0079] Identification is performed based on the power operation data, a plurality of power operation data subsequences, the distance value, and a preset distance threshold to obtain a power time series feature.

[0080] Preferably, the power time series feature is obtained by identifying according to the power operation data, the plurality of power operation data subsequences, the distance value and a preset distance threshold, including:

[0081] Calculating information gain according to a plurality of power operation data subsequences, the distance value and a preset distance threshold;

[0082] When the information gain is the largest, the separation point corresponding to the maximum information gain is taken as the target separation point;

[0083] According to the target separation point and the plurality of power operation data subsequences, determining the power operation data subsequence that meets the target separation point as a target time sequence;

[0084] A shape factor conversion is performed according to the target time series and the power operation data to extract power time series features.

[0085] In a preferred embodiment of the present invention, the power operation data is arranged in chronological order as a time series, that is, the power operation data can be regarded as a time series T=t1, t2, ..., t MA set of M real-valued data points arranged in time order, where adjacent data points t1, t2, ..., t M Assuming that a time series T of length M and a user-defined subsequence of length l are given, the subsequence can be found through a sliding window of length l, and the subsequence defined by this sliding window is expressed as The superscript l represents the length of the subsequence, and the subscript p represents the starting position of the sliding window. The set of all subsequences of length l in T is defined as S l (T), that is, several power operation data subsequences

[0086] The power operation data subsequence can also be regarded as a continuous sequence segment S with a length of l (l≤M) on the time series T, that is, S = t p ,t p+1 ,...,t p+l-1 , where 1≤p≤M-l+1. SubDist(T,S) is a function that calculates the distance d (d≥0) between the time series T and the subsequence S, and then calculates the distance value between the power operation data and each power operation data subsequence corresponding to the power operation data based on the power operation data and several power operation data subsequences. Then, based on several power operation data subsequences, the distance value and the preset distance threshold, the information gain is calculated; when the information gain is maximum, the separation point corresponding to the maximum information gain is used as the target separation point; a certain subsequence S and its corresponding distance value d are used. th The data set D can be divided into two categories, D1 and D2, which must satisfy the following conditions: 1,i Satisfies SubDist(T 1,i ,S)<d th , and each time series T in D2 2,i , satisfying SubDist(T 2,i ,S)≥d th Among them, T 1,i represents the i-th time series in D1 (1≤i≤|D1|), T 2,i represents the i-th time series in D2 (1≤i≤|D2|), |D1| and |D2| are the number of time series in D1 and D2 respectively. The target separation point is for any other threshold d t ' h All satisfy: Gain(S,d OSP(D,S) )≥Gain(S,d t ' h), that is, the target time series whose distance value is greater than the distance value corresponding to the target separation point is obtained. Finally, shape factor conversion (shapelet conversion) is performed according to the target time series and the power operation data to extract the power time series features. The target time series and its corresponding distance value satisfy the following for other subsequences S:

[0087] Gain(Shapelet(D),d OSP(D,Shapelet(D)) )≥Gain(S,d OSP(D,S) ), where Shapelet(D) represents the shapelet in the dataset D, i.e., the target time series. Shapelet transformation refers to transforming the target time series shapelet into a vector space. Shapelet is a feature, and the selected shapelet set is {shapelet}. The form of the time series S after {P} transformation is T transformed :

[0088] T transformed ={SubDist(shapelet1,T),SubDist(shapelet2,T),...,SubDist(shapelet |shapelet| ,T)}, where |shapelet| is the number of shapelets in {shapelet}. The Shapelet method can capture subtle and critical change patterns in power grid operation by identifying unique shape fragments in time series, providing more detailed pattern recognition capabilities than traditional statistical features.

[0089] Specifically, dimension reduction optimization is performed according to the power time series characteristics to obtain target power time series characteristics, including:

[0090] According to the power time series characteristics and a preset kernel function, the power time series characteristics are mapped to a high-dimensional space, and a principal component analysis is performed on the mapped power time series characteristics in the high-dimensional space to obtain a preliminary dimension-reduced time series characteristic;

[0091] The initial dimension-reduced time series features are randomly divided into action sets and environment state sets;

[0092] According to the action set and the environment state set, repeatedly performing iterative optimization until the current cumulative reward value is less than the previous cumulative reward value, thereby obtaining a final action set and a final environment state set;

[0093] Determine the target power time series characteristics according to the final action set and the final environment state set;

[0094] Wherein, the iterative optimization includes:

[0095] Update the Q value table according to the current action set and the current environment state set; the current action set and the current environment state set during the first iterative optimization are the action set and the environment state set respectively;

[0096] Calculate the current cumulative reward value based on the current action set and environment state set;

[0097] Compare the current cumulative reward value with the previous cumulative reward value;

[0098] When it is determined that the current cumulative reward value is less than the previous cumulative reward value, the current action set and the current environment state set are used as the final action set and the final environment state set;

[0099] When it is determined that the current cumulative reward value is greater than the previous cumulative reward value, the Q value table is updated according to the cumulative reward value; and the current action set and the current environment state set are updated according to the updated Q value table.

[0100] In a preferred embodiment of the present invention, Kernel Principal Component Analysis (KPCA) performs kernel processing on the basis of the principal component analysis algorithm. This method is more suitable for nonlinear separable problems and can also provide reasonable feature extraction operations for nonlinear separable series problems. KPCA is an extension of principal component analysis in the nonlinear field, that is, the method is applied to principal component analysis, and then the principal component analysis transformation is performed in a high-dimensional space. Assume that the D (D>d)-dimensional vector ω i (i=1,...,d) is the eigenvector in the high-dimensional space, λ i (i=1,...,d) is the corresponding eigenvalue, and the principal component analysis of the high-dimensional space is as follows: ω i =λ i ω i ; The eigenvector ω i (i=1,...,d) is linearly represented by the sample set φ(X), as follows: Then, put ω i Substituting (i=1,...,d) into the above formula, we get the following form: Then multiply both sides of the equation by Get the formula: The right side of the equation is derived from the properties of the kernel function, which includes linear kernel function, Gaussian kernel function, polynomial kernel function, Laplace kernel function, Cosine kernel function, Sigmiod kernel function, etc. So the formula is converted into a solution formula: Kα=λ iα, the formula means to find the eigenvectors corresponding to the largest eigenvalues ​​of K. Since K is a preset symmetric matrix, the solution vectors must be orthogonal to each other, but α here is only the eigenvector of K, not the eigenvector ω in the high-dimensional space. ω should be further found from α. A set of basis ω in high-dimensional space i (i=1,...,d) can form a subspace, and the vector after dimensionality reduction is the test sample χ te The linear representation in this subspace is: Therefore, the power time series characteristics are mapped to a high-dimensional space according to the power time series characteristics and a preset kernel function, and a principal component analysis is performed on the mapped power time series characteristics in the high-dimensional space to obtain preliminary reduced-dimensionality time series characteristics.

[0101] Q-learning is a reinforcement learning method that uses a value iteration-based method to learn a table called Q value to guide the agent to make decisions in the environment. Q-learning assumes that the interaction (action) between the agent and the environment will affect the next state, and the taking of different actions is affected by the strategy and the accumulated reward value. The action set is represented by A = {a1, a2, ..., a n}, the set of environmental states is represented by S = {s1,s2,…,s n}, the reward is denoted as r, and the strategy is denoted as π. In each round of iteration, the agent obtains information by perceiving the current state of the environment s∈S, and specifies an action a∈A based on the current strategy π to influence the environment, so that the state of the environment enters the next state s′∈S. At the same time, the agent receives a reinforcement signal (reward) r(s,a) as feedback. Based on this reward, the agent will adjust its strategy and then proceed to the next iteration. Through continuous feedback learning and optimizing the Q function, the process of optimizing the Q function enables the agent to train the best strategy π in each state * (s t )∈A, thus approaching the goal of maximizing the long-term cumulative reward value, which is reflected in the formula: Where: V π (s) represents the cumulative reward value that state s can obtain when adopting strategy π, which is called the state value function; s represents the state at time t; π(s t ) represents the strategy adopted at time t; γ represents the importance of future cumulative rewards compared to current rewards, which is called the time discount factor constant and ranges from (0,1). According to the Bellman optimal criterion, the maximum value of the cumulative reward value can be obtained, as shown in the formula: Among them, R(s,a) is the mathematical expectation of taking action a under different states s at different times; P s,s′(a) represents the transition probability of state s′ when taking action a. Q-learning finds the optimal control strategy π * The idea is to associate each pair (s, a) under the control strategy π with a Q value, that is, to associate the reward of taking action a in state s with the value. Efficient Q value iteration satisfies the formula: Then we get π * (s) = argmaxQ * (s, a), Q is obtained by Q(s, a) = max{Q(s, a next )} to obtain Q * (s,a):

[0102] Q t+1 (s,a)=(1-α)Q t (s,a)+α(r t +γmaxQ t (s′,a′)), where α is the learning rate, ranging from (0,1], and is calculated as the inverse of the total number of visits to (s,a) + 1. As t increases, the Q value of each pair (s,a) will undergo multiple updates, the Q value table will be updated according to the accumulated reward value, and the current action set and the current environment state set will be updated according to the updated Q value table. The learning rate α will gradually decrease. When the learning rate α decreases to 0, Q t (s, a) converges to the optimal value. The initial dimension reduction time series features are randomly divided into action sets and environmental state sets; according to the action sets and the environmental state sets, iterative optimization is repeatedly performed until the current cumulative reward value is less than the previous cumulative reward value, and the final action set and the final environmental state set are obtained; according to the final action set and the final environmental state set, the target power time series features are determined; wherein, the iterative optimization includes: updating the Q value table according to the current action set and the current environmental state set; the current action set and the current environmental state set in the first iterative optimization are the action set and the environmental state set respectively; according to the current action set and the environmental state set, the current cumulative reward value is calculated; the current cumulative reward value is compared with the previous cumulative reward value; when it is determined that the current cumulative reward value is less than the previous cumulative reward value, the current action set and the current environmental state set are used as the final action set and the final environmental state set; when it is determined that the current cumulative reward value is greater than the previous cumulative reward value, the Q value table is updated according to the cumulative reward value; and the current action set and the current environmental state set are updated according to the updated Q value table. At this point, the derived strategy is the optimal strategy π *, that is, the target power time series characteristics. Q-learning can use its efficient exploration and utilization capabilities in complex environments to ensure accurate optimization of the fit between the characteristics of each data subset and the kernel function. Subsequently, the power time series characteristics can be divided into six subdivided subsets, each of which corresponds to a most matching kernel function, and the optimal kernel function is used to perform dimensionality reduction processing: including the basic linear kernel, the Gaussian kernel that performs well in handling nonlinear relationships, the highly flexible polynomial kernel, the Laplace kernel that emphasizes local similarity, the cosine kernel that measures directional similarity, and the Sigmoid kernel that simulates the decision boundary of the neural network, the target power time series characteristics can be obtained. The improved KPCA of Q-learning intelligently selects the kernel function that best suits the data characteristics, dynamically adapts to the complex data structure of the power grid, avoids the limitations of the selection of a single kernel function, and improves the flexibility and efficiency of dimensionality reduction processing.

[0103] Preferably, clustering the target power time series features to obtain a final power data clustering result includes:

[0104] Randomly selecting a number of target power time series features as initial clustering centers according to the target power time series features;

[0105] According to the initial cluster center and the target power time series characteristics, the clustering operation is repeatedly performed until a preset cost function converges, thereby obtaining a final power data clustering result;

[0106] The clustering operation includes:

[0107] According to the current cluster center and the target power time series feature, the target power time series feature is allocated to the current cluster center that is closest to the target power time series feature, so as to obtain a plurality of time series feature clusters;

[0108] Taking a number of time series feature clusters as the current power data clustering results; the current cluster center when the clustering operation is first performed is the initial cluster center;

[0109] Calculate the cost function according to the current cluster center corresponding to the current power data clustering result and the target power time series characteristics;

[0110] When it is determined that the cost function converges, the current power data clustering result is used as the final power data clustering result;

[0111] When it is determined that the cost function does not converge, a Bayesian score value is calculated based on a number of time series feature clusters, the number corresponding to the target power time series feature, and a preset likelihood function; and the current number of cluster centers is updated based on the Bayesian score value and a preset score threshold;

[0112] Update the current cluster center according to the current number of cluster centers and several time series feature clusters.

[0113] In a preferred embodiment of the present invention, the Bayesian score is a BIC score. The K-means clustering algorithm is an iterative machine learning analysis algorithm, which is a calculation process that divides sample data into different types according to the similarity of the characteristics of samples in a known data set. According to the target power time series characteristics, several target power time series characteristics are randomly selected as the initial clustering centers, denoted as x i is the i-th target power time series characteristic, c i For x i The cluster to which it belongs, is the center point corresponding to the cluster, and M is the total number of target power timing features. Let t = 0, 1, 2, ..., n be the number of iterations, and repeat the following process until the preset cost function J converges: according to the current cluster center and the target power timing feature, assign the target power timing feature to the current cluster center that is closest to it Several time series feature clusters are obtained. The current cluster center when the clustering operation is first performed is the initial cluster center. For each cluster center K, the center of the cluster is recalculated. According to the current cluster center corresponding to the current power data clustering result and the target power time series characteristics, the cost function is calculated: When the cost function converges, the current power data clustering result is used as the final power data clustering result. The K-Means algorithm requires manual pre-determination of the initial K value, but this value may not be consistent with the actual data distribution. The BIC criterion is used to determine the number of clusters in the K-Means algorithm, and the BIC-KMeans algorithm is constructed to mine the rules of the uncertainty parameters of SWMM. When the cost function is determined not to converge, the Bayesian score value is calculated according to the number of time series feature clusters, the number corresponding to the target power time series features, and the preset likelihood function; and according to the Bayesian score value and the preset score threshold, the current number of cluster centers is updated to avoid the subjective selection of K value on the clustering result. The BIC-KMeans algorithm can comprehensively consider the model complexity and accuracy problems in machine learning to avoid overfitting and underfitting problems. The BIC score value calculation formula is: B=mlnn-2lnL, where B is the BIC score value, m is the current number of cluster centers, n is the total number of target power time series features, L is the likelihood function, and mlnn is the penalty term. The smaller the BIC value, the better the quality of the K-means algorithm. Finally, the current cluster center is updated according to the current number of cluster centers and several time series feature clusters. BIC-KMeans can automatically determine the optimal number of clusters, reduce manual intervention, ensure that the clustering results are neither over-segmented nor over-merged, and improve the accuracy and practicality of clustering.

[0114] Schematically, before extracting the time series features according to the power operation data to obtain the power time series features, it also includes: preprocessing the power operation data to obtain the final power operation data;

[0115] Preprocessing the power operation data to obtain final power operation data includes:

[0116] Processing missing values ​​on the power operation data to obtain power operation data after removing missing values;

[0117] Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values;

[0118] According to the abnormal value of power operation and the preset linear interpolation function, the power operation correction value is calculated;

[0119] The power operation correction value is filled into the power operation data after removing the missing value to obtain the final power operation data.

[0120] In a preferred embodiment of the present invention, the generator output data, cross-sectional flow data and load data are carefully screened. First, unreasonable data is excluded to ensure the accuracy and consistency of the data, and generators and load nodes with repeated names are removed to prevent information redundancy. Subsequently, records that are continuously zero, have very small values, or are extremely inconsistent with the main data during the entire observation period are identified and removed. For outliers in the data, the box plot analysis method is used to locate them, and linear interpolation techniques are used to make reasonable corrections to restore the continuity and rationality of the data. In order to further standardize the data, the Min-max standardization method is used to unify the measurement scale and range of all data. The interference caused by data type differences and numerical disparities on subsequent analysis is reduced in turn, the accuracy and efficiency of calculations are improved, and the depth and reliability of the analysis results are ensured.

[0121] In another preferred embodiment of the present invention, firstly, attribute variables that can characterize the operation mode of the power grid are determined, that is, Figure 3 The output data of the generator set, the section flow data and the load data shown in the figure are then preprocessed and standardized for the operation scenario data set composed of the clustered candidate variables. Secondly, the shapelet time series method is used to realize feature extraction under the condition of significantly distinguishing different categories of time series, and based on this, the Q-learning improved KPCA technology is used for dimensionality reduction. Finally, the BIC-KMeans clustering method is used to obtain the clustering results, and the cluster center of each class is selected as the typical scenario of the power grid operation mode.

[0122] The existing technology uses the nonlinear ability of temporal memory and autoencoder to extract time series features, which is suitable for time series data. Even if the data has a slight offset on the time axis, it can be effectively clustered. This method has high computational cost on large-scale data sets, complex matching process, and is sensitive to parameter selection. For example, the selection of window size will directly affect the matching effect. The embodiment of the present invention finds several power operation data subsequences of power operation data by sliding, which can not only extract time series features for linear data, but also extract time series features for nonlinear data. The computational cost is also low, the power operation data subsequence extraction process is simple, does not require complex matching, and the size of the sliding window does not affect the matching effect of the subsequence. The existing technology uses clustering algorithms (such as K-means, hierarchical clustering, DBSCAN, mixed Gaussian model, etc.) to group the operating parameters of the power grid, classify similar operating conditions into one category, and thus extract typical operating modes. This method requires the number of clusters to be set in advance, and improper selection may affect the classification effect; secondly, it is sensitive to noise, and the selection of the initial point may affect the stability of the final result. The clustering effect is best only for convex distribution data, and the processing capacity for non-convex data sets is limited. The embodiment of the present invention can judge the clustering effect based on the Bayesian score value, and then update the current number of cluster centers, which is not limited to the preset number of clusters, reduces the intervention of manually setting the number of clusters, ensures that the clustering results are neither over-subdivided nor over-merged, and improves the accuracy and practicality of clustering. The existing technology reduces the dimension of the data by extracting the main features (i.e., principal components) in the data, while retaining the information in the original data as much as possible. In the extraction of the power grid operation mode, the PCA analysis is performed on the characteristic variables, and the principal components with a cumulative contribution rate exceeding a certain threshold are selected as characteristic variables, and then the typical operation mode of the power grid is extracted. This method mainly focuses on the direction with the largest variance, and may ignore the small variance features that have an important impact on certain specific operation modes, and is also very sensitive to outliers. Outliers in the data may cause result deviations. The embodiment of the present invention can select the kernel function that best suits the data characteristics according to the preset kernel function, dynamically adapt to the complex data structure of the power grid, avoid the limitations of the selection of a single kernel function, and improve the flexibility and efficiency of the dimensionality reduction processing. In addition, the dimensionality reduction is performed for all power time series features, and the direction with the largest variance will not be mainly focused on, so that the overall dimensionality reduction of the power time series feature data can be achieved.

[0123] By implementing this embodiment, the power operation data of the power grid to be extracted is obtained; the power operation data includes: generator set output data, section flow data and load data; according to the power operation data, time series features are extracted to extract power time series features; according to the power time series features, dimension reduction optimization is performed to obtain target power time series features; the target power time series features are clustered to obtain power data clustering results; the cluster center corresponding to the power data clustering results is used as the power grid operation mode of the power grid to be extracted. By extracting the time series features of the power operation data of the power grid, power time series features reflecting the dynamic characteristics of the power grid operation are obtained, providing more accurate time series features for subsequent power grid operation mode extraction; then, the power time series features are optimized by dimension reduction to adapt to the complex operation scenarios in the large power system of the power grid, avoid the limitations of the power grid operation mode extraction, and improve the accuracy of the power grid operation mode extraction; after clustering the target power time series features, the cluster center corresponding to the power data clustering results is used as the power grid operation mode, reducing manual intervention, and gradually extracting the power grid operation mode from the time series feature extraction, dimension reduction and clustering to form a complete chain, thereby improving the accuracy of the power grid operation mode extraction.

[0124] See also Figure 2 , is a schematic diagram of a structure of a device for extracting a power grid operation mode provided by an embodiment of the present invention, comprising:

[0125] The power data acquisition module is used to acquire the power operation data of the power grid to be extracted; the power operation data includes: generator set output data, section flow data and load data;

[0126] A power time series feature extraction module, used to extract time series features according to the power operation data to obtain power time series features;

[0127] A feature dimension reduction module, used to perform dimension reduction optimization according to the power time series feature to obtain a target power time series feature;

[0128] A power data clustering module, used for clustering the target power time series features to obtain power data clustering results;

[0129] The operation mode extraction module is used to use the cluster center corresponding to the power data clustering result as the power grid operation mode of the power grid to be extracted.

[0130] Preferably, it also includes: a data preprocessing module, used to preprocess the power operation data to obtain final power operation data;

[0131] Preprocessing the power operation data to obtain final power operation data includes:

[0132] Processing missing values ​​on the power operation data to obtain power operation data after removing missing values;

[0133] Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values;

[0134] According to the power operation abnormal value and the preset linear interpolation function, the power operation correction value is calculated; the power operation correction value is filled into the power operation data after the missing value is removed to obtain the final power operation data.

[0135] The present invention provides a device for extracting the operation mode of a power grid, which acquires the power operation data of a power grid to be extracted according to a power data acquisition module; the power operation data includes: generator set output data, section flow data and load data; in a power time series feature extraction module, time series features are extracted according to the power operation data to extract power time series features; in a feature dimension reduction module, dimension reduction optimization is performed according to the power time series features to obtain target power time series features; through a power data clustering module, the target power time series features are clustered to obtain power data clustering results; finally, through an operation mode extraction module, the cluster center corresponding to the power data clustering result is used as the power grid operation mode of the power grid to be extracted. By extracting the time series features of the power operation data of the power grid, the power time series features that reflect the dynamic characteristics of the power grid operation are obtained, providing more accurate time series features for the subsequent extraction of the power grid operation mode; then the power time series features are optimized by dimensionality reduction to adapt to the complex operation scenarios of large-scale power systems in the power grid, avoid the limitations of the power grid operation mode extraction, and improve the accuracy of the power grid operation mode extraction; after clustering the target power time series features, the cluster center corresponding to the power data clustering result is used as the power grid operation mode to reduce manual intervention, and gradually extract the power grid operation mode from the complete chain formed from time series feature extraction, dimensionality reduction and clustering, thereby improving the accuracy of the power grid operation mode extraction.

[0136] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0137] Those skilled in the art can clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0138] Another embodiment of the present invention further provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements a method for extracting a power grid operation mode as described in the above embodiment when executing the computer program. The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory.

[0139] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0140] The memory can be used to store the computer program, and the processor realizes various functions of the terminal device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device or other volatile solid-state storage device.

[0141] Another embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute a method for extracting a power grid operation mode described in the above embodiment.

[0142] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.

[0143] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for extracting a power grid operation mode, characterized in that: include: Obtaining the power operation data of the power grid to be extracted; The power operation data includes: generator set output data, section flow data and load data; Extracting time series features according to the power operation data to obtain power time series features; Performing dimensionality reduction optimization according to the power time series characteristics to obtain target power time series characteristics; Clustering the target power time series features to obtain a final power data clustering result; The cluster center corresponding to the final power data clustering result is used as the power grid operation mode of the power grid to be extracted.

2. A method for extracting a power grid operation mode according to claim 1, characterized in that: Extracting time series features according to the power operation data to obtain power time series features includes: According to the power operation data and a preset sliding window length, slidingly find a plurality of power operation data subsequences of the power operation data; According to the power operation data and the plurality of power operation data subsequences, a distance value between the power operation data and each power operation data subsequence corresponding to the power operation data is calculated; Identification is performed based on the power operation data, a plurality of power operation data subsequences, the distance value, and a preset distance threshold to obtain a power time series feature.

3. A method for extracting a power grid operation mode according to claim 2, characterized in that: Identification is performed according to the power operation data, the plurality of power operation data subsequences, the distance value and a preset distance threshold to obtain a power time series feature, including: Calculating information gain according to a plurality of power operation data subsequences, the distance value and a preset distance threshold; When the information gain is the largest, the separation point corresponding to the maximum information gain is taken as the target separation point; According to the target separation point and the plurality of power operation data subsequences, determining the power operation data subsequence that meets the target separation point as a target time sequence; A shape factor conversion is performed according to the target time series and the power operation data to extract power time series features.

4. A method for extracting a power grid operation mode according to claim 1, characterized in that: Dimension reduction optimization is performed according to the power time series characteristics to obtain target power time series characteristics, including: According to the power time series characteristics and a preset kernel function, the power time series characteristics are mapped to a high-dimensional space, and a principal component analysis is performed on the mapped power time series characteristics in the high-dimensional space to obtain a preliminary dimension-reduced time series characteristic; The initial dimension-reduced time series features are randomly divided into action sets and environment state sets; According to the action set and the environment state set, repeatedly performing iterative optimization until the current cumulative reward value is less than the previous cumulative reward value, thereby obtaining a final action set and a final environment state set; Determine the target power time series characteristics according to the final action set and the final environment state set; Wherein, the iterative optimization includes: Update the Q value table according to the current action set and the current environment state set; the current action set and the current environment state set during the first iterative optimization are the action set and the environment state set respectively; Calculate the current cumulative reward value based on the current action set and environment state set; Compare the current cumulative reward value with the previous cumulative reward value; When it is determined that the current cumulative reward value is less than the previous cumulative reward value, the current action set and the current environment state set are used as the final action set and the final environment state set; When it is determined that the current cumulative reward value is greater than the previous cumulative reward value, the Q value table is updated according to the cumulative reward value; and the current action set and the current environment state set are updated according to the updated Q value table.

5. The method for extracting the operation mode of a power grid according to claim 1, characterized in that: Clustering the target power time series features to obtain the final power data clustering results includes: Randomly selecting a number of target power time series features as initial clustering centers according to the target power time series features; According to the initial cluster center and the target power time series characteristics, the clustering operation is repeatedly performed until a preset cost function converges, thereby obtaining a final power data clustering result; The clustering operation includes: According to the current cluster center and the target power time series feature, the target power time series feature is allocated to the current cluster center that is closest to the target power time series feature, so as to obtain a plurality of time series feature clusters; Taking a number of time series feature clusters as the current power data clustering results; the current cluster center when the clustering operation is first performed is the initial cluster center; Calculate the cost function according to the current cluster center corresponding to the current power data clustering result and the target power time series characteristics; When it is determined that the cost function converges, the current power data clustering result is used as the final power data clustering result; When it is determined that the cost function does not converge, a Bayesian score value is calculated based on a number of time series feature clusters, the number corresponding to the target power time series feature, and a preset likelihood function; and the current number of cluster centers is updated based on the Bayesian score value and a preset score threshold; Update the current cluster center according to the current number of cluster centers and several time series feature clusters.

6. A method for extracting a power grid operation mode according to claim 1, characterized in that: Before extracting the time series features from the power operation data to obtain the power time series features, the method further includes: preprocessing the power operation data to obtain final power operation data; Preprocessing the power operation data to obtain final power operation data includes: Processing missing values ​​on the power operation data to obtain power operation data after removing missing values; Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values; According to the abnormal value of power operation and the preset linear interpolation function, the power operation correction value is calculated; The power operation correction value is filled into the power operation data after removing the missing value to obtain the final power operation data.

7. A device for extracting the operation mode of a power grid, characterized in that: include: A power data acquisition module is used to acquire the power operation data of the power grid to be extracted; The power operation data includes: generator set output data, section flow data and load data; A power time series feature extraction module, used to extract time series features according to the power operation data to obtain power time series features; A feature dimension reduction module, used to perform dimension reduction optimization according to the power time series feature to obtain a target power time series feature; A power data clustering module, used to cluster the target power time series features to obtain a final power data clustering result; The operation mode extraction module is used to use the cluster center corresponding to the final power data clustering result as the power grid operation mode of the power grid to be extracted.

8. A device for extracting the operation mode of a power grid according to claim 7, characterized in that: Also includes: A data preprocessing module, used for preprocessing the power operation data to obtain final power operation data; Preprocessing the power operation data to obtain final power operation data includes: Processing missing values ​​on the power operation data to obtain power operation data after removing missing values; Anomaly identification is performed based on the power operation data after removing missing values ​​and a preset abnormal threshold to obtain power operation abnormal values; According to the power operation abnormal value and the preset linear interpolation function, the power operation correction value is calculated; the power operation correction value is filled into the power operation data after the missing value is removed to obtain the final power operation data.

9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a method for extracting a power grid operation mode as claimed in any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute a method for extracting a power grid operation mode as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Time series data classification method based on multi-level shape

    CN111814897A

  • Power system operation mode classification method, device, equipment and medium

    CN115423013A

  • Power system planning key operation mode extraction method and system

    CN115618258A

  • Typical operation mode extraction method and device of integrated energy system

    CN116975143A

  • Power system operation mode identification method and system based on data driving and medium

    CN117992750A