Electric energy meter record query method and system based on electric energy meter platform
By improving the clustering algorithm and the high-risk record query index table, the problem of slow query response in the existing technology is solved, realizing fast location and efficient processing of electricity meter records, and improving query efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGYIN ZHONGHE POWER METER
- Filing Date
- 2026-01-30
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies, while efficiently compressing and storing electricity meter data, lack intelligent indexes for risk identification when querying records with random fluctuations, resulting in slow query response and wasted computing resources.
An improved clustering algorithm is used to cluster records with random fluctuations, and a high-risk record query index table is constructed. Fine-grained grouping is performed using comprehensive distance and adaptive minimum number of points to filter out dangerous clusters and independent dangerous records. Records that match the query request are processed first.
It enables rapid location and priority processing of high-risk events, improves query efficiency and accuracy, reduces computational overhead, and supports the in-depth utilization of electricity meter data in smart grids.
Smart Images

Figure CN121614477B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing. More specifically, this invention relates to a method and system for querying electricity meter records based on an electricity meter platform. Background Technology
[0002] With the deepening of smart grid construction and the popularization of Internet of Things technology, metering devices such as single-phase prepaid smart meters have achieved high-frequency data acquisition, generating massive amounts of time-series data streams such as voltage, current, and power.
[0003] To cope with the enormous storage pressure, existing technologies generally employ efficient data compression algorithms. For example, the patent application CN120546706A (A method for storing electricity data in a single-phase prepaid energy meter) effectively reduces storage overhead by classifying data into categories with obvious patterns and categories with random fluctuations and using an adaptive compression algorithm for storage. This method generates metadata for each record in the category with obvious patterns or random fluctuations (data records within a continuous time window), containing the original electrical parameter sequence (current, voltage, power) and various tag features (such as change frequency, fluctuation amplitude, and dynamic weight).
[0004] However, the aforementioned existing technologies mainly focus on compression efficiency during the storage stage. In practical application scenarios, when it is necessary to query records, especially those with random fluctuations, from massive compressed data, the lack of intelligent indexes for risk identification forces the system to perform a full scan and decompression of a large amount of data, resulting in slow query response and wasted computing resources.
[0005] Therefore, how to build a query method that can quickly locate electricity meter records based on the existing achievements in efficient compressed storage has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0006] To address the technical problem of how to construct a query method for quickly locating electricity meter records based on existing efficient compressed storage achievements, this invention provides solutions in the following aspects.
[0007] In the first aspect, the method for querying electricity meter records based on an electricity meter platform includes:
[0008] An improved clustering algorithm is used to cluster all extracted random fluctuation records, resulting in multiple clusters and multiple noise points; wherein, the records contain the original electrical parameter time series and label feature vectors;
[0009] Based on the clustering results, dangerous clusters and independent dangerous records are selected, and a high-risk record query index table is constructed for rapid location.
[0010] In response to a user query request, the system uses the high-risk record query index table to locate and prioritize the processing of dangerous clusters or individual dangerous records that match the query request, and then decompresses and displays them.
[0011] The improved clustering algorithm measures similarity based on the comprehensive distance calculated between the records. The comprehensive distance is obtained by weighted fusion of a first distance calculated from the original electrical parameter time series and a second distance calculated from the label feature vector.
[0012] Furthermore, the minimum number of points in the parameters of the improved clustering algorithm is determined by the risk indication value calculated from all the records and the local density of each record.
[0013] Preferably, the process of obtaining the comprehensive distance is as follows:
[0014] For any two records, the DTW distance between their original electrical parameter time series is calculated using the dynamic time warping algorithm and then normalized as the first distance.
[0015] Calculate the Euclidean distance between the label feature vectors of any two records, and use it as the second distance;
[0016] The combined distance is obtained by weighted summation of the first distance and the second distance.
[0017] Preferably, the ratio of the mean of the first distance between any two records to the sum of the mean of the first distance and the mean of the second distance between any two records is used as the weight of the first distance, and the difference between 1 and the weight of the first distance is used as the weight of the second distance.
[0018] Preferably, the process of obtaining the minimum number of points is as follows:
[0019] Based on the fluctuation range, dynamic weight, and calculated power consistency deviation of each record, a risk indication value is calculated for all records, and an initial minimum number of points is determined based on the risk indication value.
[0020] Calculate the local density for each record, and calculate the local minimum number of points for each record based on the initial minimum number of points and the local density;
[0021] The median of the local minimum point count of all the records is used as the minimum point count finally used by the clustering algorithm.
[0022] Preferably, the process for obtaining the power consistency deviation is as follows:
[0023] For any record, calculate the instantaneous power consistency deviation corresponding to each sampling time in the record. The instantaneous power consistency deviation is the absolute value of the difference between the instantaneous power value at that sampling time and the product of the instantaneous voltage value and the instantaneous current value at the same time, and then divide it by the maximum power value of the energy meter for normalization.
[0024] Calculate the arithmetic mean of the instantaneous power consistency deviations corresponding to all sampling times within the record, and use this as the power consistency deviation of the record.
[0025] Preferably, the process of obtaining the local density is as follows:
[0026] Taking any record as the center point, find its k-th nearest neighbor based on the comprehensive distance, and use the distance to this neighbor as the neighborhood radius; count the number of neighbor records within the neighborhood radius whose comprehensive distance to the center point is less than the average comprehensive distance between all records within the neighborhood radius, and take them as the number of close neighbors; normalize the number of close neighbors to obtain the local density.
[0027] Preferably, based on the fluctuation amplitude, dynamic weight, and calculated power consistency deviation of all records within each cluster, the cluster hazard is calculated, and clusters with cluster hazard greater than a preset hazard threshold are marked as hazardous clusters; for each noise point, if its power consistency deviation is greater than a first threshold, or its dynamic weight is greater than a second threshold, it is marked as an independent hazardous record.
[0028] Preferably, the high-risk record query index table includes:
[0029] Dangerous Cluster Index: Sorted in descending order of cluster danger level, each index contains the dangerous cluster ID, cluster danger level, and a list of address pointers in physical storage for all records within that dangerous cluster;
[0030] Independent Hazard Record Marking: Records the storage address and determination characteristics of each marked independent hazard record.
[0031] Preferably, the query request is parsed, and record addresses matching the query request are filtered out based on the high-risk record query index table; the corresponding data is decompressed according to priority, and the decompressed data and tag features are bound with the metadata obtained from the high-risk record query index table to generate a high-risk event report and output it for display.
[0032] Secondly, an energy meter record query system based on an energy meter platform includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the energy meter record query method based on the energy meter platform described in any one of the claims is implemented.
[0033] The beneficial effects of this invention are:
[0034] This invention, building upon the achievements of efficient compressed storage, introduces an improved clustering algorithm based on comprehensive distance and adaptive minimum point count to perform refined grouping and risk identification of random fluctuation records from electricity meters, constructing a structured query index table for high-risk records. This method effectively solves the response delay and resource waste problems caused by full-scanning in traditional queries, enabling rapid location and priority processing of high-risk events such as overload and suspected electricity theft. By focusing on high-risk targets, the system significantly improves query efficiency and accuracy, reduces computational overhead, and provides reliable technical support for the in-depth utilization of electricity meter data in the context of smart grids. Attached Figure Description
[0035] Figure 1 This is a flowchart of steps S1-S3 in the method for querying electricity meter records based on an electricity meter platform according to an embodiment of the present invention.
[0036] Figure 2 This is a schematic diagram of the structure of the electricity meter record query system based on the electricity meter platform according to an embodiment of the present invention. Detailed Implementation
[0037] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0038] The application scenario of this invention is to provide a method for querying electricity meter records based on an electricity meter platform. This method, building upon existing efficient compressed storage achievements, aims to solve the problem of quickly and accurately locating and identifying high-risk (high-dangerous) records among random fluctuation records from massive compressed data.
[0039] Reference Figure 1 The method for querying electricity meter records based on the electricity meter platform includes steps S1-S3, as follows:
[0040] S1: Using an improved clustering algorithm, all extracted random fluctuation records are clustered to obtain multiple clusters and multiple noise points.
[0041] Read all records classified as random fluctuations from the local storage of the electricity meter platform, which have been processed by existing storage methods. Extract the original electrical parameter vector and the tag feature vector for each random fluctuation record. The original electrical parameter vector includes voltage time series, current time series and power time series. The tag feature vector includes change frequency, fluctuation amplitude and dynamic weight.
[0042] All of the above data have been dimensionless and aligned according to time points.
[0043] While random fluctuation records have been identified and compressed for storage, these records may contain a mixture of events of different natures: they include both insignificant normal fluctuations and high-risk events requiring close monitoring, such as overloads and suspected electricity theft. Traditional query methods lack the ability to perform deep pattern mining on these records, failing to automatically group abnormal records with similar patterns or characteristics into one category, leading to unclear query and analysis objectives and low efficiency. Therefore, the first step is to perform refined grouping, i.e., clustering, on the extracted random fluctuation records to distinguish different potential event patterns.
[0044] However, directly applying traditional clustering algorithms such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise) using metrics such as Euclidean distance cannot effectively handle two major characteristics of electricity meter time-series data: the waveform may stretch or shift on the time axis; and the level of risk depends not only on the waveform but also on label features such as fluctuation frequency and amplitude.
[0045] For ease of analysis, the above-mentioned "random fluctuation records" will be collectively referred to as "records".
[0046] In one embodiment, any record is selected as the target record, and any record other than the target record is selected as the reference record.
[0047] The Dynamic Time Warping (DTW) distance between the original electrical parameter vectors of the target and reference records is calculated using a dynamic time warping algorithm to effectively handle waveform scaling and offset on the time axis and measure their physical waveform similarity. The DTW distance is then normalized to serve as the first distance.
[0048] In addition, the Euclidean distance between the feature vectors of the target record and the reference record is calculated as a second distance to measure the overall difference between the two in terms of frequency, intensity and business importance of change.
[0049] The first and second distances calculated above comprehensively reflect the physical nature and business risks between the records.
[0050] Furthermore, the first distance and the second distance are weighted and summed to obtain the comprehensive distance.
[0051] Specifically, the average of the first distance and the average of the second distance among all extracted records are obtained through the above operations. The ratio of the average of the first distance to the sum of the average of the first distance and the average of the second distance is used as the weight of the first distance, and the difference between 1 and the weight of the first distance is used as the weight of the second distance. The weight of the first distance is constrained between 0.3 and 0.7 to balance the contributions of the first distance and the second distance.
[0052] The comprehensive distance calculated above can effectively solve the problem of traditional Euclidean distance being sensitive to temporal misalignment, and integrates the differences in physical nature and risk characteristics. This allows abnormal patterns with similar shapes but slightly offset occurrence times, such as multiple overload spikes, to be accurately clustered into one class. At the same time, it can effectively separate records with similar waveforms but different risk characteristics, thus improving the accuracy of clustering results for real hazard patterns.
[0053] While the improved composite distance accurately measures the similarity between records, the DBSCAN algorithm's clustering performance depends not only on the distance metric but also on the setting of its core parameter, the "minimum number of points." The fixed minimum number of points is based on the assumptions of traditional Euclidean distance and uniform data distribution. When using the new composite distance and dealing with electricity meter data (which exhibits uneven risk distribution and large local density differences), the original fixed minimum number of points becomes inapplicable. Using a fixed value may result in a large number of redundant small clusters in high-risk, densely populated areas, masking the core pattern; conversely, in low-risk, sparsely populated areas, an excessively large minimum number of points may misclassify a small number of high-risk records that should be clustered as noise, leading to missed detections.
[0054] Therefore, based on the improved overall distance mentioned above, it is also necessary to collaboratively improve the minimum number of points.
[0055] In one embodiment, a risk indicator value is first calculated for each record. Based on the risk indicator value, the initial minimum number of points for all records is determined, which sets a global baseline to ensure that the algorithm tends to use a larger minimum number of points to improve the purity of the cluster in a high-risk environment.
[0056] However, a single global baseline is insufficient to address the uneven density distribution within the data. It is necessary to further calculate a local minimum number of points for each record that is compatible with the density of its local neighborhood. After calculating the local minimum number of points for all records, the median of all local minimum number of points is taken as the minimum number of points ultimately used by the above clustering algorithm.
[0057] The median of the local minimum number of points among all records is selected as the minimum number of points used in the clustering algorithm. This is because: firstly, the random fluctuation records of electricity meters are unevenly distributed in time and space, with significant local density differences. The mean is sensitive to extreme values and is easily distorted by interference from individual extremely high or low density areas. The mode is often unstable or non-existent for continuously distributed data. Secondly, the median is robust to outliers and can more robustly reflect the central trend of the dataset as a whole. This ensures that the algorithm does not over-split in dense areas and does not over-discard potential patterns in sparse areas, thereby improving the stability of the clustering results and the accuracy of pattern recognition.
[0058] The above initial minimum number of points satisfies the following relationship:
[0059]
[0060] In the formula, The initial minimum number of points mentioned above, This is the lower bound of the initial minimum number of points (e.g., a value of 3). This is a risk indicator value. This indicates rounding down. When the overall risk is high... When the value is large, Get bigger As the size increases, it means that the criteria for the algorithm to determine whether the core points form a cluster become more stringent, and vice versa. Smaller sizes mean that the criteria for judgment are relatively lenient.
[0061] The calculation of the aforementioned risk indication value essentially involves a multi-dimensional assessment of the risk level inherent in each record and the calculation of a global average. The risk level of each record is determined by three factors: the normalized value of its volatility, the dynamic weight, and the power consistency deviation. Specifically, the comprehensive risk level of each record is obtained by multiplying the normalized value of its volatility, the dynamic weight, and the power consistency deviation, and then taking the cube root. Finally, the arithmetic mean of the comprehensive risk levels of all records is calculated to obtain the aforementioned risk indication value.
[0062] The aforementioned power consistency deviation satisfies the following relationship:
[0063]
[0064]
[0065] In the formula, For power consistency deviation, The mean of the instantaneous power consistency deviation for all times within the recording period is... For the first The instantaneous power consistency deviation at that moment. For the first The instantaneous power value corresponding to the time. For the first The instantaneous voltage value corresponding to the given moment. For the first The instantaneous current value corresponding to the given moment. This represents the maximum power of the electricity meter. The larger the value, the more significantly the record deviates from the basic physical relationship that "voltage multiplied by current equals power" over the entire time period. Therefore, the record is more likely to correspond to dangerous events such as electricity theft or equipment failure.
[0066] The above local minimum number of points satisfies the following relation:
[0067]
[0068] In the formula, For the local minimum number of points, The initial minimum number of points, For the first Local density of records The correction factor (the coefficient of variation of the local density of all records) ), This indicates rounding down to the nearest integer.
[0069] It should be noted that in the above formula for calculating the local minimum number of points, The larger the value, the higher the calculated value. The larger the value, the better. This design differs from the conventional DBSCAN algorithm's approach of reducing the minimum number of points in dense areas. The difference lies in the fact that, through the aforementioned calculations, the clustering algorithm aggregates multiple highly similar, spatially proximate anomaly records into a more representative and stable high-risk cluster, rather than generating a large number of fragmented, semantically repetitive small clusters. This effectively avoids query redundancy during periods or areas with high incidence of dangerous events, significantly improving the efficiency and interpretability of subsequent retrievals, enabling operations and maintenance personnel to quickly grasp the overall picture of group-wide anomaly events.
[0070] in The acquisition process is as follows:
[0071] The above-mentioned number Using the record as the center point, find the k-th record (with values ranging from 1 to 1). The nearest neighbors are not counted within this neighborhood radius. Only those records whose combined distance from the center point is less than the average of the combined distances between all records within the neighborhood radius are counted. This is equivalent to focusing only on those truly similar neighbors who are "close enough" in relationship, and then marking these counted records as close neighbors of the aforementioned center point.
[0072] Normalizing the number of close neighbors yields the aforementioned local density.
[0073] In addition to the above settings The purpose is to adjust the intensity of local density adjustment to the minimum number of points.
[0074] In addition, a k-distance graph is constructed to find the first inflection point as the neighborhood radius required for clustering, where k is the difference between the final determined minimum number of points and 1.
[0075] After defining the precise fitting parameters as described above, a clustering algorithm is executed to automatically group the records. Specifically:
[0076] Clustering was performed on all the records using an improved DBSCAN algorithm (using comprehensive distance, adaptive minimum number of points, and neighborhood radius).
[0077] The algorithm outputs K clusters (representing different similar anomaly patterns) and M noise points (i.e., the isolated distances of points that are not assigned to any cluster).
[0078] This completes the initial pattern mining and grouping of massive random fluctuation records.
[0079] S2: Construct a high-risk record query index table based on clustering results.
[0080] While the above operations perform preliminary pattern mining and grouping of massive amounts of randomly fluctuating records, it's important to consider that the clustering results themselves lack rapid reverse location capabilities. That is, given a cluster ID, the system cannot directly and efficiently obtain the physical storage locations of all records within that cluster. Furthermore, clusters are treated as equals without prioritization, while in real-world applications, clusters experiencing severe electricity theft events clearly require more attention than those experiencing ordinary short-term overloads. Directly querying based on the raw clustering results still requires traversing a large number of records to match cluster labels, resulting in inefficiency.
[0081] Therefore, a dedicated, structured index table is needed to transform the grouping information and risk ratings obtained from cluster analysis into a data structure that supports efficient point lookups and range queries. This index table is a key bridge connecting the intelligent analysis layer and the efficient query layer.
[0082] In one embodiment, for each cluster, the average of the combined risk levels of all records within that cluster is taken as the cluster hazard.
[0083] Furthermore, a risk threshold is set (which can be the median of the cluster risk of all clusters), and clusters with a cluster risk greater than the risk threshold are marked as dangerous clusters.
[0084] The above method filters out clusters with higher risk levels from all clusters, eliminating clusters that may be formed by normal fluctuations or low-risk events, thus making the query target more focused.
[0085] Furthermore, the mechanism of the aforementioned clustering algorithm determines that noise points have two possible scenarios: genuine random noise and unique, high-value, dangerous events.
[0086] Simply ignoring all noise points would result in significant missed detections of these high-risk, low-frequency events. However, treating all noise points as high-risk would lead to numerous false positives. Therefore, a separate set of rules based on characteristic evidence is needed to accurately filter out truly dangerous records from the noise points.
[0087] In one embodiment, for each noise point (isolated record), if the power consistency deviation of the noise point is greater than a first threshold, or its dynamic weight is greater than a second threshold, then the noise point is marked as an independent hazardous record. The first and second thresholds can be initially set based on the quantiles (e.g., the 75th quantile) of the corresponding power consistency and dynamic weights of the records within the marked hazardous clusters.
[0088] The reasons for choosing power consistency and dynamic weighting as the judgment criteria are as follows:
[0089] Even if a certain dangerous event pattern is unique (unclusterable), its anomaly in physical consistency is objective and measurable. Therefore, power consistency provides a danger signal that is independent of the pattern. Some events may be atypical at the physical level, but their context greatly increases their risk. Dynamic weights can capture this "contextual risk".
[0090] In summary, after cluster analysis of all electricity meter records, the cluster results are divided into clusters and noise points. Cluster hazard is calculated for each cluster and dangerous clusters are selected based on the cluster hazard (other clusters are considered ordinary clusters and can be ignored). Relevant features are calculated for each noise point and based on this, it is determined whether it is an independent high-risk record.
[0091] The hazardous clusters and individual hazardous records that have undergone the above screening and determination need to be organized in an easy-to-retrieve data structure to support subsequent fast queries.
[0092] In one embodiment, a high-risk record query index table is constructed, which mainly consists of two parts:
[0093] Dangerous Cluster Index: Sorted in descending order of cluster danger, each index record contains: Dangerous Cluster ID, Cluster Danger, and a list of pointers to the storage addresses of all random fluctuation records contained in that cluster.
[0094] Independent hazard record tagging: Record the storage address of each tagged independent hazard record and its key judgment characteristics (such as power consistency and dynamic weight).
[0095] This generates a lightweight query index targeting high-risk records. When querying high-risk records, the system no longer needs to traverse and decompress all data; it can simply use this index to locate the record, significantly reducing the processing scope. This index can be periodically updated (e.g., when a certain amount of new data has accumulated or at a fixed interval) using the latest data to adapt to changes in data distribution.
[0096] S3: Based on the high-risk record query index table, achieve efficient query and display of high-risk records.
[0097] In one embodiment, a complete high-risk record query is performed using the high-risk record query index table constructed in S2 above. The specific steps are as follows:
[0098] First, the system receives query requests submitted by users through the platform interface or API. The request must specify at least a target time range (e.g., querying high-risk events within a certain time period). The system parses and validates these requests, transforming them into an internal query task that includes a standard timestamp range.
[0099] Next, the system calls the index table for the aforementioned high-risk records and performs a millisecond-level memory retrieval:
[0100] Based on the query time range, quickly match the record addresses associated with each dangerous cluster entry in the dangerous cluster index, filter out addresses whose timestamps fall within the query time range, and retain their respective cluster IDs and cluster danger information. Similarly, based on the query time range, filter out record addresses whose timestamps fall within the query time range from the independent record marker portion of the index table.
[0101] Then, for the relevant high-risk clusters and isolated high-risk records found in the high-risk record query index table based on the above query request, concentrated computing resources (≥70%) are used to prioritize processing the high-risk targets located by the index table:
[0102] First, decompress the identified independent hazardous records. Then, decompress the records in the identified hazardous clusters in order of cluster hazard level from high to low.
[0103] Finally, the decompressed raw data (voltage time series, current time series, and power time series) and tag features (frequency of change, fluctuation amplitude, and dynamic weight) are bound to the metadata obtained from the high-risk record query index table in S2 above, forming complete and readable high-risk event reports. For records in dangerous clusters, the metadata includes the cluster ID and cluster hazard level; for independent dangerous records, the metadata includes the storage address and key judgment features of the independent dangerous record.
[0104] The high-risk event records that have been decompressed and bound to metadata are sorted and integrated according to their cluster hazard level from high to low. For records from hazardous clusters, the report clearly marks the hazardous cluster ID and cluster hazard level, and records from the same cluster are grouped together to present a collective anomaly pattern; for independent hazardous records, they are listed separately and their key identification characteristics are highlighted.
[0105] Finally, the system pushes this set of high-risk records, which has been focused, sorted, and structured, to the front-end visualization module of the electricity meter platform for centralized display. The platform interface clearly presents the original time-series (voltage, current, power), tag characteristics (frequency of change, fluctuation amplitude, dynamic weight), and risk metadata of each record in a combination of timeline and list format. Users can interactively filter and analyze based on dimensions such as cluster hazard and occurrence time, thereby quickly identifying the most serious suspected overload, electricity theft, and other high-risk events. This enables efficient and accurate identification and tracking of core targets of business concern from massive random fluctuation records, greatly improving the targeting and timeliness of operation and maintenance audits.
[0106] Thus, the entire process has been completed, from improved clustering analysis based on comprehensive distance and adaptive minimum number of points, to the construction of a high-risk record query index table based on cluster risk and feature criteria, to the efficient query and display of high-risk records. This has formed a complete solution for in-depth mining and rapid retrieval of high-risk components in records with random fluctuations.
[0107] This invention also provides an energy meter record query system based on an energy meter platform. For example... Figure 2 As shown, the system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, the method for querying electricity meter records based on an electricity meter platform according to the first aspect of the present invention is implemented.
[0108] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0109] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A method for querying electricity meter records based on an electricity meter platform, characterized in that, include: An improved clustering algorithm is used to cluster all extracted random fluctuation records, resulting in multiple clusters and multiple noise points; wherein, the records contain the original electrical parameter time series and label feature vectors; Based on the clustering results, dangerous clusters and independent dangerous records are selected, and a high-risk record query index table is constructed for rapid location. In response to a user query request, the system uses the high-risk record query index table to locate and prioritize the processing of dangerous clusters or individual dangerous records that match the query request, and then decompresses and displays them. The improved clustering algorithm measures similarity based on the comprehensive distance calculated between the records. The comprehensive distance is obtained by weighted fusion of a first distance calculated from the original electrical parameter time series and a second distance calculated from the label feature vector. Furthermore, the minimum number of points in the parameters of the improved clustering algorithm is determined by the risk indication value calculated from all the records and the local density of each record; The process of obtaining the minimum number of points is as follows: Based on the fluctuation range, dynamic weight, and calculated power consistency deviation of each record, a risk indication value is calculated for all records, and an initial minimum number of points is determined based on the risk indication value. Calculate the local density for each record, and calculate the local minimum number of points for each record based on the initial minimum number of points and the local density; The median of the local minimum point count of all the records is used as the minimum point count finally used by the clustering algorithm; The process for obtaining the power consistency deviation is as follows: For any record, calculate the instantaneous power consistency deviation corresponding to each sampling time in the record. The instantaneous power consistency deviation is the absolute value of the difference between the instantaneous power value at that sampling time and the product of the instantaneous voltage value and the instantaneous current value at the same time, and then divide it by the maximum power value of the energy meter for normalization. Calculate the arithmetic mean of the instantaneous power consistency deviations corresponding to all sampling times within the record, and use this as the power consistency deviation of the record.
2. The method for querying electricity meter records based on an electricity meter platform according to claim 1, characterized in that, The process of obtaining the comprehensive distance is as follows: For any two records, the DTW distance between their original electrical parameter time series is calculated using the dynamic time warping algorithm and then normalized as the first distance. Calculate the Euclidean distance between the label feature vectors of any two records, and use it as the second distance; The combined distance is obtained by weighted summation of the first distance and the second distance.
3. The method for querying electricity meter records based on an electricity meter platform according to claim 2, characterized in that, The weight of the first distance is the ratio of the mean of the first distance between any two records to the sum of the mean of the first distance and the mean of the second distance between any two records. The weight of the second distance is the difference between 1 and the weight of the first distance.
4. The method for querying electricity meter records based on an electricity meter platform according to claim 1, characterized in that, The process of obtaining the local density is as follows: Using any record as the center point, find its k-th nearest neighbor based on the comprehensive distance, and use the distance to this neighbor as the neighborhood radius; The number of neighbor records within the neighborhood radius whose combined distance to the center point is less than the average combined distance between all records within the neighborhood radius is counted as the number of close neighbors; the number of close neighbors is then normalized to obtain the local density.
5. The method for querying electricity meter records based on an electricity meter platform according to claim 1, characterized in that, Based on the fluctuation amplitude, dynamic weight, and calculated power consistency deviation of all records within each cluster, the cluster hazard level of each cluster is calculated, and clusters with a cluster hazard level greater than a preset hazard threshold are marked as hazardous clusters; for each noise point, if its power consistency deviation is greater than a first threshold or its dynamic weight is greater than a second threshold, it is marked as an independent hazardous record.
6. The method for querying electricity meter records based on an electricity meter platform according to claim 1, characterized in that, The high-risk record query index table includes: Dangerous Cluster Index: Sorted in descending order of cluster danger level, each index contains the dangerous cluster ID, cluster danger level, and a list of address pointers in physical storage for all records within that dangerous cluster; Independent Hazard Record Marking: Records the storage address and determination characteristics of each marked independent hazard record.
7. The method for querying electricity meter records based on an electricity meter platform according to claim 1, characterized in that, The query request is parsed, and the record addresses that match the query request are filtered based on the high-risk record query index table. The corresponding data is decompressed according to priority, and the decompressed data and tag features are bound with the metadata obtained from the high-risk record query index table to generate a high-risk event report and output it for display.
8. An energy meter record query system based on an energy meter platform, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the electricity meter record query method based on an electricity meter platform according to any one of claims 1-7.