A method for constructing power system risk index based on multi-source data fusion analysis
Through multi-source data fusion analysis and Bayesian network model, combined with Borderline SMOTE and multi-modal fusion method, the multi-source data fusion problem in power system risk assessment is solved, and the accurate quantification and timely monitoring of power system risks is achieved, reducing the risk of power system, Potential losses.
Patent Information
- Application Number
- CN202410924588.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-07-11
AI Technical Summary
The existing power system risk assessment methods are difficult to effectively integrate multi-source data, resulting in the inability to accurately reflect the status of the power system in different seasons and the inability to promptly detect and deal with potential risks.
Using a multi-source data fusion analysis method, the risk type characteristics are extracted through data acquisition and preprocessing, and the posterior probability is calculated through Bayesian network model, and the monitoring cycle is formulated, combining the Borderline SMOTE algorithm and multi-mode The state fusion method ensures the accuracy and comprehensiveness of risk indicators.
It improves the accuracy and comprehensiveness of the risk assessment of the power system, can promptly detect risks, reduce potential losses, make up for the problem of insufficient historical data, and provides more representative risk indicators and more reasonable monitoring cycles.
Smart Images

Figure CN118469308B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system risk index construction, and in particular to a method for constructing a power system risk index based on multi-source data fusion analysis. Background Art
[0002] With the rapid development of social economy and the increase in electricity consumption, the safe operation of power grids has become increasingly important. The adoption of a nationwide closely connected network, high-efficiency large-capacity units (groups), and ultra-high voltage levels has improved the quality and efficiency of electric energy. However, it has also brought severe challenges to the safe operation of power grids. In order to ensure the safe operation of power grids, formulating appropriate risk assessment indicators and conducting quantitative evaluations have become the focus of research at home and abroad.
[0003] In the related technology, the risk system indicators are first defined, and the Bayesian network structure is established based on the risk indicator system. The prior probability and conditional probability distribution of the nodes in the Bayesian network structure are determined based on the preset expert experience. After the risk occurs, the posterior probability is calculated by the Bayesian formula based on the prior probability and conditional probability, and then the monitoring cycle is formulated. Although this scheme can adjust the monitoring cycle according to the posterior probability, due to the randomness of the risk of the power system, the method of directly defining health indicators cannot accurately reflect the status of the power system at various stages (for example, the changes in user electricity consumption in different seasons lead to different overload risk indicators of the power system in different seasons).
[0004] With the continuous development of smart grid technology, the sources of power system data have become diversified, including sensor data, equipment logs, user behavior records, etc. These multi-source data provide a rich information basis for risk assessment. However, how to effectively integrate these multi-source data and extract valuable risk information from them has become an important challenge facing current power system risk assessment. Summary of the invention
[0005] In order to improve the accuracy of power system risk assessment, the present application provides a method for constructing a power system risk index based on multi-source data fusion analysis.
[0006] The method for constructing a power system risk index based on multi-source data fusion analysis provided in this application adopts the following technical solutions:
[0007] The method for constructing a power system risk index based on multi-source data fusion analysis includes the following steps:
[0008] Data collection and processing: collect historical operation data, obtain abnormal data, and pre-process the abnormal data;
[0009] Obtain risk type: Based on the preprocessed data, the principal component analysis method is used to obtain the risk type;
[0010] Obtaining risk index: including: feature extraction, determining fusion coefficient and determining risk index steps;
[0011] Feature extraction: extracting features of various risk types from the preprocessed data and using the features as the first risk indicator parameter;
[0012] Determine the fusion coefficient: define the fusion coefficient of each feature, and use the fusion coefficient as the second risk indicator parameter;
[0013] Determine the risk index: perform a product operation on the first risk index parameter and the corresponding second risk index parameter to obtain n risk indexes, and determine the risk index of n types of risks;
[0014] Risk assessment: including: building models, obtaining posterior probabilities and formulating monitoring cycle steps;
[0015] Establish model: Establish a Bayesian network model, use various risk indicators as nodes of the Bayesian network model, and use the dependencies between various risk types as directed edges;
[0016] Obtaining posterior probability: Set the prior probability distribution of each node and the conditional probability distribution of each directed edge. After the risk occurs, the Bayesian network model calculates the posterior probability after the risk occurs through the Bayesian formula based on the prior probability distribution and the conditional probability distribution.
[0017] Establish monitoring cycles: Establish monitoring cycles based on the posterior probability after the risk occurs.
[0018] By adopting the above technical solution, the present application obtains abnormal data from the historical operation data of the power system and performs preprocessing operations on the abnormal data, which can ensure the data quality and accuracy of subsequent analysis. In the process of preprocessing, the noise and errors in the data can be effectively reduced, making the analysis results more reliable. The present application adopts the principal component analysis method (PCA) to extract key information from complex data sets (preprocessed data) and accurately identify the main risk types. The present application extracts the characteristics of various risk types through the step of obtaining the risk index, and defines a fusion coefficient for each feature. The risk index is obtained by multiplying the feature with its corresponding fusion coefficient, and the risk indicators corresponding to various risk types are determined, so that the risk can be quantified and presented in the form of a risk index. After the above steps, the present application quantifies the risk index of the power system, which is convenient for the subsequent formulation of risk management strategies. The present application establishes a Bayesian network model, uses the various risk types obtained in the above steps as nodes of the Bayesian network model, and uses the dependencies between the various risk types as directed edges; calculates the posterior probability after the occurrence of various risks, and formulates the monitoring period of the power system based on the posterior probability. The present application extracts features based on the abnormal data extracted from the historical data, matches the fusion coefficient to the feature, and uses the risk indicator obtained by combining the two as the node of the Bayesian network model. The risk indicator matches the fusion coefficient for the risk type to make the feature ratio more reasonable. Compared with the traditional method of directly defining health indicators, this method is more comprehensive and accurate. Formulating the monitoring period based on the posterior probability after the risk occurs can ensure monitoring when the risk is likely to occur, which helps to detect risks in a timely manner and take countermeasures to reduce potential losses.
[0019] Optionally, after the step of obtaining the risk type and before the step of obtaining the risk index, the method further includes:
[0020] Quantity judgment: judge whether the number of pre-processed data contained in the nth risk type meets the preset threshold. If so, execute the step of obtaining the risk index; if not, execute the step of adding samples;
[0021] Add samples: Based on the preprocessed data, use the Borderline SMOTE algorithm to add preprocessed data to the risk types that do not meet the preset threshold.
[0022] By adopting the above technical solution, the situation where the historical data of the power system is insufficient (especially the abnormal data is insufficient) due to some reasons is compensated, and it is ensured that each risk type has a sufficient number of abnormal data to support the subsequent risk index calculation. When the number of samples of a certain risk type does not meet the preset threshold, the Borderline SMOTE algorithm is used to expand the sample by increasing the sample step, which can improve the data distribution to a certain extent, thereby improving the model's prediction accuracy for risk.
[0023] Optionally, after the step of adding samples and before the step of obtaining the risk index, a data updating step is further included, specifically:
[0024] Construct a sample set: take all preprocessed data as a sample set, and each preprocessed data as a sample point in the sample set;
[0025] Determine neighbor points: Find k neighbor points of each sample point in the sample set, where k is a preset value;
[0026] Calculate the weight matrix: calculate the local reconstruction weight matrix of each sample point from the neighboring points of the sample point;
[0027] Update data: Calculate the output value of the sample point projected on the low-dimensional space based on the local reconstruction weight matrix of the sample point and the neighboring points of the sample point, and use the output value as new preprocessed data.
[0028] By adopting the above-mentioned technical scheme, the present application calculates the local reconstruction weight matrix and the neighboring points, which can achieve data dimensionality reduction to a certain extent and reduce the amount of calculation for subsequent processing. The present application calculates the output value of the projection of the sample point on the low-dimensional space through the local reconstruction weight matrix of the sample point and the neighboring points of the sample point, thereby optimizing the data distribution, which is conducive to more accurately capturing the intrinsic characteristics and laws of the data in the subsequent risk index calculation step. By setting the data update step, the present application can process the multidimensional data in the power system and add the multidimensional data to the consideration range of the risk index, so that the risk index provided by the present application covers a larger scope and a wider range, thereby making the risk index more representative.
[0029] Optionally, after the step of determining risk indicators and before the step of risk assessment, the following steps may also be included:
[0030] Obtaining composite risk indicators: Use multimodal fusion methods to fuse risk indicators, obtain composite risk indicators, and use the composite risk indicators as new risk indicators.
[0031] By adopting the above technical solution, the composite risk indicator integrates multiple risk indicators through a multimodal fusion method, which can more comprehensively reflect the overall situation of the risk and multiple characteristics, help avoid the one-sidedness and limitations that may exist in a single risk indicator, and improve the accuracy and completeness of risk assessment. After the composite risk indicator is used as a new risk indicator, the new risk indicator is used as a node of the Bayesian network model, which indirectly realizes the use of the composite risk indicator as a node of the Bayesian network model, so that the Bayesian network model can take into account multiple risk indicators when calculating the posterior probability, making the posterior probability more accurate.
[0032] Optionally, after the step of determining the fusion coefficient and before the step of determining the risk indicator, the method further includes:
[0033] Establishing a feature vector: combining the features into a feature vector, using the feature vector as a new first risk indicator parameter, and obtaining n first risk indicator parameters;
[0034] Establish a fusion coefficient vector: combine the fusion coefficient of each feature in the same risk into a fusion coefficient vector, use the fusion coefficient vector as a new second risk indicator parameter, and obtain n second risk indicator parameters.
[0035] By adopting the above technical solution, for the part with multiple features, multiple features can be combined into a feature vector, and the fusion coefficients corresponding to the multiple features can also be combined into a fusion vector. By multiplying the feature vector with the corresponding fusion coefficient, the health index is obtained, which simplifies the subsequent risk assessment process and makes the processing more efficient.
[0036] Optionally, after the feature extraction step and before the fusion coefficient determination step, a feature adding step is further included, specifically:
[0037] Establishing a feature subset: integrating some features in the first risk indicator parameter into a first feature subset;
[0038] Quantify feature subsets: preset an accuracy threshold and define an evaluation function, and quantify the performance of the first feature subset by comparing the output of the evaluation function with the accuracy threshold;
[0039] Selecting features: Among the remaining first risk indicator parameters, according to the value of the evaluation function, select the features that make the evaluation function reach the optimal value;
[0040] Feature addition: adding the selected first risk indicator parameter to the feature subset to obtain a new feature subset, and using the new feature subset as the first feature subset;
[0041] Updating the evaluation function: updating the evaluation function according to the first feature subset, taking the updated evaluation function as a new evaluation function, using the new evaluation function to quantify the performance of the first feature subset, and executing the feature selection step until the stopping criterion is met;
[0042] The stopping criterion is: when the number of features included in the first feature subset reaches a preset threshold, the feature selection step is stopped.
[0043] By adopting the above-mentioned technical scheme, the present application constructs some features in the first risk indicator parameter into a first feature subset, and selects the first risk indicator parameter that makes the evaluation function optimal, and then obtains the features that make the evaluation function optimal, adds the optimal features to the first feature subset, and continuously executes the above steps in a loop, that is: continuously adding features that make its evaluation function optimal to the first feature subset, so that the number of features included in the first feature subset continues to increase until the stopping criterion is met, so that the data in the first feature subset is more representative. By adopting the above-mentioned technical scheme, the present application can not only select multiple types of features, but also avoid overfitting due to too much data in the first feature subset.
[0044] Optionally, after the step of updating the evaluation function and before the step of determining the fusion coefficient, a step of deleting features is further included, specifically:
[0045] Feature elimination: Eliminate one of the features in the first feature subset, and record the eliminated feature as the first feature;
[0046] Establishing the second feature subset: integrating the remaining features after removing the first feature from the first feature subset into the second feature subset;
[0047] Obtaining performance indicators: using an evaluation function to quantify the performance of the second feature subset, and recording the performance indicators of the second feature subset;
[0048] Obtaining the optimal second feature subset: comparing the performance indicators of all second feature subsets, and when the second feature subset with the best performance is obtained, recording the second feature subset with the best performance as the optimal second feature subset;
[0049] Obtain a new subset: take the optimal second feature subset as the new first feature subset, and re-execute the feature elimination step until the termination criterion is met;
[0050] The termination criterion is: the number of features included in the new first feature subset is not greater than a preset threshold.
[0051] By adopting the above technical solution, the present application deletes the features with less contribution, so that the present application is more focused on learning the features that affect the risk index, improves the generalization ability, reduces the number of features, and can also reduce the computing cost and improve the computing efficiency. The present application screens the features in the first feature subset by deleting features, fills the features in the first feature subset by adding feature steps, and iteratively deletes and adds to find the optimal feature combination, which can provide sufficient information while keeping the feature subset concise and avoiding overfitting.
[0052] Optionally, after the feature elimination step and before the second feature subset establishment step, a feature determination step is further included, which is specifically as follows:
[0053] Establishing a third feature subset: establishing a third feature subset, wherein the third feature subset stores N features eliminated from the first feature subset, and according to the order in which the features are eliminated, the nth eliminated feature is recorded as the nth eliminated feature;
[0054] Establishing a fourth feature subset: establishing a fourth feature subset, wherein the fourth feature subset is an empty set;
[0055] Establishing a fifth feature subset: establishing a fifth feature subset, wherein the fifth feature subset is an empty set;
[0056] Calculate the correlation: Starting from the second eliminated feature, calculate the correlation between the current eliminated feature and the other N-1 eliminated features;
[0057] Correlation judgment: judge whether the correlation between the remaining eliminated features and the current eliminated features is greater than the preset threshold. If so, store the current eliminated features in the fourth feature subset and execute the feature quantity judgment step; if not, store the current eliminated features in the fifth feature subset, use the fifth feature subset as the new third feature subset, and re-execute the correlation calculation step;
[0058] Feature quantity judgment: judge whether the number of eliminated features M in the fourth feature subset is greater than , if so, then select arbitrarily from the fourth feature subset The eliminated features are added to the first feature subset, and the step of establishing the second feature subset is re-executed.
[0059] By adopting the above technical solution, after the feature elimination step, the present application further calculates the correlation between the eliminated features. If there is The above features are related, so Re-add them to the first feature subset, and then execute the step of establishing the second feature subset to avoid deleting a large number of related features, which will lead to inaccurate calculation of risk indicators.
[0060] Optionally, in the data collection and processing step, after preprocessing the abnormal data, the following steps are further included:
[0061] Get timestamp: Get the timestamp corresponding to each abnormal data;
[0062] Time alignment: By adjusting the sampling frequency of collecting abnormal data, the pre-processed abnormal data is time-aligned.
[0063] By adopting the above technical solution, the pre-processed data is time-aligned, which helps to understand the distribution of features in different time periods during subsequent feature extraction and fusion, and when formulating the monitoring cycle, the time when the anomaly occurred can be quickly located according to the timestamp, which is convenient for relevant personnel to handle in time. This application can also standardize abnormal data from different sources and different sampling frequencies to the same timeline by adjusting the sampling frequency and performing time alignment, which helps to compare and analyze data on a unified time scale and reduce analysis errors caused by time differences.
[0064] Optionally, if there are gaps in the abnormal data, interpolation is used to fill the gaps in the abnormal data.
[0065] By adopting the above technical solution, the present application uses a reasonable interpolation method to generate filled values that are close to the original data pattern, thereby improving the quality of the data and making the data more complete. The interpolation method can maintain the trend and pattern of the data, making the filled data visually and statistically closer to the original data.
[0066] In summary, the present application includes at least one of the following beneficial technical effects:
[0067] 1. This application obtains abnormal data from the historical operation data of the power system and performs preprocessing operations on the abnormal data, which can ensure the data quality and accuracy of subsequent analysis. In the process of preprocessing, it can effectively reduce the noise and errors in the data, making the analysis results more reliable. This application uses principal component analysis (PCA) to extract key information from complex data sets (preprocessed data) and accurately identify the main risk types. This application extracts the characteristics of various risk types through the step of obtaining the risk index, and defines a fusion coefficient for each feature. By multiplying the feature with its corresponding fusion coefficient, the risk index is obtained, and the risk indicators corresponding to various risk types are determined, so that the risk can be quantified and presented in the form of a risk index. After the above steps, this application quantifies the risk index of the power system, which is convenient for the subsequent formulation of risk management strategies.
[0068] 2. This application establishes a Bayesian network model, uses the various risk types obtained in the above steps as nodes of the Bayesian network model, and uses the dependencies between the various risk types as directed edges; calculates the posterior probability after the occurrence of various risks, and formulates the monitoring period of the power system based on the posterior probability. This application extracts the characteristics of the risk indicator based on the abnormal data extracted from the historical data, and matches the fusion coefficient to the characteristic. The risk indicator obtained by combining the two is used as the node of the Bayesian network model. This risk indicator matches the fusion coefficient for the risk type to make the proportion of this feature more reasonable. Compared with the traditional method of directly defining health indicators, this method is more comprehensive and accurate. Formulating the monitoring period based on the posterior probability after the risk occurs can ensure that monitoring is carried out when the risk is most likely to occur, which helps to detect risks in a timely manner and take countermeasures to reduce potential losses.
[0069] 3. When the number of samples of a certain risk type does not meet the preset threshold, this application uses the Borderline SMOTE algorithm to expand the sample by adding sample steps, which can improve the distribution of data to a certain extent, thereby improving the model's prediction accuracy for risks, making up for the situation where the historical data of the power system is insufficient (especially the abnormal data is insufficient) due to some reasons, and ensuring that each risk type has a sufficient number of abnormal data to support the subsequent risk index calculation.
[0070] 4. This application further calculates the correlation between the eliminated features. If there is The above features are related, so Add them back to the first feature subset and then execute the step of establishing the second feature subset to avoid deleting a large number of related features, which will lead to inaccurate calculation of risk indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a flow chart of the method for constructing a power system risk index based on multi-source data fusion analysis in this application;
[0072] Figure 2 is a method flow chart of data collection and processing step S1 of the present application;
[0073] Figure 3 This is a flow chart of the method for obtaining the risk type step S2 of this application;
[0074] Figure 4 is a flow chart of the method for determining the sample quantity and data updating step S3 of the present application;
[0075] Figure 5 is a flow chart of the method for obtaining the risk index step S4 of the present application;
[0076] Figure 6 is a method flow chart of feature selection step S42 of the present application;
[0077] Figure 7 This is a method flow chart of the risk assessment step S5 of this application. DETAILED DESCRIPTION
[0078] The following combination Figures 1 to 7 This application is described in further detail.
[0079] like Figure 1 As shown, the present application provides a method for constructing a power system risk index based on multi-source data fusion analysis, including: data collection and processing step S1, risk type acquisition step S2, sample quantity determination and data update step S3, risk index acquisition step S4, and risk assessment step S5, by collecting historical data of the power system, extracting abnormal data from the historical data and preprocessing the abnormal data, and then obtaining the risk type, and then determining whether the number of samples in various risk types is sufficient and updating the data, and then extracting features from the preprocessed data, and setting the fusion coefficient, determining the risk index based on the features and the fusion coefficient, and then establishing a Bayesian network model to calculate the posterior probability of the risk, and formulating a monitoring period based on the posterior probability.
[0080] like Figure 2 As shown, the data collection and processing step S1 includes: a data collection step S11, an abnormal data acquisition step S12, a data processing step S13, and an abnormal data time alignment step S14.
[0081] S11 Data Collection: Collect historical operating data of various risk types in the power system. The data collection method may be obtained from a historical database or manually entered data.
[0082] S12 Abnormal data acquisition: abnormal data is acquired from historical data. The abnormal data refers to data points that deviate significantly from the normal operating state, or data that is determined to be abnormal based on expert experience. The abnormal data acquisition method includes:
[0083] Threshold comparison: Pre-set a reasonable threshold range and compare historical data. Data exceeding the threshold range is considered abnormal data.
[0084] Statistical method: Use statistical principles, such as mean and standard deviation, to calculate the distribution of historical data. Data points that deviate significantly from the average distribution are considered abnormal data.
[0085] Machine learning algorithms: Use unsupervised learning algorithms (such as clustering and anomaly detection algorithms) to train and learn historical data to automatically identify and extract abnormal data.
[0086] Expert experience: Determine whether the data is abnormal based on expert experience.
[0087] S13 Data processing: After obtaining the abnormal data, preprocessing operations are performed on the abnormal data, including:
[0088] Abnormal data cleaning: Remove erroneous or invalid abnormal data points to ensure the accuracy and consistency of abnormal data.
[0089] Abnormal data standardization: convert abnormal data of the same risk type into a unified format and unit for subsequent analysis and processing.
[0090] Abnormal data smoothing: For abnormal data points with large noise or large fluctuations, smoothing algorithms (such as moving average method, filter, etc.) are used to process them to reduce the impact of noise and fluctuations.
[0091] Abnormal data interpolation: For missing abnormal data points, interpolation methods (such as linear interpolation, polynomial interpolation, etc.) are used to fill them in to maintain the continuity and integrity of the abnormal data.
[0092] By preprocessing abnormal data, the abnormal data can be converted into more valuable information, providing a reliable basis for subsequent acquisition of risk types and risk assessment analysis.
[0093] S14 abnormal data time alignment: including: obtaining timestamp step S141 and time alignment step S142.
[0094] S141 obtains timestamp: obtains the timestamp corresponding to each abnormal data (here refers to the abnormal data after preprocessing); if the timestamp is automatically recorded in the historical database when recording the data, the timestamp is directly extracted from the data; if the timestamp of the data is not recorded in the historical database, the timestamp of the data is determined by referring to the data storage log. After obtaining the timestamp of the abnormal data, the obtained timestamp is stored together with the abnormal data, and an effective indexing and retrieval mechanism is established.
[0095] S142 Time Alignment: Time alignment of the pre-processed abnormal data is performed by adjusting the sampling frequency of the abnormal data, including the following methods:
[0096] Resampling method: For data with a high sampling frequency, choose to reduce its sampling frequency to reduce the amount of data and improve processing efficiency. Resampling can be achieved through methods such as averaging, maximum value, and minimum value. For data with a low sampling frequency, interpolation methods (such as linear interpolation, spline interpolation, etc.) can be used to estimate the data values at the missing time points to achieve time alignment.
[0097] Time synchronization: By adjusting the sampling frequency of devices and sensors, abnormal data can be synchronized to avoid time deviation problems.
[0098] like Figure 3 As shown, the risk type acquisition step S2 includes: a standardization processing step S21, a data preparation step S22, a covariance matrix calculation step S23, a principal component calculation step S24, a principal component selection step S25, and a risk type identification step S26, which are specifically as follows:
[0099] S21 Standardization Processing: Standardization processing is performed on abnormal data that has been aligned in time.
[0100] S22 Data preparation: The standardized abnormal data is organized into an i*j abnormal data matrix R, where each row represents the data at the same time point and each column represents the characteristics of a certain risk type.
[0101] S23 calculates the covariance matrix: calculates the covariance matrix of the matrix R, where the covariance matrix reflects the correlation between different features.
[0102] S24 calculates the principal components: by performing eigenvalue decomposition or singular value decomposition on the covariance matrix, a set of eigenvalues and corresponding eigenvectors are obtained. The eigenvectors are the principal components, which are sorted according to the size of the corresponding eigenvalues. The larger the eigenvalue, the more information the principal component contains.
[0103] S25 selects principal components: According to actual needs and the degree of information retention, the first few principal components are selected as representatives. These principal components can cover most of the information in the abnormal data. When selecting the number of principal components, they can be selected based on the size of the principal component contribution rate. This embodiment selects the principal components with a contribution rate greater than 85%.
[0104] In this embodiment, the number of principal components selected should be smaller than the dimension of abnormal data after normalization to avoid overfitting and increase the complexity of calculation. If the number of principal components is too large or too small, the calculation error will be too large. Therefore, when selecting the principal components, the contribution rate CPV of the principal components is calculated first, and the cumulative contribution rate curve is drawn to realize the selection of the number of principal components. The specific process is as follows:
[0105] ;
[0106] in, Represents the sum of the first A data of the covariance matrix; Represents the sum of all eigenvalues of the covariance matrix of the observations.
[0107] In this embodiment, the contribution rate CPV is set to be greater than or equal to 85%. If the cumulative variance contribution rate of the currently selected A principal components reaches or exceeds 85%, the number of principal components is A.
[0108] S26 Risk type identification: Based on the selected principal components, cluster analysis or pattern recognition is performed on abnormal data to identify different risk types, such as equipment failure, grid load fluctuation, natural disasters, etc.
[0109] like Figure 4 As shown, the sample quantity determination and data update step S3 includes: quantity determination step S31, sample adding step S32 and data update step S33.
[0110] S31 Quantity judgment: judge whether the number of abnormal data after the alignment time contained in the nth risk type meets the preset threshold. If so, execute the step of obtaining the risk index; if not, execute the step of adding samples.
[0111] S32 adds samples: includes sample identification step S321, sample selection step S322, sample synthesis step S323, and loop sample synthesis step S324.
[0112] Based on the time-aligned data, the Borderline SMOTE algorithm is used to add the time-aligned data in the risk types that do not meet the preset thresholds, specifically:
[0113] S321 Identify samples: Identify minority class samples that are at the classification boundary (i.e., samples in the risk type that do not meet the preset threshold).
[0114] S322 Select samples: For each identified sample, select A sample is randomly selected from the nearest neighbor samples.
[0115] S323 Synthetic Sample: Generate a new synthetic sample between these two samples (i.e., the minority class sample and the sample randomly selected from the nearest neighbor samples of the minority class sample).
[0116] S324 loop synthesizes samples: repeat steps S321-S323 until a sufficient number of new samples are generated (in this embodiment, a sample quantity threshold is set, and whether to end the execution of the above loop steps is determined by comparing the sample quantity with the sample quantity threshold), so that the number of data in this risk type meets the preset threshold.
[0117] Through the Borderline SMOTE algorithm, the number of samples of a few risk types is increased, making the data distribution more balanced, which is conducive to subsequent analysis and modeling.
[0118] S33 data update: includes: constructing a sample set step S331, determining neighboring points step S332, calculating a weight matrix step S333 and updating data step S334.
[0119] S331 constructs a sample set: all time-aligned abnormal data are taken as a sample set, and each time-aligned abnormal data is taken as a sample point in the sample set.
[0120] S332 determines the nearest neighbor point: for each sample point in the sample set, calculates the distance (such as Euclidean distance) between it and all other sample points, and selects the nearest neighbor point. sample points as its neighboring points, is a preset value.
[0121] S333 calculates the weight matrix: For each sample point, use its A local reconstruction equation is constructed by using neighboring points, and the weight of the equation is solved by minimizing the reconstruction error (such as using the least squares method), thereby obtaining a local reconstruction weight matrix. Each element in the weight matrix represents the contribution of a neighboring point to the current sample point.
[0122] S334 updates data: calculates the projection of the sample point on the low-dimensional space based on the local reconstruction weight matrix of the sample point and the neighboring points of the sample point, and outputs the new coordinates of the current sample point on the low-dimensional space, i.e., the updated data, and uses the output value as the new preprocessed data.
[0123] like Figure 5 As shown, the step S4 of obtaining the risk index includes: a feature extraction step S41, a feature selection step S42, a fusion coefficient determination step S43, a feature vector and a fusion coefficient vector establishment step S44, a risk index determination step S45 and a composite risk index acquisition step S46.
[0124] S41 Feature extraction: extracting features of various risk types from the preprocessed data, and using the features as first risk indicator parameters.
[0125] like Figure 6 As shown, S42 feature selection includes adding feature step S421 and deleting feature step S422.
[0126] S421 adds features: including: establishing feature subset step S4211, quantifying feature subset step S4212, selecting features step S4213, adding features step S4214 and updating evaluation function step S4215.
[0127] S4211 Establish feature subset: integrate some features in the first risk indicator parameter into a first feature subset, where some features in the first risk indicator parameter are selected based on domain knowledge, data pre-analysis or random selection.
[0128] S4212 Quantify the feature subset: preset an accuracy threshold and define an evaluation function, and quantify the performance of the first feature subset through the evaluation function, specifically: define an evaluation function, which receives the feature subset as input and outputs an evaluation score (i.e., accuracy); use a machine learning model (such as decision tree, logistic regression, SVM, etc.) to train on the feature subset, and use a test set to evaluate the performance of the machine learning model; quantify the performance of the feature subset by comparing the evaluation score with the preset accuracy threshold. If the evaluation score is greater than the preset accuracy threshold, the feature subset is a preferred first feature subset. If the evaluation score is less than or equal to the preset accuracy threshold, the feature subset is a non-preferred first feature subset, and it is necessary to re-select the features in the first risk indicator parameters, reconstruct the first feature subset, and re-execute the quantification feature subset step S4212 until a preferred first feature subset is selected, and then execute the feature selection step S4213.
[0129] S4213 Feature selection: Among the remaining first risk indicator parameters, according to the value of the evaluation function, select the feature that makes the evaluation function reach the optimal level, specifically: traverse the remaining first risk indicator parameters, and for each first risk indicator parameter, add it to the current feature subset separately in turn; use the evaluation function to evaluate the performance of the feature subset containing the current first risk indicator parameter; select the feature that makes the evaluation function score the highest.
[0130] S4214 Feature addition: Add the selected first risk indicator parameter to the feature subset to obtain a new feature subset, and use the new feature subset as the first feature subset.
[0131] S4215 Update the evaluation function: Update the evaluation function according to the first feature subset, use the updated evaluation function as the new evaluation function, adopt the new evaluation function to quantify the performance of the first feature subset, and execute the feature selection step S4214 until the stopping criteria are met, specifically: use the updated feature subset to retrain the machine learning model, use the new machine learning model to evaluate the performance on the test set, and update the score of the evaluation function (that is, the accuracy threshold in the step of quantifying the feature subset in S4212), repeat the feature selection step S4213 and the feature addition step S4214, and continue to select and add features to the feature subset.
[0132] The stopping criterion is: when the number of features contained in the first feature subset reaches a preset threshold, the feature selection step is stopped. Specifically, a feature quantity threshold is set, and when executing the feature adding step S4214, the size of the first feature subset is continuously tracked. When the size of the first feature subset reaches or exceeds the preset feature quantity threshold, adding features to the first feature subset is stopped.
[0133] S422 feature deletion: including: feature elimination step S4221, feature judgment step S4222, establishing a second feature subset step S4223, obtaining performance indicators step S4224, obtaining the optimal second feature subset step S4225 and obtaining a new subset step S4226.
[0134] S4221 Feature elimination: Eliminate one of the features in the first feature subset, and record the eliminated feature as the first feature.
[0135] S4222 Feature judgment: including: establishing a third feature subset step S42221, establishing a fourth feature subset step S42222, establishing a fifth feature subset step S42223, calculating correlation step S42224, correlation judgment step S42225 and feature quantity judgment step S42226.
[0136] S42221 Establishing a third feature subset: establishing a third feature subset, wherein the third feature subset stores N features eliminated from the first feature subset, and according to the order in which the features are eliminated, the nth eliminated feature is recorded as the nth eliminated feature.
[0137] S42222 Establish a fourth feature subset: establish a fourth feature subset, the fourth feature subset is an empty set, and perform an initialization operation on the fourth feature subset.
[0138] S42223 establishing a fifth feature subset: establishing a fifth feature subset, wherein the fifth feature subset is an empty set, and performing an initialization operation on the fifth feature subset.
[0139] S42224 calculates correlation: starting from the second feature to be eliminated, calculates the correlation between the current feature to be eliminated and the other N-1 features to be eliminated. The correlation may be calculated using algorithms such as the Pearson correlation coefficient and the Spearman rank correlation coefficient.
[0140] S42225 Correlation judgment: judge whether the correlation between the remaining eliminated features and the current eliminated features is greater than the preset threshold. If so, store the current eliminated features in the fourth feature subset and execute the feature quantity judgment step S42226; if not, store the current eliminated features in the fifth feature subset, use the fifth feature subset as the new third feature subset, and re-execute the correlation calculation step S42224.
[0141] S42226 Feature quantity judgment: judge whether the number of eliminated features M in the fourth feature subset is greater than , if so, then select arbitrarily from the fourth feature subset The removed features are added to the first feature subset, and the step of establishing the second feature subset is re-executed. Indicates that the quotient after M is divided by 4 is rounded up.
[0142] S4223 establishes a second feature subset: the features remaining after removing the first feature from the first feature subset are integrated into the second feature subset.
[0143] S4224 obtains performance indicators: uses an evaluation function to quantify the performance of the second feature subset, and records the performance indicators of the second feature subset.
[0144] S4225 Obtaining the optimal second feature subset: comparing the performance indicators of all second feature subsets, and when the second feature subset with the best performance is obtained, recording the second feature subset with the best performance as the optimal second feature subset.
[0145] S4226 Obtain a new subset: take the optimal second feature subset as a new first feature subset, and re-execute the feature elimination step S4221 until the termination criterion is met.
[0146] The termination criterion is: the number of features contained in the new first feature subset is not greater than a preset threshold, that is, during the feature elimination process, the number of features in the first feature subset is continuously monitored, and once the number reaches or is less than the preset threshold, the elimination process is stopped.
[0147] S43 determines the fusion coefficient: defines the fusion coefficient of each feature, the fusion coefficient represents the importance of each feature in the risk indicator, and uses the fusion coefficient as the second risk indicator parameter. The fusion coefficient can be determined based on domain knowledge, expert opinions or historical data, or a machine learning algorithm can be used to learn the fusion coefficient, thereby realizing the configuration of the fusion coefficient.
[0148] S44 establishes the feature vector and the fusion coefficient vector, including: establishing the feature vector step S441 and establishing the fusion coefficient vector step S442.
[0149] S441 Establishing a feature vector: combining the features into a feature vector, using the feature vector as a new first risk indicator parameter, and obtaining n first risk indicator parameters.
[0150] S442 establishes a fusion coefficient vector: combines the fusion coefficients of each feature in the same risk into a fusion coefficient vector, uses the fusion coefficient vector as a new second risk indicator parameter, and obtains n second risk indicator parameters.
[0151] S45 determines the risk index: multiplies the first risk index parameter by the corresponding second risk index parameter to obtain n risk indices, and determines the risk index of n types of risks. Specifically: for each feature, multiply it by its corresponding fusion coefficient, add all the products to obtain a risk index, and repeat the above process for n different risk categories (or situations) to obtain n risk indices. Set the risk indicators of n types of risks respectively to obtain n risk indicators.
[0152] S46 Obtaining a composite risk indicator: A multimodal fusion method is used to fuse the risk indicators to obtain a composite risk indicator, which can be used as a comprehensive and integrated risk assessment value, and the composite risk indicator is used as a new risk indicator.
[0153] like Figure 7 As shown, the risk assessment step S5 includes: a model building step S51, a posterior probability acquisition step S52 and a monitoring cycle formulation step S53.
[0154] S51 Model building: Building a Bayesian network model, taking various risk indicators as nodes of the Bayesian network model, and taking the dependencies between various risk types as directed edges.
[0155] S52 Obtaining posterior probability: Setting a prior probability distribution for each node based on historical data, expert opinions or statistical methods, and setting a conditional probability distribution for each directed edge based on historical data or expert knowledge. After the risk occurs, the Bayesian network model calculates the posterior probability after the risk occurs through the Bayesian formula based on the prior probability distribution and the conditional probability distribution.
[0156] S53 Establish a monitoring cycle: Establish a monitoring cycle based on the posterior probability after the risk occurs, specifically: analyze the posterior probability and identify high-risk areas or events; determine the frequency and duration of monitoring based on the risk level and business needs, and design a monitoring plan, including selecting appropriate monitoring tools and techniques, determining monitoring indicators, etc.; formulate response measures so that timely response and processing can be achieved when risk events occur.
[0157] This embodiment uses a Bayesian network model to comprehensively consider the dependencies between risk types and formulate a more accurate and effective risk monitoring plan based on posterior probability.
[0158] The present application provides a method for constructing a power system risk index based on multi-source data fusion analysis, including: obtaining abnormal data and preprocessing the abnormal data; obtaining the risk type based on the preprocessed data using the principal component analysis method; determining the risk index for each risk type; establishing a Bayesian network model, setting the prior probability distribution of each node and the conditional probability distribution of each directed edge, and after the risk occurs, the Bayesian network model calculates the posterior probability after the risk occurs through the Bayesian formula based on the prior probability distribution and the conditional probability distribution; and formulating a monitoring cycle based on the posterior probability after the risk occurs. The present application can timely discover and handle potential safety hazards and ensure the stable operation of the power system.
[0159] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A method for constructing a power system risk index based on multi-source data fusion analysis, characterized in that: The following steps are involved: Data collection and processing: collect historical operation data, obtain abnormal data, and pre-process the abnormal data; Obtain risk type: Based on the preprocessed data, the principal component analysis method is used to obtain the risk type; Quantity judgment: judge whether the number of pre-processed data contained in the nth risk type meets the preset threshold. If so, execute the step of obtaining the risk index; if not, execute the step of adding samples; Add samples: Based on the preprocessed data, the Borderline SMOTE algorithm is used to add preprocessed data in the risk types that do not meet the preset threshold; Construct a sample set: take all preprocessed data as a sample set, and each preprocessed data as a sample point in the sample set; Determine neighbor points: Find k neighbor points of each sample point in the sample set, where k is a preset value; Calculate the weight matrix: calculate the local reconstruction weight matrix of each sample point from the neighboring points of the sample point; Update data: calculate the output value of the projection of the sample point on the low-dimensional space based on the local reconstruction weight matrix of the sample point and the neighboring points of the sample point, and use the output value as the new preprocessed data; Obtaining risk index: including: feature extraction, determining fusion coefficient and determining risk index steps; Feature extraction: extracting features of various risk types from the preprocessed data and using the features as the first risk indicator parameter; Establishing a feature subset: integrating some features in the first risk indicator parameter into a first feature subset; Quantify feature subsets: preset an accuracy threshold and define an evaluation function, and quantify the performance of the first feature subset by comparing the output of the evaluation function with the accuracy threshold; Selecting features: Among the remaining first risk indicator parameters, according to the value of the evaluation function, select the features that make the evaluation function reach the optimal value; Feature addition: adding the selected first risk indicator parameter to the feature subset to obtain a new feature subset, and using the new feature subset as the first feature subset; Updating the evaluation function: updating the evaluation function according to the first feature subset, taking the updated evaluation function as a new evaluation function, using the new evaluation function to quantify the performance of the first feature subset, and executing the feature selection step until the stopping criterion is met; The stopping criterion is: when the number of features contained in the first feature subset reaches a preset threshold, the step of selecting features is stopped; Feature elimination: Eliminate one of the features in the first feature subset, and record the eliminated feature as the first feature; Establishing a third feature subset: establishing a third feature subset, wherein the third feature subset stores N features eliminated from the first feature subset, and according to the order in which the features are eliminated, the nth eliminated feature is recorded as the nth eliminated feature; Establishing a fourth feature subset: establishing a fourth feature subset, wherein the fourth feature subset is an empty set; Establishing a fifth feature subset: establishing a fifth feature subset, wherein the fifth feature subset is an empty set; Calculate the correlation: Starting from the second eliminated feature, calculate the correlation between the current eliminated feature and the other N-1 eliminated features; Correlation judgment: judge whether the correlation between the remaining eliminated features and the current eliminated features is greater than the preset threshold. If so, store the current eliminated features in the fourth feature subset and execute the feature quantity judgment step; if not, store the current eliminated features in the fifth feature subset, use the fifth feature subset as the new third feature subset, and re-execute the correlation calculation step; Feature quantity judgment: judge whether the number of eliminated features M in the fourth feature subset is greater than , if so, then select arbitrarily from the fourth feature subset The eliminated features are added to the first feature subset, and the step of establishing the second feature subset is re-executed; Establishing the second feature subset: integrating the remaining features after removing the first feature from the first feature subset into the second feature subset; Obtaining performance indicators: using an evaluation function to quantify the performance of the second feature subset, and recording the performance indicators of the second feature subset; Obtaining the optimal second feature subset: comparing the performance indicators of all second feature subsets, and when the second feature subset with the best performance is obtained, recording the second feature subset with the best performance as the optimal second feature subset; Obtain a new subset: take the optimal second feature subset as the new first feature subset, and re-execute the feature elimination step until the termination criterion is met; The termination criterion is: the number of features included in the new first feature subset is not greater than a preset threshold; Determine the fusion coefficient: define the fusion coefficient of each feature, the fusion coefficient represents the importance of each feature in the risk indicator, and use the fusion coefficient as the second risk indicator parameter; Establishing a feature vector: combining the features into a feature vector, using the feature vector as a new first risk indicator parameter, and obtaining n first risk indicator parameters; Establishing a fusion coefficient vector: combining the fusion coefficients of each feature in the same risk into a fusion coefficient vector, using the fusion coefficient vector as a new second risk indicator parameter, and obtaining n second risk indicator parameters; Determine the risk index: perform a product operation on the first risk index parameter and the corresponding second risk index parameter to obtain n risk indexes, and determine the risk index of n types of risks; Obtaining composite risk indicators: Using multimodal fusion methods to fuse risk indicators, obtaining composite risk indicators, and using the composite risk indicators as new risk indicators; Risk assessment: including: building models, obtaining posterior probabilities and formulating monitoring cycle steps; Establish model: Establish a Bayesian network model, use various risk indicators as nodes of the Bayesian network model, and use the dependencies between various risk types as directed edges; Obtaining posterior probability: Set the prior probability distribution of each node and the conditional probability distribution of each directed edge. After the risk occurs, the Bayesian network model calculates the posterior probability after the risk occurs through the Bayesian formula based on the prior probability distribution and the conditional probability distribution. Establish monitoring cycles: Establish monitoring cycles based on the posterior probability after the risk occurs.
2. The method for constructing a power system risk index based on multi-source data fusion analysis according to claim 1 is characterized in that: In the data collection and processing steps, after preprocessing the abnormal data, it also includes: Get timestamp: Get the timestamp corresponding to each abnormal data; Time alignment: By adjusting the sampling frequency of collecting abnormal data, the pre-processed abnormal data is time-aligned.
3. The method for constructing a power system risk index based on multi-source data fusion analysis according to claim 2 is characterized in that: If there are gaps in the abnormal data, the interpolation method is used to fill the missing abnormal data.
