A system for identifying abnormal electricity price nodes and areas based on the density characteristics of electricity price data distribution

Through the dimensionality reduction and clustering of historical electricity price data, combined with the isolated forest algorithm, the abnormal electricity prices in the power market are identified, and the problem of ignoring spatial anomalies in the existing technology is solved, and the electricity price nodes in the power market are realized. Accurate identification of partitions improves recognition accuracy and market security.

CN117540234BActive Publication Date: 2024-11-12GUANGDONG ELECTRIC POWER TRADING CENT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311442885.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-01
Publication Date
2024-11-12
Estimated Expiration
2043-11-01

AI Technical Summary

Technical Problem

When identifying abnormal electricity prices in the power market, the prior art mainly focuses on time abnormalities and ignores spatial abnormalities, and cannot accurately identify the price difference between different nodes and the situation where some nodes deviate from the overall electricity price, resulting in insufficient identification.

Method used

The historical electricity price data dimensionality reduction module is used to reduce the dimensionality through the t-SNE algorithm. The electricity price partitioning module uses the DBSCAN algorithm for clustering, and combines the isolated forest algorithm to identify abnormal electricity price nodes and partitions to extract the alienation characteristics of the data, thereby achieving the accuracy of abnormal electricity prices in space. Identify.

Benefits of technology

It effectively avoids the neglect of internal problems in the region, improves the identification accuracy, and can accurately identify abnormal space electricity prices from the two angles of electricity price nodes and partitions, providing accurate information for the traceability of subsequent abnormal causes, and ensuring the safe operation of the power market.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117540234B_ABST
    Figure CN117540234B_ABST
Patent Text Reader

Abstract

The present invention discloses an abnormal electricity price node and abnormal electricity price area identification system based on the density characteristics of electricity price data distribution, including a historical electricity price data dimensionality reduction module, an electricity price partition module, an abnormal electricity price node and an abnormal electricity price partition identification module; the historical electricity price data dimensionality reduction module obtains historical high-dimensional electricity price data, and performs dimensionality reduction to obtain a low-dimensional electricity price data set after dimensionality reduction; the electricity price partition module performs feature extraction and clustering on the low-dimensional electricity price data set to obtain multiple electricity price partitions; based on the electricity price partitions, the abnormal electricity price partition module characterizes the degree of alienation of the electricity price data to be measured, thereby identifying abnormal electricity price nodes and abnormal electricity price partitions. The present invention can be widely used in the supervision of electricity price signals in the power spot market, quickly identify abnormal electricity price nodes and partitions in the electricity price space, realize the preliminary classification of spatial abnormal electricity price signals, provide information basis for subsequent cause tracing of abnormal electricity price signals, and ensure the safety and economic operation of the power market.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electric power market, and in particular to an abnormal electricity price node and abnormal electricity price area identification system based on the density characteristics of electricity price data distribution. Background Art

[0002] The electricity price signal is a direct reflection of the attributes of electricity commodities and can accurately reflect the real market value of electricity. Scientific, reasonable and accurate electricity prices can provide good economic signals for participants in the electricity market, improve resource allocation efficiency, and maintain system safety and economic operation. However, since electricity prices are affected by many factors such as market supply and demand, line maintenance, and power generator quotations, abnormal electricity prices are prone to occur, including peak prices, mean anomalies, regional anomalies, etc. On the one hand, the formation of abnormal electricity prices must indicate that there are abnormal behaviors or abnormal phenomena in the clearing process, which will endanger the normal operation of the power system and thus damage the interests of participants; on the other hand, sudden changes in electricity prices will increase the risk of the electricity market and hinder the enthusiasm of market players to participate in the market. Therefore, the accurate identification of abnormal electricity prices in the electricity market plays a vital role in the safety and stability of the electricity market.

[0003] At present, a lot of research has been done on abnormal electricity price identification at home and abroad. Although most methods can accurately identify some types of abnormal electricity price signals, they mainly focus on the characteristics of electricity price signals as typical time series signals on the time scale. In essence, they are the longitudinal comparison of the electricity price signals of the same node at time t and time t-1, while ignoring the spatial correlation characteristics of electricity price signals. Through the actual node electricity price data of a provincial power grid trading center, it can be found that in addition to the above-mentioned abnormal electricity prices, spatial anomalies such as excessive price differences between different nodes and deviations of some nodes from the overall electricity price also occur from time to time, but existing research on the identification methods of such anomalies is rarely involved. Spatial abnormal electricity price signals are essentially a type of outlier abnormal signal, and anomaly detection methods in other directions of the power and industrial fields have reference significance. Usually, clustering or classification algorithms are used to identify outliers, but when the network topology information is unknown, if the above method is used to identify abnormal signals of the system node electricity price as a whole, it will be impossible to judge the subtle anomalies within the electricity price partition.

[0004] In summary, it can be seen that the existing methods for identifying spatial abnormal electricity prices have certain shortcomings. On the one hand, the current abnormal electricity price identification methods usually focus on the identification of temporal abnormal electricity price signals, and rarely involve the large category of spatial abnormal electricity prices; on the other hand, the anomaly detection methods in other directions of the power and industrial fields cannot achieve accurate identification of spatial abnormal electricity price signals under the condition of network topology information location. Therefore, it is necessary to consider the distribution characteristics of historical electricity price data and study the abnormal electricity price node and abnormal electricity price area identification system based on the density characteristics of electricity price data distribution. Summary of the invention

[0005] The purpose of the present invention is to provide an abnormal electricity price node and abnormal electricity price area identification system based on the density characteristics of electricity price data distribution, including a historical electricity price data dimensionality reduction module, an electricity price partition module, an abnormal electricity price node and abnormal electricity price partition identification module;

[0006] The historical electricity price data dimension reduction module obtains historical high-dimensional electricity price data and performs dimension reduction to obtain a low-dimensional electricity price data set after dimension reduction;

[0007] The electricity price partitioning module performs feature extraction and clustering on the low-dimensional electricity price data set to obtain multiple electricity price partitions;

[0008] Based on the electricity price partitions, the abnormal electricity price partition module characterizes the alienation degree of the electricity price data to be measured, thereby identifying abnormal electricity price nodes and abnormal electricity price partitions.

[0009] Furthermore, the historical electricity price data dimensionality reduction module reduces the dimensionality of historical high-dimensional electricity price data through a t-SNE algorithm.

[0010] Furthermore, the step of reducing the dimension of the historical electricity price data by the historical electricity price data dimension reduction module includes:

[0011] 1) Obtain historical high-dimensional electricity price data, recorded as N node Represents the number of nodes in the system, and the electricity price data x of any node n =(x n,1 ,x n,2 ,…x n,T ), T represents the dimension of the data set, i.e., the total number of time periods of electricity prices;

[0012] 2) Take any data point x in the data set X i The variance is σ i Gaussian distribution, get the data point x i For data point x j The similarity conditional probability p i|j , with data point x j The variance is σ j Gaussian distribution, get the data point x j For data point x i The similarity conditional probability p j|i ,Right now:

[0013]

[0014] 3) Based on similar conditional probability p j|i and similar conditional probability p j|i , construct x i and x jThe joint probability between them is:

[0015]

[0016] Where: p ij and p ji All are x i and x j The joint probability between them; N represents the number of nodes in the system;

[0017] 4) Calculate the data point x i Perplexity (P i ),Right now:

[0018]

[0019] Where: P i Represents x i The joint probability p between it and all other data points ji The joint probability distribution formed;

