A model building method and device for abnormal detection of power distribution terminals

By adopting the integrated learning method of reconstructed model and prediction model in the abnormal detection of distribution terminals, combined with the training method of labeled data and unlabeled data, the problem of insufficient detection accuracy and reliability in the prior art is solved, and the abnormal detection effect of high accuracy and high reliability is achieved.

CN114595837BActive Publication Date: 2025-04-11STATE GRID JIANGSU ELECTRIC POWER CO LTD TAIZHOU POWER SUPPLY BRANCH +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210250961.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-04-11
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

The existing distribution terminal abnormality detection methods have general usage and performance problems in big data processing, resulting in insufficient detection accuracy and poor reliability.

Method used

The integrated learning method of reconstructing the model and prediction model is adopted to detect abnormalities on the power distribution terminal monitoring information system, use marked data and unlabeled data for training, and adjust the hyperparameters of the error function and the data set marking ratio to improve the generalization ability and detection accuracy of the model.

Benefits of technology

The high accuracy and reliability of the model are achieved, and the problems of high labeling costs and low accuracy of labeling without labeling data are overcome, which reduces the cost of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595837B_ABST
    Figure CN114595837B_ABST
Patent Text Reader

Abstract

The present invention discloses a model building method and device for abnormality detection of power distribution terminals, the method comprising: collecting status data of the power distribution terminals; preprocessing the status data to obtain a training set and a test set; training a pre-established reconstruction model and a prediction model respectively according to the training set; inputting the test set into the trained reconstruction model to obtain reconstructed data; inputting the reconstructed data into the trained prediction model to obtain anomaly detection results; the method integrates the reconstruction model and the prediction model, and the model has strong generalization ability, high detection accuracy and strong reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power distribution anomaly detection, and in particular to a model building method and device for power distribution terminal anomaly detection. Background Art

[0002] In the distribution network system, with the large-scale construction of distribution network automation, its terminal equipment is updated quickly, the number is large, and the amount of information is large. The access acceptance work of distribution network terminals has increased exponentially. The anomaly detection technology of distribution terminals is worthy of study.

[0003] The main purpose of anomaly detection is to find some data that is out of the overall data distribution and define it as anomaly points. After being extended to the field of time series, anomaly detection has developed two branches: collective anomaly detection and novel point detection. Anomaly detection involves many fields, such as medical care, data security, network intrusion, fraud, aviation, etc., and is widely used in discrete data, graphic data and time series. Anomaly detection of distribution terminals is an application of anomaly detection in the field of time series.

[0004] Before the emergence of machine learning, research related to anomaly detection was based on probability distribution statistical methods. With the continuous advancement of anomaly detection research, research related to anomaly detection technology based on clustering has gradually increased. Clustering method is a kind of unsupervised learning method. The clustering idea considers using Euclidean distance to measure the similarity between data, and clustering data with high similarity to form a cluster, thereby performing grouping operations on data.

[0005] For example, patent document CN113344134A discloses a method for detecting data collection anomalies of low-voltage power distribution monitoring terminals. First, data samples of the low-voltage power distribution terminals are collected and a data set is constructed. Then, the data set is standardized and cleaned based on the Z-score standardization method. Then, a density-based clustering algorithm is used to perform cluster analysis on the pre-processed data samples of the low-voltage power distribution terminals to obtain abnormal data samples. Then, the number of abnormal data samples is used to determine whether the low-voltage power distribution terminal has data collection anomalies.

[0006] This scheme adopts a density clustering algorithm. After clustering the data, the size and density of the cluster can be determined, and abnormal clusters can be detected when they exist in the data. However, when this scheme is applied to big data processing, since the data used is unlabeled data, there are problems with versatility and performance. The accuracy of abnormal detection of distribution terminals is insufficient, and the reliability of the detection method is poor. Summary of the invention

[0007] The present invention provides a model building method and device for abnormality detection of distribution terminals. Both labeled data and unlabeled data are used to perform abnormality detection on the distribution terminal monitoring information system based on an integrated learning method of a reconstruction model and a prediction model. The model has strong generalization ability, high detection accuracy and strong reliability.

