A comprehensive verification system and verification methods based on data characteristics

By employing a verification method based on time series similarity and IPSO-PCSVM, the complexity of power grid and user behavior in the context of new energy big data is addressed, enabling efficient detection and accurate classification of electricity user behavior.

CN113887555BActive Publication Date: 2026-05-26STATE GRID HEBEI ELECTRIC POWER CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID HEBEI ELECTRIC POWER CO LTD
Filing Date
2021-08-27
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In the context of new energy big data, the interactions between power grid behavior, user behavior, environmental demand and demand-side resource operation are complex. Existing technologies are unable to effectively analyze and quantify the influencing factors, and unbalanced datasets have low detection efficiency for analyzing power load consumption behavior.

Method used

We employ a data feature verification system based on time series similarity and IPSO-PCSVM. By optimizing similarity metrics and penalty parameters, and combining secondary verification with IPSO-PCSVM, we mitigate the impact of imbalanced datasets and improve detection efficiency.

Benefits of technology

It enables efficient detection of electricity user behavior in imbalanced datasets, reduces secondary verification of normal users, and improves verification accuracy and classification performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887555B_ABST
    Figure CN113887555B_ABST
Patent Text Reader

Abstract

This invention relates to a comprehensive verification system based on data characteristics, comprising the following steps: (1) Data feature verification based on time series similarity, initially determining target users through a similarity measurement process, and ensuring that the minimum number of normal users undergo secondary verification, initially balancing the quantity gap between normal and abnormal samples during secondary verification; (2) Data feature verification system based on IPSO-PCSVM; (3) Simulation and analysis of examples. In the context of new energy big data, there are complex mutual influences between power grid behavior, user behavior, environmental demand, and demand-side resource operation. There are numerous mutual influencing factors and complex interactions. By analyzing the influence weights between interactive influencing factors and quantifying their effects, a comprehensive verification system for new energy operation data based on data characteristics is constructed, thereby providing a systematic analysis method for new energy big data analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of meteorological research technology, and in particular to a comprehensive verification system and verification method based on data characteristics. Background Technology

[0002] In the context of new energy big data, there are intricate interactions between power grid behavior, user behavior, environmental demands, and demand-side resource operation. These interactions are characterized by numerous factors and complex mechanisms, necessitating the analysis of the influence weights among these factors and the quantification of their specific impacts. Therefore, there is an urgent need to propose a big data mining model based on multidimensional load characteristic analysis to provide a systematic analytical method for analyzing power load consumption behavior. Furthermore, the characteristics of power user consumption behavior represent a new direction in smart grid research. These characteristics include: the classification and characteristics of power user loads, power user consumption behavior patterns, influencing factors and mechanisms of customer consumption behavior, and abnormal consumption behaviors. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a comprehensive verification system and method based on data characteristics, which further reduces the impact of imbalanced datasets. At the same time, the verification model can still improve the detection efficiency under imbalanced datasets.

[0004] The technical problem solved by this invention is achieved through the following technical solution:

[0005] A comprehensive verification system based on data characteristics, characterized by the following steps:

[0006] (1) Data feature verification based on time series similarity: target users are initially determined through similarity measurement process, and the minimum number of normal users are verified in the second verification. The difference in the number of normal samples and abnormal samples during the second verification is initially balanced.

[0007] (2) Data feature verification system based on IPSO-PCSVM. In this step, a secondary verification based on IPSO-PCSVM is performed. First, in order to further reduce the impact of imbalanced datasets, a verification based on PCSVM is proposed. The training sets of abnormal samples and normal samples are input to obtain the decision plane of PCSVM. Then, the parameters of PCSVM are optimized using IPSO. Finally, the target user obtained from the preliminary verification is input, and the PCSVM optimized by IPSO is used for secondary verification to output the target user's ID.

[0008] (3) Simulation and analysis of examples are used to evaluate the effectiveness of the verification system.

[0009] Furthermore, step (1) based on time series similarity data feature verification includes ① feature optimization of load characteristic indicators; ② fuzzy clustering based on kernel function optimization; and ③ similarity measurement method.

[0010] Furthermore, the preferred characteristics of the load characteristic index are selected through the following process:

[0011] a) Select a feature with a total of 1 feature. Given a feature with a total of 1 feature, calculate the feature with the best feature evaluation criteria and determine that feature as the first feature.

[0012] b. Select 2 features, add new features on top of the already selected features, and calculate the two features with the best evaluation criteria when the number of features is 2.

[0013] c selects i features, adds new features on top of the i-1 already selected features, and calculates the i features with the best evaluation criteria when the number of features is i.

[0014] d. Repeat the above steps until the accuracy is lower when selecting m+1 features than when selecting n features. Then determine the optimal number of features as m. The m features with the best evaluation criteria under the m features are the final selected features.

[0015] Furthermore, the ③ similarity measurement method obtains the daily load characteristic curve of the user through the KFCM clustering algorithm. This characteristic curve reflects the electricity consumption characteristics of such users under normal electricity consumption conditions. The similarity method based on time series is used to measure the degree of matching between the curve to be tested and the electricity consumption characteristic curve, and the target users are initially screened out.

[0016] The input data is obtained from the user's normal electricity consumption characteristic curve N = (n1, n2, ..., n m ) and the test curve H=(h1,h2,…,h) of the transformer area. m The difference between the characteristic curve X and the test curve Y is measured using Euclidean distance, and the calculation formula is shown in equation (43).

[0017]

[0018] While Euclidean distance can reflect numerical differences between curves, it cannot characterize morphological differences. To accurately depict the rising, falling, and stable morphological characteristics of curves at different time intervals, the slope of a straight line is used to represent the morphological characteristics of that time interval. Therefore, a time series of length m is reduced to a morphological series of length m-1.

[0019]