[0020] Among them, the joint probability distribution P i The entropy H(P i ) is as follows:

[0021]

[0022] Where: N node Represents the collection of nodes in the system;

[0023] 5) Based on Perplexity (P i ), use binary search to find the data point x i The corresponding optimal Gaussian variance σ i ;

[0024] 6) Assumptions is a low-dimensional electricity price dataset, where the low-dimensional mapping point y of any node electricity price n =(y n,1 ,y n,2 );

[0025] Among them, the data point y in the low-dimensional electricity price data i and data point y j The joint probability q ij As shown below:

[0026]

[0027] Where: q ij and q ji All are y i and j The joint probability between

[0028] 7) Construct the optimization objective function minC, that is:

[0029]

[0030] In the formula, KL(P i ||Q i ) represents KL divergence; Q i for y i The joint probability q with all other data points ij The joint probability distribution vector Q i ;

[0031] 8) Using the gradient descent method to iteratively solve the optimization objective function min C, thereby constructing a low-dimensional electricity price data set Y;

[0032] The calculation formula for iterative solution is as follows:

[0033]

[0034]

[0035] Where: Y (t) and Y (t+1) Respectively represent the results of the t-th and t+1-th iterations; γ represents the learning rate of gradient descent; Represents the gradient of the objective function with respect to the result of the tth iteration.

[0036] Furthermore, the method for the electricity price partitioning module to extract features and cluster low-dimensional electricity price data includes a DBSCAN algorithm.

[0037] Furthermore, the steps of feature extraction and clustering of low-dimensional electricity price data include:

[0038] 1) Import the low-dimensional electricity price dataset Y and initialize the cluster mark Cate;

[0039] 2) Select any data point y from the low-dimensional electricity price dataset Y i ;

[0040] 3) Determine data point y i Whether it has been marked as a center point, boundary point or noise point. If it has been marked, the data point y is discarded i , and return to step 2), if not marked, jump to step 4).

[0041] 4) Use formula (9) to determine the data point y i Is it a core point? If so, mark it as the center point and jump to step 5); otherwise, mark it as a noise point and jump to step 2);

[0042] Core(Y)={y i |y i ∈Y,Size(N ε (y i ))≥MinPts} (9)

[0043] Where: Core(Y) represents the set of all core points in the data set Y; MinPts is the set density threshold parameter; N ε (y i ) represents the distance from data point y in data set Y i The distance between the data points is less than ε; Size(·) indicates the number of data points in the calculation set;

[0044] 5) Update the cluster mark Cate and set the data point y i Add to this cluster class collection Initialize the test set H and calculate the data point y i All adjacent points within the radius ε are added to the test set H;

[0045] 6) Select data points h from the test set H in order s , and the data point h s Write to the cluster class collection Determine data point h s Whether it is marked as a noise point. s If it has been marked as a noise point, change the mark to a boundary point and go to step 7); otherwise, go directly to step 7);

[0046] 7) Use formula (9) to determine the data point h s Is it a core point? If so, mark it as a core point and calculate the data point h s All adjacent points within the radius ε are added to the test set H, and then go to step 8); otherwise, they are marked as boundary points and then go to step 8);

[0047] 8) Determine whether all data points in the test set H have been marked. If so, proceed to step 9); if not, jump to step 6);

[0048] 9) Determine whether all data points in the data set Y have been labeled. If so, clustering is completed; if not, jump to step 2).

[0049] Further, the steps of identifying abnormal electricity price nodes and abnormal electricity price partitions include:

[0050] 1) Identify abnormal electricity prices within each electricity price zone;

[0051] 2) Eliminate the identified abnormal electricity prices to obtain the normal electricity price data points within each area, and then identify the anomalies between electricity price partitions based on the data characteristics of the remaining electricity price data to detect whether there are abnormal electricity price areas.

[0052] Furthermore, the step of identifying abnormal electricity prices within each electricity price zone includes:

[0053] 1) Training the isolation forest, the steps include:

[0054] 1.1) Set hyperparameters, including the number of isolated trees (iTree) in iForest Tree 、The maximum height N of a single iTree in iForest sub ;

[0055] 1.2) Based on the results of electricity price zoning Import the Cate-th electricity price partition data from the test data set And pre-process the electricity price partition data;

[0056] 1.3) According to the data set The amount of data Single iTree with maximum height N sub The maximum height of the iTree corresponding to each electricity price partition Assign values, namely:

[0057]

[0058] 1.4) Initialize the iTree flag q;

[0059] 1.5) iTree flag q is updated;

[0060] 1.6) Clear all subspaces K s,k , and initialize the number of layers of iTree s and the mark k of each layer of iTree subspace;

[0061] 1.7) From the dataset Randomly select The number of subspaces K s,k , this subspace is called the root node;

[0062] 1.8) Subspace K s,k All the data in the interval are loaded into the interval R to be segmented;

[0063] 1.9) Determine whether the interval R to be segmented contains only one data node. If so, the corresponding subspace K s,k Mark as a leaf node and jump to step 1-1), otherwise go to step 1.10);

[0064] 1.10) Sort the data in the interval R to be segmented and randomly generate a data point r s+1,k Divide the data in interval R into R right and R left Two sets, push the two newly generated data into the subspace set of the next layer, that is, K s+1 ={K s ,R right ,R left};

[0065] 1.11) Determine whether the subspace of the current layer has been segmented. If so, jump to step 1.13); otherwise, go to step 1.12);

[0066] 1.12) The subspace flag k is updated, and jump to step 3-8);

[0067] 1.13) The layer number mark s is updated;

[0068] 1.14) Determine whether the current iTree has reached the maximum number of layers. If so, all subspaces K of the current layer are s,k All are marked as leaf nodes and continue with step 1.15); otherwise, jump to step 1.12).

[0069] 1.15) Determine whether the training of all iTrees is completed. If so, the iForest training process of the electricity price partition is completed and the process ends; otherwise, jump to step 1.15);

[0070] 2) First determine the data to be tested for the Cateth electricity price partition Is the ratio of the range to the average value greater than the preset threshold? If so, the electricity prices of all nodes in the electricity price partition are considered normal. Otherwise, the abnormal score of the electricity price of each node in the electricity price partition is calculated using formula (11):

[0071]

[0072] Where: is the anomaly score; the function g(x) represents the average path length of constructing an iTree with a sample size of x;

[0073] Among them, the function f q (x i ) is as follows:

[0074]

[0075] Where: Indicates the qth iTree from the root node to the data x i The number of layers that the leaf node has gone through; Represents the data point x on the qth iTree i The number of data in the same leaf node; the function g(x) represents the average path length of constructing an iTree with a sample size of x;

[0076] 3) Data with anomaly scores greater than a preset threshold are identified as abnormal electricity prices.

[0077] Furthermore, the step of preprocessing the electricity price partition data includes: determining whether the average value of the data set is less than 10, and if so, rounding the data to the nearest digit, otherwise rounding the data to a multiple of 5.

[0078] Furthermore, the steps of identifying anomalies between electricity price zones include:

[0079] 1) Calculate the average normal electricity price in each electricity price zone Right now:

[0080]

[0081] Where: Represents the electricity price dataset for the Cate-th electricity price partition The normal electricity price data set after removing the abnormal electricity price data points; the function E(·) represents the average value of the data in the set; N cate is the number of electricity price zones;

[0082] 2) The average normal electricity price of each electricity price partition is combined into a new data set Z to obtain:

[0083]

