Assessment method and device for operation safety of power distribution network, terminal equipment and storage medium

Through real-time data processing and multi-decision tree integration model, the problems of inaccurate evaluation results and insufficient real-time performance in the existing technology are solved, and efficient safety assessment of provincial disaster relief distribution networks is achieved, and the safety of the power grid is improved. Resilience.

CN119168383APending Publication Date: 2024-12-20GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411492852.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

When evaluating the safety of provincial disaster-reserve distribution networks, insufficient data or inaccurate model assumptions lead to overly optimistic assessment results, underestimate actual risks, insufficient real-time performance, and delay the power supply time of the power grid recovery.

Method used

By obtaining real-time working data of the target distribution network, standardizing processing, building a covariance matrix and performing eigenvalue decomposition, combining the integrated model of multiple decision trees for security assessment, and identifying potential risks and weak links.

Benefits of technology

It improves the reliability and real-timeness of the evaluation results, accurately identify potential risks and weak links, and improves the safety and recovery efficiency of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168383A_ABST
    Figure CN119168383A_ABST
Patent Text Reader

Abstract

The invention provides a power distribution network operation safety evaluation method and device, terminal equipment and a storage medium. The method comprises the following steps: acquiring a real-time working data set of a target power distribution network; wherein the real-time working data set comprises a plurality of pieces of real-time working data, and each piece of real-time working data comprises a plurality of characteristic indexes; performing standardization processing on each feature index to obtain a standardized feature index; constructing a covariance matrix based on the standardized feature indexes, and performing eigenvalue decomposition on the covariance matrix to obtain eigenvectors of the covariance matrix; and inputting the real-time working data set and the feature vector into a pre-constructed decision model, so that the decision model outputs a safety evaluation result of the target power distribution network, wherein the decision model takes a preset power distribution network safety assessment index as a target variable, and performs safety assessment on the target power distribution network through a plurality of decision trees, so that the reliability and the real-time performance of a power distribution network safety assessment result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of risk assessment and management, and in particular to a method, device, terminal equipment and storage medium for assessing the operation safety of a distribution network. Background Art

[0002] The provincial disaster recovery distribution network refers to a backup power transmission and distribution network established within the provincial region to respond to natural disasters or other emergencies. Its main function is to ensure that power supply can be quickly restored when a disaster occurs, maintain the normal operation of society, and minimize the significant impact on the economy and people's livelihood. At the same time, the provincial disaster recovery distribution network also carries an important emergency response function. Through reasonable layout and design, it can achieve flexible power dispatching and distribution after the disaster, providing the necessary energy guarantee for recovery and reconstruction. With the increase in the scale and complexity of the power system and the frequent occurrence of natural disasters, ensuring the safe operation of the provincial disaster recovery distribution network has become an urgent task.

[0003] In order to ensure the safe operation of provincial disaster recovery distribution networks, regular evaluation is particularly important. By evaluating the disaster resistance and rapid recovery capabilities of distribution networks, potential risks and weak links can be identified, thus providing a basis for improvement and upgrading. Provincial disaster recovery distribution networks usually cover a wide geographical area and include various types of equipment and facilities. Its complexity increases the difficulty of monitoring, analysis and management, and efficient safety evaluation methods are required to ensure its stable operation. The development of big data analysis technology provides new ideas and methods for power system safety evaluation. By deeply analyzing the huge and complex power grid data, potential safety risks and problems can be identified, and possible disaster events can be prevented and responded to in advance, thereby improving the safety and reliability of the power system. Common evaluation methods include risk assessment, reliability analysis, and fault simulation. However, these methods may lead to overly optimistic evaluation results and underestimate actual risks due to insufficient data or inaccurate model assumptions during implementation; evaluation methods with insufficient real-time performance will also lead to insufficient response speed and efficiency of the power grid to emergencies, delaying the time to restore power supply. How to improve the accuracy of safety evaluation results of provincial disaster recovery distribution networks is of vital significance for the application of provincial disaster recovery distribution networks in emergencies. Summary of the invention

[0004] The present invention aims to provide a method, device, terminal equipment and storage medium for evaluating the operation safety of a distribution network, so as to solve the above-mentioned technical problems and improve the reliability and real-time performance of the distribution network safety evaluation results.

[0005] In order to solve the above technical problems, the present invention provides, comprising:

[0006] Acquire a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators;

[0007] Performing standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator;

[0008] Constructing a covariance matrix based on the standardized characteristic index and performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector of the covariance matrix;

[0009] The real-time working data set and the feature vector are input into a pre-built decision model so that the decision model outputs a safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment index as a target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

[0010] In the above scheme, by obtaining the real-time working data of the target distribution network, the evaluation process can be analyzed based on the latest data to avoid the inaccuracy caused by the use of outdated data. Different feature indicators often have different units and magnitudes. Standardization can eliminate these differences, so that the model can treat each indicator more fairly during training and evaluation. The standardized data has the same mean and variance, which helps to improve the stability and convergence speed of the model and make the evaluation results more reliable. By constructing the covariance matrix and performing eigenvalue decomposition, the main change direction and key features in the data can be identified, thereby achieving data dimensionality reduction and feature extraction. This helps to reduce redundant information and improve the computational efficiency and evaluation accuracy of the model. Eigenvalue decomposition can help identify the principal components in the data, so that the subsequent decision model can pay more attention to the features that have the greatest impact on power grid security, and improve the pertinence and accuracy of the evaluation. The decision model uses several decision trees for integration, which can effectively reduce the overfitting problem of a single decision tree and improve the generalization ability of the model and the accuracy of the evaluation results. By combining real-time data, feature standardization, covariance matrix analysis and multiple decision tree integration, it can comprehensively cover different aspects of the distribution network, accurately identify potential risks and weak links, and provide strong support for the stable operation of the distribution network and the response to emergencies.

[0011] In one implementation, the step of performing standardization on each of the characteristic indicators to obtain a standardized characteristic indicator specifically includes:

[0012] The average value of each characteristic index in the real-time working data set is calculated based on the average formula; wherein the real-time working data set includes n real-time working data and d characteristic indexes, n and d are positive integers greater than or equal to 1, and the expression of the average formula is:

[0013]

[0014] In the formula, μ j is the average value of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, j = 1, 2, ..., d;

[0015] The standard deviation of each characteristic index is calculated according to the standard deviation formula; wherein the expression of the standard deviation formula is:

[0016]

[0017] In the formula, σ j is the standard deviation of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index;

[0018] Each of the characteristic indicators is standardized and calculated according to a standardized formula to obtain a number of standardized characteristic indicators; wherein the expression of the standardized formula is:

[0019]

