Electric energy meter data anomaly analysis method, device, equipment and medium
By extracting time-series features from the electricity meter system and performing local verification, the verified data is directly stored, while the unverified data is uploaded to the cloud for processing. Combined with cloud graph structure reasoning, the real-time and accuracy issues of abnormal electricity meter data processing are resolved, and automated anomaly identification and processing are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN STAR INSTR
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies for processing abnormal data from electricity meters suffer from problems such as high bandwidth consumption, poor real-time performance, high false alarm rate, and high line loss calculation error rate, making it impossible to effectively identify abnormal data with complex patterns.
In the electricity meter system, by acquiring the time-series characteristics of the sampled data, local verification is performed based on the preset verification logic. Data that passes verification is stored directly; otherwise, it is sent to the cloud for anomaly handling, and a graph structure is built in the cloud for anomaly reasoning.
It enables comprehensive anomaly analysis of electricity meter data, automatically identifies and handles anomalies, improves the real-time performance and accuracy of data processing, and reduces false alarm rate and line loss calculation error.
Smart Images

Figure CN122221099A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart Internet of Things technology, and in particular to a method, apparatus, device and medium for analyzing abnormal data of electricity meters. Background Technology
[0002] With the development of smart grid and Internet of Things (IoT) technologies, electricity meters have evolved from traditional mechanical instruments into highly integrated intelligent sensing terminals. These smart electricity meters can collect and report massive amounts of electricity consumption data at high frequencies (such as every minute or every 15 minutes). However, in systems with millions to tens of millions of meters, hundreds of millions of data points collected by electricity meters need to be processed daily. The quality of this data directly affects the accuracy of billing, the precision of line loss analysis, and the reliability of power grid dispatching decisions.
[0003] In existing technologies, the processing of abnormal data from electricity meters mostly involves centralized cloud processing, where all raw data is uploaded to the cloud and then cleaned uniformly. This method suffers from high bandwidth consumption, poor real-time performance, and anomaly detection delays reaching hours. Alternatively, it relies on edge-based local rule filtering, judging anomalies solely based on fixed thresholds. This method cannot identify complex patterns and has a false alarm rate exceeding 15%. Another approach is offline batch correction, where abnormal data is manually corrected afterward, which cannot support real-time business decisions and results in a high error rate in line loss calculation.
[0004] Therefore, how to comprehensively analyze electricity meter data to automatically identify and handle anomalies has become an urgent problem to be solved. Summary of the Invention
[0005] In view of this, embodiments of this application provide a method, apparatus, device, and medium for analyzing abnormal electricity meter data, in order to solve the problem of how to comprehensively analyze abnormal electricity meter data, thereby automatically identifying and handling abnormalities.
[0006] In a first aspect, embodiments of this application provide a method for analyzing anomalies in electricity meter data. This method is applied to the edge of an electricity meter system and includes: Acquire sampling data collected by the electricity meter and extract the time-series features of the sampling data; Based on the preset verification logic, the time series features are verified and the verification result is determined. If the verification result is passed, the sampled data or the corresponding correction data of the sampled data is sent to the database for storage. If the verification result is unsuccessful, the sampled data is sent to the cloud, where the cloud is used to process the anomalies in the sampled data, obtain the processing result, and send the processing result to the database for storage.
[0007] Secondly, embodiments of this application provide a method for analyzing anomalies in electricity meter data, wherein the method is applied to the cloud within an electricity meter system, and includes: After obtaining the verification result in the first aspect, if the verification result is unsuccessful, the sampling data is received using the cloud, the sampling data is used as nodes, and the connection relationship of the electricity meter is used as edges to construct a graph structure. Based on the graph structure, anomalies in the sampled data are inferred to obtain corrected data, which is then sent to the database for storage.
[0008] Thirdly, according to an embodiment of this application, an energy meter data anomaly analysis device is provided. The energy meter data anomaly analysis device is applied at the edge of an energy meter system, comprising: The feature extraction module is used to acquire the sampling data collected by the electricity meter and extract the time-series features of the sampling data; The verification module is used to verify the time series features based on preset verification logic, determine the verification result, and if the verification result is passed, send the sampled data or the corresponding correction data of the sampled data to the database for storage. An exception handling module is used to send the sampled data to the cloud if the verification result is unsuccessful. The cloud is used to process the exception of the sampled data, obtain the processing result, and send the processing result to the database for storage.
[0009] Fourthly, an electricity meter data anomaly analysis device, wherein the electricity meter data anomaly analysis device is applied to the cloud in the electricity meter system, comprising: The graph structure construction module is used to, after obtaining the verification result in the first aspect, if the verification result is not passed, use the cloud to receive the sampling data, use the sampling data as nodes, and use the connection relationship of the electricity meter as edges to construct a graph structure; The anomaly reasoning module is used to reason about the anomalies in the sampled data based on the graph structure, obtain corrected data, and send the corrected data to the database for storage.
[0010] Fifthly, embodiments of this application provide a computer device, the computer device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements the electricity meter data anomaly analysis method as described in the first aspect and / or the second aspect.
[0011] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the electricity meter data anomaly analysis method as described in the first and / or second aspects.
[0012] The beneficial effects of the embodiments in this application compared with the prior art are: This application acquires sampling data from electricity meters and extracts the time-series characteristics of the sampling data. Based on preset verification logic, the time-series characteristics are verified to determine the verification result. If the verification result is successful, the sampling data or the corresponding corrected data is sent to the database for storage. If the verification result is unsuccessful, the sampling data is sent to the cloud for anomaly processing. The cloud then processes the anomalies in the sampling data, obtains the processing results, and sends the processing results to the database for storage. By extracting the time-series characteristics of the sampling data and performing local verification based on preset logic, data that passes verification or corrected data is directly stored in the database, while data that fails verification is uploaded to the cloud for anomaly processing. Finally, the cloud processing results are also stored in the database. This comprehensive anomaly analysis of electricity meter data enables automatic identification and processing of anomalies. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram of an application environment for an anomaly analysis method for electricity meter data provided in Embodiment 1 of this application; Figure 2 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 2 of this application; Figure 3 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 3 of this application; Figure 4 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 4 of this application; Figure 5 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 5 of this application; Figure 6 This is a schematic diagram of the structure of an energy meter data anomaly analysis device provided in Embodiment Six of this application; Figure 7 This is a schematic diagram of the structure of an energy meter data anomaly analysis device provided in Embodiment 7 of this application; Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 8 of this application. Detailed Implementation
[0015] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0016] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0017] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0018] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0019] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0021] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0022] To illustrate the technical solution of this application, specific embodiments are described below.
[0023] The method for analyzing anomalies in electricity meter data provided in Embodiment 1 of this application can be applied to, for example... Figure 1 In this application environment, the client and server connect and communicate. Users can provide conditions, requirements, and operation instructions for electricity meter data anomaly analysis through the client. The server is used to control the electricity meter data anomaly analysis method according to the control instructions sent by the client.
[0024] The client side includes, but is not limited to, PDAs, desktop computers, laptops, ultra-mobile personal computers (UMPCs), netbooks, cloud terminal devices, and personal digital assistants (PDAs). The server side can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0025] See Figure 2 This is a flowchart illustrating a method for analyzing anomalies in electricity meter data provided in Embodiment 2 of this application. The above-described method for analyzing anomalies in electricity meter data can be applied to… Figure 1 The server-side component.
[0026] like Figure 2 As shown, this method for analyzing anomalies in electricity meter data, applied to the edge of an electricity meter system, may include the following steps: Step S201: Obtain the sampling data collected by the electricity meter and extract the time-series features of the sampling data.
[0027] Optionally, the step of acquiring the sampling data collected by the electricity meter and extracting the time-series features of the sampling data may further include the following steps: When collecting data from the electricity meter, real-time data that has reached the preset sampling period is collected according to the preset sampling period to obtain instantaneous data, which is then used as sampling data. By analyzing the characteristics of the sampled data as it changes over time, time-series features are obtained.
[0028] The data acquisition process involves a data acquisition terminal (concentrator, data collector) or edge gateway periodically generating data acquisition tasks based on its system clock and a preset sampling period (e.g., 15 minutes, 1 hour). At the end of the sampling period, the acquisition terminal constructs and sends a read data frame, corresponding to a specific data identifier, to the target energy meter according to the specified communication protocol. The terminal receives and verifies the energy meter's response frame, parses the message data field, and obtains the instantaneous value of the energy meter's internal register or instantaneous measurement unit at that communication moment. This value is then bound to a precise acquisition timestamp to generate a sampling data record.
[0029] Within a sliding window of length L (e.g., L = 96 15-minute points, i.e., 1 day), calculate the mean, standard deviation, maximum, minimum, and peak of the sequence. Calculate the first-difference sequence and find its absolute mean (average rate of change) and standard deviation (variability).
[0030] Linear fitting is performed on the sequence within the window, and the slope and root mean square of the fitting residuals are extracted. A Fast Fourier Transform (FFT) is performed on the window sequence to calculate its power spectral density. Significant peaks in the power spectrum are identified, and their corresponding principal periods and energy proportions are extracted. The statistical, differential, trend, and periodic feature values obtained above are normalized and concatenated into a multi-dimensional time-series feature vector, serving as a digital feature (i.e., time-series feature) characterizing the electricity consumption behavior pattern within that time period.
[0031] One possible implementation involves configuring a hardware timer or a high-precision software scheduling task within the data acquisition terminal, with a period strictly equal to a preset sampling period. When the timer is interrupted or the scheduling task is triggered, a communication transaction with the energy meter is immediately initiated. This communication acquires the instantaneous measurement value of the energy meter at that sampling point, rather than the integral value over a period of time (if an integral value is needed, the difference between two instantaneous values is usually calculated). Piecewise linear fitting or control chart algorithms are used to identify inflection points where the trend slope changes significantly in the time series, and these points are used as time series features.
[0032] Step S202: Based on the preset verification logic, the time series features are verified to determine the verification result. If the verification result is passed, the sampled data or the corresponding correction data of the sampled data is sent to the database for storage.
[0033] Optionally, the step of verifying the time-series features based on preset verification logic and determining the verification result may include the following steps: A preset verification rule threshold is obtained. For any preset analysis factor, the sampled data corresponding to the analysis factor is analyzed. If all the sampled data are not higher than the verification rule threshold, the verification result is determined to be passed.
[0034] The process involves loading pre-defined verification logic from a local configuration file, embedded database, or secure storage. This logic exists in the form of code scripts, rule sets from a rule engine (such as Drools), or executable model files. The timing features output in step S201 are used as input to feed the verification logic. The verification logic is then run on a local processor (such as the CPU of an edge computing gateway). This process generates a binary verification result flag.
[0035] The verified sampled data records are directly used as storage objects. If the verification logic includes a data cleaning or smoothing submodule (such as an anomaly correction algorithm based on time series features), the sampled data is corrected and the corrected data records are used as storage objects.
[0036] Database stored procedures are inserted into or published to the corresponding tables in a specified database (such as relational database MySQL or time-series database InfluxDB) through database driver interfaces (such as JDBC and ODBC).
[0037] An optional step is to analyze the verification process based on the verification rule threshold, thereby defining a specific implementation of the verification logic based on hard rules and simple comparisons.
[0038] Analysis factors refer to a set of preset analysis factors. Each factor corresponds to a specific electrical or data quality dimension to be monitored, such as voltage value, three-phase current imbalance, etc. For the current batch of sampled data, the specific value corresponding to each analysis factor is extracted. An independent threshold judgment is performed on each sampled data. All preset analysis factors are traversed. The logic of "if all sampled data are not higher than the verification rule threshold" is executed. The verification result will drive the S202 main process to enter the corresponding data storage or upload to the cloud branch.
[0039] Step S203: If the verification result is unsuccessful, the sampled data is sent to the cloud. The cloud is used to process the anomalies in the sampled data, obtain the processing result, and send the processing result to the database for storage.
[0040] This step is the cloud-based collaborative path for data quality control. When local edge verification fails, cloud-based intervention is triggered. Following the output of step S202, the system enters this branch when the verification result is determined to be unsuccessful.
[0041] The sampled data that triggered the verification failure, along with contextual information related to the failure (such as the analysis factors and trigger thresholds), are packaged together. The data packets are then encapsulated into an uplink message using a secure communication protocol. The data is then sent to the pre-defined cloud server endpoint via an IoT gateway or directly through the communication module.
[0042] Cloud servers (such as microservices deployed on a cloud platform) listen for and receive uplink messages from edge devices. Based on the message content (such as data type and anomaly type), the cloud system invokes or initiates corresponding anomaly handling services or algorithms. Cross-validation is performed using data from other relevant electricity meters, meteorological data, and power grid event logs from the same time period. Machine learning models (such as Isolation Forest and clustering algorithms) or knowledge graphs are used to determine the anomaly type (such as equipment failure, suspected electricity theft, or sampling interference). Based on historical normal data patterns or physical models, abnormal sampled values are estimated and corrected.
[0043] Finally, the data entities (which may be raw data with processing result labels or corrected data) along with complete processing metadata (processing time, processing algorithm, processing conclusion) are persistently stored in the cloud or a designated central database for use by subsequent advanced applications (such as reports and big data analysis).
[0044] This application acquires sampling data from electricity meters and extracts the time-series characteristics of the sampling data. Based on preset verification logic, the time-series characteristics are verified to determine the verification result. If the verification result is successful, the sampling data or the corresponding corrected data is sent to the database for storage. If the verification result is unsuccessful, the sampling data is sent to the cloud for anomaly processing. The cloud then processes the anomalies in the sampling data, obtains the processing results, and sends the processing results to the database for storage. By extracting the time-series characteristics of the sampling data and performing local verification based on preset logic, data that passes verification or corrected data is directly stored in the database, while data that fails verification is uploaded to the cloud for anomaly processing. Finally, the cloud processing results are also stored in the database. This comprehensive anomaly analysis of electricity meter data enables automatic identification and processing of anomalies.
[0045] See Figure 3 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 3 of this application. Figure 3 As shown, the step S202 above, which verifies the timing features based on preset verification logic and determines the verification result, may include the following steps: Step S301: Obtain historical time period data corresponding to the sampled data and meteorological data corresponding to the historical time period data; analyze the historical time period data, the meteorological data, and the sampled data according to a preset inference model to obtain an analysis score; Step S302: If the analysis score is not higher than the preset score threshold, then the verification result is determined to be passed.
[0046] The historical time period data is retrieved from local cache or edge databases, querying the current electricity meter for a sequence of historical sampled data within a past time window (e.g., the past 24 hours). This is used to capture the device's own operating trends and patterns.
[0047] Meteorological data (such as temperature, humidity, wind speed, and light intensity) is obtained from the local meteorological service interface or cache, corresponding to the historical time period and the current sampling time. This is an external influencing factor, as meteorological conditions (such as high temperatures and thunderstorms) significantly affect electricity load and equipment operating conditions. The sampled data is the object to be evaluated in the inference model.
[0048] Load a pre-defined, lightweight inference model locally. The inference model is a pruned and quantized neural network, decision tree ensemble model, or regression model adapted to the computing power of the edge device.
[0049] The three types of data mentioned above are processed according to the predefined format of the inference model (such as standardization, truncation, and imputation). The output of the model is a continuous numerical value, namely the analysis score (e.g., ranging from 0 to 1). This score represents a quantitative measure of whether the model considers the current sampled data to be "normal" or "reasonable" in a given historical and meteorological context.
[0050] The system reads a preset score threshold. This score threshold is the decision boundary set when the inference model is deployed. If the score is below the threshold, it means the inference model considers the current data sufficiently normal or reasonable, and no high-risk alert is triggered. Therefore, the verification result is determined to be passed. The data will proceed according to the main process S202, either to local storage or the corrected storage branch. If the score is above the threshold, it means the inference model judges the current data to be abnormal with a high degree of confidence. Therefore, the verification result is failed. The data will trigger step S203 and be sent to the cloud for further processing.
[0051] In this embodiment of the application, the false positive rate and false negative rate are balanced by shifting from rule-driven to model-driven approaches.
[0052] See Figure 4 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 4 of this application. Figure 4 As shown, step S202, which verifies the time-series features based on preset verification logic and determines the verification result, may include the following steps: Step S401: Obtain a preset priority order and channel quality level, and calculate the number of resampling times based on the priority order and the channel quality level; Step S402: Based on the number of resampling attempts, perform the steps of acquiring the sampling data collected by the electricity meter and extracting the time-series features of the sampling data until the number of resampling attempts is completed, and obtain the resampling result; Step S403: If there is no difference between the resampling results, then the verification result is determined to be passed.
[0053] The preset priority order defines the importance of different tasks or data types. For example, key data related to electricity price settlement may be set to "high" priority, while ordinary monitoring data may be set to "medium" or "low" priority.
[0054] Channel quality level is an evaluation metric for the real-time status of a current wireless communication link (such as 4G / 5G signals), calculated by communication modules (such as base station signal strength RSSI and signal-to-noise ratio SNR). The level can be "excellent", "good", or "poor", or quantified into 1 to 5 levels.
[0055] The calculation of resampling counts involves a "resampling count calculation function" or "lookup table" within the system. The logical principle of this function / table is that the more important the data (higher priority) or the worse the communication environment (lower channel quality), the more resampling is required to "vote" and confirm the data's reliability. Ultimately, the function outputs a positive integer (the number of resampling counts).
[0056] In each loop, the exact same action as step S201 is triggered again, sending a data acquisition command to the energy meter again (possibly within a very short time interval, such as a few milliseconds) to obtain a new, independent sampling data packet. For each sampling data packet, a feature extraction algorithm is executed independently to obtain a new time-series feature vector. After the loop ends, the system will obtain a resampling result.
[0057] The system retrieves all time-series feature vectors from the resampling results (typically comparing the most critical feature values, such as the mean and instantaneous values), and calculates the differences between each pair of vectors. It then checks whether all differences fall within a preset, extremely small "tolerance" range. This range is typically very strict, much smaller than the business threshold, and is used only to capture fluctuations caused by random noise or communication interference.
[0058] If the differences between all resampling results fall within the allowable deviation range (i.e., "no difference exists"), this means that under the same network conditions, multiple independent samplings yielded consistent results. This indicates that the acquisition and transmission process of the original sampling data (i.e., the first acquisition data) was stable and unaffected by sudden disturbances, and the data itself is reliable at the process level. Therefore, the verification result is determined to be passed.
[0059] If the difference between any two resampling results exceeds the allowable range, it indicates that the measurement result has experienced undue fluctuations within a short period of time. This suggests that the acquisition link (channel) may be unstable, or that there was transient interference at the moment of sampling. In this case, the verification result is failed. The original sampled data may have been distorted due to transmission errors and needs to be processed according to subsequent rules (such as taking the median, averaging, or triggering S203).
[0060] In this embodiment of the application, dynamic resampling verification is used to repeatedly collect samples to test the stability and reliability of the sampling process.
[0061] See Figure 5 This is a flowchart illustrating a method for analyzing abnormal electricity meter data provided in Embodiment 5 of this application. Figure 5 As shown, the method for analyzing anomalies in electricity meter data, applied to the cloud within the electricity meter system, may further include the following steps: Step S501: After obtaining the verification result from the above-mentioned electricity meter data anomaly analysis method, if the verification result is unsuccessful, the cloud is used to receive the sampled data, the sampled data is used as nodes, and the connection relationship of the electricity meter is used as edges to construct a graph structure. Step S502: Based on the graph structure, infer the anomalies in the sampled data to obtain corrected data, and send the corrected data to the database for storage.
[0062] The cloud receives sampling data marked as "failed" uploaded from edge devices. This sampling data includes at least the unique identifier of the abnormal electricity meter (i.e., the source of the fault) (such as the meter ID), the abnormal sampling data and its timing characteristics, and a timestamp.
[0063] A node refers to the sampled data instance itself that is marked as abnormal, or the electricity meter to which it belongs, as a "node". A node carries its own attribute information.
[0064] Edges are defined based on the actual physical connections of electricity meters. This requires querying an existing power grid topology database or calculating in real time. Connections include hierarchical relationships (topology hierarchy), for example, in a distribution area, the transformer is the parent node, its branch boxes are child nodes, and individual household meters are grandchild nodes; sibling relationships (phase line relationships), where multiple meters on the same phase line are "sibling" nodes; and physical adjacency relationships, such as meters in the same building or on the same floor. Graph construction refers to combining nodes (meters / data) and edges (connections) to form a graph structure G=(V, E). This structure clearly depicts the location and adjacency relationships of abnormal meters within the physical power grid topology or information topology network.
[0065] Input the graph structure constructed in step S501 and the associated data of all nodes in the graph (including abnormal nodes and their neighboring normal nodes) in the corresponding time period (which can be obtained from historical databases or real-time data streams) into the model.
[0066] If all direct neighboring nodes of an abnormal node A (such as other meters with the same phase line) have normal data and consistent patterns, while only A is abnormal, this strongly suggests that the problem lies with A itself (such as meter malfunction or user electricity theft). For the main meter (parent node) and each sub-meter (child node), theoretically, "the main meter reading equals the sum of the sub-meter readings plus fixed losses." If a child node's data is abnormal, this balance equation, combined with data from other normal nodes, can be used to infer the reasonable value of this abnormal node. If the parent node (such as a transformer) has abnormal data, its child nodes may also exhibit related abnormal patterns. Graph models can identify this "anomaly propagation path." Based on the above reasoning, the model outputs a conclusion. For cases where a reasonable value can be inferred (such as through calculation using the balance equation), the model directly provides a corrected data value. For cases that cannot be easily corrected (such as confirmed equipment failure), the model outputs the anomaly type and confidence level, and may include a temporary reference value based on neighbor data interpolation.
[0067] Regardless of whether the output is a corrected value or an anomaly diagnosis report, the system will write the result to a database in the cloud or at the edge for storage.
[0068] In this embodiment, the advantages of both are combined by using a mode of edge light verification and cloud heavy inference: most normal data is processed quickly at the edge without needing to be uploaded to the cloud, thus improving work efficiency.
[0069] Corresponding to the electricity meter data anomaly analysis method in the above embodiment, Figure 6 The diagram shows a structural block diagram of the electricity meter data anomaly analysis device provided in Embodiment Six of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0070] See Figure 6 The electricity meter data anomaly analysis device, applied at the edge of the electricity meter system, includes: Feature extraction module 61 is used to acquire sampling data collected by the electricity meter and extract the time-series features of the sampling data; The verification module 62 is used to verify the time series features based on preset verification logic, determine the verification result, and if the verification result is passed, send the sampled data or the corresponding correction data of the sampled data to the database for storage. An exception handling module 63 is used to send the sampled data to the cloud if the verification result is unsuccessful. The cloud is used to process the exception of the sampled data, obtain the processing result, and send the processing result to the database for storage.
[0071] Optionally, the verification module 62 includes: The threshold determination unit is used to obtain a preset verification rule threshold, and for any preset analysis factor, analyze the sampled data corresponding to the analysis factor. If all the sampled data are not higher than the verification rule threshold, the verification result is determined to be passed.
[0072] Optionally, the verification module 62 includes: The inference unit is used to acquire historical time period data corresponding to the sampled data and meteorological data corresponding to the historical time period data, and analyze the historical time period data, the meteorological data and the sampled data according to a preset inference model to obtain an analysis score; A threshold verification unit is used to determine that the verification result is passed if the analysis score is not higher than a preset score threshold.
[0073] Optionally, the verification module 62 includes: The resampling calculation unit is used to obtain a preset priority order and channel quality level, and calculate the number of resampling times based on the priority order and the channel quality level. The step execution unit is used to perform the steps of acquiring the sampling data collected by the energy meter and extracting the time-series features of the sampling data according to the number of resampling times, until the number of resampling times is completed and the resampling result is obtained; The difference judgment unit is used to determine that the verification result is passed if there is no difference between the resampling results.
[0074] Optionally, the feature extraction module 61 includes: The periodic data acquisition unit is used to acquire real-time data that has reached the preset sampling period when the electricity meter is collecting data, to obtain instantaneous data, and to use the instantaneous data as the sampling data. The feature analysis unit is used to analyze the characteristics of the sampled data changing over time to obtain time-series features.
[0075] See Figure 7 The electricity meter data anomaly analysis device, which is applied to the cloud in the electricity meter system, also includes: Graph structure construction module 71 is used to, after obtaining the verification result of the electricity meter data anomaly analysis method according to any one of claims 1 to 5, if the verification result is not passed, use the cloud to receive the sampled data, use the sampled data as nodes, and use the connection relationship of the electricity meter as edges to construct a graph structure; The anomaly reasoning module 72 is used to reason about the anomalies in the sampled data based on the graph structure, obtain corrected data, and send the corrected data to the database for storage.
[0076] It should be noted that the information interaction and execution process between the above modules, units, and sub-units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0077] Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 8 of this application. Figure 8 As shown, the computer device of this embodiment includes: at least one processor ( Figure 8 Only one is shown in the diagram), a memory, and a computer program stored in the memory and executable on at least one processor. When the processor executes the computer program, it implements the steps of any of the above-described methods for analyzing abnormal electricity meter data or embodiments of methods for analyzing abnormal electricity meter data.
[0078] This computer device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 8 The examples of computer devices are merely examples and do not constitute a limitation on computer devices. Computer devices may include more or fewer components than shown in the illustration, or combinations of certain components, or different components, such as network interfaces, displays, and input devices.
[0079] The processor referred to can be a CPU, but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0080] Memory includes readable storage media, internal memory, etc., wherein internal memory can be the RAM of a computer device, providing an environment for the operation of the operating system and computer-readable instructions stored in the readable storage media. The readable storage media can be the hard drive of a computer device, or in other embodiments, it can be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, memory can include both internal storage units and external storage devices of the computer device. Memory is used to store the operating system, applications, bootloader, data, and other programs, such as program code for computer programs. Memory can also be used to temporarily store data that has been output or will be output.
[0081] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above device can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium can include at least: any entity or device capable of carrying computer program code, a recording medium, a computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0082] The implementation of all or part of the processes in the methods of the above embodiments can also be accomplished by a computer program product. When the computer program product is run on a computer device, it enables the computer device to execute the steps in the above method embodiments.
[0083] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0084] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0085] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0086] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0087] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for analyzing anomalies in electricity meter data, characterized in that, The electricity meter data anomaly analysis method is applied to the edge of the electricity meter system, including: Acquire sampling data collected by the electricity meter and extract the time-series features of the sampling data; Based on the preset verification logic, the time series features are verified and the verification result is determined. If the verification result is passed, the sampled data or the corresponding correction data of the sampled data is sent to the database for storage. If the verification result is unsuccessful, the sampled data is sent to the cloud, where the cloud is used to process the anomalies in the sampled data, obtain the processing result, and send the processing result to the database for storage.
2. The method for analyzing abnormal electricity meter data according to claim 1, characterized in that, The verification of the time-series features based on preset verification logic, and the determination of the verification result, includes: A preset verification rule threshold is obtained. For any preset analysis factor, the sampled data corresponding to the analysis factor is analyzed. If all the sampled data are not higher than the verification rule threshold, the verification result is determined to be passed.
3. The method for analyzing abnormal electricity meter data according to claim 1, characterized in that, The verification of the time-series features based on preset verification logic, and the determination of the verification result, includes: Obtain historical time period data and meteorological data corresponding to the sampling data; analyze the historical time period data, the meteorological data, and the sampling data according to a preset inference model to obtain an analysis score. If the analysis score is not higher than the preset score threshold, the verification result is determined to be passed.
4. The method for analyzing abnormal electricity meter data according to claim 1, characterized in that, The verification of the time-series features based on preset verification logic, and the determination of the verification result, includes: Obtain a preset priority order and channel quality level, and calculate the number of resampling times based on the priority order and channel quality level; The steps of acquiring the sampling data collected by the electricity meter and extracting the time-series features of the sampling data are performed according to the number of resampling attempts until the number of resampling attempts is completed and the resampling result is obtained. If there is no difference between the resampling results, the verification result is determined to be passed.
5. The method for analyzing abnormal electricity meter data according to claim 1, characterized in that, The step of acquiring sampling data collected by the electricity meter and extracting the time-series features of the sampling data includes: When collecting data from the electricity meter, real-time data that has reached the preset sampling period is collected according to the preset sampling period to obtain instantaneous data, which is then used as sampling data. By analyzing the characteristics of the sampled data as it changes over time, time-series features are obtained.
6. A method for analyzing anomalies in electricity meter data, characterized in that, The electricity meter data anomaly analysis method is applied to the cloud within the electricity meter system, including: After obtaining the verification result of the electricity meter data anomaly analysis method according to any one of claims 1 to 5, if the verification result is unsuccessful, the sampled data is received by the cloud, the sampled data is used as nodes, and the connection relationship of the electricity meter is used as edges to construct a graph structure. Based on the graph structure, anomalies in the sampled data are inferred to obtain corrected data, which is then sent to the database for storage.
7. A device for analyzing abnormal data from an electricity meter, characterized in that, The electricity meter data anomaly analysis device is applied at the edge of the electricity meter system, including: The feature extraction module is used to acquire the sampling data collected by the electricity meter and extract the time-series features of the sampling data; The verification module is used to verify the time series features based on preset verification logic, determine the verification result, and if the verification result is passed, send the sampled data or the corresponding correction data of the sampled data to the database for storage. An exception handling module is used to send the sampled data to the cloud if the verification result is unsuccessful. The cloud is used to process the exception of the sampled data, obtain the processing result, and send the processing result to the database for storage.
8. A device for analyzing abnormal data from an electricity meter, characterized in that, The electricity meter data anomaly analysis device is applied to the cloud within the electricity meter system, and includes: The graph structure construction module is used to, after obtaining the verification result of the electricity meter data anomaly analysis method according to any one of claims 1 to 5, if the verification result is not passed, use the cloud to receive the sampled data, use the sampled data as nodes, and use the connection relationship of the electricity meter as edges to construct a graph structure; The anomaly reasoning module is used to reason about the anomalies in the sampled data based on the graph structure, obtain corrected data, and send the corrected data to the database for storage.
9. A computer device, characterized in that, The computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the electricity meter data anomaly analysis method as described in any one of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the electricity meter data anomaly analysis method as described in any one of claims 1 to 6.