Distribution area operation risk assessment method based on isolated forest and clustering analysis
By combining isolated forest and cluster analysis methods, the problems of strong subjectivity and insufficient spatial correlation in the existing risk assessment of power distribution areas are solved, and a more objective and dynamic risk assessment is achieved, which can identify potential anomalies and perform intelligent classification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID LIAONING SHENYANG ELECTRIC POWER SUPPLY COMPANY
- Filing Date
- 2025-11-29
- Publication Date
- 2026-04-14
AI Technical Summary
Existing risk assessment methods for distribution areas rely on human experience, have highly subjective weight allocation, and lack spatial correlation modeling, resulting in risk assessment results that are not objective and comprehensive enough.
A method combining isolation forest and cluster analysis is adopted. Electricity quantities and relative distances between users are calculated in a data-driven manner to construct an undirected adjacency weight matrix. Combined with sliding window cutting and multidimensional risk factor calculation, the isolation forest model is used for anomaly detection, and K-means clustering is used to achieve risk classification.
It enables more objective and dynamic risk assessment of distribution areas, can identify potential abnormal operating conditions, provide comprehensive risk assessment results, and support intelligent hierarchical and visual representation.
Smart Images

Figure CN121863379A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent monitoring and risk assessment technology for power distribution networks, specifically involving a method for assessing the operational risk of power distribution substations based on isolated forest and cluster analysis. Background Technology
[0002] With the large-scale integration of distributed energy sources such as distributed photovoltaics and electric vehicles, the operating environment of distribution transformer substations is becoming increasingly complex, significantly increasing problems such as voltage fluctuations, reverse power flow, and load imbalance. Therefore, risk assessment of substation operations has become an important research direction for power grid operation and maintenance. Current risk assessment methods mainly rely on manual experience or factor-weighted models based on expert weighting methods. These methods typically first calculate several operating factors (such as voltage limit exceedance rate, power factor, and imbalance), and then determine the weights and synthesize the scores using the Analytic Hierarchy Process (AHP), entropy weighting method, or grey relational analysis. However, these methods have the following main shortcomings: Relying on human experience, the weight allocation is highly subjective. Traditional methods lack data-driven support for setting factor weights, making the results susceptible to expert bias and failing to objectively reflect actual operational risks.
[0003] There is a lack of spatial correlation modeling. Existing studies often treat users in the transformer substation as independent individuals, failing to fully consider the spatial distance relationships between users and between users and transformers, resulting in risk assessment results ignoring the neighborhood propagation effect.
[0004] This invention overcomes the shortcomings of traditional methods by introducing spatial correlation modeling and intelligent algorithms, and provides a more data-driven, objective and dynamic method for risk assessment of power distribution substations, which better supports the operation monitoring and risk early warning of power distribution systems. Summary of the Invention
[0005] To address the issues of strong subjectivity and insufficient utilization of spatial information in existing transformer area risk assessment methods, this invention proposes a distribution transformer area risk assessment method that integrates isolated forest and cluster analysis. To achieve the above objectives, the present invention adopts the following specific technical solution: a method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis, comprising the following steps: S1. Data Acquisition: S2. Distance Weight Calculation: Obtain the location of photovoltaic users in the transformer area topology map; obtain the relative distance between users; integrate the relative distances of all users into an adjacency matrix; construct an undirected adjacency weight matrix based on the adjacency matrix; S3, Sliding window cutting: S4. Calculation of indicators: Calculate the voltage over-limit severity factor, neighborhood severity influence factor, relative neighborhood risk factor, three-phase imbalance factor, and transformer reverse overload severity factor within the time window. S5. Normalization process; S6. Anomaly Identification: Input the sample matrix composed of normalized risk factor vectors from all time window samples into the isolated forest model to obtain standardized anomaly scores, and output anomaly labels according to the anomaly scores. S7. Risk Classification: First, convert the abnormal scores and abnormal labels into classification features, and then use the K-means clustering algorithm to cluster the classification features to obtain cluster labels.
[0006] Furthermore, in step S1, data acquisition specifically includes collecting electrical quantities of the distribution area, electrical quantities of the photovoltaic user side and the distribution area's main meter, including three-phase voltage, three-phase current, total active power and total reactive power.
[0007] Furthermore, in step S2, the specific formula for the undirected adjacency weight matrix is as follows; (1) in It is an undirected adjacency weight matrix; The weight representing the connection distance between user i and user j. Let i be the relative distance between user i and user j. The neighborhood cutoff distance is N, which represents the number of photovoltaic users.
[0008] Furthermore, in step S3, the sliding window cutting specifically includes, given a unified clock for the station area, using a fixed step size. Perform time alignment; to represent the start time of a time window, with a step size of [value missing]. The time interval corresponding to the i-th sample is .
[0009] Furthermore, in step S4, the specific steps for calculating the risk factor within the time window are as follows: S41, Voltage Exceedance Severity Factor Calculation; Let the acceptable upper and lower limits of voltage be... and Then for the user voltage Define the over-limit penalty function : (2) in This is the average of the three-phase voltages. This refers to the point in time when the load rate of the distribution transformer in the area begins to exceed the limit. To end the time limit violation; User-level voltage over-limit severity Defined as: (3) Distribution area voltage over-limit severity factor User-level voltage over-limit severity Average value: (4); S42, Neighborhood Severity Influence Factor Calculation; For users Define its neighborhood influence term The weighted sum of the severity of neighboring users' violation of limits: (5) in On behalf of users With users The connection distance weights between them, where User Neighboring users Voltage exceedance severity, district-level neighborhood severity influencing factor The average value for all users: (6); S43 Relative Neighborhood Risk Factor ; For users Define its relative neighborhood risk for: (7) in: This represents the maximum distance between users throughout the entire transformer area. It is to satisfy The number of neighbors, The distance is the cutoff distance to the neighborhood. Relative risk factors at the district level The average value for all users: (8); S44: Three-phase imbalance factor ; For users At any moment Its instantaneous imbalance Defined as: (9) in , , Representing users respectively At any moment These are the current values for phases A, B, and C. The average value of the three-phase current; the three-phase unbalance factor. The mean of the time window is: (10); S45: Severity factor of reverse overload of distribution transformer ; Assume the rated capacity of the distribution transformer is The overload threshold is, The upper limit threshold for reverse heavy overload of the transformer substation is set to 0.8; the apparent power of the transformer substation is... Defined as: (11) in Active power This refers to reactive power; considering reverse power flow conditions, Overload overthreshold penalty during operation: (12) Then the severity factor of reverse overload of the distribution transformer for: (13) in The point in time when the reverse heavy overload of the distribution transformer in the transformer substation begins to exceed the limit. This is to end the time limit violation.
[0010] Furthermore, in step S5, the formula for normalizing the five risk factors using max-min normalization is as follows: (14) in These are the original data values. and These are the minimum and maximum values of the factor in the sample data, respectively. The normalized value, with a range of .
[0011] Furthermore, in step S6, The factor vectors of all time window samples are used to construct a sample matrix. Input the isolated forest model for training; This represents the number of samples, and 5 indicates the dimension of the factor. The construction of an isolation forest model specifically includes: building a series of isolation trees. For a sample Its path length in a certain isolation tree is ;sample Abnormal scoring Its average path length is determined by the following formula: (15) in The total number of isolated trees, the score value If the anomaly falls within the (0,1) interval, the model outputs a binary anomaly label based on the anomaly score. Set a threshold of 0.5; when an anomaly score is detected... If the value is greater than 0.5, it is marked as -1; otherwise, it is marked as +1.
[0012] Furthermore, in step S7, the output of the isolated forest is converted into hierarchical features. This includes anomaly scoring. and exception tags : (16) in, It is an anomaly rating of the isolated forest. It is an exception label, and T is the vector transpose symbol.
[0013] Furthermore, in step S7, using K-means clustering algorithm for Perform clustering to obtain cluster labels , Ultimately, risk level It can be mapped as: (17).
[0014] The present invention also proposes a non-transitory computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the distribution area operation risk assessment method based on isolated forest and cluster analysis as described in any one of claims 1 to 9.
[0015] The present invention can achieve the following technical effects: This invention uses an isolated forest model to perform unsupervised anomaly detection on multi-dimensional operating factors (voltage limit exceedance severity, three-phase imbalance, transformer reverse overload severity, neighborhood severity impact item, and relative neighborhood risk), avoiding manual weighting and objectively discovering potential abnormal operating states. This invention not only comprehensively considers the electrical characteristics of users, such as voltage, current, three-phase imbalance, and reverse overload, but also integrates the relative distance between users and the spatial relationship between users and transformers, thus providing a more comprehensive risk assessment result. Through this multi-dimensional feature fusion, this invention overcomes the limitations of traditional methods that rely on a single electrical indicator, making the assessment results closer to the actual power grid operating environment and more consistent with real physical distribution characteristics. This invention inputs the anomaly scores and anomaly labels output by the isolated forest into a K-means clustering model to form three risk levels: high, medium, and low, thereby achieving intelligent stratification and visual representation of the operational risks of power distribution areas. Attached Figure Description
[0016] Figure 1 This is a flowchart of the overall process for the risk assessment method for distribution substation operation disclosed in this invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not constitute a limitation thereof.
[0018] refer to Figure 1 The method for assessing the operational risk of power distribution areas based on isolated forest and cluster analysis includes the following steps: S1. Data acquisition, the process of which specifically includes: S11: Collect electrical quantities in the distribution area, including electrical quantities at the photovoltaic user side and the distribution area's main meter, including three-phase voltage. Three-phase current Total active power Total reactive power .
[0019] S12: Time resolution and alignment, with a basic sampling step of 1 hour, and uniformly adopts the data aligned with the station clock.
[0020] S2, Distance weight calculation, the specific process includes: S21: Based on the topology map of the photovoltaic (PV) distribution area, a priori graph structure is formed. The specific steps are as follows: Obtain the location of PV users in the topology map: In the topology map, each PV user is highlighted in red and has a number and text label. Obtain the coordinates of the text label for each PV user in the world coordinate system. There are N PV users in total, and the coordinates of the i-th user are... The coordinates of the j-th user are: .
[0021] S22: Calculate the Euclidean distance between each pair of coordinates of the obtained photovoltaic users to obtain the relative distance between user i and user j. : (1) S23: Relative distance of all users The adjacency matrix is formed into an N×N matrix, where i and j are the row and column indices of the matrix (representing users), respectively. The matrix has symmetry: = Distance has no direction. The diagonal is zero. =0, the distance from the user to itself is zero.
[0022] S24: Based on adjacency matrix Construct an undirected adjacency weight matrix. : (2) in The weight representing the connection distance between user i and user j. The neighborhood cutoff distance is 300m.
[0023] S3. Sliding window cutting, the specific process includes: S31: Sample Generation and Dataset Partitioning: Given a unified clock for the entire distribution area, a fixed step size is used. Time alignment is performed (at the hourly level). Indicates the start time of a time window, with a step size of 1. The movement step size is , No. The time interval corresponding to each sample is: .
[0024] The dataset is divided into a training set (90%) and a test set (10%) in chronological order.
[0025] S4. Indicator Calculation: In step S4, within the time window The specific steps for calculating the following five risk factors are as follows: S41, Voltage Exceedance Severity Factor Calculation; Voltage exceedance severity measures the degree to which the voltage of photovoltaic users within a distribution area deviates from the acceptable range. Let the acceptable upper and lower limits for voltage be and . Then for the user voltage Define the over-limit penalty function : (3) in Three-phase voltage The mean, This refers to the point in time when the load rate of the distribution transformer in the area begins to exceed the limit. To end the time limit violation; User-level voltage over-limit severity Defined as: (4) Distribution area voltage over-limit severity factor User-level voltage over-limit severity Average value: (5) S42, Neighborhood Severity Influence Factor Calculation; This factor measures the potential impact of the intensity of neighbor violations on me. For users Define its neighborhood influence term The weighted sum of the severity of neighboring users' violation of limits: (6) in On behalf of users With users The connection distance weights between them, where User Neighboring users Voltage exceedance severity, district-level neighborhood severity influencing factor The average value for all users: (7) S43 Relative Neighborhood Risk Factor ; This factor measures how much higher the risk of my neighbors is relative to me. For users... Define its relative neighborhood risk for: (8) in: This represents the maximum distance between users throughout the entire transformer area. It is to satisfy The number of neighbors, The distance is the cutoff distance for the neighborhood.
[0026] Relative risk factors at the district level The average value for all users: (9) S44: Three-phase imbalance factor ; Three-phase current imbalance measures the degree of balance between the three-phase currents. For users... At any moment Its instantaneous imbalance Defined as: (10) in , , Representing users respectively At any moment These are the current values for phases A, B, and C. The average value of the three-phase current; the three-phase unbalance factor. The mean of the time window is: (11) S45: Severity factor of reverse overload of distribution transformer ; The severity of reverse overload in a distribution transformer is used to measure the overload situation caused by reverse power flow. Assume the rated capacity of the distribution transformer is... The overload threshold is , The upper limit threshold for reverse heavy overload of the transformer substation is set to 0.8; the apparent power of the transformer substation is... Defined as: (12) in Active power This represents reactive power. Considering the reverse power flow condition, Overload overthreshold penalty during operation: (13) Then the severity factor of reverse overload of the distribution transformer for: (14) in The point in time when the reverse heavy overload of the distribution transformer in the transformer substation begins to exceed the limit. This is to end the time limit violation.
[0027] S5. Normalization process, which specifically includes: S51: Missing Value Handling: For sporadic missing values in the data, linear interpolation is used to fill them. If there are segmented missing values in the data, seasonal decomposition imputation is used, or imputation is performed using the period of the same time in adjacent weeks.
[0028] S52: Furthermore, to ensure data dimensionality consistency and facilitate subsequent calculations, the min-max normalization method is used to standardize each factor. For the factors... The formula for normalization is: (15) in These are the original data values. and These are the minimum and maximum values of the factor in the sample data, respectively. The normalized value, with a range of .
[0029] S61: Establishing the Isolation Forest Model: The dimensionless factor vectors of all time window samples are used to construct a sample matrix. Input an isolated forest model and train the model. Each row represents a factor vector for a time window. 5 represents the number of samples, and 5 indicates the dimension of the factor.
[0030] Isolation forests identify anomalies by constructing multiple isolation trees. The core idea is that outliers, due to their "few but distinct" nature, can usually be isolated via shorter paths. Constructing isolation trees: The model builds a series of isolation trees through random subsampling and random selection of feature subspaces. Each tree recursively partitions the data by randomly selecting features and split values until each sample is isolated or the tree's height limit is reached. Path length: for a sample... It is in a certain isolation tree Path length in Path length is defined as the number of edges traversed from the root node of the tree to the leaf node where the sample is isolated. A shorter path length indicates that the sample is more easily isolated, and the higher its probability of being an anomaly. Average path length and anomaly score: Because the results from a single tree are unstable, the model combines the results from all trees for calculation. Sample Abnormal scoring Its average path length is determined by the following formula: (16) in This represents the total number of isolated trees. It's worth noting that the final standardized anomaly score typically undergoes further transformation based on the average path length, resulting in a different score value. A value falling within the (0,1) interval, and the closer the value is to 1, the more anomalous the sample. To maintain consistency, this model follows this convention: The larger the size, the higher the risk.
[0031] Anomaly Labels: The model outputs binary anomaly labels based on the anomaly scores. A threshold (0.5) is typically set for abnormal scoring. If the value is greater than the threshold, it is marked as -1 (abnormal); otherwise, it is marked as +1 (normal).
[0032] S62: SHAP Explanation: The Shapley Additive Explanations (SHAP) method is used to interpret the isolated forest model and obtain the marginal contribution of each factor to the anomaly score, so as to locate the dominant risk source.
[0033] S7. Risk Classification: First, anomaly scores and labels are converted into classification features. Then, the K-means clustering algorithm is used to cluster these features, resulting in cluster labels. The process specifically includes: S71: Transformed into hierarchical features: To achieve the classification of high, medium, and low risk levels, this invention no longer directly weights the factors, but instead transforms the output of the isolated forest into hierarchical features. This includes anomaly scoring. and exception tags : (17) in, It is an anomaly rating of the isolated forest. It is an anomaly label (binary anomaly indicator). This feature vector contains information about the degree and category of the anomaly.
[0034] S72: Hierarchical Features : use K-means clustering algorithm for Perform clustering to obtain cluster labels These correspond to low, medium, and high risk levels, respectively. K-means assigns risk levels by calculating the distance between each sample and its cluster center. Formula: (18) Ultimately, the risk level can be mapped as: (19).
[0035] Now let's explain with a specific example: S1: Data Acquisition S11: Collect electrical quantities for the distribution area. In this embodiment, data was collected from a specific distribution area, including data from 11 photovoltaic users and data from the distribution area's master meter. This includes three-phase voltage. Three-phase current Total active power Total reactive power .
[0036] S12: Time resolution and alignment, with a basic sampling step size of 1 hour, and uniformly using the station clock alignment data. More specifically, nearly 8 months of station data were collected, from August 1, 2024 to February 28, 2025, with a total of 5088 time steps sampled at a 1-hour step size.
[0037] S2: Distance Weight Calculation S21: Based on the topology map of the photovoltaic (PV) distribution area, a priori graph structure is formed. The specific steps are as follows: Obtain the location of PV users in the topology map: In the topology map, each PV user is highlighted in red and has a number and text label. Obtain the coordinates of the text label of each PV user in the topology map in the world coordinate system. There are 11 PV users in total. The coordinates of the i-th user are: The coordinates of the j-th user are: .
[0038] S22: Calculate the Euclidean distance between each pair of coordinates of the obtained photovoltaic users to obtain the relative distance between user i and user j. : (20) S23: Relative distance of all users Integrate into an 11×11 adjacency matrix , where i and j are the row and column indices of the matrix, respectively, and The matrix has symmetry: = Distance has no direction. The diagonal is zero. =0, the distance from the user to itself is zero.
[0039] S24: Based on adjacency matrix Construct an undirected adjacency weight matrix.
[0040] (twenty one) S3: Sliding Window Cutting S31: Sample Generation and Dataset Partitioning: Given a unified clock for the entire distribution area, a fixed step size is used. Perform time alignment. Based on a length of... With a step size of 1 hour, 5064 were generated. Samples. The dataset is divided into a training set (90%) and a test set (10%) in chronological order.
[0041] S4: Indicator Calculation For each time window, calculate the following five types of risk factors and combine them into a factor vector.
[0042] S41: Calculate the voltage exceedance severity factor The acceptable voltage limits are 235.4V and 204.6V, respectively.
[0043] S42: Calculate the neighborhood severity influence factor
[0044] S43: Calculate the relative neighborhood risk factor
[0045] S44: Calculate the three-phase imbalance factor
[0046] S45: Calculate the severity factor of reverse overload of distribution transformer. The transformer has a rated capacity of 400kW and a heavy load threshold of 320kW. S5: Normalization S51: Missing Value Handling: For sporadic missing values in the data, linear interpolation is used to fill them. If there are segmented missing values in the data, seasonal decomposition imputation is used, or imputation is performed using the period of the same time in adjacent weeks.
[0047] S52: Normalization process: For a numerical value The formula for max-min normalization is: (twenty two) in: These are the original data values. It is the minimum value in the dataset. It is the maximum value in the dataset. It is the data value after max-min normalization, and its range is [0,1].
[0048] S6 Anomaly Detection S62: Anomaly Detection S61: Establishing the Isolation Forest Model: The dimensionless factor vectors of all time window samples are used to construct a sample matrix. Input an isolated forest model and train it. Here, the matrix... This represents the data for all samples, where each row represents a factor vector for a time window, 4564 is the number of samples, and 5 represents the dimension of the factor.
[0049] The isolated forest model constructs 100 isolated trees through random subsampling and random feature subspaces. The path length of each tree is used to measure the separability of samples. For the 4564th sample... Isolation Forest Output: Anomaly Scoring The smaller the value, the more abnormal it is. The anomaly score is calculated by taking the average path length of the sample across multiple trees. Anomaly Label -1 indicates an anomaly, and +1 indicates normal. The anomaly label is determined by the model and is typically set to the value when an anomaly score is given. Values below a certain threshold are marked as -1. Formula: (twenty three) in The sample is in the first Path length in a tree The number of trees.
[0050] S62: SHAP Explanation: The Shapley Additive Explanations (SHAP) method is used to interpret the isolated forest model and obtain the marginal contribution of each factor to the anomaly score, so as to locate the dominant risk source.
[0051] S7: Risk Classification S71: Transformed into hierarchical features: To achieve the classification of high, medium, and low risk levels, this invention no longer directly weights the factors, but instead transforms the output of the isolated forest into hierarchical features. This includes anomaly scoring. and exception tags : (twenty four) in, It is an anomaly rating of the isolated forest. It is an anomaly label (binary anomaly indicator). This feature vector contains information about the degree and category of the anomaly.
[0052] S72: Transformed into hierarchical features: use K-means clustering algorithm for Perform clustering to obtain cluster labels These correspond to low, medium, and high risk levels, respectively. K-means assigns risk levels by calculating the distance between each sample and its cluster center. Formula: (25) Ultimately, risk level It can be mapped as: (26).
[0053] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a high overload distribution transformer design method based on geometric dimensionality reduction and multi-objective optimization as described above.
[0054] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0055] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis, characterized in that, Includes the following steps: S1. Data Acquisition: S2. Distance Weight Calculation: Obtain the location of photovoltaic users in the transformer area topology map; obtain the relative distance between users; integrate the relative distances of all users into an adjacency matrix; construct an undirected adjacency weight matrix based on the adjacency matrix; S3, Sliding window cutting: S4. Calculation of indicators: Calculate the voltage over-limit severity factor, neighborhood severity influence factor, relative neighborhood risk factor, three-phase imbalance factor, and transformer reverse overload severity factor within the time window. S5. Normalization process; S6. Anomaly Identification: Input the sample matrix composed of normalized risk factor vectors from all time window samples into the isolated forest model to obtain standardized anomaly scores, and output anomaly labels according to the anomaly scores. S7. Risk Classification: First, convert the abnormal scores and abnormal labels into classification features, and then use the K-means clustering algorithm to cluster the classification features to obtain cluster labels.
2. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S1, data acquisition specifically includes collecting electrical quantities of the transformer substation, electrical quantities of the photovoltaic user side and the transformer substation main meter, including three-phase voltage, three-phase current, total active power and total reactive power.
3. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S2, the specific formula for the undirected adjacency weight matrix is as follows; (1) in It is an undirected adjacency weight matrix; The weight representing the connection distance between user i and user j. Let i be the relative distance between user i and user j. The neighborhood cutoff distance is N, which represents the number of photovoltaic users.
4. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, The sliding window cutting in step S3 specifically includes: given a unified clock for the station area, using a fixed step size. Perform time alignment; by Indicates the start time of a time window, with a step size of 1. , No. The time interval corresponding to each sample is: .
5. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S4, the specific steps for calculating the risk factor within the time window are as follows: S41, Voltage Exceedance Severity Factor Calculation; Let the acceptable upper and lower limits of voltage be... and Then for the user voltage Define the over-limit penalty function : (2) in This is the average of the three-phase voltages. This refers to the point in time when the load rate of the distribution transformer in the area begins to exceed the limit. To end the time limit violation; User-level voltage over-limit severity Defined as: (3) Distribution area voltage over-limit severity factor User-level voltage over-limit severity Average value: (4); S42, Neighborhood Severity Influence Factor Calculation; For users Define its neighborhood influence term The weighted sum of the severity of neighboring users' violation of limits: (5) in On behalf of users With users The connection distance weights between them, where User Neighboring users Voltage exceedance severity, district-level neighborhood severity influencing factor The average value for all users: (6); S43 Relative Neighborhood Risk Factor ; For users Define its relative neighborhood risk for: (7) in: This represents the maximum distance between users throughout the entire transformer area. It is to satisfy The number of neighbors, The distance is the cutoff distance to the neighborhood. Relative risk factors at the district level The average value for all users: (8); S44: Three-phase imbalance factor ; For users At any moment Its instantaneous imbalance Defined as: (9) in , , Representing users respectively At any moment These are the current values for phases A, B, and C. The average value of the three-phase current; the three-phase unbalance factor. The mean of the time window is: (10); S45: Severity factor of reverse overload of distribution transformer ; Assume the rated capacity of the distribution transformer is The overload threshold is , The upper limit threshold for reverse heavy overload of the transformer substation is set to 0.8; the apparent power of the transformer substation is... Defined as: (11) in Active power This refers to reactive power; considering reverse power flow conditions, Overload overthreshold penalty during operation: (12) Then the severity factor of reverse overload of the distribution transformer for: (13) in The point in time when the reverse heavy overload of the distribution transformer in the transformer substation begins to exceed the limit. This is to end the time limit violation.
6. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S5, the formula for normalizing the five risk factors using max-min normalization is as follows: (14) in These are the original data values. and These are the minimum and maximum values of the factor in the sample data, respectively. The normalized value, with a range of .
7. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S6, The factor vectors of all time window samples are used to construct a sample matrix. Input the isolated forest model for training; This represents the number of samples, and 5 indicates the dimension of the factor. The establishment of an isolated forest model specifically includes: constructing a series of isolation trees. For a sample It is in a certain isolation tree The path length in is ;sample Abnormal scoring Its average path length is determined by the following formula: (15) in The total number of isolated trees, the score value If the anomaly falls within the (0,1) interval, the model outputs a binary anomaly label based on the anomaly score. Set a threshold of 0.5; when an anomaly score is detected... If the value is greater than 0.5, it is marked as -1; otherwise, it is marked as +1.
8. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 1, characterized in that, In step S7, the output of the isolated forest is converted into hierarchical features. This includes anomaly scoring. and exception tags : (16) in, It is an anomaly rating of the isolated forest. It is an exception label, and T is the vector transpose symbol.
9. The method for assessing the operational risk of power distribution areas based on isolated forests and cluster analysis according to claim 8, characterized in that, In step S7, using K-means clustering algorithm for Perform clustering to obtain cluster labels , Ultimately, risk level It can be mapped as: (17)。 10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the distribution area operation risk assessment method based on isolated forest and cluster analysis as described in any one of claims 1 to 9.