[0008] A model building method for abnormality detection of power distribution terminals, comprising:

[0009] Collect status data of power distribution terminals;

[0010] Preprocessing the state data to obtain a training set and a test set;

[0011] The pre-established reconstruction model and prediction model are trained respectively according to the training set;

[0012] Inputting the test set into the trained reconstruction model to obtain reconstructed data;

[0013] The reconstructed data is input into the trained prediction model to obtain anomaly detection results.

[0014] Further, the state data is preprocessed, including:

[0015] performing normalization processing on the state data;

[0016] Perform segmentation processing on each normalized state data respectively to obtain segmented state data;

[0017] The segmented state data is divided to obtain a training set and a test set.

[0018] Furthermore, the input dimension of the reconstruction model is the same as the input dimension of the prediction model, and the output dimension of the reconstruction model is the same as the output dimension of the prediction model.

[0019] Furthermore, the pre-established reconstruction model and prediction model are trained respectively according to the training set, including:

[0020] Initializing parameters of the reconstruction model and the prediction model respectively, and setting the maximum number of iterations, the number of hidden layers and the number of neurons;

[0021] Inputting the training set into the reconstruction model and the prediction model respectively for training once until the reconstruction model and the prediction model converge;

[0022] The hyperparameters of the loss function of the prediction model are adjusted, and the prediction model is trained twice according to the training set until convergence.

[0023] Furthermore, the data in the training set includes labeled segmented state data and unlabeled segmented state data.

[0024] Furthermore, the loss function of the prediction model is:

[0025]

[0026] Among them, m represents the number of unlabeled segmentation state data, n represents the number of labeled segmentation state data, γ is a hyperparameter, and s i represents the i-th segment state data in the training set, Represents the reconstructed data corresponding to the segmented state data, represents the marked segment status data, j represents the jth marked segment status data, Represents the reconstructed data corresponding to the labeled segmented state data, y si Represents the segment status data with a tag Abnormal data identification, y si =1 means the marked segment status data is normal data, y si =0 means the marked segment status data is abnormal data, represents the prediction error of the i-th segment state data in the training set, Represents the prediction error of the labeled segment state data. .

[0027] Further, after the prediction model is trained twice according to the training set until convergence, it also includes:

[0028] The proportion of labeled data in the training set is adjusted to form multiple training sets with different proportions of labeled data to train the reconstruction model and the prediction model again until the reconstruction model and the prediction model converge, and the parameters of the reconstruction model and the prediction model are saved.

[0029] Furthermore, after inputting the reconstructed data into the trained prediction model to obtain the anomaly detection result, the method further includes:

[0030] A prediction result error of the anomaly detection result is calculated.

[0031] Furthermore, the prediction result error is calculated by the following formula:

[0032]

[0033] Among them, P i is the prediction result error, r i is the i-th segment state data in the test set, is the predicted output corresponding to the i-th segment state data, and L is the length of the segment state data.

[0034] A model building device for abnormality detection of power distribution terminals, comprising:

[0035] A collection module, used to collect status data of the power distribution terminal;

[0036] A preprocessing module, used for preprocessing the state data to obtain a training set and a test set;

[0037] A training module, used to train the pre-established reconstruction model and prediction model respectively according to the training set;

[0038] A reconstruction module, used for inputting the test set into the trained reconstruction model to obtain reconstructed data;

[0039] The detection module is used to input the reconstructed data into the trained prediction model to obtain anomaly detection results.

[0040] The model building method and device for power distribution terminal anomaly detection provided by the present invention have at least the following beneficial effects:

[0041] (1) The reconstruction model and the prediction model are integrated for learning. The data is first reconstructed and then the reconstruction results are predicted. The final prediction results are used for anomaly analysis. The model classifiers can correct each other, making the model more versatile and accurate.

[0042] (2) Using both labeled data and unlabeled data to train the model can overcome both the high labeling cost of labeled data and the low detection accuracy of unlabeled data. The resulting model has high detection accuracy and strong reliability, and the model training cost is controllable.