[0084] 3) Consider the data set Z as the test data set, complete the iForest training under the data set, and then calculate the anomaly score of each electricity price partition. If the anomaly score is greater than the preset score threshold, the partition is an abnormal electricity price partition.

[0085] Furthermore, it also includes a clearing abnormality warning module;

[0086] The abnormal clearing warning module retrieves data from the abnormal electricity price partition module, and issues an abnormal clearing alarm for the power system if there are abnormal electricity price nodes and / or abnormal electricity price partitions at the current moment.

[0087] The technical effect of the present invention is undoubted, and the beneficial effects of the present invention are as follows:

[0088] 1) The technical idea of ​​partitioning the electricity price signal and then identifying the spatial abnormal characteristics proposed in the present invention can effectively avoid the situation where internal problems in certain areas are ignored after the electricity price is judged as abnormal due to line problems, thereby effectively improving the recognition accuracy.

[0089] 2) The two-step identification framework for electricity price anomalies based on data distribution density characteristics proposed in the present invention can effectively extract the data distribution sparse characteristics of the spatial electricity price signal, a non-time series signal, and can accurately identify abnormal spatial electricity prices from the two perspectives of electricity price nodes and electricity price partitions, providing more accurate information for subsequent tracing of the causes of abnormal electricity prices.

[0090] 3) The present invention can be widely used in the supervision of electricity price signals in the electricity spot market, quickly identify abnormal electricity price nodes and partitions in the electricity price space, realize the preliminary classification of abnormal electricity price signals in space, provide an information basis for the subsequent tracing of the causes of abnormal electricity price signals, and ensure the safety and operation of the electricity market. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] Figure 1 This is a flow chart for clustering electricity prices using the DBSCAN algorithm;

[0092] Figure 2 Training flowchart for Isolation Forest Trees;

[0093] Figure 3 It is a flow chart of a method for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution;

[0094] Figure 4 is the accurate recognition rate of spatial abnormal electricity price signals from M1 to M3;

[0095] Figure 5 is the error recognition rate of spatial abnormal electricity price signals from M1 to M3;

[0096] Figure 6 This is the abnormal electricity price zoning identification effect of the method proposed in the present invention. DETAILED DESCRIPTION

[0097] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.

[0098] Embodiment 1:

[0099] See also Figures 1 to 6 , a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, including a historical electricity price data dimensionality reduction module, an electricity price partition module, an abnormal electricity price node and abnormal electricity price partition identification module;

[0100] The historical electricity price data dimension reduction module obtains historical high-dimensional electricity price data and performs dimension reduction to obtain a low-dimensional electricity price data set after dimension reduction;

[0101] The electricity price partitioning module performs feature extraction and clustering on the low-dimensional electricity price data set to obtain multiple electricity price partitions;

[0102] Based on the electricity price partitions, the abnormal electricity price partition module characterizes the alienation degree of the electricity price data to be measured, thereby identifying abnormal electricity price nodes and abnormal electricity price partitions.

[0103] Embodiment 2:

[0104] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as that of Example 1. Furthermore, the historical electricity price data dimensionality reduction module reduces the dimensionality of historical high-dimensional electricity price data through a t-SNE algorithm.

[0105] Embodiment 3:

[0106] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-2, and further, the step of reducing the dimension of historical high-dimensional electricity price data by the historical electricity price data dimension reduction module comprises:

[0107] 1) Obtain historical high-dimensional electricity price data, recorded as N node Represents the number of nodes in the system, and the electricity price data x of any node n =(x n,1 ,x n,2 ,…x n,T ), T represents the dimension of the data set, i.e., the total number of time periods of electricity prices;

[0108] 2) Take any data point x in the data set X i The variance is σ i Gaussian distribution, get the data point x i For data point x j The similarity conditional probability p i|j , with data point x j The variance is σ j Gaussian distribution, get the data point x j For data point x i The similarity conditional probability p j|i ,Right now:

[0109]

[0110] 3) Based on similar conditional probability p j|i and similar conditional probability pj|i , construct x i and x j The joint probability between them is:

[0111]

[0112] Where: p ij and p ji All are x i and x j The joint probability between them; N represents the number of nodes in the system;

[0113] 4) Calculate the data point x i Perplexity (P i ),Right now:

[0114]

[0115] Where: P i Represents x i The joint probability p between it and all other data points ji The joint probability distribution formed;

[0116] Among them, the joint probability distribution P i The entropy H(P i ) is as follows:

[0117]

[0118] Where: N node Represents the collection of nodes in the system;

[0119] 5) Based on Perplexity (P i ), use binary search to find the data point x i The corresponding optimal Gaussian variance σ i ;

[0120] 6) Assumptions is a low-dimensional electricity price dataset, where the low-dimensional mapping point y of any node electricity price n =(y n,1 ,y n,2 );

[0121] Among them, the data point y in the low-dimensional electricity price data i and data point y j The joint probability q ij As shown below:

[0122]

[0123] Where: q ij and q ji All are y i and j The joint probability between

[0124] 7) Construct the optimization objective function minC, that is:

[0125]

[0126] In the formula, KL(P i ||Q i ) represents KL divergence; Q i for y i The joint probability q with all other data points ij The joint probability distribution vector Q i ;

[0127] 8) Using the gradient descent method to iteratively solve the optimization objective function minC, thereby constructing a low-dimensional electricity price data set Y;

[0128] The calculation formula for iterative solution is as follows:

[0129]

[0130]

[0131] Where: Y (t) and Y (t+1) Respectively represent the results of the t-th and t+1-th iterations; γ represents the learning rate of gradient descent; Represents the gradient of the objective function with respect to the result of the tth iteration.

[0132] Embodiment 4:

[0133] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of embodiments 1-3. Furthermore, the method for extracting features and clustering low-dimensional electricity price data by the electricity price partitioning module includes a DBSCAN algorithm.

[0134] Embodiment 5:

[0135] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-4, and further, the steps of extracting features and clustering low-dimensional electricity price data include:

[0136] 1) Import the low-dimensional electricity price dataset Y and initialize the cluster mark Cate;

[0137] 2) Select any data point y from the low-dimensional electricity price dataset Y i ;

[0138] 3) Determine data point y i Whether it has been marked as a center point, boundary point or noise point. If it has been marked, the data point y is discarded i, and return to step 2), if not marked, jump to step 4).

[0139] 4) Use formula (9) to determine the data point y i Is it a core point? If so, mark it as the center point and jump to step 5); otherwise, mark it as a noise point and jump to step 2);

[0140] Core(Y)={y i |y i ∈Y,Size(N ε (y i ))≥MinPts} (9)

[0141] Where: Core(Y) represents the set of all core points in the data set Y; MinPts is the set density threshold parameter; N ε (y i ) represents the distance from data point y in data set Y i The distance between the data points is less than ε; Size(·) indicates the number of data points in the calculation set;

[0142] 5) Update the cluster mark Cate and set the data point y i Add to this cluster class collection Initialize the test set H and calculate the data point y i All adjacent points within the radius ε are added to the test set H;

[0143] 6) Select data points h from the test set H in order s , and the data point h s Write to the cluster class collection Determine data point h s Whether it is marked as a noise point. s If it has been marked as a noise point, change the mark to a boundary point and go to step 7); otherwise, go directly to step 7);

[0144] 7) Use formula (9) to determine the data point h s Is it a core point? If so, mark it as a core point and calculate the data point h s All adjacent points within the radius ε are added to the test set H, and then go to step 8); otherwise, they are marked as boundary points and then go to step 8);