[0020] In the formula, x′ ij is the jth characteristic index of the i-th real-time working data after standardization, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index, σ j is the standard deviation of the j-th feature index.

[0021] In one implementation, constructing a covariance matrix based on the standardized feature index and performing eigenvalue decomposition on the covariance matrix specifically includes:

[0022] Based on the covariance element conversion formula, each of the standardized characteristic indicators is operated to obtain the covariance matrix elements and the covariance matrix is ​​constructed based on the covariance matrix elements; wherein the expression of the covariance element conversion formula is:

[0023]

[0024] In the formula, σ ij is the covariance matrix element, x ′ ki and x ′ kj are the values ​​of the i-th and j-th standardized characteristic indicators of the k-th real-time working data, and is the mean of the i-th and j-th standardized feature indices;

[0025] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​of the covariance matrix and eigenvectors corresponding to each eigenvalue; wherein the eigenvectors are used to describe the direction of change of the data.

[0026] In one implementation, the method for evaluating the safety of distribution network operation further includes:

[0027] An initial data matrix is ​​constructed based on the real-time working data and the characteristic index; wherein each row element in the initial data matrix represents a characteristic vector of the real-time working data;

[0028] The mean vector of the initial data matrix is ​​calculated based on the mean vector formula; wherein the expression of the mean vector formula is:

[0029]

[0030] In the formula, μ is the mean vector, x i is the feature vector of the i-th real-time working data;

[0031] The initial data matrix is ​​matrix-centered based on a matrix centering formula to obtain a centralized data matrix; wherein the matrix centering formula is expressed as:

[0032] X centercd =X-μ T ;

[0033] In the formula, X centercd is the centralized data matrix, X is the initial data matrix, μ T is the transpose of the mean vector;

[0034] The first covariance matrix of the centralized data matrix is ​​obtained based on the covariance calculation formula; wherein the expression of the covariance calculation formula is:

[0035]

[0036] Where C is the first covariance matrix, X centercd is the initial data matrix, is the transposed matrix of the initial data matrix;

[0037] Performing eigenvalue decomposition on the first covariance matrix to obtain a first eigenvalue of the first covariance matrix and a first eigenvector corresponding to the first eigenvalue;

[0038] The covariance matrix is ​​tested based on the first covariance matrix, and when the first covariance matrix is ​​consistent with the covariance matrix, it is determined that the covariance matrix constructed based on the standardized feature index is correct.

[0039] In one implementation, before the real-time working data and the feature vector are input into the pre-built decision model, the feature value and the feature vector are pre-processed based on the principal component analysis method, specifically:

[0040] The eigenvalues ​​are sorted in descending order, the eigenvalues ​​with the highest order are retained based on the preset cumulative explained variance contribution rate, and the eigenvectors corresponding to the eigenvalues ​​with the highest order are used as the principal components; wherein the expression of the variance contribution rate is:

[0041]

[0042] In the formula, is the sum of all eigenvalues, is the sum of the eigenvalues ​​of the first k principal components; i is the i-th eigenvalue, k is the retained principal component;

[0043] Projecting the real-time working data set onto the principal component to obtain a reduced-dimensional real-time working data set;

[0044] Extract the maximum eigenvector coefficient of the principal component and extract the corresponding second eigenvector;

[0045] The dimension-reduced real-time working data set and the second feature vector are input into the decision model.

[0046] In one implementation, the decision model uses a preset distribution network security assessment index as a target variable and performs a security assessment on the target distribution network through a plurality of decision trees, specifically including:

[0047] Inputting the dimension-reduced real-time working data set and the second feature vector into a decision forest model; wherein the decision forest model includes a plurality of decision trees;

[0048] Obtain the prediction result of each decision tree; wherein the function expression of the prediction result is:

[0049]

[0050] In the formula, is the prediction result of the i-th decision tree, J is the number of leaves of the i-th decision tree, is the predicted value of leaf node j, is the region of leaf node j, I(*) is the indicator function, which is used to indicate whether the real-time working data x belongs to the region

[0051] Generate a safety prediction result of the decision forest model according to each prediction result; wherein the expression of the safety prediction result is:

[0052]

[0053] In the formula, is the prediction result of the i-th decision tree, and N is the number of decision trees in the decision forest model.

[0054] In one implementation, the method for evaluating the operation safety of the distribution network further includes: inputting the historical working data set of the target distribution network into the initial neural network model for iterative training to obtain the decision model, specifically:

[0055] Collecting a historical working data set of the target distribution network, and constructing a training set based on the historical working data set; wherein each historical working data in the historical working data set contains a number of characteristic indicators, and the training set contains a number of data subsets;

[0056] Constructing a feature set based on the feature index; wherein the feature set includes a plurality of feature subsets;

[0057] A plurality of decision trees are set in the initial neural network model, and an iterative training operation is performed on each decision tree; wherein the iterative training operation is to randomly select a data subset and a feature subset from the training set and the feature set respectively for prediction until the decision tree cannot be split any further;

[0058] The prediction result of the initial neural network model is generated according to each training result, and the prediction result is tested based on a preset performance evaluation indicator. When the test result of the prediction result reaches a preset threshold, it is determined that the training of the initial neural network model is completed, and the iterative training of the decision tree is ended to obtain the decision model.

[0059] In a second aspect, the present application also provides a distribution network operation safety evaluation device, including: a data acquisition module, a standard processing module, a vector operation module and a safety evaluation module;

[0060] The data acquisition module is used to acquire a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators;

[0061] The standard processing module is used to perform standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator;

[0062] The vector operation module is used to construct a covariance matrix based on the standardized characteristic index and perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector of the covariance matrix;

[0063] The safety assessment module is used to input the real-time working data set and the feature vector into a pre-built decision model so that the decision model outputs the safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment indicator as the target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

[0064] In the above scheme, by obtaining the real-time working data of the target distribution network, the evaluation process can be analyzed based on the latest data to avoid the inaccuracy caused by the use of outdated data. Different feature indicators often have different units and magnitudes. Standardization can eliminate these differences, so that the model can treat each indicator more fairly during training and evaluation. The standardized data has the same mean and variance, which helps to improve the stability and convergence speed of the model and make the evaluation results more reliable. By constructing the covariance matrix and performing eigenvalue decomposition, the main change direction and key features in the data can be identified, thereby achieving data dimensionality reduction and feature extraction. This helps to reduce redundant information and improve the computational efficiency and evaluation accuracy of the model. Eigenvalue decomposition can help identify the principal components in the data, so that the subsequent decision model can pay more attention to the features that have the greatest impact on power grid security, and improve the pertinence and accuracy of the evaluation. The decision model uses several decision trees for integration, which can effectively reduce the overfitting problem of a single decision tree and improve the generalization ability of the model and the accuracy of the evaluation results. By combining real-time data, feature standardization, covariance matrix analysis and multiple decision tree integration, it can comprehensively cover different aspects of the distribution network, accurately identify potential risks and weak links, and provide strong support for the stable operation of the distribution network and the response to emergencies.