[0043] (3) During the training process, the hyperparameters of the error function and the weight of the data set labels are adjusted to obtain multiple training model parameter files, which reduces the workload of anomaly detection and improves the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 The present invention is a flowchart of an embodiment of a method for establishing a model for abnormality detection of power distribution terminals provided by the present invention.

[0045] Figure 2 A flowchart of an embodiment of the model training method in the method provided by the present invention.

[0046] Figure 3 A schematic structural diagram of an embodiment of a model building device for power distribution terminal anomaly detection provided by the present invention.

[0047] Figure numerals: 1-acquisition module, 2-preprocessing module, 3-training module, 4-reconstruction module, 5-detection module. DETAILED DESCRIPTION

[0048] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0049] refer to Figure 1 In some embodiments, a model building method for power distribution terminal anomaly detection is provided, comprising:

[0050] S1. Collect status data of power distribution terminals;

[0051] S2. Preprocess the state data to obtain a training set and a test set;

[0052] S3, training the pre-established reconstruction model and prediction model respectively according to the training set;

[0053] S4, inputting the test set into the trained reconstruction model to obtain reconstructed data;

[0054] S5. Input the reconstructed data into the trained prediction model to obtain anomaly detection results.

[0055] Specifically, in step S1, the status data of the power distribution terminal is time series data. Compared with traditional discrete data, time series has the following two special features: first, apart from time dependence, there may be trend mutations and seasonality between data; second, the labeling cost of time series is high, because the abnormal judgment of time series requires context analysis and comparison, so manual time series labeling is very challenging and costly.

[0056] In step S2, the state data is preprocessed, including:

[0057] S21, normalizing the state data;

[0058] S22, performing segmentation processing on each normalized state data to obtain segmented state data;

[0059] S23, dividing the segmented state data to obtain a training set and a test set.

[0060] Specifically, in step S21, the state data obtained in step S1 is represented as T = {x1, x2, ..., x n}, where the maximum value of the data is x max , the minimum value is x minSince the value ranges of time series data in different time periods are different, in order to avoid the decline of data distribution learning ability caused by inconsistent data units, in some embodiments, the value ranges of all state data are normalized by min-max normalization, and the conversion function used for normalization is expressed by the following formula:

[0061]

[0062] Among them, T′ is the normalized data set, x i is the original value of the i-th state data, is the normalized value of the i-th state data, x max is the maximum value in the state data, x min is the minimum value in the status data, and n is the total number of status data.

[0063] In step S22, since the time series data has a long duration, the normalized state data is segmented to divide a long time series into many shorter time segments. In some embodiments, the segmentation operation uses a sliding window to segment the time series data, specifically, taking a sliding window with a length of k, setting the sliding step size to 1, and performing a segmentation operation on the normalized state data T′ to obtain segmented state data.

[0064] The segment status data is expressed by the following formula:

[0065] S={(s i ,r i ,y i ),(s2,y2,y2),......,(s n-k ,r n-k ,y n-k )};

[0066] Among them, s i is the i-th segment state data, r i is the predicted data of the i-th segment state data (obtained after the prediction model predicts the output), y i is the abnormal mark of the i-th data segment, n is the total number of segmented state data, k is the length of the sliding window, and S is the normalized state data.

[0067] In some embodiments, the segmented status data is marked according to the marking of the status data, specifically: when the status data is unmarked, the segmented status data is marked as 1; when the status data is marked, the segmented status data is marked as the corresponding mark in the source data set.

[0068] In step S3, the input dimension of the reconstruction model is the same as the input dimension of the prediction model, and the output dimension of the reconstruction model is the same as the output dimension of the prediction model, so that the output of the reconstruction model can be used as the input of the prediction model.