[0145] 8) Determine whether all data points in the test set H have been marked. If so, proceed to step 9); if not, jump to step 6);

[0146] 9) Determine whether all data points in the data set Y have been labeled. If so, clustering is completed; if not, jump to step 2).

[0147] Embodiment 6:

[0148] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-5, and further, the steps of identifying abnormal electricity price nodes and abnormal electricity price areas include:

[0149] 1) Identify abnormal electricity prices within each electricity price zone;

[0150] 2) Eliminate the identified abnormal electricity prices to obtain the normal electricity price data points within each area, and then identify the anomalies between electricity price partitions based on the data characteristics of the remaining electricity price data to detect whether there are abnormal electricity price areas.

[0151] Embodiment 7:

[0152] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-6, and further, the step of identifying abnormal electricity prices within each electricity price zone includes:

[0153] 1) Training the isolation forest, the steps include:

[0154] 1.1) Set hyperparameters, including the number of isolated trees (iTree) in iForest Tree 、The maximum height N of a single iTree in iForest sub ;

[0155] 1.2) Based on the results of electricity price zoning Import the Cate-th electricity price partition data from the test data set And pre-process the electricity price partition data;

[0156] 1.3) According to the data set The amount of data Single iTree with maximum height N sub The maximum height of the iTree corresponding to each electricity price partition Assign values, namely:

[0157]

[0158] 1.4) Initialize the iTree flag q;

[0159] 1.5) iTree flag q is updated;

[0160] 1.6) Clear all subspaces Ks,k , and initialize the number of layers of iTree s and the mark k of each layer of iTree subspace;

[0161] 1.7) From the dataset Randomly select The number of subspaces K s,k , this subspace is called the root node;

[0162] 1.8) Subspace K s,k All the data in the interval are loaded into the interval R to be segmented;

[0163] 1.9) Determine whether the interval R to be segmented contains only one data node. If so, the corresponding subspace K s,k Mark as a leaf node and jump to step 1-1), otherwise go to step 1.10);

[0164] 1.10) Sort the data in the interval R to be segmented and randomly generate a data point r s+1,k Divide the data in interval R into R right and R left Two sets, push the two newly generated data into the subspace set of the next layer, that is, K s+1 ={K s ,R right ,R left};

[0165] 1.11) Determine whether the subspace of the current layer has been segmented. If so, jump to step 1.13); otherwise, go to step 1.12);

[0166] 1.12) The subspace flag k is updated, and jump to step 3-8);

[0167] 1.13) The layer number mark s is updated;

[0168] 1.14) Determine whether the current iTree has reached the maximum number of layers. If so, all subspaces K of the current layer are s,k All are marked as leaf nodes and continue with step 1.15); otherwise, jump to step 1.12).

[0169] 1.15) Determine whether the training of all iTrees is completed. If so, the iForest training process of the electricity price partition is completed and the process ends; otherwise, jump to step 1.15);

[0170] 2) First determine the data to be tested for the Cateth electricity price partition Is the ratio of the range to the average value greater than the preset threshold? If so, the electricity prices of all nodes in the electricity price partition are considered normal. Otherwise, the abnormal score of the electricity price of each node in the electricity price partition is calculated using formula (11):

[0171]

[0172] Where: is the anomaly score; the function g(x) represents the average path length of constructing an iTree with a sample size of x;

[0173] Among them, the function f q (x i ) is as follows:

[0174]

[0175] Where: Indicates the qth iTree from the root node to the data x i The number of layers that the leaf node has gone through; Represents the data point x on the qth iTree i The number of data in the same leaf node; the function g(x) represents the average path length of constructing an iTree with a sample size of x;

[0176] 3) Data with anomaly scores greater than a preset threshold are identified as abnormal electricity prices.

[0177] Embodiment 8:

[0178] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of embodiments 1-7. Furthermore, the step of preprocessing the electricity price partition data includes: determining whether the average value of the data set is less than 10, and if so, rounding the data to the unit place, otherwise rounding to a multiple of 5.

[0179] Embodiment 9:

[0180] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-8, and further, the step of identifying abnormalities between electricity price zones includes:

[0181] 1) Calculate the average normal electricity price in each electricity price zone Right now:

[0182]

[0183] Where: Represents the electricity price dataset for the Cate-th electricity price partition The normal electricity price data set after removing the abnormal electricity price data points; the function E(·) represents the average value of the data in the set; N cate is the number of electricity price zones;

[0184] 2) The average normal electricity price of each electricity price partition is combined into a new data set Z to obtain:

[0185]

[0186] 3) Consider the data set Z as the test data set, complete the iForest training under the data set, and then calculate the anomaly score of each electricity price partition. If the anomaly score is greater than the preset score threshold, the partition is an abnormal electricity price partition.

[0187] Embodiment 10:

[0188] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, the technical content of which is the same as any one of Embodiments 1-9, and further includes a clearing abnormality warning module;

[0189] The abnormal clearing warning module retrieves data from the abnormal electricity price partition module, and issues an abnormal clearing alarm for the power system if there are abnormal electricity price nodes and / or abnormal electricity price partitions at the current moment.

[0190] Embodiment 10:

[0191] A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution. The system processes historical high-dimensional electricity price data, analyzes the distribution characteristics of electricity price data, extracts key partition characteristics of electricity price data signals, and then realizes electricity price signal partitioning. Further, according to the density characteristics of the electricity price signal data to be tested, the isolation forest algorithm is used to realize hierarchical identification of spatial abnormal electricity prices, effectively identify abnormal electricity price points and abnormal electricity price partitions, and ensure the safety and economic operation of the power market.

[0192] Specifically, in order to avoid the high latitude of historical electricity price data affecting the electricity price partition effect, the historical electricity price data is reduced in dimension based on the t-SNE algorithm; then, the distribution characteristics of the electricity price data after dimensionality reduction are analyzed using the DBSCAN algorithm, and the key partition characteristics of the electricity price data signal are extracted to complete the electricity price partition; finally, the isolated Senling algorithm is used to characterize the alienation degree of the motor signal to be tested based on the electricity price partition information, and to identify abnormal electricity price nodes and abnormal electricity price partitions. In addition, the effectiveness and accuracy of the method proposed in the present invention are verified through actual example simulation.

[0193] The specific working process is as follows:

[0194] (1) Dimensionality reduction method of electricity price data based on t-SNE algorithm

[0195] First, the t-SNE algorithm is used to map the original high-dimensional data points to the probability distribution through affine transformation, and then a new probability distribution is constructed in the low-dimensional space, and the low-dimensional space data is continuously optimized to make the two probability distributions of the high-dimensional and low-dimensional data spaces as consistent as possible, thereby obtaining low-dimensional data that can be used for subsequent electricity price partitioning. The specific steps are as follows:

[0196] 1) Construct a high-dimensional original electricity price data set and calculate its joint probability:

[0197] The electricity price data of each node in the system constitutes a high-dimensional original data set N node Represents the number of nodes in the system, and the electricity price data x of any node n =(x n,1 ,x n,2 ,…x n,T ), T represents the dimension of the data set, i.e., the total number of time periods for electricity prices. i and x j For any two data points in the data set X, i The variance is σ i Gaussian distribution, we can get x as shown in formula (1) i x j The similarity conditional probability p i|j , which means x j In x i The probability size in the field, the larger the value, the greater the probability of x j From x i The closer.

[0198]

[0199] Where: i Is x i The Gaussian variance centered at x i The shape of the Gaussian distribution constructed for .