[0020] The sequences of morphological characteristics of the normal power consumption characteristic curve and the curve under test are N'=(n1,n2,…,nm-1 ) and H'=(h1,h2,…,h m-1 To align two sequences, a distance matrix needs to be constructed. Each element in the matrix represents the Euclidean distance.

[0021] D(i,j)=||n i -h j ||2 i=1,2,…,m-1; j=1,2,…,m-1 (45)

[0022] DTW path selection seeks the path with the minimum cumulative distance under the conditions of satisfying the three constraints of boundary conditions, continuity, and monotonicity.

[0023] A cumulative distance D' is constructed using dynamic programming. The cumulative distance D'(i,j) is the sum of the distance d(i,j) of the current grid point and the cumulative distance of the smallest neighboring element that can reach that point.

[0024] D'(i,j)=d(i,j)+min{D'(i-1,j-1),D'(i-1,j),D'(i,j-1)} (46)

[0025] The path with the shortest cumulative distance is the optimal path to that point; DTW can bend the time axis to match points and accurately measure the time series based on its shape; the calculation of the numerical and morphological similarity of the curve time series is shown in formula (47).

[0026]

[0027] In the formula: α and λ are the weights considering numerical value and morphology, respectively, where α + λ = 1;

[0028] In the similarity measurement process, the user's normal electricity consumption characteristic curve and the test curve of the transformer area obtained by clustering are input. First, the respective morphological sequences N' and H' are solved according to the formula. Then, the numerical and morphological similarity between the normal user's electricity consumption characteristic curve and the test curve is calculated using formula (47). Finally, the matching degree between the characteristic curve and the test curve is output. The target user is initially judged based on the obtained matching degree and the set threshold.

[0029] After multiple trials, the final selected thresholds were D2 = 3.5 and D1 = 0.8. The selection of these thresholds ensures that there are fewer normal users among the suspected users within the threshold range, while there are almost no target users among the normal users. This step narrows the scope of the secondary verification and alleviates the balance between normal and abnormal samples during the verification process.

[0030] Furthermore, step (2) is based on the IPSO-PCSVM data feature verification system, specifically including the following methods: ① a support vector machine with customized penalty parameters; ② parameter optimization of a comprehensively improved particle swarm algorithm; ③ verification process based on similarity measurement and IPSO-PCSVM.

[0031] Furthermore, the support vector machine with customized penalty parameters mentioned above assigns different weights to samples with different classification errors during the training process, given (x... i ,f i (i = 1, 2, ..., M) are training samples in the data sample set, where f i f represents the abnormal data feature index corresponding to the sample. i x ∈{-1, +1} i The tag where y i A value of +1 indicates abnormal user behavior, and N is the number of training samples. The support vector machine with the kernel function can then be represented as:

[0032]

[0033] In the formula: C i C is the penalty parameter for this sample. i The larger the sample size, the more importance it receives during training, and the more important it is to the classification decision plane.

[0034] To mitigate the impact of imbalanced samples, different penalty parameters are set for normal and abnormal samples, where C... i The determination of is made by equation (49);

[0035]

[0036] In the formula, u∈(0,1] is the emphasis coefficient for data imbalance, which reflects the importance of data imbalance in the hyperplane determination process. The smaller u is, the more important the data imbalance is considered.

[0037] Solving equation (49) will yield α * Then b * We can obtain the following from equation (50):

[0038]

[0039] The final decision plane can be represented as:

[0040]

[0041] Furthermore, step ③, based on similarity measurement and IPSO-PCSVM verification process, includes:

[0042] Step 1: Input the power load data of the transformer area to be tested. According to the generalized Kirchhoff's law, the sub-meter reading + network loss = total meter reading. If the network loss is too large, it is considered that there is a possibility of electricity theft in the transformer area.

[0043] Step 2: Input the electricity consumption data of the target transformer area for unsupervised learning verification. First, the KFCM clustering algorithm is used to classify the users in the transformer area and obtain the daily load electricity consumption characteristic curves of each type of user. Then, the numerical value and shape of the curves are considered comprehensively. Euclidean distance is used for numerical measurement, and DTW is used for shape measurement. The similarity between the characteristic curve and the curve to be tested is measured. Finally, different user types are determined according to the set threshold curve. This step balances the number of samples during verification.

[0044] Step 3: Based on the electricity metering data of the target users, calculate the new energy data characteristic index value of the users. On the basis of the PSO algorithm, the dynamic inertia coefficient is adjusted according to (54), the acceleration coefficient is adjusted according to (55) and (56), and the speed of the particle swarm is limited by (57) to obtain a comprehensive improved particle swarm optimization algorithm. Considering the influence of the imbalanced dataset, different emphasis coefficients are assigned to normal samples and abnormal samples, and the parameters of PCSVM are optimized using IPSO. The decision plane of PCSVM is obtained according to formula (51), and the different characteristic users obtained in step 2 are classified.

[0045] Step 4: Output verification results. Abnormal users can be identified using the labels obtained through supervised learning. Based on the output verification results, the accuracy rate, false positive rate, and other indicators of the verification are calculated to evaluate the verification model, and the model parameters are updated in real time.

[0046] Furthermore, the simulation and analysis of the example specifically include the following methods: ① verification of the evaluation index of the model; ② verification of new energy users based on similarity measurement; ③ verification algorithm based on IPSO-PCSVM.

[0047] Furthermore, the evaluation index of the verification model mentioned in ① adopts a confusion matrix, dividing all electricity users into T groups. P F P F N T N ,

[0048] Confusion Matrix

[0049]

[0050] Choose accuracy (r) AC ) and false positive rate (r PO As evaluation metrics for the model, their definitions are as follows:

[0051]

[0052] Where: N FP N represents the number of false positive samples detected. FN N represents the number of false negatives detected. TP N represents the number of true positive samples detected. TN This represents the number of true negative samples detected.

[0053] The advantages and positive effects of this invention are:

[0054] 1. In the context of new energy big data, there are complex interactions between power grid behavior, user behavior, environmental demand, and demand-side resource operation. These interactions are influenced by numerous factors and are complex. By analyzing the influence weights of these factors and quantifying their impact, this method constructs a comprehensive verification system for new energy operation data based on data characteristics. This provides a systematic analytical method for new energy big data analysis.

[0055] 2. In order to more reasonably and effectively characterize the similarity between the feature curve and the curve to be tested during the similarity measurement process, this method proposes an improved time series similarity measurement method. This method comprehensively considers the morphological and numerical characteristics of the curves, uses Euclidean distance to measure the numerical characteristics between the curves, and uses the DTW algorithm to measure the morphological characteristics between the curves. The target users are initially determined through the similarity measurement process, and the minimum number of normal users are required for secondary verification.

[0056] 3. To further mitigate the impact of imbalanced datasets and address the issue of parameters being overly reliant on manual or experimental selection during the secondary verification process, this method proposes a comprehensive and improved verification method using a particle swarm optimization algorithm to optimize a customized penalty parameter support vector machine. The final output users are highly likely to be target users, requiring manual screening to ensure that employees conduct targeted checks.

[0057] 4. This method, based on similarity measurement and IPSO-PCSVM verification, first determines the target transformer area based on the generalized law of flow conservation and the principle of energy matching. Then, in the similarity measurement process, it comprehensively considers the numerical and morphological characteristics of the curves, using Euclidean distance for numerical measurement and the DTW algorithm for morphological measurement. Based on the magnitude of the measurement values, the target user is initially determined, balancing normal and abnormal samples during verification. Finally, supervised learning is used for secondary verification, proposing a verification algorithm based on IPSO-optimized PCSVM, overcoming the subjectivity of parameter selection and mitigating the impact of imbalanced datasets. In the similarity measurement process, the proposed algorithm comprehensively considers the morphological and numerical characteristics of the curves, requiring fewer normal samples for secondary verification, balancing the number of normal and abnormal samples during secondary verification. During secondary verification, the proposed verification model can mitigate the impact of imbalanced datasets, and IPSO is used to optimize the SVM parameters, improving classification performance. The proposed verification algorithm improves the accuracy of verification. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of the functional modules of a big data mining model based on multidimensional load characteristic analysis.

[0059] Figure 2 Flowchart for predicting daily electricity consumption patterns;

[0060] Figure 3 A schematic diagram of Euclidean distance;

[0061] Figure 4 Three possible diagrams for finding the minimum cumulative path;

[0062] Figure 5 This is a schematic diagram of morphological distance based on DTW;

[0063] Figure 6 The maximum decision plane in the interval region;

[0064] Figure 7 This is a verification process based on similarity metrics and IPSO-PCSVM;

[0065] Figure 8 This refers to the changes in clustering criteria during the feature optimization process;

[0066] Figure 9 A comparison of the number of iterations between KFCM and FCM;

[0067] Figure 10 A comparison of different time series similarity measurement methods;

[0068] Figure 11 A graph showing the trend of optimal fitness changes for different algorithms;

[0069] Figure 12 Accuracy under different proportions of the training dataset;

[0070] Figure 13 The accuracy and false negative rate of verification under different methods;

[0071] Figure 14 The AUC is calculated using different methods under different classification models. Detailed Implementation

[0072] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are merely descriptive and not limiting, and should not be used to limit the scope of protection of the present invention.

[0073] A comprehensive verification system based on data characteristics is proposed. Imbalance between normal and abnormal samples leads to significantly lower accuracy for SVM classification and prediction of minority class samples compared to multi-class samples. Furthermore, the choice of SVM parameters affects classification performance. To address the impact of imbalanced data on SVM classification accuracy, a step-by-step approach is proposed to mitigate the influence of imbalanced datasets on SVM's effectiveness in verifying new energy data, thereby improving the effectiveness of the verification algorithm. This approach utilizes similarity metrics and IPSO-PCSVM for target user verification.

[0074] The overall verification process consists of three steps: target area identification, preliminary verification, and secondary verification.

[0075] (I) Data Feature Verification Based on Time Series Similarity

[0076] Preliminary verification based on time series similarity data features: First, according to the feature optimization strategy of load characteristic indicators, effective and independent feature indicators representing users' electricity consumption behavior are selected to reduce the redundancy of classification information between features; then, based on the selected feature indicators, the users' electricity consumption curves are clustered to obtain the users' electricity consumption characteristic curves; finally, the similarity between the electricity consumption characteristic curve and the curve to be measured is measured, and the threshold is determined through multiple experiments to preliminarily identify target users. This step can minimize the number of normal users to be verified in the second verification, and preliminarily balance the difference in the number of normal samples and abnormal samples when performing the second verification.

[0077] 1) Optimal selection of load characteristic indicators