[0065] In one implementation, the standard processing module is used to perform standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator, specifically including:

[0066] The average value of each characteristic index in the real-time working data set is calculated based on the average formula; wherein the real-time working data set includes n real-time working data and d characteristic indexes, n and d are positive integers greater than or equal to 1, and the expression of the average formula is:

[0067]

[0068] In the formula, μ j is the average value of the jth characteristic index, x ijis the jth characteristic index of the i-th real-time working data, j = 1, 2, ..., d;

[0069] The standard deviation of each characteristic index is calculated according to the standard deviation formula; wherein the expression of the standard deviation formula is:

[0070]

[0071] In the formula, σ j is the standard deviation of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index;

[0072] Each of the characteristic indicators is standardized and calculated according to a standardized formula to obtain a number of standardized characteristic indicators; wherein the expression of the standardized formula is:

[0073]

[0074] In the formula, x′ ij is the jth characteristic index of the i-th real-time working data after standardization, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index, σ j is the standard deviation of the j-th feature index.

[0075] In one implementation, the vector operation module is used to construct a covariance matrix based on the standardized feature index and perform eigenvalue decomposition on the covariance matrix, specifically including:

[0076] Based on the covariance element conversion formula, each of the standardized characteristic indicators is operated to obtain the covariance matrix elements and the covariance matrix is ​​constructed based on the covariance matrix elements; wherein the expression of the covariance element conversion formula is:

[0077]

[0078] In the formula, σ ij is the covariance matrix element, x ′ ki and x ′ kj are the values ​​of the i-th and j-th standardized characteristic indicators of the k-th real-time working data, and is the mean of the i-th and j-th standardized feature indices;

[0079] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​of the covariance matrix and eigenvectors corresponding to each eigenvalue; wherein the eigenvectors are used to describe the direction of change of the data.

[0080] In one implementation, the distribution network operation safety assessment device further includes:

[0081] An initial data matrix is ​​constructed based on the real-time working data and the characteristic index; wherein each row element in the initial data matrix represents a characteristic vector of the real-time working data;

[0082] The mean vector of the initial data matrix is ​​calculated based on the mean vector formula; wherein the expression of the mean vector formula is:

[0083]

[0084] In the formula, μ is the mean vector, x i is the feature vector of the i-th real-time working data;

[0085] The initial data matrix is ​​matrix-centered based on a matrix centering formula to obtain a centralized data matrix; wherein the matrix centering formula is expressed as:

[0086] X centercd =X-μ T ;

[0087] In the formula, X centercd is the centralized data matrix, X is the initial data matrix, μ T is the transpose of the mean vector;

[0088] The first covariance matrix of the centralized data matrix is ​​obtained based on the covariance calculation formula; wherein the expression of the covariance calculation formula is:

[0089]

[0090] Where C is the first covariance matrix, X centercd is the initial data matrix, is the transposed matrix of the initial data matrix;

[0091] Performing eigenvalue decomposition on the first covariance matrix to obtain a first eigenvalue of the first covariance matrix and a first eigenvector corresponding to the first eigenvalue;

[0092] The covariance matrix is ​​tested based on the first covariance matrix, and when the first covariance matrix is ​​consistent with the covariance matrix, it is determined that the covariance matrix constructed based on the standardized feature index is correct.

[0093] In one implementation, before the real-time working data and the feature vector are input into the pre-built decision model, the feature value and the feature vector are pre-processed based on the principal component analysis method, specifically:

[0094] The eigenvalues ​​are sorted in descending order, the eigenvalues ​​with the highest order are retained based on the preset cumulative explained variance contribution rate, and the eigenvectors corresponding to the eigenvalues ​​with the highest order are used as the principal components; wherein the expression of the variance contribution rate is:

[0095]

[0096] In the formula, is the sum of all eigenvalues, is the sum of the eigenvalues ​​of the first k principal components; i is the i-th eigenvalue, k is the retained principal component;

[0097] Projecting the real-time working data set onto the principal component to obtain a reduced-dimensional real-time working data set;

[0098] Extract the maximum eigenvector coefficient of the principal component and extract the corresponding second eigenvector;

[0099] The dimension-reduced real-time working data set and the second feature vector are input into the decision model.

[0100] In one implementation, the decision model uses a preset distribution network security assessment index as a target variable and performs a security assessment on the target distribution network through a plurality of decision trees, specifically including:

[0101] Inputting the dimension-reduced real-time working data set and the second feature vector into a decision forest model; wherein the decision forest model includes a plurality of decision trees;

[0102] Obtain the prediction result of each decision tree; wherein the function expression of the prediction result is:

[0103]

[0104] In the formula, is the prediction result of the i-th decision tree, J is the number of leaves of the i-th decision tree, is the predicted value of leaf node j, is the region of leaf node j, I(*) is the indicator function, which is used to indicate whether the real-time working data x belongs to the region

[0105] Generate a safety prediction result of the decision forest model according to each prediction result; wherein the expression of the safety prediction result is:

[0106]

[0107] In the formula, is the prediction result of the i-th decision tree, and N is the number of decision trees in the decision forest model.

[0108] In one implementation, the distribution network operation safety evaluation device further includes: inputting the historical working data set of the target distribution network into the initial neural network model for iterative training to obtain the decision model, specifically:

[0109] Collecting a historical working data set of the target distribution network, and constructing a training set based on the historical working data set; wherein each historical working data in the historical working data set contains a number of characteristic indicators, and the training set contains a number of data subsets;

[0110] Constructing a feature set based on the feature index; wherein the feature set includes a plurality of feature subsets;

[0111] A plurality of decision trees are set in the initial neural network model, and an iterative training operation is performed on each decision tree; wherein the iterative training operation is to randomly select a data subset and a feature subset from the training set and the feature set respectively for prediction until the decision tree cannot be split any further;

[0112] The prediction result of the initial neural network model is generated according to each training result, and the prediction result is tested based on a preset performance evaluation indicator. When the test result of the prediction result reaches a preset threshold, it is determined that the training of the initial neural network model is completed, and the iterative training of the decision tree is ended to obtain the decision model.

[0113] In a third aspect, the present application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the distribution network operation safety evaluation method as described above is implemented.

[0114] In a fourth aspect, the present application also provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the distribution network operation safety assessment method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] Figure 1 A schematic diagram of a flow chart of a method for evaluating the operation safety of a distribution network provided in one embodiment of the present invention;