[0200] In order to ensure the symmetry of the conditional probability, simplify the subsequent gradient calculation, and speed up the optimization process, a more general joint probability is used to replace the original conditional probability, as shown in formula (2):

[0201]

[0202] Where: p ij and p ji All are x i and x j The joint probability between them; N represents the number of nodes in the system.

[0203] From equations (1) and (2), we can see that if we want to obtain an accurate joint probability pij , we need to determine the Gaussian variance σ i and σ j The T-SNE algorithm uses the concept of perplexity to find a suitable Gaussian variance.

[0204] Take data point x i The Gaussian variance σ i For example, the data point x i The perplexity of x can be explained as i The number of valid neighboring points nearby can be represented as i ), as shown in formula (3):

[0205]

[0206] Where: P i Represents x i The joint probability p between it and all other data points ji The joint probability distribution formed by H(P i ) represents the joint probability distribution P i The entropy of is calculated as shown in formula (4):

[0207]

[0208] Where: N node Represents a collection of nodes in the system.

[0209] From equations (3) and (4), we can see that by adjusting the perplexity (P i ) can further adjust the corresponding Gaussian variance σ i In order to ensure that the t-SNE algorithm maintains a high degree of robustness, the perplexity is usually selected between 5 and 50. After determining the perplexity of the distribution, the binary search method is used to find the data point x i The corresponding optimal Gaussian variance σ i .

[0210] 2) Create a low-dimensional target dataset and assume its joint probability:

[0211] After completing the calculation of the joint probability distribution of the original high-dimensional data space, it is also necessary to make assumptions about the joint probability distribution of the target data set after dimensionality reduction. is the target data set after dimensionality reduction, where the low-dimensional mapping point y of any node electricity price n =(y n,1 ,y n,2 ). i and j are any two data points in the dataset Y.

[0212] In order to solve the crowding problem in the process of data dimensionality reduction, the t distribution with a degree of freedom of 1 can be used to characterize the probability distribution of the low-dimensional data space. The joint probability q of the data points in the low-dimensional data space is ij As shown in formula (5):

[0213]

[0214] Where: q ij and q ji All are y i and j The joint probability between y i The joint probability q with all other data points ij The joint probability distribution Q i .

[0215] 3) Calculate the KL divergence between the two joint probability distributions and continuously optimize the low-dimensional target data set:

[0216] Ideally, if the joint probability distribution P of the data before and after dimensionality reduction is i and Q i If they are equal, it means that the low-dimensional dataset Y accurately reflects the similarity relationship between the data points in the high-dimensional dataset X. The t-SNE algorithm continuously iterates and adjusts the low-dimensional dataset Y to achieve the joint probability distribution P. i and Q i In this process, the difference between the two joint probability distributions is measured by the KL divergence (Kullback-Leibler divergence), as shown in formula (6):

[0217]

[0218] Where: C is the objective function of iterative optimization, which is the sum of the KL divergences of the probability distributions of all data points in the data set. KL(·) represents the calculation of the KL divergence between two distributions.

[0219] Minimize the objective function C to ensure the joint probability distribution P of the data before and after dimensionality reduction i and Q i As similar as possible, the gradient descent method is used for optimization, and the objective function C is about any data point after dimensionality reduction. i The gradient of is shown in formula (7), and the iterative solution formula is shown in formula (8):

[0220]

[0221]

[0222] Where: Y(t) and Y (t+1) Respectively represent the results of the t-th and t+1-th iterations; γ represents the learning rate of gradient descent; It represents the gradient of the objective function with respect to the result of the t-th iteration, which can be solved by equation (7).

[0223] (2) Node electricity price partitioning method after dimensionality reduction based on DBSCAN algorithm

[0224] The steps of clustering the reduced-dimensional electricity price data Y using the DBSCAN algorithm are as follows: Figure 1 As shown, the specific process is as follows:

[0225] 2-1) Import the reduced-dimensional electricity price dataset Y and initialize the cluster class flag Cate.

[0226] 2-2) Pick any data point from the data set Y and y i Determine whether it has been marked as a center point, boundary point or noise point. If it has been marked, repeat step 2-2) to determine the next data point; if it has not been marked, jump to step 2-3).

[0227] 2-3) Use formula (9) to determine the data point y i Is it a core point? If so, mark it as the center point and jump to step 2-4); otherwise, mark it as a noise point and jump to step 2-2).

[0228] Core(Y)={y i |y i ∈Y,Size(N ε (y i ))≥MinPts} (9)

[0229] Where: Core(Y) represents the set of all core points in the data set Y; MinPts is the set density threshold parameter, which represents the minimum number of data points in the data set where a single core point is located; N ε (y i ) represents the distance from data point y in data set Y i The distance between ∈ and ∈ is less than ε. Size(·) indicates the number of data points in the calculation set.

[0230] 2-4) The cluster mark Cate is updated and the data point y i Add to this cluster class collection Initialize the test set H and calculate the base point y i All adjacent points within the radius ε are added to the test set H.

[0231] 2-5) Select data points h from the test set H in orders , and add it to the cluster class set Determine whether it is marked as a noise point. s If it has been marked as a noise point, change the mark to a boundary point and continue with step 2-6); otherwise, continue directly with step 2-6).

[0232] 2-6) Use formula (11) to determine the data point h s Is it a core point? If so, mark it as a core point, and use formula (9) to calculate all the adjacent points within the radius of the base point, add them all to the test set H, and then continue with step 2-7); otherwise, mark it as a boundary point and continue with step 2-7).

[0233] 2-7) Determine whether all data points in the test set H have been marked. If yes, proceed to step 2-8); if not, jump to step 2-5).

[0234] 2-8) Determine whether all data points in the data set Y have been labeled. If so, clustering is completed; if not, jump to step 2-2).

[0235] (3) A two-step identification framework for abnormal electricity prices based on data distribution characteristics

[0236] The process of identifying spatial abnormal electricity prices is carried out in two steps. First, the abnormal points within each electricity price zone are identified. After eliminating the abnormal data, the normal electricity price data points within each area are obtained. Then, the anomalies between electricity price zones are identified based on the data characteristics of the remaining electricity price data to detect whether there are abnormal electricity price areas.

[0237] 1) Abnormal electricity price identification process within electricity price zone

[0238] Based on the electricity price partition information, the isolation forest algorithm is used to identify the anomalies of the partitioned electricity price data. It is mainly divided into two steps. The first step is the training of the isolation forest (iForest); the second step is to use the trained isolation forest to calculate the anomaly score of each data point and identify the abnormal data points.

[0239] Among them, the first step of the process of training the isolation forest is as follows Figure 2 As shown, take any Cate-th electricity price partition as an example:

[0240] 3-1) Setting hyperparameters: ① The number of isolated trees (iTree) in iForest N Tree ,②The maximum height N of a single iTree in iForest sub .

[0241] 3-2) Based on the results of electricity price zoning Import the Cate-th electricity price partition data from the test data set The data is preprocessed. If the average value of the data set is less than 10, the data is rounded to the nearest decimal place. Otherwise, it is rounded to a multiple of 5 to avoid the influence of extremely small differences on the recognition results during the use of the DBSCAN algorithm.

[0242] 3-3) Determine the data set Is the number of data greater than the maximum height N of a single iTree? sub , and use formula (10) to calculate the maximum height of the iTree corresponding to each electricity price partition Assign a value.

[0243]

[0244] 3-4) The iTree flag q is initialized.