[0078] Electricity consumption characteristics are closely related to users' electricity consumption behavior, and there are significant correlations between various electricity consumption characteristics. Redundant information in the feature space leads to poor analysis results. Removing overlapping and redundant information and constructing a feature set from the effective features helps improve analysis performance. In the process of optimizing load characteristic indicators, user electricity consumption data is input, and the corresponding indicators in Table 7 are calculated. Using the evaluation criteria for electricity consumption feature optimization, feature optimization is performed on each indicator, outputting a simplified feature set representing user electricity consumption behavior. This reduces information redundancy between features and achieves dimensionality reduction of high-dimensional features. A feature library is constructed using commonly used features representing user electricity consumption behavior; the specific features and their meanings are shown in Table 7.

[0079] The selection process for the optimal strategy based on electricity consumption behavior characteristics is as follows:

[0080] (1) Select a feature with 1 feature, and calculate the feature with the best feature evaluation criteria under the premise that the number of features is 1, and determine this feature as the first feature;

[0081] (2) Select 2 features, add new features on the basis of the selected features, and calculate the two features with the best evaluation criteria when the number of features is 2.

[0082] (3) Select i features, add new features on top of the i-1 features already selected, and calculate the i features with the best evaluation criteria when the number of features is i.

[0083] (4) Repeat the above steps until the accuracy is lower than that of n features when m+1 features are selected. Then determine the optimal number of features as m. The m features with the best evaluation criteria under m features are the final selected features.

[0084] Table 1. Meaning of User Electricity Consumption Behavior Characteristics

[0085]

[0086]

[0087] Note: P represents load, sum, av, max, min, and var represent total, mean, maximum, and minimum values, respectively, and peak, val, and sh represent peak, trough, and flat periods, respectively.

[0088] 2) Fuzzy clustering based on kernel function optimization

[0089] Kernel Fuzzy C Means (KFCM) clustering algorithm utilizes kernel functions to map the features of the original samples into a high-dimensional space, making previously hidden features stand out and improving the algorithm's clustering performance. During the clustering process, the input is the load curve of a user's normal electricity consumption, and the output is the cluster center curve of the user's normal electricity consumption, i.e., the electricity consumption characteristic curve.