[0069] In some embodiments, the reconstruction model adopts the SS-LSTM-AAE (Semi-supervised Autoencoder based on LSTM and attention mechanism) model, and the prediction model adopts the semi-supervised LSTM prediction model, namely the SS-LSTM-pre (Semi-supervised LSTM prediction model) model. The above two models are integrated to obtain a semi-supervised anomaly detection model based on ensemble learning, and a small amount of labeled data is used to analyze a large amount of unlabeled data. The input and output dimensions of the SS-LSTM-AAE model are unified with the input dimensions of the SS-LSTM-pre model.

[0070] Among them, the semi-supervised anomaly detection model refers to a detection model that uses a semi-supervised learning method. According to the characteristic of whether the training process depends on the labeling of the data itself, machine learning methods are divided into supervised learning, unsupervised learning and semi-supervised learning. Supervised learning uses data with its own labels to train the model, and adjusts the parameters of the classifier through training to make the classifier achieve the best performance. In supervised learning, each set of instance data needs to contain an input data and an expected output data. The supervised learning method learns the mapping from input to output by analyzing such instance data, so that the model can output its mapped output for any valid input. The model has high accuracy, but the manpower and time cost of data labeling are also high; unsupervised learning does not rely on data labeling, and does not learn the mapping from input to output, but learns the distribution characteristics of the data itself, clusters similar data together, and divides unlabeled data into many combinations, so as to achieve the purpose of classification. It is difficult to classify data with too high or too low dimensions, and the accuracy is insufficient. Semi-supervised learning uses a small amount of labeled data to analyze a large amount of unlabeled data. It is a compromise between supervised learning and unsupervised learning in time series data.

[0071] Among them, LSTM autoencoder is used in the reconstruction model and prediction model. Autoencoder is a neural network based on semi-supervised learning method for extracting effective features from data. By training the network, the autoencoder can learn data encoding without being affected by data noise. Autoencoder generally simplifies data by data dimension reduction. In addition, the autoencoder can also reconstruct data encoding through a decoder to generate data that is very similar to the original input data, and through continuous training of the model, the error between the final output data and the original data is as close to zero as possible. Autoencoder is a special artificial neural network. By setting the encoder and decoder of the same network structure, the encoder can encode the input data to extract effective data features, and the decoder can restore the compressed data features and restore them to the original features as much as possible. The autoencoder needs to be able to find the main features of the original input data as much as possible and compress them into the final data, so as to achieve a high degree of reproduction of the original data. The reconstruction model and prediction model provided here both use LSTM autoencoder.

[0072] Among them, ensemble learning refers to integrating multiple weak classifiers to form a stronger classifier with greater versatility and higher accuracy. When a weak classifier outputs an incorrect result, the error can be corrected by outputting the correct result through the remaining weak classifiers. According to the goals to be achieved by the integration, ensemble learning includes the Bagging method for reducing variance, the Boosting method for reducing deviation, and the Stacking method for improving prediction results. This embodiment integrates the SS-LSTM-AAE model with the SS-LSTM-pre model to form a semi-supervised anomaly detection model SS-LSTM-PAAE based on ensemble learning.

[0073] refer to Figure 2 In some embodiments, the pre-established reconstruction model and prediction model are trained separately according to the training set, including:

[0074] S31, respectively initializing parameters of the reconstruction model and the prediction model, and setting the maximum number of iterations, the number of hidden layers and the number of neurons;

[0075] S32, inputting the training set into the reconstruction model and the prediction model respectively for training until the reconstruction model and the prediction model converge;

[0076] S33: Adjust the hyperparameters of the loss function of the prediction model, and perform secondary training on the prediction model according to the training set until convergence.

[0077] In some embodiments, the data in the training set includes labeled segment state data and unlabeled segment state data.

[0078] Among them, one training is basic training, and the training set is input into the SS-LSTM-AAE model and the SS-LSTM-pre model for model training respectively until the model converges. As a preferred implementation method, the condition for model convergence is that the change value of the loss function of the model after each round of training is less than the preset value, and the model parameters obtained by training are saved as the model parameters obtained by one training.

[0079] The loss function of the reconstruction model is:

[0080]