[0116] Figure 2A schematic diagram of a module of a distribution network operation safety assessment device provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0117] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0118] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0119] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0120] Example 1

[0121] See also Figure 1 , Figure 1 The flowchart of a method for evaluating the operation safety of a distribution network provided in an embodiment of the present invention is as follows. The embodiment of the present invention provides a method for evaluating the operation safety of a distribution network, including steps 101 to 104, each of which is as follows:

[0122] Step 101 obtains a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators;

[0123] In an embodiment of the present invention, a real-time working data set of a provincial disaster recovery distribution network is obtained through a SCADA system. A SCADA (Supervisory Control and Data Acquisition) system is a computer system used for industrial automation and process control, which is mainly used to monitor and control equipment and processes distributed in a wide geographical area, and is often used in the fields of electricity, water treatment, oil, natural gas, manufacturing, etc. The extracted real-time working data includes the voltage, current, frequency and power of each device in the distribution network. The corresponding characteristic indicators are extracted according to the collected real-time working data. The characteristic indicators include average current, maximum voltage, frequency deviation (frequency deviation is the frequency deviation of each sampling point;), covariance, skewness, windage, standard deviation, etc. The characteristic indicators can be set according to the type and specific content of the real-time working data, and are not limited here.

[0124] Step 102: performing standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator.

[0125] In one embodiment, the step of performing standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator specifically includes:

[0126] The average value of each characteristic index in the real-time working data set is calculated based on the average formula; wherein the real-time working data set includes n real-time working data and d characteristic indexes, n and d are positive integers greater than or 1, and the expression of the average formula is:

[0127]

[0128] In the formula, μ j is the average value of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, j = 1, 2, ..., d;

[0129] The standard deviation of each characteristic index is calculated according to the standard deviation formula; wherein the expression of the standard deviation formula is:

[0130]

[0131] In the formula, σ j is the standard deviation of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index;

[0132] Each of the characteristic indicators is standardized and calculated according to a standardized formula to obtain a number of standardized characteristic indicators; wherein the expression of the standardized formula is:

[0133]

[0134] In the formula, x′ ij is the jth characteristic index of the i-th real-time working data after standardization, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index, σ j is the standard deviation of the j-th feature index.

[0135] In the embodiment of the present invention, for a real-time working data set having n real-time working data and d characteristic indicators, the average value and standard deviation of each characteristic indicator are calculated by an average formula, and each characteristic indicator is standardized according to the average value and standard deviation of each characteristic indicator to obtain a standardized characteristic indicator. Exemplarily, as shown in Table 1, it is assumed that there are three samples of real-time working data containing two characteristic indicators (characteristic indicators X1 and X2).

[0136] Table 1

[0137] Sample(k) <![CDATA[X1]]> <![CDATA[X2]]> 1 2.0 3.0 2 4.0 5.0 3 6.0 7.0

[0138] For each feature index, the mean is:

[0139] μ1=(2.0+4.0+6.0) / 3=4.0; μ2=(3.0+5.0+7.0) / 3=5.0.

[0140] Then the standard deviation of each characteristic index is calculated according to the average value of the characteristic index, and then the standard is replaced by the characteristic index.

[0141] Step 103: constructing a covariance matrix based on the standardized characteristic index and performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector of the covariance matrix.

[0142] In one embodiment, constructing a covariance matrix based on the standardized feature index and performing eigenvalue decomposition on the covariance matrix specifically includes:

[0143] Based on the covariance element conversion formula, each of the standardized characteristic indicators is operated to obtain the covariance matrix elements and the covariance matrix is ​​constructed based on the covariance matrix elements; wherein the expression of the covariance element conversion formula is:

[0144]

[0145] In the formula, σ ij is the covariance matrix element, x ′ ki and x ′ kjare the values ​​of the i-th and j-th standardized characteristic indicators of the k-th real-time working data, and is the mean of the i-th and j-th standardized feature indices;

[0146] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​of the covariance matrix and eigenvectors corresponding to each eigenvalue; wherein the eigenvectors are used to describe the direction of change of the data.

[0147] In an embodiment of the present invention, each standard conversion characteristic index is converted into a covariance matrix element based on a covariance element conversion formula, and then the elements in the covariance matrix are subjected to eigenvalue decomposition to obtain the eigenvalues ​​and eigenvectors of the covariance matrix. When the covariance matrix is ​​subjected to eigenvalue decomposition, it can be obtained by solving the formula det(Σ-λI)=0, where Σ is the covariance matrix, λ is the eigenvalue, and I is the unit matrix. All eigenvalues ​​of the covariance matrix can be obtained by solving this polynomial equation. Then, for each eigenvalue λ, the linear equation (Σ-λI)v=0 is solved to obtain the eigenvector v corresponding to the eigenvalue. Through eigenvalue decomposition, eigenvalues ​​(reflecting the size of the data variance) and corresponding eigenvectors (reflecting the main direction of data change) can be obtained. The larger the eigenvalue, the greater the variability of the data in the direction corresponding to the eigenvector. Eigenvalue decomposition belongs to conventional technical means in the art and will not be described in detail here.

[0148] In one embodiment, the distribution network operation safety evaluation device further includes: constructing an initial data matrix based on the real-time working data and the characteristic index; wherein each row element in the initial data matrix represents a characteristic vector of the real-time working data; and calculating the mean vector of the initial data matrix based on the mean vector formula; wherein the expression of the mean vector formula is:

[0149]

[0150] In the formula, μ is the mean vector, x i is the feature vector of the i-th real-time working data;

[0151] The initial data matrix is ​​matrix-centered based on a matrix centering formula to obtain a centralized data matrix; wherein the matrix centering formula is expressed as:

[0152] X centercd =X-μ T ;

[0153] Where, X centercd is the centralized data matrix, X is the initial data matrix, μ T is the transpose of the mean vector;

[0154] The first covariance matrix of the centralized data matrix is ​​obtained based on the covariance calculation formula; wherein the expression of the covariance calculation formula is:

[0155]

[0156] Where C is the first covariance matrix; X centercd is the initial data matrix, is the transposed matrix of the initial data matrix;

[0157] Perform eigenvalue decomposition on the first covariance matrix to obtain first eigenvalues ​​λ1, λ2, ..., λd of the first covariance matrix and first eigenvectors v1, v2, ..., vd corresponding to the first eigenvalues; test the covariance matrix based on the first covariance matrix, and when the first covariance matrix is ​​consistent with the covariance matrix, determine that the covariance matrix constructed based on the standardized characteristic indicators is correct.

[0158] In the embodiment of the present invention, an initial data matrix is ​​constructed based on the received real-time working data and characteristic indicators. Exemplarily, the initial data matrix is ​​as follows:

[0159]

[0160] The dimension of X is n×d, which means the initial data matrix contains n real-time working data and d characteristic indicators. i Represents the eigenvector of the i-th real-time working data. Then, the mean vector μ of the initial data matrix is ​​calculated according to the mean vector formula matrix, with a length of d. Then, the centralized data matrix X is calculated according to the matrix centralization formula centercd , where each feature column is subtracted from the feature vector of the corresponding feature. T represents the transpose of the mean vector, each column of which corresponds to each feature column of the initial data matrix X. The first covariance matrix C represents the centered data matrix X centercd The covariance relationship between features, and its dimension is d×d, its element c ij represents the covariance between the i-th and j-th features. Performing eigenvalue decomposition on the first covariance matrix C can obtain the eigenvalues ​​λ1, λ2, ..., λd and the corresponding eigenvectors v1, v2, ..., vd. The eigenvalue decomposition process has been explained in the previous article and will not be repeated here. The eigenvalue λi satisfies the following equation: Cv i =λ i v i . The feature vector v iAfter normalization, the eigenvector of the first covariance matrix C can be obtained. The eigenvector represents the direction of the data in the feature space. The eigenvector is usually normalized (unit length) for easy representation. The larger the eigenvalue, the more important the corresponding eigenvector. The first covariance matrix is ​​constructed based on the original data such as real-time working data and characteristic indicators, and the eigenvalue decomposition is performed to obtain the corresponding eigenvalues ​​and eigenvectors. The obtained first covariance matrix, eigenvalues ​​and eigenvectors are compared with the covariance matrix, eigenvalues ​​and eigenvectors obtained based on the standardized characteristic indicators. If the comparison results are consistent, it is judged that the covariance matrix obtained based on the standardized characteristic indicators is correct, and the subsequent calculations can be based on the matrix and the related eigenvalues ​​and eigenvectors. If they are inconsistent, recalculate until the two are consistent.

[0161] Step 104: Input the real-time working data and the feature vector into a pre-built decision model so that the decision model outputs a safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment index as a target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

[0162] In one embodiment, before the real-time working data and the eigenvector are input into the pre-built decision model, the eigenvalue and the eigenvector are pre-processed based on the principal component analysis method, specifically: the eigenvalues ​​are sorted in descending order, the eigenvalues ​​with the highest order are retained based on the preset cumulative explained variance contribution rate, and the eigenvectors corresponding to the eigenvalues ​​with the highest order are used as the principal components; wherein the expression of the variance contribution rate is:

[0163]

[0164] In the formula, is the sum of all eigenvalues, is the sum of the eigenvalues ​​of the first k principal components; i is the i-th eigenvalue, k is the retained principal component;

[0165] Projecting the real-time working data set onto the principal component to obtain a reduced-dimensional real-time working data set;

[0166] Extract the maximum eigenvector coefficient of the principal component and extract the corresponding second eigenvector;

[0167] The dimension-reduced real-time working data set and the second feature vector are input into the decision model.

[0168] In the embodiment of the present invention, the obtained feature quantities are sorted in descending order from large to small, and the number of principal components to be retained is selected by setting an appropriate cumulative explained variance contribution rate according to user needs, and the eigenvectors corresponding to the first k eigenvalues ​​are selected as principal components. It should be noted that the total variance is equal to the sum of all eigenvalues. Specifically, In principal component analysis, the original data is converted into a set of new variables, namely principal components, which are linear combinations of the original variables. The cumulative explained variance contribution rate refers to the percentage of total variation explained by the first few principal components or factors together. For example, if the cumulative explained variance contribution rate of the first three principal components reaches 80%, this means that these three principal components together explain 80% of the variation of the original data. Preferably, the number of principal components selected to be retained should be able to explain most (usually more than 80%) of the total variance. The real-time working data in the real-time working data set is projected onto the first k principal components. Assuming that the eigenvectors of the first k principal components form a matrix P (size is p×k), the reduced-dimensional real-time working data set can be expressed as Xreduced=X′P, where Xreduced is the reduced-dimensional real-time working data set and X′ is the real-time working data set. The size of Xreduced is n×k, n is the number of real-time sample data, and k is the dimension after dimensionality reduction. Extract the maximum eigenvector coefficient of the principal component, that is, the original feature corresponding to the principal component loading. In principal component analysis, new features (i.e., principal components) are generated by linearly combining the original features. The coefficients of these new features reflect the importance of the original features in the principal component, which is called the principal component loading. The larger the principal component loading, the greater the contribution of the corresponding original features to the principal component, and these features have a more important impact on the change of the data. Exemplarily, after principal component analysis, two principal components PC1 and PC2 are obtained, and their corresponding eigenvector coefficients (principal component loadings) are PC1: [0.7, 0.5, -0.4]; PC2: [0.6, -0.8, 0.2]. It can be seen that the absolute value of feature 1 in the loading of PC1 is the largest (0.7), so feature 1 has the greatest impact on PC1, and the absolute value of feature 2 in the loading of PC2 is the largest (-0.8), so feature 2 has the greatest impact on PC2. Feature 1, feature 2, that is, the two second eigenvectors and the reduced-dimensional real-time working data are input into the decision model for safety assessment.

[0169] In one embodiment, the decision model uses a preset distribution network security assessment index as a target variable and performs a security assessment on the target distribution network through a plurality of decision trees, specifically including:

[0170] Inputting the dimension-reduced real-time working data set and the second feature vector into a decision forest model; wherein the decision forest model includes a plurality of decision trees;

[0171] Obtain the prediction result of each decision tree; wherein the function expression of the prediction result is:

[0172]

[0173] In the formula, is the prediction result of the i-th decision tree, J is the number of leaves of the i-th decision tree, is the predicted value of leaf node j, is the region of leaf node j, I(*) is the indicator function, which is used to indicate whether the real-time working data x belongs to the region

[0174] Generate a safety prediction result of the decision forest model according to each prediction result; wherein the expression of the safety prediction result is:

[0175]

[0176] In the formula, is the prediction result of the i-th decision tree, and N is the number of decision trees in the decision forest model.

[0177] In the embodiment of the present invention, the real-time working data after dimension reduction is input into the decision forest model, and each decision tree in the decision forest model transmits the received real-time working data from the root node to the leaf node, and makes a decision according to the structure of the decision tree. Each decision tree outputs a prediction result, and the arithmetic mean of the prediction results output by all decision trees is calculated by the mean method, and the arithmetic mean is used as the final prediction result of the decision forest model.

[0178] In one embodiment, the method for evaluating the operation safety of the distribution network further includes: inputting the historical working data set of the target distribution network into the initial neural network model for iterative training to obtain the decision model, specifically:

[0179] Collecting a historical working data set of the target distribution network, and constructing a training set based on the historical working data set; wherein each historical working data in the historical working data set contains a number of characteristic indicators, and the training set contains a number of data subsets;

[0180] Constructing a feature set based on the feature index; wherein the feature set includes a plurality of feature subsets;

[0181] A plurality of decision trees are set in the initial neural network model, and an iterative training operation is performed on each decision tree; wherein the iterative training operation is to randomly select a data subset and a feature subset from the training set and the feature set respectively for prediction until the decision tree cannot be split any further;

[0182] The prediction result of the initial neural network model is generated according to each training result, and the prediction result is tested based on a preset performance evaluation indicator. When the test result of the prediction result reaches a preset threshold, it is determined that the training of the initial neural network model is completed, and the iterative training of the decision tree is ended to obtain the decision model.

[0183] In an embodiment of the present invention, a corresponding decision model is constructed based on the historical working data set of the target distribution network. The historical working data set contains several historical working data samples, and each historical working data sample contains several features. The historical working data set is divided into several data subsets as the training subsets of the initial neural network model. At the same time, an n×1 vector y is constructed based on the operation safety index of the distribution network as the target variable to train the initial neural network model. Among them, the operation safety index includes voltage amplitude, power grid frequency, transient active power, instantaneous reactive power, etc. For each decision tree in the initial neural network model, a subset is selected from the training node by the self-service sampling method (random sampling with replacement) as the training set of the current decision tree. When each node is split, a feature subset is randomly selected from the feature set, and the optimal splitting point is found based on the selected feature subset (for example, using the mean square error minimization as the splitting criterion). Starting from the root node, the data is recursively divided into subnodes according to the selected features and splitting points until the stop condition is met (such as reaching the maximum depth, the number of samples in the node is less than the preset threshold, or all the output values ​​of the node are the same). At each leaf node, the average value of the target variable (grid operation safety index) of all samples of the node is calculated and used as the predicted value of the leaf node. Repeat the above training steps until a complete decision tree is constructed. After all decision trees are trained, the prediction results of the entire initial neural network model are generated based on the average value of the prediction results of each decision tree. Exemplarily, if the performance evaluation indicators such as accuracy, precision, recall rate and specificity of the model prediction results reach the preset threshold, the model training is judged to be completed, and a decision model that can be directly used for the target distribution network is obtained.

[0184] In an embodiment of the present invention, there is also provided a distribution network operation safety assessment device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the above-mentioned distribution network operation safety assessment method is implemented.

[0185] In an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned distribution network operation safety assessment method.

[0186] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to complete the present invention. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the evaluation device for the safety of distribution network operation.

[0187] The distribution network operation safety assessment device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The distribution network operation safety assessment device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of distribution network operation safety assessment devices and do not constitute a limitation on distribution network operation safety assessment devices. More or fewer components may be included, or some components may be combined, or different components may be included. For example, the distribution network operation safety assessment device may also include input and output devices, network access devices, buses, and the like.

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

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

[0190] Among them, if the module based on the evaluation of the safety of the operation of the distribution network is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0191] The embodiment of the present invention provides a method for evaluating the operation safety of a distribution network. By acquiring the real-time working data of the target distribution network, the evaluation process can be analyzed based on the latest data to avoid the inaccuracy caused by the use of outdated data. Different characteristic indicators often have different units and magnitudes. Standardization processing can eliminate these differences, so that the model can treat each indicator more fairly during training and evaluation. The data after standardization processing has the same mean and variance, which helps to improve the stability and convergence speed of the model and make the evaluation results more reliable. By constructing a covariance matrix and performing eigenvalue decomposition, the main change direction and key features in the data can be identified, thereby achieving data dimensionality reduction and feature extraction. This helps to reduce redundant information and improve the computational efficiency and evaluation accuracy of the model. Eigenvalue decomposition can help identify the principal components in the data, so that the subsequent decision model can pay more attention to the features that have the greatest impact on power grid safety, and improve the pertinence and accuracy of the evaluation. The decision model uses several decision trees for integration, which can effectively reduce the overfitting problem of a single decision tree and improve the generalization ability of the model and the accuracy of the evaluation results. By combining real-time data, feature standardization, covariance matrix analysis and multiple decision tree integration, it can comprehensively cover different aspects of the distribution network, accurately identify potential risks and weak links, and provide strong support for the stable operation of the distribution network and the response to emergencies.

[0192] Example 2

[0193] See also Figure 2 , Figure 2 A schematic diagram of a module of a distribution network operation safety evaluation device provided in an embodiment of the present invention. The present invention provides a device including: a data acquisition module 201, a standard processing module 202, a vector operation module 203 and a safety evaluation module 204;

[0194] The data acquisition module 201 is used to acquire a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators;

[0195] The standard processing module 202 is used to perform standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator;

[0196] The vector operation module 203 is used to construct a covariance matrix based on the standardized characteristic index and perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector of the covariance matrix;

[0197] The safety assessment module 204 is used to input the real-time working data set and the feature vector into a pre-built decision model so that the decision model outputs the safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment index as the target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

[0198] In one embodiment, the standard processing module 202 is used to perform standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator, which specifically includes:

[0199] The average value of each characteristic index in the real-time working data set is calculated based on the average formula; wherein the real-time working data set includes n real-time working data and d characteristic indexes, n and d are positive integers greater than or 1, and the expression of the average formula is:

[0200]

[0201] In the formula, μ j is the average value of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, j = 1, 2, ..., d;

[0202] The standard deviation of each characteristic index is calculated according to the standard deviation formula; wherein the expression of the standard deviation formula is:

[0203]

[0204] In the formula, σ j is the standard deviation of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index;

[0205] Each of the characteristic indicators is standardized and calculated according to a standardized formula to obtain a number of standardized characteristic indicators; wherein the expression of the standardized formula is:

[0206]

[0207] In the formula, x′ ij is the jth characteristic index of the i-th real-time working data after standardization, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index, σ j is the standard deviation of the j-th feature index.

[0208] In one implementation, the vector operation module 203 is used to construct a covariance matrix based on the standardized feature index and perform eigenvalue decomposition on the covariance matrix, specifically including:

[0209] Based on the covariance element conversion formula, each of the standardized characteristic indicators is operated to obtain the covariance matrix elements and the covariance matrix is ​​constructed based on the covariance matrix elements; wherein the expression of the covariance element conversion formula is:

[0210]

[0211] In the formula, σ ij is the covariance matrix element, x ′ ki and x ′ kj are the values ​​of the i-th and j-th standardized characteristic indicators of the k-th real-time working data, and is the mean of the i-th and j-th standardized feature indices;