[0090] Assume cluster centers Φ(v) in high-dimensional space k It is possible to find the preimage v in the original space. k The objective function of KFCM is:

[0091]

[0092] From the definition of the Mercer kernel, we can obtain:

[0093] d 2 (n i ,v k )=||Φ(n i )-Φ(v k )|| 2 =K(n) i ,n i )+K(v k ,v k )-2K(n i ,v k (35)

[0094] Therefore, the objective function of the improved fuzzy C-clustering algorithm can be transformed into:

[0095]

[0096] The iterative formula for finding the cluster centers and membership matrix of this algorithm is obtained using the Lagrange multiplication method:

[0097]

[0098]

[0099] Equation (38) cannot be obtained directly. Using the definition of kernel mapping, multiplying equation (38) by Φ... T (x j ),have to:

[0100]

[0101] The kernel function is chosen to be a Gaussian radial basis function (RBF). The objective function of the fuzzy C-clustering algorithm based on kernel function optimization then becomes:

[0102]

[0103] In the formula: σ is the width parameter of the function, which controls the radial range of the function.

[0104] At this point, the cluster center and membership matrix U obtained by Lagrange multiplication simplifies to:

[0105]

[0106]

[0107] When obtaining the initial number of clusters and cluster centers, the fast hill climbing method introduced in reference

[69] determines the number of clusters and cluster centers, which overcomes the subjectivity of determining the number of categories and obtains the initial cluster centers and initial membership matrix at the same time.

[0108] 3) Similarity measurement methods

[0109] A user's characteristic curve reflects their electricity consumption characteristics and the pattern of load changes over a period of time. The daily load characteristic curve of a user is obtained through the KFCM clustering algorithm. This characteristic curve reflects the electricity consumption characteristics of this type of user under normal electricity usage conditions. Therefore, by using a time-series-based similarity method to measure the degree of matching between the curve to be tested and the electricity consumption characteristic curve, target users can be initially screened.

[0110] Time series similarity includes both numerical and shape similarities, but most current studies on time series similarity have failed to adequately address both. The input data is derived from the normal electricity consumption characteristic curves of users, N = (n1, n2, ..., n...). m ) and the test curve H=(h1,h2,…,h) of the transformer area. m The difference between the characteristic curve X and the curve Y to be measured is measured by Euclidean distance, as shown by the vertical dashed line in the attached figure. The calculation formula is shown in equation (43).

[0111]

[0112] While Euclidean distance can reflect numerical differences between curves, it cannot characterize morphological differences. To accurately depict the rising, falling, and stable morphological characteristics of curves in different time periods, the slope of a straight line is used to represent the morphological characteristics of that period. Therefore, a time series of length m is reduced to a morphological series of length m-1.

[0113]

[0114] The sequences of morphological characteristics of the normal power consumption characteristic curve and the curve under test are N'=(n1,n2,…,n m-1) and H'=(h1,h2,…,h m-1 To align two sequences, a distance matrix needs to be constructed. Each element in the matrix represents the Euclidean distance.

[0115] D(i,j)=||n i -h j ||2 i=1,2,…,m-1; j=1,2,…,m-1 (45)

[0116] The path chosen by DTW is not arbitrary. It seeks the path that minimizes the final cumulative distance sum while satisfying three constraints: boundary conditions, continuity, and monotonicity.

[0117] A cumulative distance D' is constructed using dynamic programming. The cumulative distance D'(i,j) is the sum of the distance d(i,j) of the current grid point and the cumulative distance of the smallest neighboring element that can reach that point, as shown in the attached diagram. Figure 4 The diagram shows three possible ways to find the cumulative path.

[0118] D'(i,j)=d(i,j)+min{D'(i-1,j-1),D'(i-1,j),D'(i,j-1)} (46)

[0119] The path with the shortest cumulative distance is the optimal path to that point.

[0120] DTW can bend the time axis to match points, accurately measuring time series based on morphology. The similarity measurement of the time series between the morphological features X' of the electrical characteristic curve and the morphological features Y' of the curve under test is as follows: Figure 5 As shown in the figure, the distance between the morphological sequences is represented by the dashed lines.

[0121] The calculation of the numerical and morphological similarity of the time series curves, taking into account both, is shown in formula (47):

[0122]

[0123] In the formula: α and λ are the weights considering numerical value and morphology, respectively, where α+λ=1.

[0124] In the similarity measurement process, the user's normal electricity consumption characteristic curve and the test curve of the transformer area obtained by clustering are input. First, the morphological sequences N' and H' of each are solved according to the formula. Then, the numerical and morphological similarity between the normal user's electricity consumption characteristic curve and the test curve is calculated using formula (47). Finally, the matching degree between the characteristic curve and the test curve is output. The target user is initially judged based on the obtained matching degree and the set threshold. After multiple experiments, the final selected thresholds are D2 = 3.5 and D1 = 0.8. The selection of these thresholds can ensure that there are fewer normal users among the suspected users within the threshold range, while there are almost no target users among the normal users. This step narrows the scope of the secondary verification and alleviates the balance between normal and abnormal samples during the verification.

[0125] (II) Data Feature Verification System Based on IPSO-PCSVM

[0126] In this step, a secondary verification based on IPSO-PCSVM is performed. First, to further mitigate the impact of imbalanced datasets, a verification based on PCSVM is proposed. The training sets of abnormal and normal samples are input to obtain the decision plane of PCSVM. Then, the parameters of PCSVM are optimized using IPSO. Finally, the target user obtained from the preliminary verification is input, and a secondary verification is performed using the IPSO-optimized PCSVM to output the target user's ID.

[0127] 1) Support Vector Machine with Customized Penalty Parameters

[0128] The Penalty-Customized Support Vector Machine (PCSVM) proposes assigning different weights to samples with different classification errors during training. Given (x) i ,f i (i = 1, 2, ..., M) are training samples in the data sample set, where f i f represents the abnormal data feature index corresponding to the sample. i x ∈{-1, +1} i The tag where y i A value of +1 indicates abnormal user behavior, and N is the number of training samples. The support vector machine with the kernel function can then be represented as:

[0129]

[0130] In the formula: C i C is the penalty parameter for this sample. i The larger the sample, the more importance it receives during training, and the more important it is to the classification decision plane.

[0131] To mitigate the impact of imbalanced samples, different penalty parameters are set for normal and abnormal samples, where C... i The determination of is determined by equation (49).

[0132]

[0133] In the formula, u∈(0,1] is the emphasis coefficient for data imbalance, which reflects the importance of data imbalance in the hyperplane determination process. The smaller u is, the more important the data imbalance is considered.

[0134] Solving equation (49) will yield α * Then b * We can obtain the following from equation (50):

[0135]

[0136] The final decision plane can be represented as:

[0137]

[0138] Using PCSVM for secondary verification, firstly, the feature indicators and corresponding labels of the sample training set are given; then, the trained PCSVM decision plane is obtained through the sample training set (see attached figure). The figure shows the decision planes of SVM and PCSVM. The dashed line represents the decision plane of PCSVM, and the solid line represents the decision plane constructed by SVM. As can be seen from the figure, PCSVM has a higher verification accuracy for minority classes, and the constructed decision plane is more favorable to minority classes.

[0139] 2) Parameter optimization of the comprehensively improved particle swarm optimization algorithm

[0140] The performance of an SVM classifier depends on the kernel function σ and the emphasis coefficient u for data imbalance.

[72] The kernel function σ reflects the degree of correlation between support vectors. When σ is too small, the connection between support vectors weakens, compromising the model's generalization ability. Conversely, when σ is large, the support vector relationships become more compact, making it difficult for the resulting classification model to achieve good classification results. The penalty factor u reflects the importance of data imbalance in the hyperplane determination process. If u decreases, the importance of normal samples decreases, and data imbalance is considered more significant, mitigating the impact of the imbalanced dataset. However, if u is too small, the model will not have high generalization performance and will be unable to accurately classify new sample sets.

[0141] Therefore, there should exist an optimal combination of the kernel function σ and the emphasis coefficient u for data imbalance, which can ensure that the trained SVM classifier can mitigate the impact of imbalanced datasets while achieving good generalization ability and classification performance. Since these are hyperparameters, they cannot be optimized using gradient-based methods. Based on the standard Particle Swarm Optimization (PSO) algorithm, this paper proposes a comprehensive improved PSO algorithm to optimize the hyperparameters of SVM by improving the inertia weights and acceleration coefficients.

[0142] (1) Standard Particle Swarm Optimization Algorithm

[0143] Standard Particle Swarm Optimization Algorithm

[73] First, an initial particle swarm is randomly generated, where individual particles have random velocities. During iteration, they dynamically adjust their velocities and positions based on their own (self-extreme) and the flight experience of nearby particles (global / local extrema) to find the optimal region. In D-dimensional space, each possible optimal solution can be considered as an individual particle in a swarm of m particles. During iteration, the real-time state of the particles is determined by their velocity. Location Description. The formulas for updating particle velocity and position are as follows:

[0144] v id (t+1)=ω·v id (t)+c1r1(np id -x id (t))+c2r2(np gd -x id (t)) (52)

[0145] x id (t+1)=x ii (t)+v id (t+1) (53)

[0146] In the formula: ω is the inertia weight, usually taken as a positive number or 0; c1 and c2 are learning factors, and the selection interval of r1 and r2 is [0,1]; x id (t) represents the real-time position of the i-th particle; v id (t) represents the real-time velocity of the i-th particle.

[0147] (2) Adjusting the inertia weight

[0148] The formula reveals that as ω increases, the particle's flight range widens, enhancing global search capability, but reducing convergence accuracy; conversely, as ω decreases, global search capability decreases, but convergence accuracy improves. In the standard PSO algorithm, ω is typically set to 1. This method, relying on human experience, is difficult to dynamically adjust and cannot effectively balance the relationship between local and global search. Therefore, setting a dynamically decreasing linearly decreasing inertial weight parameter ω yields better optimization results than a fixed value. The formula is as follows:

[0149] ω=ω max -(ω max -ω min )·t / T (54)

[0150] In the formula: ω min and ω max represents the maximum and minimum inertia weight values, respectively. To balance local and global search capabilities, the inertia weight ranges from [0.4, 0.9]. The upper limit of this range is selected as the maximum inertia weight value, and the lower limit is selected as the minimum inertia weight value. t is the current iteration number, and T is the maximum iteration number.

[0151] (3) Dynamic acceleration coefficient

[0152] Based on the findings in equation (52), when c1 = 0, particles lack self-identification ability and can only rely on information sharing among particles for optimization, resulting in limited convergence speed. When encountering complex problems, they are more prone to getting trapped in local values ​​than the standard particle swarm. When c2 = 0, particles lose information sharing ability and can only rely on their own information and that of the previous generation for optimization, making it difficult to obtain the optimal solution. Therefore, an improved approach to the PSO algorithm, which involves self-adjustment, is proposed to enable particles to approach the optimal solution more accurately during iteration. This involves dynamically selecting acceleration coefficients to place particles within the entire search space in the early stages of the search, enhancing their social information capabilities; and to maximize their search efficiency and enhance their local search capabilities in the later stages of the search. The specific implementation formula is as follows:

[0153]

[0154]

[0155] In the formula: r1, r2, r3, and r4 represent the initial settings.

[0156] (4) Comprehensive Improved Particle Swarm Optimization

[0157] By improving the inertia weight and acceleration coefficient in the standard particle swarm optimization algorithm, a comprehensive improved particle swarm optimization algorithm (IPSO) is proposed. By controlling the particle flight speed and limiting the maximum flight distance of the particles, the algorithm prevents the particles from flying out of the search range. The specific details are shown in equation (57).

[0158]

[0159] In the formula: v max Indicates the maximum velocity of a particle; v min This represents the maximum velocity of the particle; k is set to 0.05.

[0160] According to the analysis of equation (57), when the iteration starts, the value of t is small and the particle flight speed is in a large range. As the iteration continues, the particle speed decreases and will search in a smaller range. Overall, the algorithm achieves self-adjustment, so that the particle can accurately approach the optimal solution.