[0081] in, t represents the time step, l represents the length of the sliding window, and s i represents the i-th segment state data in the training set, Indicates the corresponding segment status data s i The reconstructed data, represents the prediction error of the i-th segment state data in the training set, x j Represents the i-th segment state data s in the training set i The jth data segment in represents the reconstructed data of the jth data segment;

[0082] The loss function of the prediction model is:

[0083]

[0084] Among them, m represents the number of unlabeled segmentation state data, n represents the number of labeled segmentation state data, γ is a hyperparameter, and s i represents the i-th segment state data in the training set, Represents the reconstructed data corresponding to the segmented state data, represents the marked segment status data, j represents the jth marked segment status data, Represents the reconstructed data corresponding to the labeled segmented state data, y si Represents the segment status data with a tag Abnormal data identification, y si =1 means the marked segment status data is normal data, y si =0 means the marked segment status data is abnormal data, represents the prediction error of the i-th segment state data in the training set, Represents the prediction error for labeled segment state data.

[0085] In the second training, the hyperparameter γ in the loss function of the prediction model is adjusted to adjust the label weight.

[0086] After step S33, it also includes: adjusting the proportion of labeled data in the training set to form multiple training sets with different proportions of labeled data to re-train the reconstruction model and the prediction model until the reconstruction model and the prediction model converge, and saving the parameters of the reconstruction model and the prediction model.

[0087] In some embodiments, the proportion of labeled data in the training set is adjusted to form three segmented state data training sets with 20% labeled data proportion, 30% labeled data proportion and 50% labeled data proportion, and then the above training sets are input into the reconstruction model, and the reconstruction model and the prediction model are trained again until the reconstruction model and the prediction model converge, and the parameters of the reconstruction model and the prediction model are saved. At this point, the model training is completed.

[0088] In step S4, in some specific embodiments, the SS-LSTM-AAE model is used as the first part of the SS-LSTM-PAAE model, the test set is input into the SS-LSTM-AAE model, and the result reconstructed by the SS-LSTM-AAE model is output, and the result reconstructed by the SS-LSTM-AAE model is the reconstructed data.

[0089] In step S5, in some specific embodiments, the SS-LSTM-pre model is used as the second part of the SS-LSTM-PAAE model, and the result reconstructed by the SS-LSTM-AAE model is used as the input of the SS-LSTM-pre model for prediction operation, and finally the prediction result of the SS-LSTM-pre model, i.e., the prediction data, is output. The prediction data is the final output result of the SS-LSTM-PAAE model.

[0090] In some embodiments, the SS-LSTM-pre model includes an LSTM layer and a fully connected layer.

[0091] After inputting the reconstructed data into the trained prediction model to obtain the abnormality detection result, the method further includes: calculating the prediction result error of the abnormality detection result. The prediction result error is calculated by the following formula:

[0092]

[0093] Among them, P i is the prediction result error, r i is the i-th segment state data in the test set, is the predicted output corresponding to the i-th segment state data, and L is the length of the segment state data.

[0094] The prediction result error is used to evaluate the accuracy of the model.

[0095] refer to Figure 3 In some embodiments, a model building device for abnormality detection of a power distribution terminal is provided, comprising:

[0096] Collection module 1, used to collect status data of power distribution terminals;

[0097] Preprocessing module 2, used for preprocessing the state data to obtain a training set and a test set;

[0098] A training module 3 is used to train the pre-established reconstruction model and prediction model respectively according to the training set;

[0099] A reconstruction module 4 is used to input the test set into the trained reconstruction model to obtain reconstructed data;

[0100] The detection module 5 is used to input the reconstructed data into the trained prediction model to obtain anomaly detection results.

[0101] Furthermore, the preprocessing module 2 is also used for:

[0102] performing normalization processing on the state data;

[0103] Perform segmentation processing on each normalized state data respectively to obtain segmented state data;

[0104] The segmented state data is divided to obtain a training set and a test set.

[0105] The conversion function used for normalization is expressed by the following formula:

[0106]