[0212] Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​of the covariance matrix and eigenvectors corresponding to each eigenvalue; wherein the eigenvectors are used to describe the direction of change of the data.

[0213] In one implementation, the distribution network operation safety assessment device further includes:

[0214] An initial data matrix is ​​constructed based on the real-time working data and the characteristic index; wherein each row element in the initial data matrix represents a characteristic vector of the real-time working data;

[0215] The mean vector of the initial data matrix is ​​calculated based on the mean vector formula; wherein the expression of the mean vector formula is:

[0216]

[0217] In the formula, μ is the mean vector, x i is the feature vector of the i-th real-time working data;

[0218] The initial data matrix is ​​matrix-centered based on a matrix centering formula to obtain a centralized data matrix; wherein the matrix centering formula is expressed as:

[0219] X centercd =X-μ T ;

[0220] Where, X centercd is the centralized data matrix, X is the initial data matrix, μ Tis the transpose of the mean vector;

[0221] The first covariance matrix of the centralized data matrix is ​​obtained based on the covariance calculation formula; wherein the expression of the covariance calculation formula is:

[0222]

[0223] Where C is the first covariance matrix, X centercd is the initial data matrix, is the transposed matrix of the initial data matrix;

[0224] Performing eigenvalue decomposition on the first covariance matrix to obtain a first eigenvalue of the first covariance matrix and a first eigenvector corresponding to the first eigenvalue;

[0225] The covariance matrix is ​​tested based on the first covariance matrix, and when the first covariance matrix is ​​consistent with the covariance matrix, it is determined that the covariance matrix constructed based on the standardized feature index is correct.

[0226] In one implementation, before the real-time working data and the feature vector are input into the pre-built decision model, the feature value and the feature vector are pre-processed based on the principal component analysis method, specifically:

[0227] The eigenvalues ​​are sorted in descending order, the eigenvalues ​​with the highest order are retained based on the preset cumulative explained variance contribution rate, and the eigenvectors corresponding to the eigenvalues ​​with the highest order are used as the principal components; wherein the expression of the variance contribution rate is:

[0228]

[0229] In the formula, is the sum of all eigenvalues, is the sum of the eigenvalues ​​of the first k principal components; i is the i-th eigenvalue, k is the retained principal component;

[0230] Projecting the real-time working data set onto the principal component to obtain a reduced-dimensional real-time working data set;

[0231] Extract the maximum eigenvector coefficient of the principal component and extract the corresponding second eigenvector;

[0232] The dimension-reduced real-time working data set and the second feature vector are input into the decision model.

[0233] In one implementation, the decision model uses a preset distribution network security assessment index as a target variable and performs a security assessment on the target distribution network through a plurality of decision trees, specifically including:

[0234] Inputting the dimension-reduced real-time working data set and the second feature vector into a decision forest model; wherein the decision forest model includes a plurality of decision trees;

[0235] Obtain the prediction result of each decision tree; wherein the function expression of the prediction result is:

[0236]

[0237] In the formula, is the prediction result of the i-th decision tree, J is the number of leaves of the i-th decision tree, is the predicted value of leaf node j, is the region of leaf node j, I(*) is the indicator function, which is used to indicate whether the real-time working data x belongs to the region

[0238] Generate a safety prediction result of the decision forest model according to each prediction result; wherein the expression of the safety prediction result is:

[0239]

[0240] In the formula, is the prediction result of the i-th decision tree, and N is the number of decision trees in the decision forest model.

[0241] In one implementation, the distribution network operation safety evaluation device further includes: inputting the historical working data set of the target distribution network into the initial neural network model for iterative training to obtain the decision model, specifically:

[0242] Collecting a historical working data set of the target distribution network, and constructing a training set based on the historical working data set; wherein each historical working data in the historical working data set contains a number of characteristic indicators, and the training set contains a number of data subsets;

[0243] Constructing a feature set based on the feature index; wherein the feature set includes a plurality of feature subsets;

[0244] A plurality of decision trees are set in the initial neural network model, and an iterative training operation is performed on each decision tree; wherein the iterative training operation is to randomly select a data subset and a feature subset from the training set and the feature set respectively for prediction until the decision tree cannot be split any further;

[0245] The prediction result of the initial neural network model is generated according to each training result, and the prediction result is tested based on a preset performance evaluation indicator. When the test result of the prediction result reaches a preset threshold, it is determined that the training of the initial neural network model is completed, and the iterative training of the decision tree is ended to obtain the decision model.

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

[0247] The embodiment of the present invention provides an evaluation device for the safe operation of a distribution network. By acquiring the real-time working data of the target distribution network, the evaluation process can be analyzed based on the latest data to avoid the inaccuracy caused by the use of outdated data. Different characteristic indicators often have different units and magnitudes. Standardization processing can eliminate these differences, so that the model can treat each indicator more fairly during training and evaluation. The data after standardization processing has the same mean and variance, which helps to improve the stability and convergence speed of the model and make the evaluation results more reliable. By constructing a covariance matrix and performing eigenvalue decomposition, the main change direction and key features in the data can be identified, thereby achieving data dimension reduction and feature extraction. This helps to reduce redundant information and improve the computational efficiency and evaluation accuracy of the model. Eigenvalue decomposition can help identify the main components in the data, so that the subsequent decision model can pay more attention to the features that have the greatest impact on power grid safety, and improve the pertinence and accuracy of the evaluation. The decision model uses several decision trees for integration, which can effectively reduce the overfitting problem of a single decision tree and improve the generalization ability of the model and the accuracy of the evaluation results. By combining real-time data, feature standardization, covariance matrix analysis and multiple decision tree integration, it can comprehensively cover different aspects of the distribution network, accurately identify potential risks and weak links, and provide strong support for the stable operation of the distribution network and the response to emergencies.

[0248] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A method for evaluating the safety of distribution network operation. It is characterized in that include: Acquire a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators; Performing standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator; Constructing a covariance matrix based on the standardized characteristic index and performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector of the covariance matrix; The real-time working data set and the feature vector are input into a pre-built decision model so that the decision model outputs a safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment index as a target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

2. A method for evaluating the operation safety of a distribution network as claimed in claim 1, It is characterized in that The standardization of each characteristic index to obtain a standardized characteristic index specifically includes: The average value of each characteristic index in the real-time working data set is calculated based on the average formula; wherein the real-time working data set includes n real-time working data and d characteristic indexes, n and d are positive integers greater than or equal to 1, and the expression of the average formula is: In the formula, μ j is the average value of the jth feature index, x ij is the jth characteristic index of the i-th real-time working data, j = 1, 2, ..., d; The standard deviation of each characteristic index is calculated according to the standard deviation formula; wherein the expression of the standard deviation formula is: In the formula, σ j is the standard deviation of the jth characteristic index, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index; Each of the characteristic indicators is standardized and calculated according to a standardized formula to obtain a number of standardized characteristic indicators; wherein the expression of the standardized formula is: In the formula, x′ ij is the jth characteristic index of the i-th real-time working data after standardization, x ij is the jth characteristic index of the i-th real-time working data, μ j is the average value of the jth characteristic index, σ j is the standard deviation of the j-th feature index.