[0161] 3) Verification process based on similarity measurement and IPSO-PCSVM

[0162] This chapter studies the verification of abnormal electricity consumption by power users under imbalanced datasets. A comprehensive verification model combining supervised and unsupervised learning is established. Unsupervised learning primarily identifies target users initially. The main purpose of this step is to narrow down the verification scope for secondary verification in supervised learning, ensuring that normal samples are not subject to secondary verification as much as possible. This avoids misclassification of normal users by the SVM trained due to a lack of target user samples. Furthermore, the obtained user electricity consumption characteristic curves can be applied in other areas, such as energy efficiency analysis and demand-side management. Supervised learning is used for secondary verification of target users. Firstly, SVM has been rigorously tested and has higher accuracy compared to other classifiers. Secondly, it can handle overfitting problems and appropriately process unknown datasets. Finally, Support Vector Machines, through combinations with different kernel functions, can separate non-linearly separable data. Therefore, this chapter chooses SVM for secondary verification of target users, which is the target users identified in the initial verification. Combining supervised and unsupervised learning improves classification accuracy. In practical applications, the entire algorithm design mainly includes the following four key steps:

[0163] Step 1: Input the power load data of the transformer area to be tested. According to the generalized Kirchhoff's law, the sub-meter reading + network loss = total meter reading. If the network loss is too large, it is considered that there is a possibility of electricity theft in the transformer area.

[0164] Step 2: Input the electricity consumption data of the target transformer area for unsupervised learning verification. First, the KFCM clustering algorithm is used to classify the users in the transformer area and obtain the daily load electricity consumption characteristic curves of each type of user. Then, the numerical value and shape of the curves are considered comprehensively. Euclidean distance is used for measurement in terms of numerical value, and DTW is used for measurement in terms of shape. The similarity between the characteristic curve and the curve to be tested is measured using the formula. Finally, different user types are determined according to the set threshold curve. This step balances the number of samples during verification.

[0165] Step 3: Based on the electricity metering data of the target users, calculate the new energy data characteristic index value of the users. Based on the PSO algorithm, the dynamic inertia coefficient is adjusted according to (54), the acceleration coefficient is adjusted according to (55) and (56), and the speed of the particle swarm is limited by (57) to obtain a comprehensive improved particle swarm optimization algorithm. Considering the influence of the imbalanced dataset, different emphasis coefficients are assigned to normal samples and abnormal samples, and the parameters of PCSVM are optimized using IPSO. The decision plane of PCSVM is obtained according to formula (51), and the different characteristic users obtained in step 2 are classified.

[0166] Step 4: Output verification results. Abnormal users can be identified using the labels obtained through supervised learning. Based on the output verification results, the accuracy rate, false positive rate, and other indicators of the verification are calculated to evaluate the verification model, and the model parameters are updated in real time.

[0167] (III) Simulation and Analysis

[0168] 1) Evaluation indicators for the verification model

[0169] To effectively evaluate the verification performance of the new energy data verification model, a confusion matrix as shown in Table 2 is typically used. The actual user classification and the classification obtained through the verification model are analyzed, and all electricity users are divided into T categories. P F P F N T N .

[0170] Table 2 Confusion Matrix in Verification

[0171]

[0172] Choose accuracy (r) AC ) and false positive rate (r PO As evaluation metrics for the model, their definitions are as follows:

[0173]

[0174] Where: N FP N represents the number of false positive samples detected. FNN represents the number of false negatives detected. TP N represents the number of true positive samples detected. TN This represents the number of true negative samples detected.

[0175] Furthermore, AUC reflects the comprehensive ability of the verification model to classify normal users and abnormal users, so this paper selects AUC as another evaluation indicator. The formula for calculating AUC is:

[0176]

[0177] In the formula: M is the number of normal samples; N is the number of abnormal samples; Rank i ∑ represents the number of the i-th sample arranged according to its probability score; i∈positiveClass Rank i This means adding the numbers of the normal samples together.

[0178] 2) Verification of new energy users based on similarity metrics

[0179] More than ten commonly used features representing user electricity consumption behavior are numbered, and these features are used as a feature library for user electricity consumption behavior. Features in the feature library are selected using feature optimization criteria. The correspondence between features and numbers is shown in Table 3.

[0180] Table 3. Correspondence between features and numbers

[0181]

[0182]

[0183] As shown in the graph of the change of clustering criteria during the stepwise selection of features, the clustering accuracy increases with the increase of the number of features. However, when the number of features exceeds 4, the clustering accuracy decreases. Therefore, this paper finally determined that the number of features representing user electricity consumption behavior is 4, and the determined feature indicators are load factor, peak power consumption rate, off-peak power factor, and percentage of electricity consumption during flat periods.

[0184] The objective function value in a clustering algorithm reflects the sum of distances from each type of sample point to the cluster center. The smaller the objective function value, the more compact the clustering effect within each cluster and the more separated the clusters. As shown in the attached figure, a comparison of the number of iterations between KFCM and FCM reveals that KFCM has a faster convergence speed and a smaller objective function value than FCM. This reflects that KFCM's clustering algorithm has higher accuracy, better clustering effect, and faster convergence characteristics.

[0185] Based on the user electricity consumption characteristic curves of daily load obtained by clustering algorithm, the similarity between the curve to be tested and the daily load characteristic curve is measured in time series. Euclidean distance is used for numerical measurement, and the DTW algorithm is used to calculate the curve shape. The weights of the two are chosen as α = λ = 0.5 in this paper. After multiple experiments, the final selected thresholds are D2 = 3.5 and D1 = 0.8.

[0186] Table 4. Measures of Time Series Similarity

[0187]

[0188] The attached figures show a comparison of false negative and false positive rates under different similarity measurement methods for time series. The selected methods include Euclidean distance, correlation coefficient, a combination of Euclidean distance and correlation coefficient, and the method proposed in this paper. Simulation experiments demonstrate that the proposed method has the lowest false negative and false positive rates compared to other methods.

[0189] 3) Verification algorithm based on IPSO-PCSVM

[0190] The particle swarm size was selected as 20, the total number of iterations was 40, the particle search interval was [-5, 5], the particle velocity search interval was [-2, 2], and the acceleration coefficient was 2. The specific parameters are shown in Table 5.