[0245] 3-5)iTree flag q is updated.

[0246] 3-6) Clear all subspaces K s,k , and initialize the number of layers of iTree s and the flag k of each layer of the iTree subspace.

[0247] 3-7) From the dataset Randomly select The number of subspaces K s,k , this subspace is called the root node.

[0248] 3-8) Subspace K s,k All the data in the interval R to be segmented is loaded.

[0249] 3-9) Determine whether the interval R to be segmented contains only one data node. If so, the corresponding subspace K s,k Mark as a leaf node and jump to step 3-1), otherwise continue.

[0250] 3-10) Sort the data in the interval R to be segmented and randomly generate a data point r s+1,k Divide the data in interval R into R right and R left Two sets, push the two newly generated data into the subspace set of the next layer, that is, K s+1 ={K s+1 ,R right ,R left}.

[0251] 3-11) Determine whether the subspace of the current layer has been segmented. If so, jump to step 3-13); otherwise, continue to step 3-12).

[0252] 3-12) The flag k of the subspace is updated, and jump to step 3-8).

[0253] 3-13) The layer number flag s is updated.

[0254] 3-14) Determine whether the current iTree has reached the maximum number of layers. If so, all subspaces K of the current layer are s,k All are marked as leaf nodes and continue with step 3-15); otherwise, jump to step 3-12).

[0255] 3-15) Determine whether the training of all iTrees is completed. If so, the iForest training process of the electricity price partition is completed and the process ends; otherwise, jump to step 3-5).

[0256] After completing the training of all electricity price partitions iForest according to the above steps, perform abnormal signal recognition on the test data in each electricity price partition in turn. First, determine the test data of the Cateth electricity price partition Is the ratio of the range to the average value greater than 3%? If so, the electricity prices of all nodes in the electricity price partition are considered normal and no abnormality identification is required; otherwise, the abnormality score of the electricity price of each node in the electricity price partition needs to be calculated using formula (10):

[0257]

[0258] Where: function f q (x i ) indicates that the calculation uses the Cate-th iTree to split the data x i The required path length is shown in formula (11):

[0259]

[0260] Where: Indicates the qth iTree from the root node to the data x i The number of layers that the leaf node has gone through; Represents the data point x on the qth iTree i The number of data in the same leaf node; the function g(x) has the same meaning as in formula (10), both representing the average path length of constructing an iTree with a sample size of x.

[0261]

[0262] Where: γ is the Euler constant, and its value is approximately equal to 0.5772156649.

[0263] The closer the anomaly score is to 0, the longer the path required to separate the test data point from the data set is, and the less likely the data point is to be an anomaly. Conversely, the closer the anomaly score is to 1, the easier it is to separate the test data point from the data set, and the more likely the data point is to be an anomaly. A reasonable threshold is determined based on the number of categories of node price anomaly scores in each price partition to complete the identification of anomalies within each price partition.

[0264] 2) Abnormal electricity price zone identification process

[0265] After the abnormal electricity price in the electricity price zone is identified, the average value of the normal electricity price in each electricity price zone is calculated using formula (13):

[0266]

[0267] Where: Represents the electricity price dataset for the Cate-th electricity price partition The normal electricity price data set after removing the abnormal electricity price data points; the function E(·) represents the average value of the data in the set.

[0268] The average normal electricity price of each electricity price partition is combined into a new data set Z, as shown in formula (14):

[0269]

[0270] Consider the data set Z as the test data set, repeat steps 3-1) to 3-15) to complete the training of iForest under the data set, and then use equations (10)-(12) to calculate the anomaly score of each electricity price partition, so as to identify whether the electricity price in the electricity price partition is abnormal compared with the entire system.

[0271] In summary, the flowchart of the method for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution proposed in the present invention is as follows: Figure 3 shown.

[0272] Embodiment 12:

[0273] A verification experiment of a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution as described in any one of Embodiments 1-11 is as follows:

[0274] (1) Using the t-SNE algorithm to construct the joint probability distribution of electricity price data before and after dimensionality reduction

[0275] First, the joint probability distribution of the original high-dimensional electricity price data is constructed through equations (1)-(4), and then a low-dimensional target data set is created, and its joint probability distribution is assumed through equation (5).

[0276] (2) Calculate the KL divergence between the two joint probability distributions and continuously optimize the low-dimensional target data set

[0277] Formula (6) is used to calculate the KL divergence between the two distributions before and after data dimension reduction as the optimization objective function;

[0278] Formula (7) is used to calculate the gradient of the optimization objective function with respect to the low-dimensional target data set, and the low-dimensional target data set is continuously iterated and optimized through formula (8) until the objective function meets the requirements, that is, the similarity between the two data sets before and after the data dimensionality reduction meets the requirements.

[0279] (3) Use the DBSCAN algorithm to partition the node electricity price data after dimensionality reduction

[0280] According to the method from step 2-1) to step 2-8), the DBSCAN algorithm is used to cluster the dimensionality-reduced electricity price data to complete the electricity market price partitioning.

[0281] (4) Training of Isolation Forest (iForest)

[0282] Based on the electricity price partition information, the node data of the corresponding partition is taken out from the test data set in turn, and the method from step 3-1) to step 3-15) is used to train the isolation forest tree (iForest) of each electricity price partition in the test data set.

[0283] (5) Use the trained isolation forest to calculate the anomaly score of each data point and identify abnormal electricity price nodes within the electricity price partition

[0284] It is determined in turn whether the ratio of the range to the average value of the tested data in each electricity price partition in the tested electricity price data is greater than 3%. If so, the electricity prices of all nodes in the electricity price partition are considered normal and no abnormality identification is required. Otherwise, proceed to the next step;

[0285] If the node electricity price within a certain electricity price partition needs to be spatially anomaly identified, the anomaly score of the electricity price data of each node within the electricity price partition is obtained by using the isolated forest tree (iForest) corresponding to the electricity price partition according to the method shown in equations (10)-(12);

[0286] Abnormal nodes are identified based on the comparison of abnormal scores of electricity price data of each node.

[0287] (6) After removing the abnormal electricity price nodes, identify the abnormal electricity price partitions

[0288] After the abnormal electricity price in the electricity price zone is identified, the abnormal electricity price data in each electricity price zone is eliminated using equations (13)-(14), and then the average value of all electricity price data in each electricity price zone is calculated to form a new regional electricity price data set to be tested;

[0289] Repeat the method from step 3-1) to step 3-15) to train the corresponding isolated forest tree (iForest), and calculate the abnormal score corresponding to the average normal average electricity price of each partition according to the method shown in formulas (10)-(12);

[0290] By comparing the abnormal scores of the normal average electricity prices in each electricity price zone, the abnormal electricity price zone is identified.

[0291] The specific simulation results are as follows:

[0292] 1) Electricity price partition parameter selection and partition results

[0293] When using the DBSCAN algorithm to partition the electricity prices of system nodes, although it is possible to avoid determining the number of partitions in advance, the setting of the distance parameter ε and the density threshold parameter MinPts during the execution of the algorithm will affect the electricity price partitioning results. Table 1 shows the electricity price partitioning results under 16 parameter combinations, and measures the partitioning effects under different parameter combinations from five aspects: the number of electricity price partitions, the number of unpartitioned nodes, the range, the interquartile range, and the variance.

[0294] Table 1 Effect of electricity price partition under different parameter combinations

[0295]