3. A method for evaluating the operation safety of a distribution network as claimed in claim 1, It is characterized in that The constructing a covariance matrix based on the standardized characteristic index and performing eigenvalue decomposition on the covariance matrix specifically includes: Based on the covariance element conversion formula, each of the standardized characteristic indicators is operated to obtain the covariance matrix elements and the covariance matrix is ​​constructed based on the covariance matrix elements; wherein the expression of the covariance element conversion formula is: In the formula, σ ij is the covariance matrix element, x ′ ki and x ′ kj are the values ​​of the i-th and j-th standardized characteristic indicators of the k-th real-time working data, and is the mean of the i-th and j-th standardized feature indices; Perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​of the covariance matrix and eigenvectors corresponding to each eigenvalue; wherein the eigenvectors are used to describe the direction of data change.

4. A method for evaluating the operation safety of a distribution network as claimed in claim 1, It is characterized in that The method for evaluating the safety of distribution network operation also includes: An initial data matrix is ​​constructed based on the real-time working data and the characteristic index; wherein each row element in the initial data matrix represents a characteristic vector of the real-time working data; The mean vector of the initial data matrix is ​​calculated based on the mean vector formula; wherein the expression of the mean vector formula is: In the formula, μ is the mean vector, x i is the feature vector of the i-th real-time working data; The initial data matrix is ​​matrix-centered based on a matrix centering formula to obtain a centralized data matrix; wherein the matrix centering formula is expressed as: X centercd =X-μ T ; In the formula, X centercd is the centralized data matrix, X is the initial data matrix, μ T is the transpose of the mean vector; The first covariance matrix of the centralized data matrix is ​​obtained based on the covariance calculation formula; wherein the expression of the covariance calculation formula is: Where C is the first covariance matrix, X centercd is the initial data matrix, is the transposed matrix of the initial data matrix; Performing eigenvalue decomposition on the first covariance matrix to obtain a first eigenvalue of the first covariance matrix and a first eigenvector corresponding to the first eigenvalue; The covariance matrix is ​​tested based on the first covariance matrix, and when the first covariance matrix is ​​consistent with the covariance matrix, it is determined that the covariance matrix constructed based on the standardized feature index is correct.

5. A method for evaluating the operation safety of a distribution network as claimed in claim 4, It is characterized in that Before inputting the real-time working data and the feature vector into the pre-built decision model, the method further includes pre-processing the feature value and the feature vector based on the principal component analysis method, specifically: The eigenvalues ​​are sorted in descending order, the eigenvalues ​​with the highest order are retained based on the preset cumulative explained variance contribution rate, and the eigenvectors corresponding to the eigenvalues ​​with the highest order are used as the principal components; wherein the expression of the variance contribution rate is: In the formula, is the sum of all eigenvalues, is the sum of the eigenvalues ​​of the first k principal components; i is the i-th eigenvalue, k is the retained principal component; Projecting the real-time working data set onto the principal component to obtain a reduced-dimensional real-time working data set; Extract the maximum eigenvector coefficient of the principal component and extract the corresponding second eigenvector; The dimension-reduced real-time working data set and the second feature vector are input into the decision model.

6. A method for evaluating the operation safety of a distribution network as claimed in claim 5, It is characterized in that The decision model uses the preset distribution network security assessment index as the target variable and performs security assessment on the target distribution network through a number of decision trees, specifically including: Inputting the dimension-reduced real-time working data set and the second feature vector into a decision forest model; wherein the decision forest model includes a plurality of decision trees; Obtain the prediction result of each decision tree; wherein the function expression of the prediction result is: In the formula, is the prediction result of the i-th decision tree, J is the number of leaves of the i-th decision tree, is the predicted value of leaf node j, is the region of leaf node j, I(*) is the indicator function, which is used to indicate whether the real-time working data x belongs to the region Generate a safety prediction result of the decision forest model according to each prediction result; wherein the expression of the safety prediction result is: In the formula, is the prediction result of the i-th decision tree, and N is the number of decision trees in the decision forest model.

7. A method for evaluating the operation safety of a distribution network as claimed in claim 1, It is characterized in that The method for evaluating the operation safety of the distribution network further includes: inputting the historical working data set of the target distribution network into the initial neural network model for iterative training to obtain the decision model, specifically: Collecting a historical working data set of the target distribution network, and constructing a training set based on the historical working data set; wherein each historical working data in the historical working data set contains a number of characteristic indicators, and the training set contains a number of data subsets; Constructing a feature set based on the feature index; wherein the feature set includes a plurality of feature subsets; A plurality of decision trees are set in the initial neural network model, and an iterative training operation is performed on each decision tree; wherein the iterative training operation is to randomly select a data subset and a feature subset from the training set and the feature set respectively for prediction until the decision tree cannot be split any further; The prediction result of the initial neural network model is generated according to each training result, and the prediction result is tested based on a preset performance evaluation indicator. When the test result of the prediction result reaches a preset threshold, it is determined that the training of the initial neural network model is completed, and the iterative training of the decision tree is ended to obtain the decision model.

8. A device for evaluating the safety of distribution network operation. It is characterized in that include: Data acquisition module, standard processing module, vector operation module and safety assessment module; The data acquisition module is used to acquire a real-time working data set of a target distribution network; wherein the real-time working data set includes a plurality of real-time working data, and each of the real-time working data includes a plurality of characteristic indicators; The standard processing module is used to perform standardization processing on each of the characteristic indicators to obtain a standardized characteristic indicator; The vector operation module is used to construct a covariance matrix based on the standardized characteristic index and perform eigenvalue decomposition on the covariance matrix to obtain the eigenvector of the covariance matrix; The safety assessment module is used to input the real-time working data set and the feature vector into a pre-built decision model so that the decision model outputs the safety assessment result of the target distribution network; wherein the decision model uses a preset distribution network safety assessment indicator as the target variable and performs a safety assessment on the target distribution network through a plurality of decision trees.

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

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the method for evaluating the operation safety of the distribution network as described in any one of claims 1 to 6.

Citation Information

Cited By

  • ID Mapping method, device and system based on similarity calculation, and storage medium

    CN119417530A

  • Intelligent risk control method based on enterprise multi-dimensional data

    CN120069564A