[0191] Table 5 Parameter settings for different PSO algorithms

[0192]

[0193]

[0194] Table 6 Comparison results of verification under the optimized algorithm

[0195]

[0196] As shown in the attached figures, the comprehensively improved particle swarm optimization algorithm achieves convergence after 220 iterations, repeatedly escaping local minima and reaching the global optimum during the iteration process. In subsequent iterations, the particle fitness gradually converges to 0. Compared to the standard particle swarm optimization algorithm, the particle swarm optimization algorithm with added dynamic inertia weights shows a significant improvement in convergence rate. Furthermore, the particle swarm optimization algorithm using selected acceleration coefficients shows a significant reduction in convergence error accuracy compared to the standard particle swarm optimization algorithm. In summary, the comprehensively improved particle swarm optimization algorithm achieves its improvement goals and, to some extent, compensates for the shortcomings of the standard particle swarm optimization algorithm.

[0197] In the supervised learning verification system, the established IPSO-PCSVM verification model verifies the electricity consumption behavior of target users identified in unsupervised learning. Four different models were compared: manually set SVM parameters, SVM parameter optimization using PSO, SVM parameter optimization using IPSO, and IPSO-PCSVM parameter optimization, considering accuracy, false positive rate, model classification time, and model training time. By comparing the four different models in Table 6, comparing the accuracy and false positive rate of manually set SVM parameters and PSO-SVM, it can be found that PSO-SVM has a higher verification accuracy and a lower false positive rate. However, PSO-SVM has a longer training and classification time. Therefore, using the PSO algorithm for parameter optimization can achieve higher accuracy, but requires more training and classification time. Comparing IPSO-SVM and PSO-SVM, it can be demonstrated that the IPSO-optimized SVM has higher accuracy. Comparing manually set SVM, PSO-SVM, and IPSO-SVM demonstrates that parameter selection has a significant impact on the classification performance of SVM. By comparing the accuracy of IPSO-SVM and IPSO-PCSVM, it can be found that PCSVM can mitigate the impact of imbalanced datasets and can accurately identify target users under imbalanced datasets, but it requires more training and classification time.

[0198] As the number of training samples increases, the accuracy of SVM, DT, and PCSVM is compared as shown in the figure. It can be seen from the figure that as the number of new energy data samples and normal samples increases, the accuracy of the three methods will improve. However, when comparing PCSVM with SVM and DT with the same number of samples, the overall verification accuracy obtained in this paper is the highest, which confirms the superiority of the method proposed in this paper.

[0199] The initial check can identify methods 5 and 6, but cannot distinguish methods 1, 2, 3, and 4. Therefore, a secondary check is required for these four methods. PCSVM is used to check the four different methods, and only one method is checked at a time, so there is no error accumulation. The results are shown in the figure. Although the accuracy of the method proposed in this paper is not high in some types of checks, the overall accuracy of the check is quite considerable.

[0200] The attached figure shows a comparison of the AUC of different classification models under different types. The comparison shows that, compared with the existing mainstream verification methods, the AUC of the proposed method is higher than other verification models under the same conditions, but it is still slightly lower than deep learning methods. Moreover, the AUC of the proposed method and deep learning methods do not change significantly under different conditions, which proves that the proposed method has a certain degree of robustness.

[0201] To evaluate the verification performance of the proposed model, several other models previously used for verification were implemented on the same dataset, namely clustering algorithms, standard support vector machines, decision trees, artificial neural networks, and the proposed method. Table 7 shows that unsupervised clustering algorithms can be used to identify customers with similar load patterns. However, due to their unsupervised nature, their verification accuracy is not high if used as the primary algorithm in a theft verification application. Therefore, they are usually used in conjunction with other verification methods to narrow down the data range for verification. SVM shows better verification performance compared to other verification models, but compared to the PCSVM algorithm, it achieves better verification performance because it mitigates the impact of imbalanced datasets. The verification algorithm used in this paper improves the verification efficiency compared to PCSVM alone, demonstrating the effectiveness of the proposed algorithm. However, the false detection rate of the proposed verification algorithm still needs improvement.

[0202] Table 7 Comparison of verification effects of different verification models

[0203]

[0204] Although embodiments and drawings of the present invention have been disclosed for illustrative purposes, those skilled in the art will understand that various substitutions, variations and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the scope of the present invention is not limited to the contents disclosed in the embodiments and drawings.

Claims

1. A comprehensive verification system based on data characteristics, characterized in that: Includes the following steps: (1) Data feature verification based on time series similarity: target users are initially determined through similarity measurement process, and the minimum number of normal users are verified in the second verification. The difference in the number of normal samples and abnormal samples during the second verification is initially balanced. (2) Data feature verification system based on IPSO-PCSVM. In this step, a secondary verification based on IPSO-PCSVM is performed. First, in order to further reduce the impact of imbalanced datasets, a verification based on PCSVM is proposed. The training sets of abnormal samples and normal samples are input to obtain the decision plane of PCSVM. Then, the parameters of PCSVM are optimized using IPSO. Finally, the target user obtained from the preliminary verification is input, and the PCSVM optimized by IPSO is used for secondary verification to output the target user's ID. (3) Simulation and analysis of examples are used to evaluate the effectiveness of the verification system; The step (1) is a data feature verification based on time series similarity, including ① feature optimization of load characteristic indicators; ② Fuzzy clustering based on kernel function optimization; ③ Similarity measurement methods; The ③ similarity measurement method obtains the daily load characteristic curve of the user through the KFCM clustering algorithm. This characteristic curve reflects the electricity consumption characteristics of such users under normal electricity consumption conditions. The time series-based similarity method is used to measure the degree of matching between the curve to be tested and the electricity consumption characteristic curve, and the target users are initially screened out. The input data is obtained from the user's normal electricity consumption characteristic curve. The test curves of the platform area Using Euclidean distance to the characteristic curve With the curve to be measured The numerical difference is measured, and the calculation formula is shown in equation (43). (43) While Euclidean distance can reflect numerical differences between curves, it cannot characterize their morphological differences. To accurately depict the rising, falling, and stable morphological characteristics of curves at different time periods, the slope of a straight line is used to represent the morphological characteristics of that period. Therefore, a line with a length of... The time series was reduced to one morphological sequence, (44) The sequences of morphological characteristics of the normal power consumption characteristic curve and the curve under test are respectively and To align two sequences, we need to construct a distance matrix, where each element of the matrix is ​​represented by the Euclidean distance: (45) DTW path selection seeks the path with the minimum cumulative distance under the conditions of satisfying the three constraints of boundary conditions, continuity, and monotonicity. Construct a cumulative distance using dynamic programming. The cumulative distance is Distance to the current grid point The sum of the cumulative distances to the smallest neighboring element that can reach that point. (46) The path with the shortest cumulative distance is the optimal path to that point; DTW can bend the time axis to match points and accurately measure the time series based on its shape; the calculation of the numerical and morphological similarity of the curve time series is shown in formula (47). (47) In the formula: and The weights are respectively considered for numerical value and morphology, where ; In the similarity measurement process, the user's normal electricity consumption characteristic curve and the transformer area's test curve obtained from clustering are input. First, the morphological sequence of each is solved according to equation (4-12). and Then, the numerical and morphological similarity between the normal user electricity consumption characteristic curve and the test curve is calculated using equation (47). Finally, the matching degree between the characteristic curve and the test curve is output. The target user is initially judged based on the obtained matching degree and the set threshold. After numerous trials, the final selected threshold was determined. =3.5, =0.