[0296] As can be seen from Table 1, when the distance parameter ε exceeds 10, the values ​​of the range, quartile difference and variance, which measure the concentration of data distribution, are significantly increased. At this time, the partitioning result does not meet the principle of "the electricity prices of all nodes in the partition are as similar as possible and the distribution is as concentrated as possible" proposed in Chapter 1; when the distance parameter is equal to 3 or 5, the concentration of data after partitioning is not much different, but there are obvious differences in the number of electricity price partitions and the number of unpartitioned nodes. At the same time, considering that the electricity price partition should include all nodes as much as possible, and the electricity price partition should not be too many, resulting in excessive partitioning, the distance parameter ε is set to 5 and the density threshold parameter ε is set to 3. Under this set of hyperparameter settings, the node electricity prices of a provincial power grid trading center in 2022 used in the example test are roughly divided into 29 electricity price partitions. From the results of electricity price partitioning, the overall distribution is still based on administrative divisions. At the same time, in economically developed areas, due to the more complete degree of power grid construction, the partitioning is also tighter. Some coastal areas will form relatively independent electricity price partitions due to the influence of the geographical environment. This proves that in the absence of grid topology information, some network information can be restored through historical node electricity price data. The resulting electricity price partitioning results have a certain degree of authenticity and trustworthiness and can be used for subsequent identification of abnormal spatial electricity price signals.

[0297] 2) Effect of identifying abnormal points of spatial electricity prices

[0298] Compare the recognition effects of the following three methods:

[0299] M1: The method for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution proposed in the present invention;

[0300] M2: Using the isolation forest algorithm to identify spatial abnormal electricity price signals as a whole;

[0301] M3: Use K-means algorithm to perform overall identification of spatial abnormal electricity price signals.

[0302] It should be noted that in order to facilitate the comparison of the recognition effects of different abnormal signals, all parameter settings and data preprocessing procedures of the isolation forest algorithm in M2 are consistent with those in M1. The only difference between the two is that no partition recognition is performed. The number of clusters required by the K-means algorithm in M3 is set to the optimal number of partitions obtained in M1, 29. After clustering, the distance to the cluster center is more than 3 times the average distance of the cluster, which is considered an abnormal point.

[0303] The above three methods are used to identify the node electricity price data of 96 time periods on a certain day in 2022 of a provincial power grid trading center. The recognition results based on manual experience are used as the standard to compare the recognition effects of the three methods. The proportion of abnormal electricity price signal points identified by the three methods is shown in Table 2, and the recognition accuracy rate is shown in Table 2. Figure 4 As shown in Figure 5 shown.

[0304] Table 2 Identification ratio of spatial abnormal electricity price signal points of M1-M3

[0305]

[0306] From the data in Table 2, it can be found that the M3 method identifies the least spatial abnormal electricity price signals, which is about half of the M1 method proposed in the present invention, while the M2 method identifies the most spatial abnormal electricity price signals, which is more than 3 times that of the M1 method proposed in the present invention. Figure 5 From the accuracy of each method, it can be found that compared with the average accuracy of 95.09% of the M1 method and 93.17% of the M2 method, the M3 method has a lower accuracy rate due to the small number of abnormal signals identified, with an average accuracy of less than 30%. At the same time, although the M1 method and the M2 method have similar recognition accuracy, compared with M2, the recognition effect of M1 is more stable, and the recognition accuracy can be maintained above 80% in most periods, without extreme cases.

[0307] Recombination Figure 6It can be found from the error recognition rate shown in that M3 has the highest error recognition rate, reaching an average of more than 60%. It can be seen that K-means, as a special clustering algorithm, is only an auxiliary function of abnormal recognition. For abnormal recognition of single-dimensional, non-time series data such as node electricity price signals, the effect is not ideal. The error recognition rate of the M2 method is more than 3 times higher than that of the M1 method proposed in the present invention, reaching 38.93%. It can be seen that the higher accurate recognition rate of the M2 method is guaranteed by a large number of detected abnormal signals. Although the accurate recognition rate is high, a large number of abnormal signals will also be detected by mistake, resulting in a high false alarm rate. By comparing the recognition effects of the three methods, it can be found that the isolation forest algorithm has certain advantages in the recognition of spatial abnormal electricity price signals, but in the case of non-partition recognition, a large number of electricity price signals that were originally normal in the partition will be identified as abnormal, causing difficulties in the subsequent analysis of the causes of abnormal electricity price signals. In summary, the method proposed in the present invention can ensure the recognition effect of spatial abnormal electricity price signals.

[0308] 3) Effect of identifying abnormal electricity price zones

[0309] In addition to identifying abnormal electricity price signal points, the M1 method proposed in this invention can also identify abnormal electricity price signal regions from the perspective of the overall market, so as to further analyze the causes of abnormal electricity price signals. The regional abnormal electricity price detection is performed on the same day node electricity price data tested in the above example, and the detection results are as follows: Figure 6 As shown. It can be found that the M1 method proposed in the present invention can almost perfectly identify all electricity price signal areas in all time periods tested, with an average accuracy of 99.27%. At the same time, the error recognition rate of more than 60% of the time periods is below 10%, and the overall error recognition rate is only 11.72%. Although there is a problem of excessive recognition of abnormal areas of electricity price signals, the proportion of extreme misrecognition is extremely small, and in the case of relatively even distribution of electricity prices in concentrated areas and time periods where the alienation characteristics of electricity price data are not obvious, it is necessary to assist with manual experience to make judgments.

Claims