[0107] Among them, x i is the original value of the i-th state data, is the normalized value of the i-th state data, x max is the maximum value in the state data, x min is the minimum value in the status data, and n is the total number of status data.

[0108] The segment status data is expressed by the following formula:

[0109] S={(s i ,r i ,y i ),(s2,y2,y2),......,(s n-k ,r n-k ,yn-k )};

[0110] Among them, s i is the i-th segment state data, r i is the predicted data of the i-th segment state data (obtained after the prediction model predicts the output), y i is the abnormal mark of the i-th data segment, n is the total number of segmented state data, k is the length of the sliding window, and S is the normalized state data.

[0111] In the training module 3, the input dimension of the reconstruction model is the same as the input dimension of the prediction model, and the output dimension of the reconstruction model is the same as the output dimension of the prediction model.

[0112] The training module 3 is also used for:

[0113] Initializing parameters of the reconstruction model and the prediction model respectively, and setting the maximum number of iterations, the number of hidden layers and the number of neurons;

[0114] Inputting the training set into the reconstruction model and the prediction model respectively for training once until the reconstruction model and the prediction model converge;

[0115] The hyperparameters of the loss function of the prediction model are adjusted, and the prediction model is trained twice according to the training set until convergence.

[0116] The data in the training set includes labeled segmented state data and unlabeled segmented state data.

[0117] Among them, the loss function of the reconstruction model is:

[0118]

[0119] in, t represents the time step, l represents the length of the sliding window, and s i represents the i-th segment state data in the training set, Indicates the corresponding segment status data s i The reconstructed data, represents the prediction error of the i-th segment state data in the training set, x j Represents the i-th segment state data s in the training set i The jth data segment in represents the reconstructed data of the jth data segment;

[0120] The loss function of the prediction model is:

[0121]

[0122] Among them, m represents the number of unlabeled segmentation state data, n represents the number of labeled segmentation state data, γ is a hyperparameter, and s i represents the i-th segment state data in the training set, Represents the reconstructed data corresponding to the segmented state data, represents the marked segment status data, j represents the jth marked segment status data, Represents the reconstructed data corresponding to the labeled segmented state data, y si Represents the segment status data with a tag Abnormal data identification, y si =1 means the marked segment status data is normal data, y si =0 means the marked segment status data is abnormal data, represents the prediction error of the i-th segment state data in the training set, Represents the prediction error for labeled segment state data.

[0123] The training module 3 is also used for:

[0124] The proportion of labeled data in the training set is adjusted to form multiple training sets with different proportions of labeled data to train the reconstruction model and the prediction model again until the reconstruction model and the prediction model converge, and the parameters of the reconstruction model and the prediction model are saved.

[0125] The detection module 5 is also used to calculate the prediction result error of the abnormal detection result.

[0126] The prediction result error is calculated by the following formula:

[0127]

[0128] Among them, P i is the prediction result error, r i is the i-th segment state data in the test set, is the predicted output corresponding to the i-th segment state data, and L is the length of the segment state data.

[0129] The distribution terminal anomaly detection method and device based on integrated learning provided in this embodiment integrate the reconstruction model and the prediction model for learning, first reconstruct the data, then predict the reconstruction result, and use the final prediction result to perform anomaly analysis. The model classifiers form an error correction effect on each other, and the model is more versatile and more accurate. At the same time, labeled data and unlabeled data are used to train the model, which can overcome the problem of high labeling cost of labeled data and the problem of low detection accuracy of unlabeled data. The obtained model has high detection accuracy and reliability, and the model training cost is controllable. During the training process, the hyperparameters of the error function and the labeling proportion of the data set are adjusted to obtain multiple training model parameter files, which reduces the workload of anomaly detection and improves the accuracy of anomaly detection.