8. The selection of this threshold ensures that there are fewer normal users among the suspected users within the threshold range, while there are almost no target users among the normal users. This step narrows the scope of the secondary verification and alleviates the balance between normal and abnormal samples during the verification.

2. The comprehensive verification system based on data characteristics as described in claim 1, characterized in that: The optimal selection process for the load characteristic index ① is as follows: a) Select a feature with a total of 1 feature. Given a feature with a total of 1 feature, calculate the feature with the best feature evaluation criteria and determine that feature as the first feature. b. Select 2 features, add new features on top of the already selected features, and calculate the two features with the best evaluation criteria when the number of features is 2. c selects the number of features as In the selected Based on existing features, new features are added, and the calculation is performed when the number of features is... The best evaluation criteria at that time One feature; d. Repeat the above steps until the selection is made. When there are 1 feature, the accuracy is higher than If the number of features is low, then the optimal number of features is determined as follows: , The best evaluation criterion under these characteristics These features are the features that are ultimately selected.

3. The comprehensive verification system based on data characteristics as described in claim 1, characterized in that: Step (2) is based on the IPSO-PCSVM data feature verification system, which specifically includes the following methods: ① a support vector machine with customized penalty parameters; ② parameter optimization of the comprehensively improved particle swarm algorithm; ③ verification process based on similarity measurement and IPSO-PCSVM.

4. The comprehensive verification system based on data characteristics as described in claim 3, characterized in that: The aforementioned ① support vector machine with customized penalty parameters assigns different weights to samples with different classification errors during training. ( ) represents the training samples in the data sample set, where These are the abnormal data feature indicators corresponding to the samples. for The tags, among which A value of +1 indicates that the user has exhibited abnormal behavior. Let the number of training samples be denoted by the kernel function. The support vector machine can then be represented as: (48) In the formula: This is the penalty parameter for this sample. The larger the sample size, the more importance it receives during training, and the more important it is for the classification decision plane. To mitigate the impact of imbalanced samples, different penalty parameters are set for normal and abnormal samples. The determination of is made by equation (49); (49) In the formula, The emphasis coefficient for data imbalance reflects the importance of data imbalance in the hyperplane determination process. The smaller the value, the more important the data imbalance is considered; Solving equation (49) will yield ,Then We can obtain the following from equation (50): (50) The final decision plane can be represented as: (51)。 5. The comprehensive verification system based on data characteristics as described in claim 3, characterized in that: The third step, based on similarity measurement and IPSO-PCSVM verification process, includes: Step 1: Input the power load data of the transformer area to be tested. According to the generalized Kirchhoff's law, the sub-meter reading + network loss = total meter reading. If the network loss is too large, it is considered that there is a possibility of electricity theft in the transformer area. Step 2: Input the electricity consumption data of the target transformer area for unsupervised learning verification. First, the KFCM clustering algorithm is used to classify the users in the transformer area and obtain the daily load electricity consumption characteristic curves of each type of user. Then, the numerical value and shape of the curves are considered comprehensively. Euclidean distance is used for numerical measurement, and DTW is used for shape measurement. Equation (4-15) is used to measure the similarity between the characteristic curve and the curve to be tested. Finally, different user types are judged according to the set threshold curve. This step balances the number of samples during verification. Step 3: Based on the electricity metering data of the target users, calculate the new energy data characteristic index value of the users. On the basis of the PSO algorithm, the dynamic inertia coefficient is adjusted according to (54), the acceleration coefficient is adjusted according to (55) and (56), and the speed of the particle swarm is limited by (57) to obtain a comprehensive improved particle swarm optimization algorithm. Considering the influence of the imbalanced dataset, different emphasis coefficients are assigned to normal samples and abnormal samples, and the parameters of PCSVM are optimized using IPSO. The decision plane of PCSVM is obtained according to formula (51), and the different characteristic users obtained in step 2 are classified. Step 4: Output the verification results. The labels obtained through supervised learning can identify abnormal users. Based on the output verification results, calculate the verification accuracy, false detection rate and other indicators, evaluate the verification model, and update the model parameters in real time.

6. The comprehensive verification system based on data characteristics as described in claim 1, characterized in that: The simulation and analysis of the example include the following methods: ① verification of the evaluation index of the model; ② verification of new energy users based on similarity measurement; ③ verification algorithm based on IPSO-PCSVM.

7. The comprehensive verification system based on data characteristics as described in claim 6, characterized in that: The evaluation index of the verification model mentioned in ① uses a confusion matrix to classify all electricity users into , , , , Confusion Matrix ; Select accuracy ( ) and false positive rate ( As evaluation metrics for the model, their definitions are as follows: (58) In the formula: The number of false positive samples detected; The number of false negatives detected; The number of true positive samples detected; This represents the number of true negative samples detected.