1. A system for identifying abnormal electricity price nodes and areas based on the density characteristics of electricity price data distribution. It is characterized in that It includes a historical electricity price data dimension reduction module, an electricity price partition module, an abnormal electricity price node and an abnormal electricity price partition identification module; The historical electricity price data dimension reduction module obtains historical high-dimensional electricity price data and performs dimension reduction to obtain a low-dimensional electricity price data set after dimension reduction; The electricity price partitioning module performs feature extraction and clustering on the low-dimensional electricity price data set to obtain multiple electricity price partitions; Based on the electricity price partition, the abnormal electricity price partition module characterizes the alienation degree of the electricity price data to be measured, thereby identifying abnormal electricity price nodes and abnormal electricity price partitions; The steps of identifying abnormal electricity price nodes and abnormal electricity price partitions include: s1) Identify abnormal electricity prices within each electricity price zone; s2) Eliminate the identified abnormal electricity prices to obtain the normal electricity price data points within each area, and then identify the anomalies between electricity price partitions based on the data characteristics of the remaining electricity price data to detect whether there are abnormal electricity price areas; The steps of identifying abnormal electricity prices within each electricity price zone include: 1) Training the isolation forest, the steps include: 1.1) Set hyperparameters, including the number of isolated trees (iTree) in iForest Tree 、The maximum height N of a single iTree in iForest sub ; 1.2) Based on the results of electricity price zoning Import the Cate-th electricity price partition data from the test data set And pre-process the electricity price partition data; 1.3) According to the data set The amount of data Single iTree with maximum height N sub The maximum height of the iTree corresponding to each electricity price partition Assign values, namely: 1.4) Initialize the iTree flag q; 1.5) iTree flag q is updated; 1.6) Clear all subspaces K s,k , and initialize the number of layers of iTree s and the mark k of each layer of iTree subspace; 1.7) From the dataset Randomly select The number of subspaces K s,k , this subspace is called the root node; 1.8) Subspace K s,k All the data in the interval are loaded into the interval R to be segmented; 1.9) Determine whether the interval R to be segmented contains only one data node. If so, the corresponding subspace K s,k Mark as a leaf node and jump to step 1-1), otherwise go to step 1.10); 1.10) Sort the data in the interval R to be segmented and randomly generate a data point r s+1,k Divide the data in interval R into R right and R left Two sets, push the two newly generated data into the subspace set of the next layer, that is, K s+1 ={K s ,R right ,R left }; 1.11) Determine whether the subspace of the current layer has been segmented. If so, jump to step 1.13); otherwise, go to step 1.12); 1.12) The subspace flag k is updated, and jump to step 1.8); 1.13) The layer number mark s is updated; 1.14) Determine whether the current iTree has reached the maximum number of layers. If so, all subspaces K of the current layer are s,k All are marked as leaf nodes and continue with step 1.15); otherwise, jump to step 1.12); 1.15) Determine whether the training of all iTrees is completed. If so, the iForest training process of the electricity price partition is completed and the process ends; otherwise, jump to step 1.15); 2) First determine the data to be tested for the Cateth electricity price partition Is the ratio of the range to the average value greater than the preset threshold? If so, the electricity prices of all nodes in the electricity price partition are considered normal. Otherwise, the abnormal score of the electricity price of each node in the electricity price partition is calculated using formula (11): Where: is the anomaly score; the function g(x) represents the average path length of constructing an iTree with a sample size of x; Among them, the function f q (x i ) is as follows: Where: Indicates the qth iTree from the root node to the data x i The number of layers that the leaf node has gone through; Represents the data point x on the qth iTree i The number of data in the same leaf node; the function g(x) represents the average path length of constructing an iTree with a sample size of x; 3) Identify data with anomaly scores greater than a preset threshold as abnormal electricity prices; The steps for identifying anomalies between electricity price zones include: a1) Calculate the average normal electricity price in each electricity price zone Right now: Where: Represents the electricity price dataset for the Cate-th electricity price partition The normal electricity price data set after removing the abnormal electricity price data points; the function E(·) represents the average value of the data in the set; N cate is the number of electricity price zones; a2) The average normal electricity price of each electricity price partition is combined into a new data set Z to obtain: a3) Consider the data set Z as the test data set, complete the iForest training under the data set, and then calculate the anomaly score of each electricity price partition. If the anomaly score is greater than the preset score threshold, the partition is an abnormal electricity price partition.

2. According to claim 1, a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, It is characterized in that The historical electricity price data dimensionality reduction module reduces the dimensionality of historical high-dimensional electricity price data through the t-SNE algorithm.

3. According to claim 1, a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, It is characterized in that The steps of reducing the dimension of historical high-dimensional electricity price data by the historical electricity price data dimension reduction module include: 1) Obtain historical high-dimensional electricity price data, recorded as N node Represents the number of nodes in the system, and the electricity price data x of any node n =(x n,1 ,x n,2 ,…x n,T ), T represents the dimension of the data set, i.e., the total number of time periods of electricity prices; 2) Take any data point x in the data set X i The variance is σ i Gaussian distribution, get the data point x i For data point x j The similarity conditional probability p i|j , with data point x j The variance is σ j Gaussian distribution, get the data point x j For data point x i The similarity conditional probability p j|i ,Right now: 3) Based on similar conditional probability p j|i and similar conditional probability p j|i , construct x i and x j The joint probability between them is: Where: p ij and p ji All are x i and x j The joint probability between 4) Calculate the data point x i Perplexity (P i ),Right now: Where: P i Represents x i The joint probability p between it and all other data points ji The joint probability distribution formed; Among them, the joint probability distribution P i The entropy H(P i ) is as follows: Where: N node Represents the collection of nodes in the system; 5) Based on Perplexity (P i ), use binary search to find the data point x i The corresponding optimal Gaussian variance σ i ; 6) Assumptions is a low-dimensional electricity price dataset, where the low-dimensional mapping point y of any node electricity price n =(y n,1 ,y n,2 ); Among them, the data point y in the low-dimensional electricity price data i and data point y j The joint probability q ij As shown below: Where: q ij and q ji All are y i and j The joint probability between 7) Construct the optimization objective function min C, that is: In the formula, KL(P i ||Q i ) represents KL divergence; Q i for y i The joint probability q with all other data points ij The joint probability distribution vector Q i ; 8) Using the gradient descent method to iteratively solve the optimization objective function min C, thereby constructing a low-dimensional electricity price data set Y; The calculation formula for iterative solution is as follows: Where: Y (t) and Y (t+1) Respectively represent the results of the t-th and t+1-th iterations; γ represents the learning rate of gradient descent; Represents the gradient of the objective function with respect to the result of the tth iteration.

4. According to claim 1, a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, It is characterized in that The method for the electricity price partitioning module to extract features and cluster low-dimensional electricity price data includes a DBSCAN algorithm.

5. According to claim 1, a system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution, It is characterized in that The steps of feature extraction and clustering of low-dimensional electricity price data include: 1) Import the low-dimensional electricity price dataset Y and initialize the cluster mark Cate; 2) Select any data point y from the low-dimensional electricity price dataset Y i ; 3) Determine data point y i Whether it has been marked as a center point, boundary point or noise point. If it has been marked, the data point y is discarded i , and return to step 2), if not marked, jump to step 4); 4) Use formula (9) to determine the data point y i Is it a core point? If so, mark it as the center point and jump to step 5); otherwise, mark it as a noise point and jump to step 2); Core(Y)={y i |y i ∈Y,Size(N ε (y i ))≥MinPts} (9) Where: Core(Y) represents the set of all core points in the data set Y; MinPts is the set density threshold parameter; N ε (y i ) represents the distance from data point y in data set Y i The distance between the data points is less than ε; Size(·) indicates the number of data points in the calculation set; 5) Update the cluster mark Cate and set the data point y i Add to this cluster class collection Initialize the test set H and calculate the data point y i All adjacent points within the radius ε are added to the test set H; 6) Select data points h from the test set H in order s , and the data point h s Write to the cluster class collection Determine data point h s Whether it is marked as a noise point; if h s If it has been marked as a noise point, change the mark to a boundary point and go to step 7); otherwise, go directly to step 7); 7) Use formula (9) to determine the data point h s Is it a core point? If so, mark it as a core point and calculate the data point h s All adjacent points within the radius ε are added to the test set H, and then go to step 8); otherwise, they are marked as boundary points and then go to step 8); 8) Determine whether all data points in the test set H have been marked. If so, proceed to step 9); if not, jump to step 6); 9) Determine whether all data points in the data set Y have been labeled. If so, clustering is completed; if not, jump to step 2).

6. A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution according to claim 1, It is characterized in that The step of preprocessing the electricity price partition data includes: determining whether the average value of the data set is less than 10, if so, rounding the data to the nearest digit, otherwise rounding to a multiple of 5.

7. A system for identifying abnormal electricity price nodes and abnormal electricity price areas based on the density characteristics of electricity price data distribution according to claim 1, Features: It also includes a clearing abnormality warning module; The abnormal clearing warning module retrieves data from the abnormal electricity price partition module, and issues an abnormal clearing alarm for the power system if there are abnormal electricity price nodes and / or abnormal electricity price partitions at the current moment.

Citation Information

Patent Citations

  • Power load abnormal data detection method and system based on secondary detection method

    CN113554079A

  • Abnormal bidding behavior probability identification method for electricity market power producer

    CN114757692A

  • Load anomaly detection method and system based on DBSCAN clustering

    CN114861788A

  • Abnormality identification and mode distinguishing method and system for monitoring data of power transformer

    CN116861354A