Method and system for diagnosing and analyzing operation error of electric energy meter based on operation error
By combining an improved spectral clustering algorithm with the principle of energy conservation, data optimization, and Tikhonov regularization, the problems of adaptability and stability in the diagnosis of electricity meter operating errors were solved, achieving fine classification of electricity meter operating status and stability of error estimation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SHANXI MARKETING SERVICE CENT
- Filing Date
- 2026-06-25
- Publication Date
- 2026-07-24
Smart Images

Figure CN122451601A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system metering technology, and in particular to a method and system for operational diagnosis and analysis based on the operational error of electricity meters. Background Technology
[0002] Current methods for diagnosing operational errors in electricity meters primarily rely on threshold judgment or single-meter data comparison. Threshold judgment methods preset a fixed error threshold, classifying meters exceeding this threshold as abnormal. This fails to consider variations in metering curve shapes caused by differences in electricity consumption patterns, easily misjudging normally functioning meters with unique usage patterns as faulty. Single-meter data comparison methods determine errors by comparing meter readings with reference meters, failing to utilize the correlation characteristics of regional meter clusters and making it difficult to distinguish between individual anomalies and systemic deviations.
[0003] Existing technical solutions mostly employ static classification rules, which cannot adapt to the dynamic operating characteristics of a massive number of electricity meters. When directly solving error assessment models based on energy conservation, they are susceptible to ill-conditioned problems caused by data noise; even small data fluctuations can lead to drastic oscillations in error estimation results, making it impossible to obtain stable and reliable evaluation conclusions. Furthermore, the lack of a data-level screening mechanism for invalid data points further reduces the accuracy of the model.
[0004] The problems that need to be solved in the diagnosis of electricity meter operation errors are: how to achieve adaptive and fine classification of operation status based on the shape of the meter value curve, and how to eliminate the interference of data noise on the error assessment model to obtain stable estimation results. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology and to propose a method and system for operational diagnosis and analysis based on the operating error of electricity meters.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for operational error diagnosis and analysis based on electricity meters, comprising:
[0007] The metering curve data of all electricity meters in the target area within a set time period are obtained from the metering automation system. The metering curve data is preprocessed to form a standardized electricity meter operation data sequence.
[0008] Based on the improved spectral clustering algorithm, the standardized electricity meter operation data sequence is subjected to curve-shaped clustering. The optimal number of categories for the electricity meter operation status is determined according to the clustering results and the elbow rule, and the electricity meters in different operation statuses are divided into different categories.
[0009] Based on the principle of energy conservation, a state evaluation model is constructed with the total meter reading of the region as a constraint and the operating error of each type of electricity meter as the solution objective.
[0010] The effective data points in the standardized electricity meter operation data sequence are screened using a data optimization strategy, and the state evaluation model is subjected to ill-conditioning processing based on the improved Tikhonov regularization method to obtain a stable electricity meter operation error estimation equation.
[0011] Solve the stable energy meter operation error estimation equation, calculate the operation error estimate of energy meters in each category, diagnose the operation status of energy meters based on the operation error estimate, and generate diagnostic analysis results.
[0012] As a further aspect of the present invention, the improved spectral clustering algorithm is used to perform curve-shaped clustering on the standardized electricity meter operation data sequence, specifically including:
[0013] The morphological features of each metering value curve in the standardized electricity meter operation data sequence are extracted. The morphological features include the mean, variance, skewness, kurtosis, and low-frequency approximation coefficients after wavelet decomposition of the curve.
[0014] Based on the morphological features of all extracted curves, calculate the morphological similarity between any two measurement value curves and construct a morphological similarity matrix;
[0015] Perform a Laplace transform on the morphological similarity matrix to construct a normalized Laplace matrix;
[0016] Calculate the eigenvectors corresponding to the first k largest eigenvalues of the standardized Laplacian matrix, and arrange the eigenvectors in rows to form an eigenvector matrix;
[0017] An improved density peak clustering algorithm is used to cluster the row vectors of the feature vector matrix. The improved density peak clustering algorithm automatically divides the row vectors by introducing a local density adaptive truncation distance and an automatic cluster center identification strategy based on hierarchical merging.
[0018] The clustering results of the row vectors are mapped back to the original metering curves to complete the clustering based on the curve shape, thus obtaining the preliminary classification results of the electricity meter metering curves.
[0019] As a further aspect of the present invention, the improved density peak clustering algorithm achieves automatic partitioning of row vectors by introducing a local density adaptive truncation distance and an automatic cluster center identification strategy based on hierarchical merging, specifically including:
[0020] For each row vector in the eigenvector matrix, calculate its Euclidean distance to all other row vectors;
[0021] For each row vector, the distance from the row vector to its k-th nearest neighbor row vector is taken as its local neighborhood radius. The number of other row vectors falling within the local neighborhood radius is counted and defined as the local density of the row vector, where k is a preset neighborhood parameter.
[0022] The minimum distance from each row vector to all row vectors with a density greater than its local density is defined as the relative distance between the row vectors.
[0023] The decision value for a cluster center is calculated based on the product of the local density and the relative distance of all row vectors.
[0024] Points with significantly higher decision values than their surrounding row vectors are selected as initial cluster centers;
[0025] The remaining non-center row vectors are assigned to the class of the nearest center row vector with a higher local density, thus completing the initial partitioning.
[0026] For the initially divided clusters, the distance between the centers of each pair of clusters and the average distance within each cluster are calculated. Based on the hierarchical merging strategy, clusters that are too close and have loose intra-cluster structures are merged until the preset inter-cluster distance threshold is met, thus achieving automatic partitioning of row vectors.
[0027] As a further aspect of the present invention, the step of determining the optimal number of categories for the operating state of the electricity meter based on clustering results and the elbow rule specifically includes:
[0028] Set a series of different candidate classification numbers, and for each candidate classification number, repeatedly execute the process of performing curve-shaped clustering on the standardized electricity meter operation data sequence based on the improved spectral clustering algorithm to obtain the clustering results under the candidate classification number;
[0029] Calculate the total intra-class dispersion of the clustering results corresponding to each candidate category number. The total intra-class dispersion is defined as the sum of the squared Euclidean distances of all measurement curves within each category to their category centers.
[0030] Plot an elbow curve with the number of candidate categories on the x-axis and the total intra-class dispersion on the y-axis;
[0031] Calculate the rate of decrease in the total intra-class dispersion between adjacent candidate class numbers on the elbow curve, and determine the candidate class number corresponding to the inflection point where the rate of decrease slows down as the optimal number of classes;
[0032] Based on the optimal classification number, the metering curves of the electricity meters are finally classified, thereby classifying electricity meters in different operating states into different categories.
[0033] As a further aspect of the present invention, the state evaluation model constructed based on the principle of energy conservation, with the total meter reading of the region as a constraint and the operating error of each type of electricity meter as the solution objective, specifically includes:
[0034] Obtain the regional summary meter data for the target area within the set time period;
[0035] From the standardized electricity meter operation data sequence, extract the metering value curves of all electricity meters classified into the same category, sum the readings of all electricity meter metering value curves in the same category at the same time, and obtain the time series of sub-metering values of the same category.
[0036] Sum the time series of all categories of sub-measures within the target area to construct the time series of the theoretical total measure of the area;
[0037] Based on the principle of energy conservation, an equality constraint is established between the total meter readings of the region and the time series of the theoretical total meter readings of the region. The equality constraint needs to take into account the operating errors of the electricity meters in each category.
[0038] A category-based operational error variable is introduced to represent the comprehensive level of operational error of electricity meters within each category. A state evaluation model is constructed with the objective of minimizing the difference between the time series of the total meter readings of the region and the theoretical total meter readings of the region, and with the equality constraints as the condition.
[0039] As a further aspect of the present invention, the step of using a data optimization strategy to filter effective data points in the standardized electricity meter operation data sequence specifically includes:
[0040] The standardized electricity meter operation data sequence is time-aligned to ensure that the timestamps of the metering values of all electricity meters and the regional master meter are strictly synchronized.
[0041] Calculate the rate of change of the readings of each electricity meter at each moment, and remove abrupt data points whose rate of change exceeds the normal operating threshold;
[0042] Analyze the periodic patterns of measurement data, and select multiple continuous and stable time segments as effective data acquisition windows within the steady-state operating cycle;
[0043] Within the effective data acquisition window, incomplete data points caused by communication interruption or data loss are removed;
[0044] From the remaining data points, samples are uniformly taken in each time segment according to the density distribution of the data points, and finally the effective set of data points for constructing and solving the state evaluation model is selected.
[0045] As a further aspect of the present invention, the state evaluation model is subjected to ill-conditioning reduction processing based on the improved Tikhonov regularization method to obtain a stable energy meter operating error estimation equation, specifically including:
[0046] The state evaluation model is expressed as a system of linear equations on the set of effective data points, where the coefficient matrix of the system of linear equations is the design matrix and the unknown vectors are the operational error variables of each category.
[0047] Calculate the condition number of the design matrix to determine whether the state evaluation model is ill-conditioned;
[0048] An improved Tikhonov regularization method is used to process ill-conditioned models. The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix, and combines the regularization matrix with the Tikhonov regularization term.
[0049] Construct a regularized least squares problem that includes the regularization term, transforming the original ill-conditioned state evaluation model into a well-conditioned regularized least squares problem;
[0050] Solving the regularized least squares problem yields a stable solution for the category of operating error variables. The equation satisfied by the stable solution is the stable energy meter operating error estimation equation.
[0051] The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix, specifically including:
[0052] The design matrix is subjected to singular value decomposition to obtain its singular value sequence;
[0053] Analyze the decay characteristics of the singular value sequence to identify the inflection point where the singular value rapidly decreases from a large value to a small value;
[0054] Based on the inflection point location, the singular value sequence is divided into a dominant singular value region and a tail-end small singular value region.
[0055] For the small singular value region at the tail, a diagonal regularization matrix is constructed. The elements on the diagonal of the diagonal regularization matrix are inversely proportional to the reciprocal of the corresponding singular value, so as to impose greater constraints on the solution components corresponding to the small singular values.
[0056] The constructed regularization matrix is combined with the standard Tikhonov regularization parameters to form a regularization term with an adaptive structure, which is used to control the smoothness of the solution and the strength of suppression of ill-conditioned models.
[0057] As a further aspect of the present invention, solving the stable energy meter operating error estimation equation and calculating the operating error estimate values for energy meters of each category specifically includes:
[0058] The stable energy meter operating error estimation equation is rearranged into a matrix solution form;
[0059] A stable numerical algorithm based on QR decomposition is used to solve the stable energy meter operating error estimation equation to obtain estimated values of operating error variables for each category.
[0060] Based on the estimated values of the operating error variables for each category and the similarity of the shape of the meter reading curves within each category, the operating error of each category is allocated to each meter within that category.
[0061] Calculate the individual operating error estimate for each electricity meter. The individual operating error estimate is the result obtained by weighting the category operating error variable estimate based on morphological similarity.
[0062] As a further aspect of the present invention, the operating status of the energy meter is diagnosed based on the estimated operating error value, and diagnostic analysis results are generated, specifically including:
[0063] Set normal operating error threshold ranges for the estimated values of operating error variables for each category and for the estimated values of individual operating errors of electricity meters;
[0064] The calculated estimated values of each category of operating error variable are compared with the normal operating error threshold range to identify abnormal categories where the operating error exceeds the threshold.
[0065] The calculated estimated individual operating error of the electricity meter is compared with the normal operating error threshold range to identify abnormal electricity meters whose operating error exceeds the threshold.
[0066] For the identified anomaly categories and abnormal energy meters, their anomaly types are marked based on the morphological characteristics of their metering curves. The anomaly types include systematic deviations, random jumps, or trend drifts.
[0067] The system integrates the estimated operating errors, anomaly diagnostic indicators, and anomaly types of all electricity meters to generate a structured report of electricity meter operation diagnostic analysis results.
[0068] As a further aspect of the present invention, the present invention also includes an operational diagnostic analysis system based on electricity meter operational errors. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the above-described operational diagnostic analysis method based on electricity meter operational errors.
[0069] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0070] An improved spectral clustering algorithm, combined with the elbow rule, processes standardized electricity meter operating data sequences, achieving clustering by analyzing the morphological characteristics of metering curves. The algorithm automatically calculates the optimal number of clusters based on the clustering results, grouping electricity meters with similar operating patterns into the same category. This approach overcomes the limitations of fixed classification rules, naturally separating meters in different operating states to form a classification structure that matches actual operating characteristics, reducing the probability of misclassification due to differences in electricity consumption habits.
[0071] A data optimization strategy is employed to select effective data points from standardized electricity meter operation data sequences and eliminate interfering data that deviates from the normal distribution. An improved Tikhonov regularization method is used to reduce ill-conditioning in the state assessment model, introducing stability constraints during model solving. This approach is suitable for processing massive amounts of electricity meter time-series data, smoothly mitigating model computational interference, standardizing the electricity meter operation error solution process, and optimizing the adaptability of operational condition diagnosis. This method suppresses parameter oscillations caused by data noise, ensuring the stability of the error estimation equation even with measurement biases, and obtaining repeatable estimates of electricity meter operation errors. Attached Figure Description
[0072] Figure 1 This is a flowchart of the operation diagnosis and analysis method based on the operation error of an electricity meter as described in this invention;
[0073] Figure 2 A flowchart for spectral clustering curve morphology clustering;
[0074] Figure 3 A flowchart for determining the optimal number of categories for the elbow rule. Detailed Implementation
[0075] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0076] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0077] See Figure 1 This invention provides a method for operational diagnosis and analysis based on the operating error of an electricity meter, the specific method including:
[0078] Metering curve data of all electricity meters in the target area within a set time period is obtained from the metering automation system. This data is preprocessed to form a standardized electricity meter operation data sequence. An improved spectral clustering algorithm is used to perform curve shape clustering on the standardized electricity meter operation data sequence. Based on the clustering results and the elbow rule, the optimal number of categories for each electricity meter's operating state is determined, classifying meters in different operating states into different categories. Based on the principle of energy conservation, a state evaluation model is constructed, with the total metering value of the area as a constraint and the operating error of electricity meters within each category as the solution objective. A data optimization strategy is used to screen effective data points in the standardized electricity meter operation data sequence, and an improved Tikhonov regularization method is used to reduce ill-conditioning in the state evaluation model, resulting in a stable electricity meter operating error estimation equation. This stable equation is solved to calculate the estimated operating error values for electricity meters within each category. Based on these estimated operating error values, the operating state of the electricity meters is diagnosed, generating diagnostic analysis results.
[0079] In one embodiment of the present invention, see [reference] Figure 2 This study extracts the morphological features of each metering curve from a standardized electricity meter operation data sequence. These features include the curve's mean, variance, skewness, kurtosis, and low-frequency approximation coefficients after wavelet decomposition. Based on the extracted morphological features, the morphological similarity between any two metering curves is calculated, constructing a morphological similarity matrix. A Laplace transform is applied to the morphological similarity matrix to construct a standardized Laplace matrix. The eigenvectors corresponding to the k largest eigenvalues of the standardized Laplace matrix are calculated and arranged row-wise to form an eigenvector matrix. An improved density peak clustering algorithm is used to cluster the row vectors of the eigenvector matrix. This improved algorithm automatically partitions the row vectors by introducing a local density adaptive truncation distance and an automatic cluster center identification strategy based on hierarchical merging. The clustering results of the row vectors are mapped back to the original metering curves, completing the curve morphology-based clustering and obtaining the preliminary classification results of the electricity metering curves.
[0080] The improved density peak clustering algorithm achieves automatic partitioning of row vectors by introducing a local density adaptive truncation distance and a hierarchical merging-based automatic cluster center identification strategy. Specifically, it includes the following steps: For each row vector in the feature vector matrix, calculate its Euclidean distance to all other row vectors. For each row vector, use the distance from the row vector to its k-th nearest neighbor row vector as its local neighborhood radius, and count the number of other row vectors falling within this local neighborhood radius. Define this number as the local density of the row vector, where k is a preset neighborhood parameter. Calculate the minimum distance from each row vector to all row vectors with a higher local density than its own, defining this as the relative distance of the row vector. Calculate the decision value for each row vector as a cluster center based on the product of its local density and relative distance. Select points with significantly higher decision values than surrounding row vectors as initial cluster centers. Assign the remaining non-center row vectors to the class containing the nearest center row vector with a higher local density, completing the initial partitioning. For the initially divided clusters, the distance between the centers of each pair of clusters and the average distance within each cluster are calculated. Based on the hierarchical merging strategy, clusters that are too close and have loose intra-cluster structures are merged until the preset inter-cluster distance threshold is met, thus achieving automatic partitioning of row vectors.
[0081] In practical implementation, an improved spectral clustering algorithm is used to perform curve morphology clustering on standardized electricity meter operation data sequences. The morphological features of each metering curve in the standardized electricity meter operation data sequences are extracted. These morphological features include the mean, variance, skewness, kurtosis, and low-frequency approximation coefficients after wavelet decomposition. For a target area, the metering automation system provides metering curve data for all electricity meters within a set time period. Each metering curve contains readings at a series of time points. After preprocessing to form a standardized electricity meter operation data sequence, the morphological features of each metering curve are calculated. The mean is the arithmetic mean of all readings on the metering curve; the variance is the average of the squares of the deviations of the metering curve readings from the mean; the skewness is a measure of the asymmetry of the metering curve distribution; and the kurtosis is a measure of the sharpness of the peak values in the metering curve distribution. Wavelet decomposition uses a specific wavelet basis to perform multi-level decomposition of the metering curves, extracting low-frequency approximation coefficients as morphological features reflecting the overall trend of the metering curves. In some embodiments, based on the morphological features of all extracted measurement value curves, the morphological similarity between any two measurement value curves is calculated, and a morphological similarity matrix is constructed. Each element of the morphological similarity matrix represents the degree of morphological similarity between the corresponding two measurement value curves. For example, the morphological similarity is calculated using a Gaussian kernel function, and the formula is expressed as:
[0082]
[0083] in: It represents the morphological similarity between the i-th and j-th measurement curves. and These are the morphological feature vectors of the i-th and j-th measurement value curves, respectively. The kernel width parameter is used to control the similarity decay rate. Let represent the Euclidean norm. The morphological similarity matrix is a symmetric matrix with diagonal elements of 1. In practice, a Laplace transform is performed on the morphological similarity matrix to construct a standardized Laplace matrix. The calculation of the standardized Laplace matrix is based on the morphological similarity matrix and the degree matrix. The degree matrix is a diagonal matrix, and its diagonal elements are the sum of all elements in the corresponding row of the morphological similarity matrix. The standardized Laplace matrix is used to capture the structural relationships between the measurement curves. The eigenvectors corresponding to the first k largest eigenvalues of the standardized Laplace matrix are calculated. These eigenvectors are arranged row-wise to form an eigenvector matrix. Each row of the eigenvector matrix corresponds to a representation of the original measurement curve in the low-dimensional embedding space. The dimension of the row vectors is determined by the number of eigenvalues k selected.
[0084] Optionally, an improved density peak clustering algorithm is used to cluster the row vectors of the feature vector matrix. This improved algorithm automatically partitions the row vectors by introducing a local density adaptive truncation distance and a hierarchical merging-based automatic cluster center identification strategy. For each row vector in the feature vector matrix, the Euclidean distance from the row vector to all other row vectors is calculated. The Euclidean distance between row vectors reflects the difference in the shape of the metric curves represented by the row vectors in the low-dimensional space. In specific implementation, for each row vector, the distance to its k-th nearest neighbor row vector is used as the local neighborhood radius. The number of other row vectors falling within the local neighborhood radius is counted and defined as the local density of the row vector, where k is a preset neighborhood parameter. The local density adaptive truncation distance dynamically adjusts the neighborhood range of each row vector according to the data distribution. The minimum distance from each row vector to all row vectors with a local density greater than the row vector's local density is calculated and defined as the relative distance of the row vector. The relative distance measures the degree of separation between the row vector and row vectors with higher local densities. Calculate the decision value for each row vector as a cluster center based on the product of its local density and relative distance. Row vectors with high decision values have high local density and high relative distance, and are identified as potential cluster centers. Select points with decision values significantly higher than their surrounding row vectors as initial cluster centers. This determination can be achieved by ranking the decision values or setting a threshold. Assign the remaining non-center row vectors to the class containing the nearest center row vector with a higher local density, completing the initial partitioning. The assignment process ensures that each non-center row vector belongs to the class corresponding to the nearest center row vector with a higher local density.
[0085] It is understandable that for the initially partitioned clusters, the distance between each pair of cluster centers and the average intra-cluster distance are calculated. The cluster center is the mean vector of all row vectors within the cluster, and the average intra-cluster distance is the average Euclidean distance from all row vectors within the cluster to the cluster center. Based on a hierarchical merging strategy, clusters that are too close together and have loose intra-cluster structures are merged until a preset inter-cluster distance threshold is met. The inter-cluster distance threshold is defined as the ratio of the minimum inter-cluster distance to the average intra-cluster distance. When the distance between two cluster centers is less than the inter-cluster distance threshold multiplied by the sum of the average intra-cluster distances of the two clusters, a merging operation is triggered. After merging, the center and average intra-cluster distance of the new cluster are recalculated. In some embodiments, the hierarchical merging strategy is iteratively performed until the distance between all clusters is greater than the inter-cluster distance threshold, thereby achieving automatic partitioning of row vectors and obtaining the clustering results of the row vectors. In practical implementation, the clustering results of the row vectors are mapped back to the original metering curves. Each row vector in the clustering results corresponds to one original metering curve, so the category label of the row vector is directly assigned to the corresponding metering curve, completing the clustering based on curve shape and obtaining the preliminary classification results of the electricity metering curves. The preliminary classification results group electricity metering curves with similar shapes into the same category. Optionally, during the mapping process, the consistency of the clustering results is verified. For example, it is checked whether the morphological features of the metering curves within the same category have high similarity, and whether the morphological features of the metering curves between different categories have significant differences. This is achieved by comparing the average distance of the morphological feature vectors within and between categories. It can be understood that the improved density peak clustering algorithm adapts to the sparsity variation of the data distribution through local density adaptive truncation distance, and avoids manually setting the number of cluster centers through the hierarchical merging-based automatic cluster center identification strategy, thereby improving the automation and accuracy of clustering.
[0086] In one embodiment of the present invention, see [reference] Figure 3 A series of different candidate cluster numbers are set. For each candidate cluster number, the above process based on improved spectral clustering is repeated to obtain the clustering results under each candidate cluster number. The total intra-cluster dispersion of the clustering results corresponding to each candidate cluster number is calculated. The total intra-cluster dispersion is defined as the sum of the squared Euclidean distances of all measurement value curves within each category to their category centers. An elbow curve is plotted with the candidate cluster number as the x-axis and the total intra-cluster dispersion as the y-axis. The rate of decrease of the total intra-cluster dispersion between adjacent candidate cluster numbers on the elbow curve is calculated, and the candidate cluster number corresponding to the inflection point where the rate of decrease slows down is determined as the optimal cluster number. Based on the optimal cluster number, the measurement value curves of the electricity meters are finally classified, thereby dividing the electricity meters in different operating states into different categories.
[0087] In specific implementation, the optimal number of categories for the electricity meter's operating status is determined based on the clustering results and the elbow rule. A series of different candidate categories are set, which is an integer sequence from a preset minimum to a preset maximum value, for example, the candidate category sequence is [2,3,4,5,6,7,8]. For each candidate category, the process based on the improved spectral clustering algorithm is repeated. The improved spectral clustering algorithm process includes extracting the morphological features of the metering curves, constructing a morphological similarity matrix, performing a Laplace transform, calculating eigenvectors, and performing improved density peak clustering on the row vectors of the eigenvector matrix to obtain the clustering results under the candidate category. Each candidate category corresponds to a clustering result that divides the electricity meter's metering curves into a specific number of categories. In some embodiments, the total intra-class dispersion of the clustering results corresponding to each candidate category is calculated. The total intra-class dispersion is defined as the sum of the squared Euclidean distances of all metering curves within each category to their category centers, expressed by the formula:
[0088]
[0089] in: This is the current number of candidate categories. This represents the m-th category. It belongs to the category The morphological feature vector of a measurement value curve. It is a category The mean center of all morphological feature vectors in the middle. Represents the Euclidean norm and the total within-class scatter. To measure the compactness of clustering results, a smaller overall dispersion value within a cluster indicates that the morphological characteristics of the measurement curves within the same category are more similar.
[0090] In practice, an elbow curve is plotted with the number of candidate categories on the x-axis and the total intra-class dispersion on the y-axis. This curve visually illustrates how the total intra-class dispersion changes as the number of candidate categories increases. The rate of decrease in the total intra-class dispersion between adjacent candidate categories on the elbow curve is calculated. This rate is defined as the difference between the total intra-class dispersion corresponding to the next candidate category and the previous candidate category, divided by the difference between the previous candidate category and the previous candidate category. The rate of decrease reflects the degree of compactness improvement brought about by increasing the number of categories. Optionally, the number of candidate categories corresponding to the inflection point where the rate of decrease slows down is determined as the optimal number of categories. The determination of a slowdown in the rate of decrease can be achieved by observing changes in the rate of decrease. For example, when the decrease in the rate of decrease is below a set threshold, it is considered that the rate of decrease has slowed down, and the corresponding previous candidate category is often selected as the inflection point. It can be understood that the number of candidate categories corresponding to the inflection point means that the contribution of further increasing the number of categories to improving cluster compactness is significantly reduced. This number of candidate categories can balance model complexity and clustering effect, and is therefore determined as the optimal number of categories.
[0091] In some embodiments, the metering curves of the electricity meter are finally classified according to the optimal number of classifications, thereby dividing the electricity meters in different operating states into different categories. The final classification is achieved by re-executing the complete process based on the improved spectral clustering algorithm with the optimal number of classifications as a parameter, or by adjusting the merging and splitting of the preliminary clustering results to achieve the optimal number of classifications. In practice, by comparing the total intra-class dispersion values under different candidate class numbers, the data comparison can be clearly shown. For example, when the number of candidate classes is 3, the total intra-class dispersion is 150.5; when the number of candidate classes is 4, the total intra-class dispersion is 120.2; and when the number of candidate classes is 5, the total intra-class dispersion is 115.8. The decrease rate from the number of candidate classes 3 to 4 is calculated as (150.5-120.2) / 150.5=0.201, and the decrease rate from the number of candidate classes 4 to 5 is (120.2-115.8) / 120.2=0.037. The latter decrease rate of 0.037 is significantly smaller than the former decrease rate of 0.201, indicating that the decrease rate slows down significantly after the number of candidate classes is 4. Therefore, the inflection point corresponds to the number of candidate classes 4, and the optimal number of classes is determined to be 4. Optionally, after determining the optimal number of categories, a final classification result report is generated. The report lists the meter identifiers included in each category and the morphological feature centers of each category, thus completing the optimal division of the meter operating status. It can be understood that determining the optimal number of categories for the meter operating status based on clustering results and the elbow rule provides a reasonable and data-driven basis for subsequent construction of the status evaluation model, avoiding the arbitrariness of subjectively setting the number of categories.
[0092] In one embodiment of the present invention, the total meter readings of a target area within a set time period are obtained. From the standardized electricity meter operation data sequence, the meter reading curves of all electricity meters classified into the same category are extracted. The readings of all electricity meter reading curves within the same category at the same time are summed to obtain the time series of sub-meter readings for the same category. The time series of sub-meter readings for all categories within the target area are summed to construct the time series of the theoretical total meter readings for the region. Based on the principle of energy conservation, an equality constraint is established between the total meter readings of the region and the time series of the theoretical total meter readings for the region. This equality constraint must consider the operating errors of electricity meters within each category. A category operating error variable is introduced to represent the comprehensive level of operating errors of electricity meters within each category. A state evaluation model is constructed with the objective of minimizing the difference between the total meter readings of the region and the time series of the theoretical total meter readings for the region, and with the equality constraint as a condition. A data optimization strategy is used to screen effective data points in the standardized electricity meter operation data sequence, specifically including the following steps. Standardized electricity meter operation data sequences are time-aligned to ensure strict synchronization of timestamps for all electricity meters and the regional master meter within the area. The rate of change of each meter's reading at each moment is calculated, and abrupt data points exceeding the normal operating threshold are removed. The periodicity of the metering data is analyzed, and multiple consecutive, stable time segments are selected as effective data acquisition windows within the steady-state operating cycle. Within these effective acquisition windows, incomplete data points due to communication interruptions or missing data are removed. From the remaining data points, samples are uniformly collected across each time segment based on the data point density distribution to select the effective set of data points for constructing and solving the state assessment model.
[0093] In practical implementation, based on the principle of energy conservation, a state evaluation model is constructed, with the regional total meter reading as a constraint and the operating error of each category of electricity meters as the solution objective. This model acquires the regional total meter reading data for the target area within a set time period. The regional total meter reading data is time-series data reflecting the total electricity consumption of the target area, collected synchronously with the electricity meter reading curve data. From the standardized electricity meter operating data sequence, the reading curves of all electricity meters classified into the same category are extracted. Electricity meters in the same category have similar operating states and curve shapes. The readings of all electricity meter reading curves within the same category at the same time are summed to obtain the time series of sub-item readings for the same category. The sub-item reading time series represents the sum of the readings of all electricity meters in that category at the corresponding time. In some embodiments, the time series of sub-item readings for all categories within the target area are summed to construct the regional theoretical total meter reading time series. The regional theoretical total meter reading time series is a new time series formed by the sum of the sub-item readings of all categories at each time point, and theoretically should be consistent with the regional total meter reading data. Based on the principle of energy conservation, an equality constraint is established between the regional total meter readings and the time series of the regional theoretical total meter readings. This equality constraint needs to consider the operating errors of each category of electricity meters. A category-specific operating error variable is introduced to represent the overall level of operating errors within each category of electricity meters. The formula is as follows:
[0094]
[0095] in: Indicates the total number of categories. Let m represent the category running error variable for the m-th category, which is a scalar to be solved. This represents the itemized measurement value of the m-th category at time t. Let t represent the total regional measurement data. A state assessment model is constructed with the objective of minimizing the difference between the total regional measurement data and the time series of the theoretical total regional measurement data, and with equality constraints as conditions. The objective function is typically to minimize the sum of squares of the differences.
[0096] A data optimization strategy is used to screen valid data points in standardized electricity meter operation data sequences. Time alignment processing is then performed on these sequences to ensure strict synchronization of the timestamps of all electricity meters and the regional master meter within the region. This time alignment process unifies data from different electricity meters into the same timestamp sequence through interpolation or resampling. The rate of change of each electricity meter's reading at each moment is calculated, and abrupt data points with rates of change exceeding a normal operating threshold are removed. This threshold is set based on historical data or physical laws; for example, an absolute change exceeding 10% per minute is considered an abrupt change. The periodicity of the metering data is analyzed. Within the steady-state operating cycle, multiple consecutive time segments with stable data are selected as effective data acquisition windows. The steady-state operating cycle typically corresponds to the user's regular electricity consumption pattern, and stable data means that the metering value fluctuation is less than a set range. In some embodiments, within the effective data acquisition window, incomplete data points caused by communication interruptions or data loss are removed. Incomplete data points refer to records with missing data at any electricity meter or regional master meter at that time point. From the remaining data points, based on the density distribution of the data points, uniform sampling is performed across each time segment to select the effective set of data points for constructing and solving the state evaluation model. Uniform sampling avoids excessive concentration of data over time. Optionally, refer to Table 1, which shows a simplified data comparison illustrating the data point situation before and after the data optimization strategy:
[0097] Table 1: Comparison of Data Optimization Strategy Before and After Screening
[0098]
[0099] In practical implementation, a data optimization strategy eliminates a large number of data points with abrupt changes, missing data, or data in non-steady-state periods. The effective data point set is evenly distributed within the stable operating period, thereby improving the robustness and accuracy of the subsequent state assessment model. It can be understood that the data optimization strategy ensures the quality of data used for model construction and reduces the interference of outlier data on operational error estimation. Optionally, the selection of the effective data acquisition window can be based on the electricity load curve, identifying relatively stable periods of daily load, such as nighttime off-peak hours, as the effective data acquisition window. When constructing the state assessment model, only the time t corresponding to the effective data point set and its corresponding... and The data forms a series of equality constraint equations. It can be understood that the state assessment model constructed based on the principle of energy conservation transforms the problem of individual electricity meter operating errors, which are difficult to measure directly, into an optimization problem of estimating the overall category error under the constraint of the total meter.
[0100] In one embodiment of the present invention, the state evaluation model is expressed as a system of linear equations on the set of effective data points. The coefficient matrix of the linear equations is the design matrix, and the unknown vectors are the operational error variables of each category. The condition number of the design matrix is calculated to determine whether the state evaluation model is ill-conditioned. An improved Tikhonov regularization method is used to process the ill-conditioned model. The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix and combines the regularization matrix with the Tikhonov regularization term. A regularized least squares problem containing the regularization term is constructed to transform the original ill-conditioned state evaluation model into a well-conditioned regularized least squares problem. Solving the regularized least squares problem yields stable solutions for the category operational error variables. The equation satisfied by the stable solution is the stable energy meter operational error estimation equation.
[0101] The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix. The specific steps are as follows: 1. Perform singular value decomposition on the design matrix to obtain its singular value sequence. 2. Analyze the decay characteristics of the singular value sequence to identify the inflection points where singular values rapidly decrease from large to small values. 3. Based on the inflection points, divide the singular value sequence into a dominant singular value region and a tail-end small singular value region. 4. For the tail-end small singular value region, construct a diagonal regularization matrix. The elements on the diagonal of the diagonal regularization matrix are inversely proportional to the reciprocal of the corresponding singular value, thus imposing a stronger constraint on the solution components corresponding to the small singular values. 5. Combine the constructed regularization matrix with the standard Tikhonov regularization parameters to form a regularization term with an adaptive structure, used to control the smoothness of the solution and the strength of suppression of ill-conditioned models.
[0102] In practical implementation, the state evaluation model is expressed as a system of linear equations on the set of valid data points. The coefficient matrix of the linear equation system is the design matrix, and the unknown vectors are the operational error variables of each category. For a set containing M categories and N valid data points, the dimension of the design matrix A is N×M, and the element in the i-th row and j-th column of the design matrix A is the sub-measure value of the j-th category at the time of the i-th valid data point. The dimension of observation vector b is N×1, and the i-th element of observation vector b is the regional summary table value at the time of the i-th valid data point. The unknown vector θ has a dimension of M×1, and the j-th element of the unknown vector θ is the runtime error variable of the j-th category. The system of linear equations is in the form of The condition number of the design matrix is calculated to determine whether the state evaluation model is ill-conditioned. The condition number of the design matrix is obtained by calculating the ratio of the maximum singular value to the minimum singular value of the design matrix. A condition number much greater than 1 indicates that the design matrix is close to singular and the state evaluation model is ill-conditioned.
[0103] In some embodiments, an improved Tikhonov regularization method is used to handle ill-conditioned models. Based on the distribution characteristics of the singular values of the design matrix, the improved Tikhonov regularization method adaptively constructs a regularization matrix and combines it with Tikhonov regularization terms to construct a regularized least squares problem containing regularization terms, transforming the original ill-conditioned state evaluation model into a well-conditioned regularized least squares problem. Solving the regularized least squares problem yields stable solutions to the categorical operating error variables. The equation satisfied by the stable solutions is the stable energy meter operating error estimation equation. The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix and performs singular value decomposition on the design matrix to obtain its singular value sequence. The singular value decomposition form of the design matrix A is: Where U and V are orthogonal matrices, and Σ is a diagonal matrix whose diagonal elements are... A sequence of singular values is constructed. The decay characteristics of the singular value sequence are analyzed to identify the inflection point where singular values rapidly decrease from large to small values. This inflection point is the singular value index; after this index, the singular values become very small and their changes become gradual. Optionally, based on the inflection point, the singular value sequence is divided into a dominant singular value region and a tail-end small singular value region. The dominant singular value region contains the larger singular values before the inflection point, while the tail-end small singular value region contains the small singular values at and after the inflection point. For the tail-end small singular value region, a diagonal regularization matrix is constructed. The elements on the diagonal of the diagonal regularization matrix are inversely proportional to the reciprocal of the corresponding singular value, thus imposing a greater constraint on the solution components corresponding to the small singular values. It can be understood that the regularization matrix L is an M×M diagonal matrix, whose diagonal elements... Defined as: if singular values If it belongs to the dominant singular value region, then If singular values If it belongs to the region of tiny singular values at the tail, then ,in It is a scaling factor, typically taken as the average of the singular values in the dominant singular value region. This construction method makes the regularization term... In this approach, the solution components corresponding to tiny singular values are penalized to a greater extent, thereby effectively suppressing the ill-conditioned oscillations of the solution.
[0104] In practice, the constructed regularization matrix is combined with the standard Tikhonov regularization parameters to form a regularization term with an adaptive structure. This term controls the smoothness of the solution and the strength of suppression against ill-conditioned models. The adaptive structure is reflected in the fact that the regularization matrix L can be specifically adjusted according to the singular value distribution of the specific design matrix. Table 2 shows a simplified example illustrating the relationship between the singular value distribution of the design matrix and the construction of the adaptive regularization matrix.
[0105] Table 2: Singular Value Distribution and Regularization Matrix Construction Table for Design Matrix
[0106]
[0107] In some embodiments, the inflection point location is determined by observing the relative rate of decline of singular values, for example, when the rate of decline of adjacent singular values... When the threshold is exceeded, j is considered an inflection point. It can be understood that through this adaptive construction, the improved Tikhonov regularization method, while ensuring that the dominant solution components are not excessively penalized, strongly suppresses noise amplification caused by small singular values, thus obtaining a more physically reasonable stable solution. Optional, Tikhonov regularization parameters... The L-curve method or generalized cross-validation method can be used to select the appropriate method. After solving the constructed regularized least squares problem, the obtained stable solution vector θ is the stable estimate of the operating error variables for each category. Substituting it into the original model relationship constitutes the stable operating error estimation equation for the energy meter.
[0108] In one embodiment of the present invention, the stable energy meter operating error estimation equation is rearranged into a matrix solution form. A stable numerical algorithm based on QR decomposition is used to solve the stable energy meter operating error estimation equation, obtaining estimated values of operating error variables for each category. Based on the estimated values of operating error variables for each category and the morphological similarity of the meter readings within each category, the category operating errors are allocated to each energy meter within that category. An individual operating error estimate is calculated for each energy meter; this individual operating error estimate is the result of weighting the category operating error variable estimates based on morphological similarity. The operating status of the energy meters is diagnosed based on the operating error estimates, generating diagnostic analysis results. The specific steps are as follows: A normal operating error threshold range is set for the estimated values of operating error variables for each category and the individual operating error estimates for each energy meter. The calculated estimated values of operating error variables for each category are compared with the normal operating error threshold range to identify abnormal categories where the operating error exceeds the threshold. The calculated individual operating error estimates for each energy meter are compared with the normal operating error threshold range to identify abnormal energy meters where the operating error exceeds the threshold. For identified anomaly categories and abnormal energy meters, their anomaly types are labeled based on the morphological characteristics of their metering curves. Anomaly types include systematic deviations, random jumps, or trend drifts. The estimated operating errors, anomaly diagnostic labels, and anomaly types of all energy meters are integrated to generate a structured energy meter operation diagnostic analysis report.
[0109] In practical implementation, the stable operating error estimation equation of the energy meter is solved, and the estimated operating error value of the energy meter in each category is calculated. The stable operating error estimation equation of the energy meter is then rearranged into a matrix solution form, which is usually expressed as follows: In this system, matrix A is the design matrix, vector b is the observation vector, matrix L is the adaptively constructed regularization matrix, scalar λ is the Tikhonov regularization parameter, and vector δ is a column vector composed of the estimated values of the category-specific operating error variables to be solved. A stable numerical algorithm based on QR decomposition is used to solve the stable energy meter operating error estimation equations, obtaining the estimated values of the operating error variables for each category. The QR decomposition-based algorithm obtains the estimated values of the operating error variables for each category by using the coefficient matrix... The error is decomposed into an orthogonal matrix Q and an upper triangular matrix R, and then the vector δ is solved by back substitution. In some embodiments, based on the estimated values of the operating error variables for each category and the morphological similarity of the meter readings within each category, the category operating error is allocated to each meter within the category. The morphological similarity is calculated using the Gaussian kernel similarity calculated during the clustering stage. The allocation weight of a meter within a category is proportional to its average morphological similarity with other meters within the category. The individual operating error estimate for each meter is calculated. The individual operating error estimate is the result of weighting the category operating error variable estimate based on morphological similarity, expressed by the formula:
[0110]
[0111] in: This is the estimated value of the individual operating error of the i-th electricity meter. This is the estimated value of the category operation error variable for the category m to which the i-th electricity meter belongs. It is a normalized weighting of electricity meter i within category m, calculated based on morphological similarity.
[0112] The operating status of the electricity meter is diagnosed based on the estimated operating error values, generating diagnostic analysis results. Normal operating error threshold ranges are set for the estimated operating error variables of each category and for the individual operating error estimates of the electricity meter. These threshold ranges are intervals, such as [-0.02, +0.02], indicating that a relative error within ±2% is considered normal. In practice, the calculated estimated operating error variables for each category are compared with the normal operating error threshold ranges to identify abnormal categories where the operating error exceeds the threshold. For example, if the estimated operating error variable value for a certain category is +0.05, exceeding the upper limit of +0.02, then that category is identified as abnormal. Optionally, the calculated estimated individual operating errors of the electricity meters are compared with the normal operating error threshold range to identify abnormal electricity meters whose operating errors exceed the threshold. In the data comparison, assuming a category containing three electricity meters, the estimated value of its category operating error variable is +0.05. The estimated values of the individual operating errors of the three electricity meters calculated through weight allocation are +0.048, +0.051, and +0.049, respectively, all exceeding the upper limit of +0.02. Therefore, these three electricity meters are identified as abnormal electricity meters. For the identified abnormal categories and abnormal electricity meters, their abnormality types are labeled based on the morphological characteristics of their metering curves. Abnormality types include systematic deviation, random jumps, or trend drift. Systematic deviation refers to the overall metering curve continuously deviating from the normal shape; random jumps refer to the existence of isolated peaks or troughs in the metering curve; and trend drift refers to the metering curve showing a continuous upward or downward trend.
[0113] It is understandable that labeling anomalies requires tracing back the original morphological characteristics of the metering curves. For example, if the average value of an abnormal energy meter's metering curve is significantly higher than the average value of normal curves of the same type, and the curve is smooth overall without jumps, it is labeled as a systematic deviation; if the curve has sharp pulses at a single moment, it is labeled as an accidental jump. In some embodiments, the estimated operating errors, anomaly diagnostic identifiers, and anomaly types of all energy meters are integrated to generate a structured energy meter operation diagnostic analysis result report. The structured report is presented in tabular form, and the report content includes the energy meter's unique identifier, category, individual operating error estimate, whether it is abnormal, anomaly type (if abnormal), and estimated operating error variables for the category. Optionally, the diagnostic analysis result report may also include a simple data comparison summary, such as the total number of abnormal energy meters, the distribution of the number of abnormal energy meters in each category, and the range of estimated operating error variables for each category. It is understood that diagnosing the operating status of energy meters based on operating error estimates and generating diagnostic analysis results provides a clear, data-driven decision-making basis for on-site verification, maintenance, or replacement of energy meters.
[0114] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1. A method for operational error diagnosis and analysis based on electricity meters, characterized in that, Includes the following steps: The metering curve data of all electricity meters in the target area within a set time period are obtained from the metering automation system. The metering curve data is preprocessed to form a standardized electricity meter operation data sequence. Based on the improved spectral clustering algorithm, the standardized electricity meter operation data sequence is subjected to curve-shaped clustering. The optimal number of categories for the electricity meter operation status is determined according to the clustering results and the elbow rule, and the electricity meters in different operation statuses are divided into different categories. Based on the principle of energy conservation, a state evaluation model is constructed with the total meter reading of the region as a constraint and the operating error of each type of electricity meter as the solution objective. The effective data points in the standardized electricity meter operation data sequence are screened using a data optimization strategy, and the state evaluation model is subjected to ill-conditioning processing based on the improved Tikhonov regularization method to obtain a stable electricity meter operation error estimation equation. Solve the stable energy meter operation error estimation equation, calculate the operation error estimate of energy meters in each category, diagnose the operation status of energy meters based on the operation error estimate, and generate diagnostic analysis results.
2. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, The improved spectral clustering algorithm is used to perform curve-shaped clustering on the standardized electricity meter operation data sequence, specifically including: The morphological features of each metering value curve in the standardized electricity meter operation data sequence are extracted. The morphological features include the mean, variance, skewness, kurtosis, and low-frequency approximation coefficients after wavelet decomposition of the curve. Based on the morphological features of all extracted curves, calculate the morphological similarity between any two measurement value curves and construct a morphological similarity matrix; Perform a Laplace transform on the morphological similarity matrix to construct a normalized Laplace matrix; Calculate the eigenvectors corresponding to the first k largest eigenvalues of the standardized Laplacian matrix, and arrange the eigenvectors in rows to form an eigenvector matrix; An improved density peak clustering algorithm is used to cluster the row vectors of the feature vector matrix. The improved density peak clustering algorithm automatically divides the row vectors by introducing a local density adaptive truncation distance and an automatic cluster center identification strategy based on hierarchical merging. The clustering results of the row vectors are mapped back to the original metering curves to complete the clustering based on the curve shape, thus obtaining the preliminary classification results of the electricity meter metering curves.
3. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 2, characterized in that, The improved density peak clustering algorithm achieves automatic partitioning of row vectors by introducing a local density adaptive truncation distance and an automatic cluster center identification strategy based on hierarchical merging. Specifically, it includes: For each row vector in the eigenvector matrix, calculate its Euclidean distance to all other row vectors; For each row vector, the distance from the row vector to its k-th nearest neighbor row vector is taken as its local neighborhood radius. The number of other row vectors falling within the local neighborhood radius is counted and defined as the local density of the row vector, where k is a preset neighborhood parameter. The minimum distance from each row vector to all row vectors with a density greater than its local density is defined as the relative distance between the row vectors. The decision value for a cluster center is calculated based on the product of the local density and the relative distance of all row vectors. Points with significantly higher decision values than their surrounding row vectors are selected as initial cluster centers; The remaining non-center row vectors are assigned to the class of the nearest center row vector with a higher local density, thus completing the initial partitioning. For the initially divided clusters, the distance between the centers of each pair of clusters and the average distance within each cluster are calculated. Based on the hierarchical merging strategy, clusters that are too close and have loose intra-cluster structures are merged until the preset inter-cluster distance threshold is met, thus achieving automatic partitioning of row vectors.
4. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, The determination of the optimal number of categories for the operating status of the electricity meter based on clustering results and the elbow rule specifically includes: Set a series of different candidate classification numbers, and for each candidate classification number, repeatedly execute the process of performing curve-shaped clustering on the standardized electricity meter operation data sequence based on the improved spectral clustering algorithm to obtain the clustering results under the candidate classification number; Calculate the total intra-class dispersion of the clustering results corresponding to each candidate category number. The total intra-class dispersion is defined as the sum of the squared Euclidean distances of all measurement curves within each category to their category centers. Plot an elbow curve with the number of candidate categories on the x-axis and the total intra-class dispersion on the y-axis; Calculate the rate of decrease in the total intra-class dispersion between adjacent candidate class numbers on the elbow curve, and determine the candidate class number corresponding to the inflection point where the rate of decrease slows down as the optimal number of classes; Based on the optimal classification number, the metering curves of the electricity meters are finally classified, thereby classifying electricity meters in different operating states into different categories.
5. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, Based on the principle of energy conservation, a state evaluation model is constructed, with the total meter reading of the region as a constraint and the operating error of each type of electricity meter as the solution objective. Specifically, this includes: Obtain the regional summary table measurement data of the target area within the set time period; From the standardized electricity meter operation data sequence, extract the metering value curves of all electricity meters classified into the same category, sum the readings of all electricity meter metering value curves in the same category at the same time, and obtain the time series of sub-metering values of the same category. Sum the time series of all categories of sub-measures within the target area to construct the time series of the theoretical total measure of the area; Based on the principle of energy conservation, an equality constraint is established between the total meter readings of the region and the time series of the theoretical total meter readings of the region. The equality constraint needs to take into account the operating errors of the electricity meters in each category. A category-based operational error variable is introduced to represent the comprehensive level of operational error of electricity meters within each category. A state evaluation model is constructed with the objective of minimizing the difference between the time series of the total meter readings of the region and the theoretical total meter readings of the region, and with the equality constraints as the condition.
6. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, The step of using a data optimization strategy to filter valid data points in the standardized electricity meter operation data sequence specifically includes: The standardized electricity meter operation data sequence is time-aligned to ensure that the timestamps of the metering values of all electricity meters and the regional master meter are strictly synchronized. Calculate the rate of change of the meter readings of each electricity meter at each moment, and remove abrupt data points whose rate of change exceeds the normal operating threshold. Analyze the periodic patterns of measurement data, and select multiple continuous and stable time segments as effective data acquisition windows within the steady-state operating cycle; Within the effective data acquisition window, incomplete data points caused by communication interruption or data loss are removed; From the remaining data points, samples are uniformly taken in each time segment according to the density distribution of the data points, and finally the effective set of data points for constructing and solving the state evaluation model is selected.
7. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 6, characterized in that, The improved Tikhonov regularization method is used to reduce the ill-conditioning of the state evaluation model, resulting in a stable equation for estimating the operating error of the electricity meter, specifically including: The state evaluation model is expressed as a system of linear equations on the set of effective data points, where the coefficient matrix of the system of linear equations is the design matrix and the unknown vectors are the operational error variables of each category. Calculate the condition number of the design matrix to determine whether the state evaluation model is ill-conditioned; An improved Tikhonov regularization method is used to process ill-conditioned models. The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix, and combines the regularization matrix with the Tikhonov regularization term. Construct a regularized least squares problem that includes the regularization term, transforming the original ill-conditioned state evaluation model into a well-conditioned regularized least squares problem; Solving the regularized least squares problem yields a stable solution for the category of operating error variables. The equation satisfied by the stable solution is the stable energy meter operating error estimation equation. The improved Tikhonov regularization method adaptively constructs a regularization matrix based on the distribution characteristics of the singular values of the design matrix, specifically including: The design matrix is subjected to singular value decomposition to obtain its singular value sequence; Analyze the decay characteristics of the singular value sequence to identify the inflection point where the singular value rapidly decreases from a large value to a small value; Based on the inflection point location, the singular value sequence is divided into a dominant singular value region and a tail-end small singular value region. For the small singular value region at the tail, a diagonal regularization matrix is constructed. The elements on the diagonal of the diagonal regularization matrix are inversely proportional to the reciprocal of the corresponding singular value, so as to impose greater constraints on the solution components corresponding to the small singular values. The constructed regularization matrix is combined with the standard Tikhonov regularization parameters to form a regularization term with an adaptive structure, which is used to control the smoothness of the solution and the strength of suppression of ill-conditioned models.
8. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, Solve the stable energy meter operating error estimation equation and calculate the operating error estimate for each category of energy meters, specifically including: The stable energy meter operating error estimation equation is rearranged into a matrix solution form; A stable numerical algorithm based on QR decomposition is used to solve the stable energy meter operating error estimation equation to obtain estimated values of operating error variables for each category. Based on the estimated values of the operating error variables for each category and the similarity of the shape of the meter reading curves within each category, the operating error of each category is allocated to each meter within that category. Calculate the individual operating error estimate for each electricity meter. The individual operating error estimate is the result obtained by weighting the category operating error variable estimate based on morphological similarity.
9. The method for operational diagnosis and analysis based on electricity meter operating errors according to claim 1, characterized in that, Based on the estimated operating error, the operating status of the electricity meter is diagnosed, and diagnostic analysis results are generated, specifically including: Set normal operating error threshold ranges for the estimated values of operating error variables for each category and for the estimated values of individual operating errors of electricity meters; The calculated estimated values of each category of operating error variable are compared with the normal operating error threshold range to identify abnormal categories where the operating error exceeds the threshold. The calculated estimated individual operating error of the electricity meter is compared with the normal operating error threshold range to identify abnormal electricity meters whose operating error exceeds the threshold. For the identified anomaly categories and abnormal energy meters, their anomaly types are marked based on the morphological characteristics of their metering curves. The anomaly types include systematic deviations, random jumps, or trend drifts. The system integrates the estimated operating errors, anomaly diagnostic indicators, and anomaly types of all electricity meters to generate a structured report of electricity meter operation diagnostic analysis results.
10. A diagnostic analysis system for operational errors of electricity meters, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the operation diagnosis and analysis method based on the operation error of the electricity meter as described in any one of claims 1 to 9.