Power grid business data feature extraction method
Through multi-level feature extraction and real-time abnormality detection methods, the problems of slow data processing speed and insufficient feature information in the existing technology of power grid business are solved, efficient, accurate and real-time data processing and abnormality detection are achieved, and the safety and reliability of power grid operation are improved.
Patent Information
- Application Number
- CN202411727601.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-21
AI Technical Summary
The existing power grid business data feature extraction methods are difficult to achieve rapid processing when facing large-scale data, and traditional methods ignore the correlation between data and potentially advanced features, resulting in insufficient extracted feature information and difficult to achieve real-time, accurate and efficient processing.
Multi-level feature extraction and real-time abnormality detection methods are adopted to periodically collect power grid business data, perform preliminary processing and basic feature extraction, then feature extraction and analysis are carried out, advanced feature data are obtained, and abnormal detection and alarm mechanism are triggered, and feature extraction strategies are adjusted.
It realizes efficient, accurate and real-time data processing of power grid business, significantly improves data processing speed and efficiency, ensures the comprehensiveness and accuracy of feature extraction, and promptly triggers alarms through real-time abnormality detection, improving the safety and reliability of power grid operation.
Smart Images

Figure CN119669722A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid technology, and in particular to a method for extracting power grid service data features. Background Art
[0002] With the rapid development of smart grids, the scale and complexity of grid business data have increased dramatically. These data not only include traditional basic information such as power load, voltage, and current, but also cover data in multiple dimensions such as user behavior, equipment status, and external environment. In order to effectively manage and utilize these massive data and achieve accurate monitoring of grid operation, optimized scheduling, and fault warning, feature extraction of grid business data has become one of the key technologies.
[0003] The existing methods for extracting features from power grid business data are unable to cope with large-scale power grid data due to traditional serial processing methods. It is difficult to complete data preprocessing and feature extraction in a short time, which affects subsequent data analysis and decision support. Many existing methods only focus on basic power grid operation parameters, ignoring the correlation between data and potential advanced features, resulting in the extracted feature information being insufficient to fully reflect the actual operation status of the power grid. In smart grids, real-time performance is crucial for anomaly detection, fault warning, etc. However, many existing feature extraction methods are difficult to achieve real-time, accurate, and efficient processing due to their high computational complexity. Summary of the invention
[0004] To solve the above problems, the present invention provides a method for extracting features of power grid business data, which adopts a method for extracting features of power grid business data with multi-level feature extraction and real-time anomaly detection, and can realize efficient, accurate and real-time power grid business data processing.
[0005] The above objectives can be achieved through the following solutions:
[0006] A method for extracting features from power grid business data comprises: periodically collecting power grid business data; performing preliminary processing and feature extraction on the power grid business data to obtain basic feature data; re-extracting and analyzing the features of the basic feature data to obtain advanced feature data; performing anomaly detection on the basic feature data and the advanced feature data, and judging whether anomaly detection results are abnormal; when anomaly detection results are abnormal, triggering an alarm mechanism and adjusting a feature extraction strategy.
[0007] Furthermore, the preliminary processing and feature extraction of the power grid business data includes: performing preliminary data cleaning and format conversion on the power grid business data to obtain preliminary data; distributing the preliminary data to multiple computing nodes according to a preset data partitioning strategy; and simultaneously processing the distributed preliminary data on each computing node to extract basic feature data.
[0008] Furthermore, distributing the preliminary data to multiple computing nodes according to a preset data partitioning strategy includes: setting a data partitioning strategy according to the characteristics and processing requirements of power grid business data; dividing the preliminary data according to the data partitioning strategy to obtain multiple data blocks; and distributing the multiple data blocks to different computing nodes.
[0009] Furthermore, the simultaneously processing the assigned preliminary data on each computing node to extract basic feature data includes: setting multiple threads on each computing node, each thread processing one or more data blocks; each thread processes the assigned data block according to a preset feature extraction algorithm to extract feature data blocks; and organizing the feature data blocks to obtain basic feature data.
[0010] Furthermore, after obtaining the basic characteristic data, the method further includes: caching the basic characteristic data; and when the same power grid service data appears again, obtaining the basic characteristic data from the cache.
[0011] Furthermore, the feature re-extraction and analysis of the basic feature data to obtain advanced feature data includes: preprocessing the basic feature data to obtain input data; selecting a Mamdani fuzzy system and defining fuzzy sets and membership functions; inputting the input data into the Mamdani fuzzy system to obtain fuzzy feature data; and using a recursive feature elimination method to screen the fuzzy feature data and the basic feature data to obtain advanced feature data.
[0012] Furthermore, the preprocessing of the basic feature data to obtain input data includes: processing the missing values of the basic feature data using a mean filling method to obtain first processed data; identifying and processing outliers of the first processed data using a box plot method to obtain second processed data; and normalizing the second processed data to obtain input data.
[0013] Furthermore, the use of the recursive feature elimination method to screen the fuzzy feature data and the basic feature data to obtain advanced feature data includes: collecting historical basic feature data and historical fuzzy feature data to obtain a historical data set; establishing a support vector machine model and setting relevant parameters; using the historical data set to train the support vector machine model to obtain an importance assessment model; using the fuzzy feature data and the basic feature data to construct a feature set; inputting the data in the feature set into the importance assessment model to obtain an importance assessment result; eliminating the feature data with the lowest importance in the feature set according to the importance assessment result to obtain a new feature set; inputting the feature data in the new feature set into the importance assessment model for iterative calculation; stopping the iteration when the feature data in the new feature set meets the preset conditions to obtain an advanced feature set.
[0014] Furthermore, the anomaly detection of the basic feature data and the advanced feature data includes: collecting historical anomaly data and establishing a training data set; using the training data set to train an isolation forest model to obtain an anomaly assessment model; receiving the basic feature data and the advanced feature data in real time to obtain a detection data set; preprocessing the detection data set; inputting the processed detection data set into the anomaly assessment model to obtain an anomaly assessment result; and triggering an alarm mechanism according to the anomaly assessment result.
[0015] Furthermore, the adjustment feature extraction strategy includes: judging whether the basic feature data or the advanced feature data is abnormal based on the abnormality assessment result; if the basic feature data is abnormal, optimizing the feature extraction algorithm and adjusting the sampling frequency of the power grid business data; if the advanced feature data is abnormal, optimizing the advanced feature set to obtain an optimized feature set; and optimizing the importance assessment model using the optimized feature set.
[0016] Compared with the prior art, the present invention has the following advantages:
[0017] 1. The present invention constructs a distributed parallel processing architecture, which can automatically distribute power grid business data to multiple computing nodes for parallel processing, significantly improving the speed and efficiency of data processing, and is particularly suitable for large-scale power grid data processing scenarios;
[0018] 2. This method is designed with two levels: basic feature extraction and advanced feature extraction. Basic feature extraction directly extracts basic power grid operation parameters from raw data, while advanced feature extraction mines deeper feature information through complex algorithm analysis, such as machine learning or deep learning models. This multi-level design ensures the comprehensiveness and accuracy of feature extraction.
[0019] 3. The present invention integrates real-time anomaly detection and can receive and process basic feature data and advanced feature data in real time. Once abnormal data is found, the alarm mechanism will be triggered immediately and a detailed abnormal report will be generated so that the operation and maintenance personnel can respond and handle it in time.
[0020] 4. The present invention also includes an adaptive optimization algorithm that can automatically adjust the feature extraction strategy according to the results of anomaly detection; when the system detects a frequently occurring anomaly type, it will automatically optimize the relevant feature extraction algorithm or adjust the sampling frequency to improve the accuracy and efficiency of anomaly detection;
[0021] 5. In order to reduce repeated calculations and improve processing efficiency, the present invention implements a data caching and reuse mechanism; for the processed power grid business data, the extracted basic feature data will be cached, and when the same data appears again, the feature data can be directly obtained from the cache, avoiding repeated calculations.
[0022] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a flow chart of a method for extracting features of power grid service data according to an embodiment of the present invention;
[0025] Figure 2 is a schematic diagram of preliminary data partitioning and parallel processing according to an embodiment of the present invention;
[0026] Figure 3 is a schematic diagram of basic feature data for multi-threaded feature extraction according to an embodiment of the present invention;
[0027] Figure 4 It is a schematic diagram of a process of screening high-level feature data using a recursive feature elimination method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Reference Figure 1 An embodiment of the present invention proposes a method for extracting features of power grid business data, which uses a multi-level feature extraction and real-time anomaly detection method to achieve efficient, accurate and real-time power grid business data processing.
[0030] The method of this embodiment specifically includes:
[0031] Periodically collect power grid business data;
[0032] Specifically, this step is the starting point of the entire feature extraction process. Grid business data refers to various types of data generated during the operation of the grid, including voltage, current, power, load, etc.; these data are crucial to understanding the operating status of the grid; periodic collection means that the system will automatically collect these data according to preset time intervals (such as every hour, every day, every week, etc.).
[0033] For example, devices such as voltage sensors, current sensors, and power sensors are used to periodically collect grid service data, such as parameters such as voltage, current, and power. These data will be used as input for subsequent processing.
[0034] Preliminarily processing and extracting features of the power grid business data to obtain basic feature data;
[0035] Specifically, after the raw data is collected, it needs to be preliminarily processed; the preliminarily processing may include data cleaning (such as removing invalid data, correcting erroneous data), data format conversion (such as converting data into a unified format or unit), etc.; this is to ensure that subsequent feature extraction and analysis can be carried out accurately and efficiently.
[0036] Specifically, feature extraction is to extract information representative of the operating status of the power grid from the data after preliminary processing; these basic feature data may include voltage fluctuation range, current peak, power factor, etc.; these feature data can reflect the operating status of the power grid in certain aspects and provide a basis for subsequent advanced feature extraction and anomaly detection.
[0037] Exemplarily, the collected power grid business data is preliminarily processed and feature extracted. This step includes data cleaning, format conversion, and distribution of data to multiple computing nodes for processing; for example, invalid values and duplicate values in the data can be removed, the data can be converted into a unified format, and divided into multiple data blocks according to the characteristics of the data and processing requirements, and then distributed to different computing nodes for parallel processing; on each computing node, the data block is processed according to a preset feature extraction algorithm to extract basic feature data, such as voltage fluctuation range, current peak value, etc.
[0038] Re-extracting and analyzing the basic feature data to obtain advanced feature data;
[0039] Specifically, after obtaining the basic feature data, further feature extraction and analysis are required to obtain higher-level feature data. Advanced feature data may include load trends, stability assessments, fault predictions, etc. of the power grid; these advanced feature data can more deeply reflect the operating status and potential problems of the power grid.
[0040] For example, in order to obtain advanced feature data, it may be necessary to adopt more complex algorithms or models, such as machine learning algorithms, deep learning models, etc.; these algorithms or models can perform more in-depth analysis and processing of basic feature data, thereby extracting more valuable information.
[0041] Performing anomaly detection on the basic feature data and the advanced feature data, and determining whether anomaly detection results are abnormal;
[0042] Specifically, after obtaining the basic feature data and advanced feature data, it is necessary to receive these data in real time and perform anomaly detection; anomaly detection refers to real-time monitoring and analysis of the received data to discover possible abnormal situations or problems.
[0043] Exemplarily, anomaly detection may adopt a variety of methods and techniques, such as threshold judgment, statistical analysis, machine learning algorithms, etc.; for example, a threshold for the voltage fluctuation range can be set, and when the actual voltage fluctuation exceeds this threshold, it is considered that an abnormal situation exists; or a machine learning algorithm can be used to analyze and learn historical data to establish an anomaly detection model for real-time monitoring of abnormal situations in new data.
[0044] When anomaly detection results are abnormal, the alarm mechanism is triggered and the feature extraction strategy is adjusted.
[0045] For example, when the system detects an abnormality, it will immediately trigger an alarm mechanism; the alarm mechanism may include sending alarm information to relevant personnel, initiating emergency processing procedures, etc.; this can ensure that relevant personnel are aware of the abnormal conditions of the power grid in a timely manner and take appropriate measures to deal with them; the feature extraction strategy will also be adjusted according to the detected abnormal conditions and problems; the adjustment of the feature extraction strategy may include optimizing the feature extraction algorithm, adjusting the sampling frequency, adding new feature extraction dimensions, etc.; this is to ensure that the system can more accurately extract and reflect the operating status of the power grid and improve the accuracy and reliability of anomaly detection.
[0046] Furthermore, the preliminary processing and feature extraction of the power grid service data includes:
[0047] Performing preliminary data cleaning and format conversion on the power grid business data to obtain preliminary data;
[0048] Specifically, data cleaning aims to identify and remove invalid, erroneous or incomplete data; invalid data may include null values, duplicate values or obviously unreasonable values (such as current or voltage values that exceed the physical range); erroneous data may include data anomalies caused by sensor failure or transmission errors; the data cleaning process usually includes checking the validity of the data, removing duplicate values, filling or deleting missing values, etc.
[0049] Specifically, since power grid business data may come from different data sources and have different formats and units, format conversion is required to ensure the uniformity and comparability of the data; this may include converting the data into a unified numerical format, time format or unit, etc.
[0050] For example, suppose that in the collected power grid data, the voltage value at a certain moment is "-9999", which is obviously an error value because it exceeds the actual possible voltage range. In the data cleaning process, this value should be identified and replaced with a reasonable missing value or estimated based on the trend of adjacent data points; if the timestamp format in the power grid data is "YYYY-MM-DD HH:MM:SS", and the time format required for subsequent analysis is "UNIX timestamp", format conversion is required.
[0051] Allocating the preliminary data to multiple computing nodes according to a preset data partitioning strategy;
[0052] Specifically, the data partitioning strategy aims to divide the data into multiple parts according to the characteristics and processing requirements of the data so that they can be processed in parallel on different computing nodes; this can improve the speed and efficiency of data processing, especially when processing large-scale data; the partitioning strategy should take into account the size, type, processing difficulty of the data and the resource status of the computing nodes.
[0053] The allocated preliminary data are processed simultaneously on each computing node to extract basic feature data.
[0054] Specifically, after the data is allocated, each computing node will process the allocated preliminary data according to a preset feature extraction algorithm; the feature extraction algorithm may include statistical calculations (such as mean, standard deviation), signal processing (such as Fourier transform), machine learning algorithms (such as clustering, classification), etc.
[0055] Furthermore, allocating the preliminary data to multiple computing nodes according to a preset data partitioning strategy includes:
[0056] Set data partitioning strategies based on the characteristics and processing requirements of power grid business data;
[0057] Specifically, it is necessary to formulate an appropriate data partitioning strategy based on the scale, type, distribution characteristics and subsequent processing requirements of power grid business data.
[0058] For example, for large-scale and unevenly distributed data, a partitioning strategy based on data volume may be adopted to ensure that the amount of data processed by each computing node is relatively balanced; and for data with time series characteristics, a partitioning strategy based on time period may be adopted.
[0059] Dividing the preliminary data according to the data partitioning strategy to obtain a plurality of data blocks;
[0060] For example, after formulating a data partitioning strategy, the next step is to divide the preliminary data according to this strategy; this step usually involves physical or logical partitioning of the data, dividing the data into multiple smaller, easier-to-process data blocks; these data blocks will serve as input for subsequent parallel processing.
[0061] The multiple data blocks are distributed to different computing nodes.
[0062] Specifically, in this step, the divided data blocks need to be distributed to different computing nodes. According to the needs, one computing node can also process multiple different data blocks for parallel processing. This step usually involves data transmission and distribution, and it is necessary to ensure that each computing node can receive the data block it is responsible for processing. At the same time, the data load balancing problem needs to be considered to ensure that the processed data blocks of each computing node are relatively balanced to avoid overloading or idleness of some nodes.
[0063] For example, Figure 2As shown in the figure, suppose there is a large-scale power grid load data, which needs to be feature extracted and analyzed to obtain preliminary data; first, a partitioning strategy based on data volume can be formulated according to the scale and distribution characteristics of the data, and the preliminary data can be divided into 10 data blocks; then, these 10 data blocks are respectively assigned to 10 different computing nodes for processing; each computing node will process the assigned data block according to the preset feature extraction algorithm to extract the basic feature data; in this way, through parallel processing, the speed and efficiency of data processing can be significantly improved.
[0064] Furthermore, the step of simultaneously processing the allocated preliminary data on each computing node to extract basic feature data includes:
[0065] Multiple threads are set on each computing node, and each thread processes one or more data blocks;
[0066] Specifically, in this step, multiple threads need to be created on each computing node to process data in parallel; the number of threads can be determined based on the hardware resources of the computing node (such as the number of CPU cores) and the size and processing requirements of the data; through multi-threaded processing, the resources of the computing node can be fully utilized and the data processing capability can be improved.
[0067] Each thread processes the assigned data block according to a preset feature extraction algorithm to extract a feature data block;
[0068] Specifically, after the threads are created, each thread will process the assigned data blocks according to the preset feature extraction algorithm; the feature extraction algorithm may include statistical calculations (such as mean, standard deviation), signal processing (such as Fourier transform), machine learning algorithms (such as clustering, classification), etc. The specific selection depends on the characteristics and processing requirements of the power grid business data; each thread will independently process the data blocks it is responsible for and extract the feature data.
[0069] The feature data blocks are sorted to obtain basic feature data.
[0070] Specifically, after all threads complete data processing, the feature data blocks extracted by each thread need to be sorted to obtain complete basic feature data; this step may include operations such as data merging, deduplication, and sorting to ensure the accuracy and completeness of the basic feature data.
[0071] For example, Figure 3As shown, it is assumed that there is a computing node responsible for processing two data blocks; two threads can be created on the computing node, each responsible for processing the two data blocks; thread 1 processes data block 1 according to a preset feature extraction algorithm to extract feature data block 1; thread 2 processes data block 2 to extract feature data block 2; then, the two feature data blocks are sorted to obtain the basic feature data of the computing node; in this way, data can be processed in parallel on multiple computing nodes to quickly extract the basic features of the power grid business data.
[0072] Furthermore, after obtaining the basic feature data, it also includes:
[0073] Cache the basic feature data;
[0074] Specifically, in the feature extraction process, once basic feature data is extracted from the power grid business data, the data will be cached; the cache can be an efficient data storage structure, such as an in-memory database or a distributed cache system, which can quickly read and write data.
[0075] When the same power grid service data appears again, the basic characteristic data is obtained from the cache.
[0076] Specifically, when the same power grid business data is received again (for example, periodically collected data may contain a large number of repeated data points), it will first check whether the basic features of these data already exist in the cache; if so, it will be directly obtained from the cache without recalculation.
[0077] For example, in a certain collection cycle, a group of power grid business data is collected, and the basic characteristics of this group of data (such as voltage fluctuation range, current peak, etc.) are calculated through a feature extraction algorithm; after the calculation is completed, these basic characteristic data are cached; in a subsequent collection cycle, the same power grid business data as last time is collected again; before feature extraction, the cache is first checked to find that the basic characteristics of these data already exist; therefore, these basic characteristic data are directly obtained from the cache without executing the feature extraction algorithm again; in this way, unnecessary repeated calculations are avoided and the efficiency of data processing is improved; especially when the data collection frequency is high and the data repetition rate is high, the caching strategy can bring significant performance improvements.
[0078] Furthermore, the step of re-extracting and analyzing the basic feature data to obtain advanced feature data includes:
[0079] Preprocessing the basic feature data to obtain input data;
[0080] Specifically, preprocessing is to ensure that the quality and format of the input data meet the requirements of subsequent analysis; preprocessing may include processing missing values (such as using mean filling, median filling or interpolation), identifying and processing outliers (such as using box plot method), data normalization or standardization, etc., to eliminate the influence of different dimensions.
[0081] Select Mamdani fuzzy system and define fuzzy sets and membership functions;
[0082] Specifically, the Mamdani fuzzy system converts basic feature data into fuzzy feature data to deal with uncertainty and ambiguity; the Mamdani fuzzy system is selected as the conversion model, and fuzzy sets (such as "high voltage", "medium voltage", "low voltage", etc.) and corresponding membership functions (describing the degree to which each data point belongs to a fuzzy set) are defined according to the characteristics of power grid business data.
[0083] Inputting the input data into the Mamdani fuzzy system to obtain fuzzy feature data;
[0084] Specifically, the basic feature data is converted into fuzzy feature data using fuzzy logic; the preprocessed basic feature data is used as input, and the fuzzy feature data is obtained through the reasoning mechanism of the Mamdani fuzzy system.
[0085] The fuzzy feature data and the basic feature data are screened by using a recursive feature elimination method to obtain high-level feature data.
[0086] Specifically, the most representative high-level features for the power grid operation status are selected from the fuzzy feature data and the basic feature data; first, historical data is collected to build a training set, and then a support vector machine model is trained as an importance assessment model; then, the model is used to iteratively evaluate the feature set, and the least important features are eliminated in each iteration until the preset conditions are met (such as the number of feature data reaches a predetermined threshold or the model performance is no longer significantly improved).
[0087] For example, suppose there is a power grid monitoring system that collects basic characteristic data such as voltage, current and power; it is found that there are a small number of missing values in the voltage data, and we use the mean of adjacent data to fill them; there are abnormally high values in the current data, which are identified and replaced with the 95% quantile value using the box plot method; all basic characteristic data are normalized to make them in the same dimension; three fuzzy sets are defined: "low voltage", "medium voltage" and "high voltage", and a membership function (such as a triangular membership function) is specified for each fuzzy set; the preprocessed voltage data is input into the Mamdani fuzzy system, and the fuzzy feature corresponding to each data point is obtained according to the defined fuzzy sets and membership functions. (For example, the probability of "low voltage" is 0.7, the probability of "medium voltage" is 0.2, and the probability of "high voltage" is 0.1); collect historical voltage, current and power data and their corresponding fuzzy feature data as training sets; train a support vector machine model as an importance assessment model; use recursive feature elimination to iteratively evaluate the importance of each feature data, and eliminate the least important feature data in each iteration until the number of remaining feature data reaches a preset value (such as 10); the final high-level feature set may include "average voltage fuzzy level", "current fluctuation range" and "power factor stability", etc. These feature data are of great significance for monitoring the operating status of the power grid.
[0088] Furthermore, the preprocessing of the basic feature data to obtain input data includes:
[0089] Using a mean filling method to process the missing values of the basic feature data to obtain first processed data;
[0090] Specifically, the mean of the non-missing values of each feature is calculated, and the missing values in the feature are replaced with the mean to obtain the first processed data, thereby filling the missing values in the basic feature data and avoiding interference with subsequent analysis caused by incomplete data.
[0091] Using a box plot method to identify and process outliers in the first processed data to obtain second processed data;
[0092] Specifically, the box plot method (usually based on the quartiles of the data) is used to identify outliers, and the identified outliers are replaced (such as using the median, mean, or specific upper and lower limits) or deleted to obtain the second processed data; then the outliers in the data are identified and processed. These outliers may be caused by data entry errors or equipment failures, which will have an adverse effect on data analysis.
[0093] The second processed data is normalized to obtain input data.
[0094] Specifically, an appropriate normalization method (such as minimum-maximum normalization, Z-score standardization, etc.) is selected to convert all eigenvalues in the second processed data into a unified range such as [0, 1] or [-1, 1] to obtain input data; and then the data of different dimensions are converted to the same scale for comparison and comprehensive analysis.
[0095] Exemplarily, assume that there is a power grid business data set containing three features: voltage, current, and power, in which there are missing values and outliers; check the data set and find that there are 5 missing values in the voltage feature, calculate the mean of the non-missing values in the voltage feature, assuming it is 220V; replace the 5 missing values with 220V to obtain the first processed data; apply the box plot method to the current feature in the first processed data; identify that 3 data points in the current feature are beyond the normal range; replace the 3 outliers with the median of the current feature or delete them to obtain the second processed data; select the minimum-maximum normalization method, calculate the minimum and maximum values of each feature in the second processed data, normalize each feature value to the range of [0,1], and obtain the input data.
[0096] Furthermore, the fuzzy feature data and the basic feature data are screened by the recursive feature elimination method to obtain high-level feature data including:
[0097] Collect historical basic feature data and historical fuzzy feature data to obtain a historical data set;
[0098] Specifically, a data set containing historical basic feature data and historical fuzzy feature data is collected as a training set for subsequent model training.
[0099] Establish a support vector machine model and set relevant parameters;
[0100] Specifically, a support vector machine (SVM) is selected as the importance evaluation model, and relevant parameters (such as kernel function type, penalty parameter C, etc.) are set.
[0101] Using the historical data set to train the support vector machine model to obtain an importance assessment model;
[0102] Specifically, the support vector machine model is trained using historical data sets so that it can evaluate the importance of feature data for classification or prediction of power grid operation status.
[0103] Constructing a feature set using the fuzzy feature data and the basic feature data;
[0104] Specifically, the fuzzy feature data and the basic feature data are merged to construct a feature set.
[0105] Inputting the data in the feature set into the importance assessment model to obtain an importance assessment result;
[0106] Specifically, the data in the initial feature set is input into the trained support vector machine model to obtain the importance evaluation result (such as weight or coefficient) of each feature.
[0107] Eliminating the feature data with the lowest importance in the feature set according to the importance evaluation result to obtain a new feature set;
[0108] Specifically, according to the importance evaluation result, the feature data with the lowest importance in the feature set is eliminated to obtain a new feature set.
[0109] Inputting feature data in the new feature set into the importance assessment model for iterative calculation;
[0110] Specifically, the data in the new feature set is input into the SVM model again for training, and the importance of the features is re-evaluated; the above steps are repeated until the feature data in the feature set meets the preset conditions (such as the number of features reaches a predetermined threshold, or the model performance is no longer significantly improved).
[0111] When the feature data in the new feature set meets the preset conditions, the iteration is stopped to obtain the advanced feature set.
[0112] Specifically, when the iteration stops, the obtained feature set is the most representative high-level feature set for the power grid operation status.
[0113] For example, Figure 4As shown in the figure, the power grid monitoring data of the past year, including basic feature data and fuzzy feature data, are extracted from the database as the historical data set; SVM (support vector machine) is selected as the importance evaluation model, and the kernel function can be set to radial basis function (RBF), and the penalty parameter C is 1.0; the support vector machine model is trained using the historical data set to enable it to evaluate the importance of feature data for power grid fault classification; the basic feature data such as voltage, current, power at the current moment and the fuzzy feature data such as voltage fuzzy level obtained by Mamdani fuzzy system conversion are merged to construct a feature set; the feature data in the feature set are input into the trained support vector machine model to obtain the importance of each feature data The importance evaluation result is obtained by evaluating the importance of the feature data (such as power factor stability) according to the importance evaluation result; the feature data with the lowest importance (such as power factor stability) is eliminated to obtain a new feature set; the data in the new feature set is input into the support vector machine model for training again, and the importance of the remaining features is re-evaluated; the above steps are repeated until the number of features in the feature set is reduced to a predetermined threshold (such as 10), or the model performance (such as classification accuracy) is no longer significantly improved; when the iteration stops, the obtained feature set (such as average voltage, current fluctuation range, voltage fuzzy level, etc.) is the most representative advanced feature set for the power grid operation status, and these features will be used for subsequent power grid status monitoring and fault prediction.
[0114] Further, the performing anomaly detection on the basic feature data and the advanced feature data includes:
[0115] Collect historical abnormal data and build a training data set;
[0116] Specifically, data samples known to be abnormal are screened out from the historical operation data of the power grid. These samples may include equipment failure, abnormal voltage fluctuation, current overload, etc.; these abnormal data samples are combined with the corresponding normal data samples to form a training data set for training the anomaly detection model.
[0117] Using the training data set to train an isolation forest model to obtain an anomaly assessment model;
[0118] Specifically, Isolation Forest is selected as the anomaly detection algorithm. This algorithm is based on the assumption that "anomalies are few and unique" and isolates anomalies by constructing multiple decision trees. The Isolation Forest model is trained using a training data set so that it can learn the distribution characteristics of normal data and abnormal data, thereby having the ability to perform anomaly assessment on unknown data.
[0119] Receiving the basic feature data and the advanced feature data in real time to obtain a detection data set;
[0120] Specifically, basic feature data (such as voltage, current, etc.) and advanced feature data (such as important features obtained through feature extraction) are collected in real time through the power grid monitoring system; these data are combined into a detection data set for subsequent anomaly detection.
[0121] Preprocessing the detection data set;
[0122] Specifically, the data in the test data set is cleaned to remove invalid or erroneous data points; data normalization or standardization is performed as needed to ensure comparability between different features.
[0123] Inputting the processed detection data set into the anomaly assessment model to obtain an anomaly assessment result;
[0124] Specifically, the preprocessed detection data set is input into the trained isolation forest model; the model will perform an anomaly assessment on each data point and output an anomaly score or anomaly probability.
[0125] An alarm mechanism is triggered according to the abnormal assessment result.
[0126] Specifically, an abnormal threshold is set. When the abnormal score or abnormal probability of a data point exceeds the threshold, the data point is considered to be abnormal; the alarm mechanism is triggered and an alarm message is sent to relevant personnel so that timely processing measures can be taken.
[0127] For example, it is assumed that there is a power grid monitoring system that collects basic characteristic data such as voltage and current in real time, and obtains advanced characteristic data such as voltage fluctuation rate and current overload index through feature extraction; data samples of abnormal events such as abnormal voltage fluctuation and current overload are screened out from historical data, and these abnormal samples are combined with corresponding normal samples to form a training data set; the training data set is used to train the isolation forest model, and the model learns the distribution characteristics of normal data and abnormal data, such as normal voltage fluctuation range, normal current value, etc.; the power grid monitoring system collects basic characteristic data such as voltage and current in real time, and calculates advanced characteristic data such as voltage fluctuation rate and current overload index; the collected data is cleaned and normalized to ensure the accuracy and comparability of the data; the pre-processed data is input into the isolation forest model for abnormal evaluation, and the model outputs the abnormal score or abnormal probability of each data point; the abnormal threshold is set to 0.8, and when the abnormal score of a data point exceeds 0.8, the alarm mechanism is triggered; the system sends an alarm message to the operation and maintenance personnel, prompting that there are abnormal conditions such as abnormal voltage fluctuation or current overload, and the operation and maintenance personnel take timely measures according to the alarm information, such as adjusting the voltage, limiting the current, etc., to ensure the safe and stable operation of the power grid.
[0128] Furthermore, the adjusting feature extraction strategy includes:
[0129] According to the abnormality assessment result, determining whether the basic feature data or the advanced feature data is abnormal;
[0130] Specifically, basic feature data and advanced feature data are received in real time, and anomaly detection is performed on these data through an anomaly assessment model; based on the anomaly assessment result, it is determined whether the basic feature data or the advanced feature data is abnormal.
[0131] If the basic feature data is abnormal, optimizing the feature extraction algorithm and adjusting the sampling frequency of the power grid service data;
[0132] Specifically, if the basic characteristic data is abnormal, it means that there may be problems in the original data collection or preprocessing stage; optimize the preset feature extraction algorithm, which may include improving data cleaning methods, adjusting data normalization parameters, etc., to improve the accuracy and stability of the basic characteristic data; at the same time, adjust the sampling frequency of power grid business data, which may increase the sampling points to obtain more information, or reduce the sampling points to reduce data noise.
[0133] If the high-level feature data is abnormal, optimizing the high-level feature set to obtain an optimized feature set;
[0134] The importance assessment model is optimized using the optimized feature set.
[0135] Specifically, if the high-level feature data is abnormal, it means that the current high-level feature set may not be able to fully reflect the true state of the power grid; optimizing the high-level feature set may include adding new important features, deleting irrelevant or redundant features, recombining features, etc., to obtain an optimized feature set; using the optimized feature set to optimize the importance assessment model (such as the support vector machine model), retrain the model to improve its assessment accuracy of the power grid state; after adjusting the feature extraction strategy, it is necessary to continuously monitor the abnormal assessment results and make further adjustments based on actual conditions; by continuously optimizing the feature extraction strategy and anomaly detection model, the accuracy and reliability of the power grid monitoring system can be improved.
[0136] For example, it is assumed that in the power grid monitoring system, basic feature data include voltage, current and power, and advanced feature data include voltage fluctuation rate, current overload index and power factor stability; basic feature data such as voltage, current and power, as well as advanced feature data such as voltage fluctuation rate, current overload index and power factor stability are received in real time, and it is found through the abnormal evaluation model that the voltage fluctuation rate is abnormally increased; according to the abnormal evaluation result, it is judged that the advanced feature data (voltage fluctuation rate) is abnormal; the advanced feature set is optimized, which may include adding new features such as voltage harmonic content to more comprehensively reflect the abnormal situation of voltage, and at the same time, considering deleting the features related to voltage. Features that are highly correlated with and redundant to voltage fluctuations, such as power factor stability (if its changes are mainly caused by voltage fluctuations); retrain importance assessment models (such as support vector machine models) using optimized high-level feature sets (including voltage fluctuation rate, current overload index, voltage harmonic content, etc.); improve the accuracy of the model's assessment of the grid status (especially voltage anomalies) by adjusting model parameters and feature weights; monitor the optimized anomaly assessment results, and if new anomalies are found or model performance degrades, adjust the feature extraction strategy and anomaly detection model again; and improve the overall performance and reliability of the grid monitoring system through continuous iterative optimization.
[0137] That is, any equivalent changes and modifications made according to the teachings of the present invention are still within the scope of the present invention. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present invention. This application is intended to cover any variation, use or adaptive change of the present invention, which follows the general principles of the present invention and includes common knowledge or customary technical means in the art that are not described in the present invention.
Claims
1. A method for extracting features from power grid service data, characterized in that: The method comprises: Periodically collect power grid business data; Preliminarily processing and extracting features of the power grid business data to obtain basic feature data; Re-extracting and analyzing the basic feature data to obtain advanced feature data; Performing anomaly detection on the basic feature data and the advanced feature data, and determining whether anomaly detection results are abnormal; When anomaly detection results are abnormal, the alarm mechanism is triggered and the feature extraction strategy is adjusted.
2. A method for extracting features of power grid service data according to claim 1, characterized in that: The preliminary processing and feature extraction of the power grid service data includes: Performing preliminary data cleaning and format conversion on the power grid business data to obtain preliminary data; Allocating the preliminary data to multiple computing nodes according to a preset data partitioning strategy; The allocated preliminary data are processed simultaneously on each computing node to extract basic feature data.
3. A method for extracting features of power grid service data according to claim 2, characterized in that: The distributing the preliminary data to multiple computing nodes according to the preset data partitioning strategy includes: Set data partitioning strategies based on the characteristics and processing requirements of power grid business data; Dividing the preliminary data according to the data partitioning strategy to obtain a plurality of data blocks; The multiple data blocks are distributed to different computing nodes.
4. A method for extracting features of power grid service data according to claim 2, characterized in that: The step of simultaneously processing the allocated preliminary data on each computing node to extract basic feature data includes: Multiple threads are set on each computing node, and each thread processes one or more data blocks; Each thread processes the assigned data block according to a preset feature extraction algorithm to extract a feature data block; The feature data blocks are sorted to obtain basic feature data.
5. A method for extracting features of power grid service data according to claim 4, characterized in that: After obtaining the basic feature data, it also includes: Cache the basic feature data; When the same power grid service data appears again, the basic characteristic data is obtained from the cache.
6. A method for extracting features of power grid service data according to claim 1, characterized in that: The re-extracting and analyzing the basic feature data to obtain the advanced feature data includes: Preprocessing the basic feature data to obtain input data; Select Mamdani fuzzy system and define fuzzy sets and membership functions; Inputting the input data into the Mamdani fuzzy system to obtain fuzzy feature data; The fuzzy feature data and the basic feature data are screened by using a recursive feature elimination method to obtain high-level feature data.
7. A method for extracting features of power grid service data according to claim 6, characterized in that: The preprocessing of the basic feature data to obtain input data comprises: Using a mean filling method to process the missing values of the basic feature data to obtain first processed data; Using a box plot method to identify and process outliers in the first processed data to obtain second processed data; The second processed data is normalized to obtain input data.
8. A method for extracting features of power grid service data according to claim 6, characterized in that: The fuzzy feature data and the basic feature data are screened by the recursive feature elimination method to obtain high-level feature data including: Collect historical basic feature data and historical fuzzy feature data to obtain a historical data set; Establish a support vector machine model and set relevant parameters; Using the historical data set to train the support vector machine model to obtain an importance assessment model; Constructing a feature set using the fuzzy feature data and the basic feature data; Inputting the data in the feature set into the importance assessment model to obtain an importance assessment result; Eliminating the feature data with the lowest importance in the feature set according to the importance evaluation result to obtain a new feature set; Inputting feature data in the new feature set into the importance assessment model for iterative calculation; When the feature data in the new feature set meets the preset conditions, the iteration is stopped to obtain the advanced feature set.
9. A method for extracting features of power grid service data according to claim 8, characterized in that: The performing abnormality detection on the basic feature data and the advanced feature data comprises: Collect historical abnormal data and build a training data set; Using the training data set to train an isolation forest model to obtain an anomaly assessment model; Receiving the basic feature data and the advanced feature data in real time to obtain a detection data set; Preprocessing the detection data set; Inputting the processed detection data set into the anomaly assessment model to obtain an anomaly assessment result; An alarm mechanism is triggered according to the abnormal assessment result.
10. A method for extracting features of power grid service data according to claim 9, characterized in that: The adjustment feature extraction strategy includes: According to the abnormality assessment result, determining whether the basic feature data or the advanced feature data is abnormal; If the basic feature data is abnormal, optimizing the feature extraction algorithm and adjusting the sampling frequency of the power grid service data; If the high-level feature data is abnormal, optimizing the high-level feature set to obtain an optimized feature set; The importance assessment model is optimized using the optimized feature set.
Citation Information
Cited By
Cross-modal transaction feature self-generation and anomaly detection system and method fused with large language model
CN120258990A