[0130] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A model building method for abnormality detection of power distribution terminals, characterized in that: include: Collect status data of power distribution terminals; Preprocessing the state data to obtain a training set and a test set; The pre-established reconstruction model and prediction model are trained respectively according to the training set; Inputting the test set into the trained reconstruction model to obtain reconstructed data; Inputting the reconstructed data into the trained prediction model to obtain anomaly detection results; Preprocessing the state data includes: performing normalization processing on the state data; Perform segmentation processing on each normalized state data respectively to obtain segmented state data; Dividing the segmented state data to obtain a training set and a test set; The data in the training set includes labeled segmented state data and unlabeled segmented state data; The loss function of the prediction model is: Among them, m represents the number of unlabeled segmentation state data, n represents the number of labeled segmentation state data, γ is a hyperparameter, and s i represents the i-th segment state data in the training set, Represents the reconstructed data corresponding to the segmented state data, represents the marked segment status data, j represents the jth marked segment status data, Represents the reconstructed data corresponding to the labeled segmented state data, y si Represents the segment status data with a tag Abnormal data identification, y si =1 means the marked segment status data is normal data, y si =0 means the marked segment status data is abnormal data, represents the prediction error of the i-th segment state data in the training set, Represents the prediction error for labeled segment state data.

2. The method according to claim 1, characterized in that The input dimension of the reconstruction model is the same as the input dimension of the prediction model, and the output dimension of the reconstruction model is the same as the output dimension of the prediction model.

3. The method according to claim 2, characterized in that The pre-established reconstruction model and prediction model are trained respectively according to the training set, including: Initializing parameters of the reconstruction model and the prediction model respectively, and setting the maximum number of iterations, the number of hidden layers and the number of neurons; Inputting the training set into the reconstruction model and the prediction model respectively for training once until the reconstruction model and the prediction model converge; The hyperparameters of the loss function of the prediction model are adjusted, and the prediction model is trained twice according to the training set until convergence.

4. The method according to claim 3, characterized in that After the prediction model is trained twice according to the training set until convergence, the method further includes: The proportion of labeled data in the training set is adjusted to form multiple training sets with different proportions of labeled data to train the reconstruction model and the prediction model again until the reconstruction model and the prediction model converge, and the parameters of the reconstruction model and the prediction model are saved.

5. The method according to claim 1, characterized in that After inputting the reconstructed data into the trained prediction model to obtain the anomaly detection result, the method further includes: A prediction result error of the anomaly detection result is calculated.

6. The method according to claim 5, characterized in that The prediction result error is calculated by the following formula: Among them, P i is the prediction result error, r i is the i-th segment state data in the test set, is the predicted output corresponding to the i-th segment state data, and L is the length of the segment state data.

7. A model building device for abnormality detection of power distribution terminals, characterized in that: include: A collection module, used to collect status data of the power distribution terminal; A preprocessing module, used for preprocessing the state data to obtain a training set and a test set; A training module, used to train the pre-established reconstruction model and prediction model respectively according to the training set; A reconstruction module, used for inputting the test set into the trained reconstruction model to obtain reconstructed data; A detection module, used for inputting the reconstructed data into a trained prediction model to obtain an anomaly detection result; The preprocessing module is also used for: Preprocessing the state data includes: performing normalization processing on the state data; Perform segmentation processing on each normalized state data respectively to obtain segmented state data; Dividing the segmented state data to obtain a training set and a test set; The data in the training set includes labeled segmented state data and unlabeled segmented state data; The loss function of the prediction model is: Among them, m represents the number of unlabeled segmentation state data, n represents the number of labeled segmentation state data, γ is a hyperparameter, and s i represents the i-th segment state data in the training set, Represents the reconstructed data corresponding to the segmented state data, represents the marked segment status data, j represents the jth marked segment status data, Represents the reconstructed data corresponding to the labeled segmented state data, y si Represents the segment status data with a tag Abnormal data identification, y si =1 means the marked segment status data is normal data, y si =0 means the marked segment status data is abnormal data, represents the prediction error of the i-th segment state data in the training set, Represents the prediction error for labeled segment state data.

Citation Information

Patent Citations

  • Low-voltage power distribution monitoring terminal data acquisition anomaly detection method and system

    CN113344134A

  • Mixed model multivariate time sequence anomaly detection method based on graph neural network

    CN113516226A