Disclosure of Invention
In order to solve the technical problems in the prior art, embodiments of the present invention provide an anomaly detection method for an electrical power system, which accurately and automatically detects anomalies of the electrical power system by using a fusion detection module, so as to improve detection efficiency and detection accuracy of anomaly detection and improve processing efficiency of anomaly processing.
In order to achieve the above object, an embodiment of the present invention provides an abnormality detection method for an electric power system, where the detection method includes: acquiring power information of a power system, wherein the power information comprises a plurality of power data; acquiring a preset fusion detection model; analyzing the power information based on the preset fusion detection model to obtain analyzed information; processing the analyzed information based on the preset fusion detection model to obtain processed information; generating an abnormality detection result of the power system based on the processed information.
Preferably, the obtaining of the preset fusion detection model includes: establishing a first initial model and a second initial model; acquiring a preset experiment data set, and generating training data based on the preset experiment data set; training the first initial model based on the training data to obtain the cluster detection model; acquiring a first cluster and a first cluster center of the training data based on the cluster detection model; acquiring a first distance between the training data and the center of the first cluster; processing the training data based on the first cluster and the first distance to obtain processed training data; training the second initial model based on the processed training data to obtain a classification detection model; and executing fusion operation on the clustering detection model and the classification detection model to obtain the preset fusion detection model.
Preferably, the detection method further comprises: generating test data corresponding to the training data based on the preset experimental data set; processing the test data based on the first cluster and the first distance to obtain processed test data; and verifying the preset fusion detection model based on the processed test data.
Preferably, after the verifying the preset fusion detection model based on the processed test data, the detection method further includes: acquiring corresponding optimization parameters based on a verification result under the condition that the preset fusion detection model does not meet the preset detection requirement as the verification result; and optimizing the preset fusion detection model based on the optimization parameters to obtain the optimized preset fusion detection model.
Preferably, the analyzing the power information based on the preset fusion detection model to obtain analyzed information includes: preprocessing the power information to obtain preprocessed information; performing conversion processing on the preprocessed information to obtain converted information; performing clustering processing on the converted information based on the preset fusion detection model to obtain at least one second cluster and a second cluster center corresponding to the converted information; acquiring a second distance between each piece of electric power data and the corresponding second cluster center; generating the analyzed information based on the power information, the second cluster, and the second distance.
Preferably, the preprocessing the power information to obtain preprocessed information includes: extracting ratio information of which the type is a ratio type in the electric power information; performing reference alignment operation on the ratio information to obtain aligned information; and updating the electric power information based on the aligned information to obtain preprocessed information.
Preferably, the performing conversion processing on the preprocessed information to obtain converted information includes: acquiring a preset data format; performing data extraction on the preprocessed information to obtain extracted data; and carrying out format conversion on the extracted data based on the preset data format to obtain converted information.
Preferably, the processing the analyzed information based on the preset fusion detection model to obtain processed information includes: classifying the analyzed information based on the preset fusion detection model to obtain classification information of each electric power data, wherein the classification information comprises the abnormal probability of the electric power data; and taking the classification information as the processed information.
Preferably, the generating an abnormality detection result of the power system based on the processed information includes: acquiring a preset probability threshold; judging whether the abnormal probability of the power data is greater than the preset probability threshold value or not; generating an abnormal detection result of data abnormality under the condition that the abnormal probability of the power data is greater than the preset probability threshold; and generating an abnormal detection result with normal data under the condition that the abnormal probability of the power data is less than or equal to the preset probability threshold.
Preferably, the detection method further comprises: acquiring corresponding abnormal data under the condition that the abnormal detection result is data abnormality; extracting abnormal parameters of the abnormal data; determining a processing priority of the exception data based on the exception parameter; performing a sequential output operation on the exception data based on the processing priority.
Preferably, the exception parameter includes a first exception parameter D and a second exception parameter L, and the determining the processing priority of the exception data based on the exception parameter includes: acquiring a mapping relation between the processing priority and the abnormal parameter, wherein the mapping relation is characterized in that: p ═ D + k × L; wherein k is a preset slope of the mapping relation; and determining the processing priority of the abnormal data based on the mapping relation and the abnormal parameters.
Correspondingly, the invention also provides an abnormality detection device of the power system, which comprises: a first acquisition unit configured to acquire power information of a power system, the power information including a plurality of power data; the second acquisition unit is used for acquiring a preset fusion detection model; the analysis unit is used for analyzing the electric power information based on the preset fusion detection model to obtain analyzed information; the processing unit is used for processing the analyzed information based on the preset fusion detection model to obtain processed information; a detection unit configured to generate an abnormality detection result of the power system based on the processed information.
Preferably, the second acquiring unit includes: the model establishing module is used for establishing a first initial model and a second initial model; the data acquisition module is used for acquiring a preset experiment data set and generating training data based on the preset experiment data set; the first training module is used for training the first initial model based on the training data to obtain a cluster detection model; the first intermediate information acquisition module is used for acquiring a first cluster and a first cluster center of the training data based on the cluster detection model; the second intermediate information acquisition module is used for acquiring a first distance between the training data and the first cluster center; the data processing module is used for processing the training data based on the first cluster and the first distance to obtain processed training data; the second training module is used for training the second initial model based on the processed training data to obtain a classification detection model; and the fusion module is used for executing fusion operation on the clustering detection model and the classification detection model to obtain the preset fusion detection model.
Preferably, the second acquiring unit further comprises a testing module, and the testing module is configured to: generating test data corresponding to the training data based on the preset experimental data set; processing the test data based on the first cluster and the first distance to obtain processed test data; and verifying the preset fusion detection model based on the processed test data.
Preferably, after the verifying the preset fusion detection model based on the processed test data, the test module is further configured to: acquiring corresponding optimization parameters based on a verification result under the condition that the preset fusion detection model does not meet the preset detection requirement as the verification result; and optimizing the preset fusion detection model based on the optimization parameters to obtain the optimized preset fusion detection model.
Preferably, the analysis unit comprises: the preprocessing module is used for preprocessing the power information to obtain preprocessed information; the conversion module is used for executing conversion processing on the preprocessed information to obtain converted information; a third intermediate information obtaining module, configured to perform clustering processing on the converted information based on the preset fusion detection model, and obtain at least one second cluster and a second cluster center corresponding to the converted information; the fourth intermediate information acquisition module is used for acquiring a second distance between each piece of electric power data and the corresponding second cluster center; an analysis information generation module to generate the analyzed information based on the power information, the second cluster, and the second distance.
Preferably, the preprocessing module is configured to: extracting ratio information of which the type is a ratio type in the electric power information; performing reference alignment operation on the ratio information to obtain aligned information; and updating the electric power information based on the aligned information to obtain preprocessed information.
Preferably, the performing conversion processing on the preprocessed information to obtain converted information includes: acquiring a preset data format; performing data extraction on the preprocessed information to obtain extracted data; and carrying out format conversion on the extracted data based on the preset data format to obtain converted information.
Preferably, the processing unit includes: the classification module is used for classifying the analyzed information based on the preset fusion detection model to obtain classification information of each electric power data, wherein the classification information comprises the abnormal probability of the electric power data; and the determining module is used for taking the classification information as the processed information.
Preferably, the generating an abnormality detection result of the power system based on the processed information includes: acquiring a preset probability threshold; judging whether the abnormal probability of the power data is greater than the preset probability threshold value or not; generating an abnormal detection result of data abnormality under the condition that the abnormal probability of the power data is greater than the preset probability threshold; and generating an abnormal detection result with normal data under the condition that the abnormal probability of the power data is less than or equal to the preset probability threshold.
Preferably, the detection apparatus further includes a priority processing unit, and the priority processing unit includes: the abnormal data acquisition module is used for acquiring corresponding abnormal data under the condition that the abnormal detection result is data abnormality; the abnormal parameter extraction module is used for extracting abnormal parameters of the abnormal data; a priority determination module for determining a processing priority of the abnormal data based on the abnormal parameter; and the output module is used for executing sequential output operation on the abnormal data based on the processing priority.
Preferably, the exception parameter includes a first exception parameter D and a second exception parameter L, and the determining the processing priority of the exception data based on the exception parameter includes: acquiring a mapping relation between the processing priority and the abnormal parameter, wherein the mapping relation is characterized in that: p ═ D + k × L; wherein k is a preset slope of the mapping relation; and determining the processing priority of the abnormal data based on the mapping relation and the abnormal parameters.
In another aspect, the present invention also provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the abnormality detection method of the power system provided by the present invention.
Through the technical scheme provided by the invention, the invention at least has the following technical effects:
the existing detection model is improved, and the fused detection model is obtained by adopting a model fusion mode, so that the defects or shortcomings of a single detection model are reduced or overcome on the basis of considering the advantages of each detection model, the more intelligent abnormity detection effect is realized, the abnormity detection efficiency is improved, and the detection accuracy is improved; the exception handling efficiency is improved, the operation safety of the power system is improved, and the actual requirements of enterprises are met.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Detailed Description
In order to solve the technical problems in the prior art, embodiments of the present invention provide an anomaly detection method for an electrical power system, which performs fusion processing on a plurality of analysis models, and performs automatic anomaly detection on electrical power information according to a fused hybrid model, so as to effectively improve detection efficiency and detection accuracy of anomaly detection, and reduce labor cost of an enterprise.
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
The terms "system" and "network" in embodiments of the present invention may be used interchangeably. The "plurality" means two or more, and in view of this, the "plurality" may also be understood as "at least two" in the embodiments of the present invention. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship, unless otherwise specified. In addition, it should be understood that the terms first, second, etc. in the description of the embodiments of the invention are used for distinguishing between the descriptions and are not intended to indicate or imply relative importance or order to be construed.
Referring to fig. 1, an embodiment of the present invention provides an abnormality detection method for an electrical power system, where the detection method includes:
s10) acquiring power information of the power system, the power information including a plurality of power data;
s20) acquiring a preset fusion detection model;
s30) analyzing the power information based on the preset fusion detection model to obtain analyzed information;
s40) processing the analyzed information based on the preset fusion detection model to obtain processed information;
s50) generating an abnormality detection result of the electric power system based on the processed information.
In the prior art, the anomaly detection of the power system through a single detection model often has the detection advantages in a certain direction and the detection disadvantages on the other hand. Therefore, in order to solve the above technical problem, in a possible embodiment, before the power system is subjected to anomaly detection, a preset fusion detection model based on multiple monitoring models is constructed for the power system, for example, the preset fusion detection model may be formed by fusing multiple detection models, which include but are not limited to a statistical detection model, a cluster detection model, a classification detection model, a regression detection model, a deep neural network detection model, and the like, and by performing a fusion operation on the detection models, the defects of each detection model are improved by other detection models on the basis of fully utilizing the advantages of each detection model, so as to achieve a better power anomaly detection effect.
Referring to fig. 2, in the embodiment of the present invention, the obtaining of the preset fusion detection model includes:
s21) establishing a first initial model and a second initial model;
s22) acquiring a preset experiment data set, and generating training data based on the preset experiment data set;
s23) training the first initial model based on the training data to obtain a cluster detection model;
s24) obtaining a first cluster and a first cluster center of the training data based on the cluster detection model;
s25) obtaining a first distance between the training data and the first cluster center;
s26) processing the training data based on the first cluster and the first distance to obtain processed training data;
s27) training the second initial model based on the processed training data to obtain a classification detection model;
s28) executing fusion operation on the cluster detection model and the classification detection model to obtain the preset fusion detection model.
In a possible implementation manner, the detection model that needs to be fused may be determined first, for example, in an embodiment of the present invention, the first initial model and the second initial model are established first, and then a preset experimental data set is obtained, for example, the preset experimental data set may be obtained from a log database of an electric power system, and because the data volume in the log database is often huge, the ETL tool may be used for batch export. After the preset experiment data set is obtained, corresponding training data are generated according to the preset experiment data set, the first initial model is trained based on the training data, and a corresponding cluster detection model is obtained.
At this time, the training data is further processed according to the trained cluster detection model, for example, in the embodiment of the present invention, the training data is processed according to the cluster model to obtain a first cluster of the training data and a corresponding first cluster center, further, a first distance between each training data and the first cluster center is obtained, then the training data is processed according to the obtained first cluster and the first distance to obtain processed data convenient for subsequent processing, at this time, the second initial model is trained according to the processed training data to obtain a classification detection model, at this time, the cluster detection model and the classification detection model are fused, and a final fused preset fusion detection model is obtained.
In the embodiment of the invention, the detection models are optimized on the basis of the prior art, and the detection models with different advantages are fused, so that the defects of each detection model are effectively reduced on the basis of having the detection advantages of each detection model, the detection accuracy and the detection efficiency of the abnormity detection of the power system are effectively improved, and the actual abnormity detection requirements of enterprises are met.
In an embodiment of the present invention, the detection method further includes: generating test data corresponding to the training data based on the preset experimental data set; processing the test data based on the first cluster and the first distance to obtain processed test data; and verifying the preset fusion detection model based on the processed test data.
Further, in this embodiment of the present invention, after the verifying the preset fusion detection model based on the processed test data, the detection method further includes: acquiring corresponding optimization parameters based on a verification result under the condition that the preset fusion detection model does not meet the preset detection requirement as the verification result; and optimizing the preset fusion detection model based on the optimization parameters to obtain the optimized preset fusion detection model.
In one possible embodiment, in order to ensure that the generated preset fusion detection model has sufficient accuracy and coverage rate for detecting an abnormality, in the process of acquiring the preset fusion detection model, training data is generated based on a preset experimental data set, and corresponding test data is also generated, for example, the test data may be backup data same as the training data or test data different from the training data, and after a first cluster and a first distance of the training data are acquired according to the cluster detection model, the test data may be further processed according to the first cluster and the first distance, and processed test data is acquired, at this time, the preset fusion detection model is verified by the processed test data, for example, the processed test data is detected by the preset fusion detection model, and corresponding anomaly detection results are obtained.
For example, in one embodiment, 10 pieces of processed test data are input into a preset fusion detection model for anomaly detection, and 2 pieces of data are normal, and 8 pieces of data are abnormal for anomaly detection. The 10 processed test data actually include 10 abnormal data, that is, the accuracy of the preset fusion detection model is 80%, for example, in the embodiment of the present invention, when the accuracy of the preset fusion detection model is more than 90%, it is determined that the preset fusion detection model meets the preset detection requirement, that is, the verification result of the preset fusion detection model obtained in this embodiment does not meet the preset detection requirement, so that a corresponding optimization parameter is obtained according to the verification result, for example, the preset fusion detection model may be optimized and analyzed according to the 2 data of the false detection or the missing detection, and a corresponding optimization parameter is obtained, at this time, the preset fusion detection model is optimized according to the optimization parameter, for example, the original parameter is replaced by the optimization parameter, and the optimized preset fusion detection model is obtained.
In the embodiment of the invention, in the process of establishing the preset fusion detection model, the preset fusion detection model is optimized according to relevant indexes of actual detection of the preset fusion detection model, such as the relevant indexes including but not limited to the accuracy, the abnormal coverage rate and the like of the preset fusion detection model, so as to obtain the preset fusion detection model meeting the detection requirements, thereby effectively ensuring that the sufficient detection accuracy can be achieved in the subsequent abnormal detection process.
And after the qualified preset fusion detection model is established, the real-time abnormity monitoring of the power system is started. Referring to fig. 3, in the embodiment of the present invention, the analyzing the power information based on the preset fusion detection model to obtain analyzed information includes:
s31) preprocessing the electric power information to obtain preprocessed information;
s32) executing conversion processing to the preprocessed information to obtain converted information;
s33) clustering the converted information based on the preset fusion detection model to obtain at least one second cluster and a second cluster center corresponding to the converted information;
s34) obtaining a second distance between each power data and the corresponding second cluster center;
s35) generating the analyzed information based on the power information, the second cluster, and the second distance.
In one possible embodiment, power information of the power system is first acquired, and a plurality of power data is included in the acquired power information. In the actual monitoring process of the power system, each line endpoint of the power system periodically collects the power information of each line and stores the power information into the database, so that in the process of acquiring the power information, the data volume of the power information stored in the database is huge, and the power information can be derived in batches through an ETL tool. However, in practical applications, because the data at the line end is streaming data, each data is composed of a key value pair consisting of a line ID and a data record, and the streaming data does not meet the input data format requirement of the detection model, the acquired power information needs to be preprocessed to meet the input data format requirement of the preset fusion detection model.
In this embodiment of the present invention, the preprocessing the power information to obtain preprocessed information includes: extracting ratio information of which the type is a ratio type in the electric power information; performing reference alignment operation on the ratio information to obtain aligned information; and updating the electric power information based on the aligned information to obtain preprocessed information.
Because the power data in the power system is different from the data in other industries, the power data has more ratio type data, but the ratio benchmarks of the different ratio type data are different, in order to ensure the effectiveness and accuracy of subsequent data analysis and abnormality detection, the ratio information of which the type is the ratio type in the power information is extracted first, and then the benchmark alignment operation is performed on the ratio information.
Further, converting a data format of the preprocessed information, in an embodiment of the present invention, the performing conversion processing on the preprocessed information to obtain the converted information includes: acquiring a preset data format; performing data extraction on the preprocessed information to obtain extracted data; and carrying out format conversion on the extracted data based on the preset data format to obtain converted information.
In a possible embodiment, a preset data format is first obtained, for example, the preset data format may be [ sequence number, attribute name, attribute value ], then data extraction is performed on the preprocessed information to obtain extracted data, for example, the attribute name and the corresponding attribute value in the preprocessed information may be extracted, and then format conversion is performed on the extracted data according to the preset data format, for example, the extracted data may be stored as data in the preset format to obtain converted information, see table 1:
serial number
|
Attribute name
|
Attribute value
|
1
|
Time
|
08.17.49
|
2
|
BV_Value
|
500KV
|
3
|
STATUS
|
1 |
TABLE 1
At this time, clustering processing is performed on the converted information according to a preset fusion detection model to obtain at least one second cluster and a second cluster center corresponding to the converted information, for example, in an embodiment of the present invention, 5 clusters and corresponding 5 cluster centers are obtained after clustering processing is performed on the converted information, at this time, a second distance between each piece of power data in the power information and the second cluster center is further obtained, analyzed information is generated according to the power information, the second clusters and the second distances, for example, the information is packed to generate the analyzed information, and for example, a storage format of the analyzed information is [ power data, second clusters, second distances ].
In the embodiment of the invention, the streaming data and the randomly stored data are converted into the data which can be processed by a machine by pre-processing the power data, and the data are further processed by the clustering model, so that the effect of information gain is realized on the power data, the processing difficulty of subsequent data processing is effectively reduced, and the reliability and the accuracy in the data processing process are improved.
In this embodiment of the present invention, the processing the analyzed information based on the preset fusion detection model to obtain processed information includes: classifying the analyzed information based on the preset fusion detection model to obtain classification information of each electric power data, wherein the classification information comprises the abnormal probability of the electric power data; and taking the classification information as the processed information.
Further, in an embodiment of the present invention, the generating an abnormality detection result of the power system based on the processed information includes: acquiring a preset probability threshold; judging whether the abnormal probability of the power data is greater than the preset probability threshold value or not; generating an abnormal detection result of data abnormality under the condition that the abnormal probability of the power data is greater than the preset probability threshold; and generating an abnormal detection result with normal data under the condition that the abnormal probability of the power data is less than or equal to the preset probability threshold.
In the prior art, in the process of processing the power data through the classification model alone, each piece of power data needs to be labeled manually, for example, information such as the type of the power data needs to be labeled, so that a large amount of manpower needs to be consumed, the workload of technicians is greatly increased, and the work efficiency is reduced. Therefore, in order to solve the above technical problem, in a possible implementation, the power data is first clustered by using a preset fusion detection model to achieve a data gain effect on the power data, and on the basis, the preset fusion detection model can perform a direct classification operation on each power data based on the second cluster and the corresponding second distance included in the analyzed information, and obtain corresponding classification information, for example, the classification information includes an abnormal probability of each power data.
At this time, a preset probability threshold is obtained, and it is determined whether the abnormal probability of each of the power data is greater than the preset probability threshold, for example, in an embodiment, if the abnormal probability of a certain power data is greater than the preset probability threshold, the power data is determined to be abnormal data, and thus an abnormal detection result of the corresponding data abnormality is generated.
In the embodiment of the invention, by adopting a mode of fusing models, the technical effect of effectively overcoming the defects of a single detection model is realized on the basis of taking the advantages of each detection model into consideration, so that the intelligent and automatic abnormity detection of the power system is realized, the detection efficiency and the detection accuracy in the abnormity detection process are effectively improved, and the normal detection requirements of enterprises are met.
In an embodiment of the present invention, the detection method further includes: acquiring corresponding abnormal data under the condition that the abnormal detection result is data abnormality; extracting abnormal parameters of the abnormal data; determining a processing priority of the exception data based on the exception parameter; performing a sequential output operation on the exception data based on the processing priority.
Further, in this embodiment of the present invention, the determining the processing priority of the abnormal data based on the exception parameter includes: acquiring a mapping relation between the processing priority and the abnormal parameter, wherein the mapping relation is characterized in that: p ═ D + k × L; wherein k is a preset slope of the mapping relation; and determining the processing priority of the abnormal data based on the mapping relation and the abnormal parameters.
In the prior art, when some power data is detected to be abnormal, the abnormal data is often directly input into an expert system for abnormal analysis and abnormal processing, however, in the actual application process, because different abnormalities have different degrees of influence on the power line and the time consumed by experts for solving different abnormal data is also different, the existing abnormal processing method causes the conditions of low abnormal processing efficiency and unreasonable abnormal processing (more important conditions such as abnormal hysteresis processing) and therefore cannot meet the actual abnormal processing requirements of enterprises.
Therefore, in a possible embodiment, after the above-mentioned abnormality detection result is obtained, if the abnormality detection result is a data abnormality, the corresponding abnormal data is obtained, and at this time, the abnormal parameter of the abnormal data is further extracted, for example, the abnormal parameter includes but is not limited to a first abnormal parameter D and a second abnormal parameter L, for example, the first abnormal parameter D is a solution consumption time of the abnormal data, the second abnormal parameter L is a degree of influence of the abnormal data on the power system, and the abnormal parameter corresponding to each power data may be saved in a database by a technician in advance and automatically called by the power system when the power data is the abnormal data.
At this time, a mapping relationship between the processing priority of each piece of power data and the abnormal parameter is obtained, and in the embodiment of the present invention, the mapping relationship may be characterized as a linear mapping relationship of P ═ D + k ×, L, where k is characterized as a preset slope of the mapping relationship. According to the mapping relationship, the processing priority of each abnormal data can be determined, and preferably, in the embodiment of the present invention, the processing priority is uniquely allocated, that is, each processing priority corresponds to only one abnormal data. At this time, the sequential output operation is performed on the abnormal data according to the processing priority, for example, each abnormal data is sequentially output to the expert system according to the processing priority, so as to achieve the technical effects of processing the abnormal data with a larger influence degree in a higher priority mode or processing the abnormal data with a larger consumption time in a lagging mode.
In the embodiment of the invention, by adopting the priority-based exception handling method, the exception data handling efficiency can be effectively improved, the influence of the exception data on the power system is reduced, the operation safety of the power system is improved, and the actual requirements of enterprises are met.
An abnormality detection device for an electric power system according to an embodiment of the present invention will be described below with reference to the drawings.
Referring to fig. 4, based on the same inventive concept, an embodiment of the present invention provides an abnormality detection apparatus for an electric power system, including: a first acquisition unit configured to acquire power information of a power system, the power information including a plurality of power data; the second acquisition unit is used for acquiring a preset fusion detection model; the analysis unit is used for analyzing the electric power information based on the preset fusion detection model to obtain analyzed information; the processing unit is used for processing the analyzed information based on the preset fusion detection model to obtain processed information; a detection unit configured to generate an abnormality detection result of the power system based on the processed information.
In an embodiment of the present invention, the second obtaining unit includes: the model establishing module is used for establishing a first initial model and a second initial model; the data acquisition module is used for acquiring a preset experiment data set and generating training data based on the preset experiment data set; the first training module is used for training the first initial model based on the training data to obtain a cluster detection model; the first intermediate information acquisition module is used for acquiring a first cluster and a first cluster center of the training data based on the cluster detection model; the second intermediate information acquisition module is used for acquiring a first distance between the training data and the first cluster center; the data processing module is used for processing the training data based on the first cluster and the first distance to obtain processed training data; the second training module is used for training the second initial model based on the processed training data to obtain a classification detection model; and the fusion module is used for executing fusion operation on the clustering detection model and the classification detection model to obtain the preset fusion detection model.
In this embodiment of the present invention, the second obtaining unit further includes a testing module, and the testing module is configured to: generating test data corresponding to the training data based on the preset experimental data set; processing the test data based on the first cluster and the first distance to obtain processed test data; and verifying the preset fusion detection model based on the processed test data.
In an embodiment of the present invention, after the verifying the preset fusion detection model based on the processed test data, the test module is further configured to: acquiring corresponding optimization parameters based on a verification result under the condition that the preset fusion detection model does not meet the preset detection requirement as the verification result; and optimizing the preset fusion detection model based on the optimization parameters to obtain the optimized preset fusion detection model.
In an embodiment of the present invention, the analysis unit includes: the preprocessing module is used for preprocessing the power information to obtain preprocessed information; the conversion module is used for executing conversion processing on the preprocessed information to obtain converted information; a third intermediate information obtaining module, configured to perform clustering processing on the converted information based on the preset fusion detection model, and obtain at least one second cluster and a second cluster center corresponding to the converted information; the fourth intermediate information acquisition module is used for acquiring a second distance between each piece of electric power data and the corresponding second cluster center; an analysis information generation module to generate the analyzed information based on the power information, the second cluster, and the second distance.
In an embodiment of the present invention, the preprocessing module is configured to: extracting ratio information of which the type is a ratio type in the electric power information; performing reference alignment operation on the ratio information to obtain aligned information; and updating the electric power information based on the aligned information to obtain preprocessed information.
In this embodiment of the present invention, the performing conversion processing on the preprocessed information to obtain converted information includes: acquiring a preset data format; performing data extraction on the preprocessed information to obtain extracted data; and carrying out format conversion on the extracted data based on the preset data format to obtain converted information.
In an embodiment of the present invention, the processing unit includes: the classification module is used for classifying the analyzed information based on the preset fusion detection model to obtain classification information of each electric power data, wherein the classification information comprises the abnormal probability of the electric power data; and the determining module is used for taking the classification information as the processed information.
In an embodiment of the present invention, the generating an abnormality detection result of the power system based on the processed information includes: acquiring a preset probability threshold; judging whether the abnormal probability of the power data is greater than the preset probability threshold value or not; generating an abnormal detection result of data abnormality under the condition that the abnormal probability of the power data is greater than the preset probability threshold; and generating an abnormal detection result with normal data under the condition that the abnormal probability of the power data is less than or equal to the preset probability threshold.
In this embodiment of the present invention, the detection apparatus further includes a priority processing unit, and the priority processing unit includes: the abnormal data acquisition module is used for acquiring corresponding abnormal data under the condition that the abnormal detection result is data abnormality; the abnormal parameter extraction module is used for extracting abnormal parameters of the abnormal data; a priority determination module for determining a processing priority of the abnormal data based on the abnormal parameter; and the output module is used for executing sequential output operation on the abnormal data based on the processing priority.
In this embodiment of the present invention, the determining the processing priority of the abnormal data based on the exception parameter includes: acquiring a mapping relation between the processing priority and the abnormal parameter, wherein the mapping relation is characterized in that: p ═ D + k × L; wherein k is a preset slope of the mapping relation; and determining the processing priority of the abnormal data based on the mapping relation and the abnormal parameters.
Further, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the abnormality detection method for an electric power system according to the present invention.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the details of the above embodiments, and various simple modifications can be made to the technical solutions of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and the simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, the embodiments of the present invention do not describe every possible combination.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program, which is stored in a storage medium and includes several instructions to enable a single chip, a chip, or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, any combination of various different implementation manners of the embodiments of the present invention is also possible, and the embodiments of the present invention should be considered as disclosed in the embodiments of the present invention as long as the combination does not depart from the spirit of the embodiments of the present invention.