Electric energy meter online self-detection method and system based on edge calculation

By building a feature library of electricity consumption behavior on edge computing nodes and introducing a dynamic correction model of environmental factors and user behavior into the cloud platform, the problems of wasted computing resources and high false alarm rate in the detection of abnormal electricity meters are solved, and efficient and accurate online self-detection of electricity meters is achieved.

CN121995302APending Publication Date: 2026-05-08HOLLICK ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HOLLICK ELECTRIC CO LTD
Filing Date
2026-03-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing methods for detecting anomalies in electricity meters rely on cloud processing of large amounts of redundant data, resulting in wasted computing resources and increased network bandwidth pressure. Furthermore, they are difficult to detect anomalies in electricity meters in a timely manner, have a high false alarm rate, and cannot effectively distinguish between changes in electricity consumption behavior and actual faults.

Method used

A feature library of electricity consumption behavior is built on edge computing nodes. Theoretical electricity consumption prediction values ​​are generated through time series analysis. Environmental factors and user behavior dynamic correction models are introduced into the cloud platform to achieve preliminary anomaly screening and secondary verification. Combined with lightweight baseline prediction and multi-dimensional information fusion, the false alarm rate is reduced.

Benefits of technology

It effectively reduces cloud data processing volume and network transmission pressure, enables rapid response and accurate detection, reduces false alarm rate, and improves operation and maintenance efficiency and the accuracy of anomaly detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995302A_ABST
    Figure CN121995302A_ABST
Patent Text Reader

Abstract

The invention discloses an electric energy meter on-line self-detection method and system based on edge computing, and belongs to the field of data processing.The electric energy meter on-line self-detection method based on edge computing comprises the following steps that a power utilization behavior feature library is constructed at an edge computing node based on historical power utilization data, establishing a baseline prediction model through time sequence analysis, and generating a theoretical electricity consumption prediction value; the method comprises the following steps: acquiring power consumption data acquired by an electric energy meter in real time, and comparing the power consumption data with a theoretical power consumption predicted value to calculate a difference value, and has the beneficial effects that a lightweight baseline prediction model is deployed at an edge computing node for preliminary screening, so that the data processing amount and the network transmission pressure of a cloud end are effectively reduced; external factors such as environmental factors and population variation are introduced into the cloud platform, and secondary verification is performed on the preliminary abnormality, so that the accuracy of abnormality detection is improved; through cooperative work of the edge and the cloud, the advantage of low time delay of edge calculation is exerted, and the strong calculation capability of the cloud is utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing, and in particular relates to an online self-testing method and system for electricity meters based on edge computing. Background Technology

[0002] Currently, monitoring the operational status of electricity meters typically relies on electricity consumption data collection systems, with smart meters acting as edge nodes responsible for collecting and uploading data. In existing technologies, a common practice is for electricity meters to directly upload massive amounts of raw data to a cloud-based main station at a fixed frequency, where the cloud platform centrally stores, processes, and analyzes the data.

[0003] However, with the development of smart grids and the surge in the number of electricity meters, this model of transmitting all data to the cloud platform for processing faces significant challenges. On the one hand, the cloud needs to process a large amount of redundant normal data, leading to wasted computing resources and increased network bandwidth pressure, thus increasing the system burden. On the other hand, when electricity meters malfunction, because the data is transmitted to the cloud at a fixed frequency for post-event analysis, it is difficult to detect and locate the problem in a timely manner. In addition, traditional anomaly detection methods often rely solely on fixed thresholds for judgment, failing to fully consider the dynamic changes in user electricity consumption behavior. For example, population changes caused by factors such as holiday travel or temporary addition of guests to a household can lead to natural fluctuations in electricity consumption. If these are indiscriminately judged as electricity meter malfunctions, false alarms are likely to occur, affecting user experience and operational efficiency.

[0004] In summary, the existing electricity meter anomaly detection is not intelligent enough and needs improvement. Summary of the Invention

[0005] Therefore, it is necessary to provide an online self-testing method and system for electricity meters based on edge computing to address the above-mentioned problems.

[0006] This invention is implemented as follows: an online self-testing method for electricity meters based on edge computing includes the following steps:

[0007] At the edge computing node, an electricity consumption behavior feature library is built based on historical electricity consumption data. A baseline prediction model is established through (lightweight) time series analysis to generate theoretical electricity consumption prediction values. The electricity consumption data collected in real time from the electricity meter is obtained and compared with the theoretical electricity consumption prediction values ​​to calculate the difference. If the difference does not exceed the first threshold, the electricity meter is determined to be operating normally. If it exceeds the first threshold, the electricity meter is marked as having a preliminary abnormal state, and the preliminary abnormal information and related data are uploaded to the cloud platform.

[0008] The cloud platform receives preliminary anomaly information and related data uploaded by edge computing nodes, calls external data interfaces to obtain environmental factors affecting electricity consumption, analyzes the historical behavior characteristics of users in the same period, identifies whether there are personnel changes in the current time period, and dynamically corrects the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate the corrected theoretical electricity consumption prediction value.

[0009] The corrected theoretical electricity consumption forecast is compared with the real-time electricity consumption data a second time. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

[0010] In one embodiment, the present invention provides an online self-detection method for electricity meters based on edge computing. The method involves constructing an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establishing a baseline prediction model through time series analysis, and generating theoretical electricity consumption prediction values. The method also includes acquiring real-time electricity consumption data from the electricity meter, comparing it with the theoretical electricity consumption prediction values ​​to calculate the difference. If the difference does not exceed a first threshold, the electricity meter is determined to be operating normally; if it exceeds the first threshold, the electricity meter is marked as being in a preliminary abnormal state, and the preliminary abnormality information and related data are uploaded to the cloud platform. Specifically, this includes:

[0011] At the edge computing node, the raw electricity consumption data (current, voltage, power, etc.) uploaded in real time by the electricity meter is received through the communication interface. After the raw electricity consumption data is verified for integrity and converted into a format, the target parameters (active power, reactive power, etc.) are extracted and stored in the local cache as historical electricity consumption data.

[0012] Historical electricity consumption data is retrieved, and the mean, variance, and trend of electricity consumption in each time period are calculated using a sliding window statistical method to construct an electricity consumption behavior feature database. The features in the electricity consumption behavior feature database include daily electricity consumption patterns, holiday effects, and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature database, a (lightweight) time series prediction algorithm (such as exponential smoothing or ARIMA model) is used to generate the theoretical electricity consumption prediction value for the current time period, and a dynamic first threshold (such as ±15% of the prediction value) is set.

[0013] The system acquires real-time electricity consumption data from the electricity meter, compares it with the theoretical electricity consumption prediction value, and calculates the percentage deviation. If the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues. If the deviation exceeds the first threshold, the electricity meter is marked as being in a preliminary abnormal state, and the preliminary abnormal information and related data (including electricity meter ID, timestamp, real-time data, prediction value, and deviation amount) are packaged and uploaded to the cloud platform.

[0014] In one embodiment, the present invention provides an online self-detection method for electricity meters based on edge computing. The steps of receiving preliminary anomaly information and related data uploaded by edge computing nodes through a cloud platform, calling external data interfaces to obtain environmental factors affecting electricity consumption, analyzing users' historical behavior characteristics for the same period, identifying whether there are personnel changes in the current time period, and dynamically correcting the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate a corrected theoretical electricity consumption prediction value specifically include:

[0015] The cloud platform receives preliminary anomaly information and related data uploaded by edge computing nodes, calls API interfaces to obtain third-party data sources (such as weather data released by the meteorological bureau), and determines whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors.

[0016] Analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption patterns (such as weekday / rest day patterns) through clustering algorithms, compare the similarity between the electricity consumption curves during abnormal periods and historical patterns, and combine external data to comprehensively determine whether there are personnel changes (such as family trips or temporary additions to the population).

[0017] If environmental factors or personnel changes affecting electricity consumption are identified, the baseline prediction model is dynamically adjusted according to the type of change (e.g., electricity consumption decreases due to people leaving home, electricity consumption increases due to people moving in), and the adjusted theoretical electricity consumption prediction value is generated. The adjusted theoretical electricity consumption prediction value is then compared with the real-time collected electricity consumption data to calculate the deviation after adjustment. At the same time, the trend of the deviation before and after adjustment is compared as a basis for judgment.

[0018] In one embodiment, the present invention provides an online self-detection method for electricity meters based on edge computing, wherein the corrected theoretical electricity consumption prediction value is calculated as follows:

[0019] Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time;

[0020] Temperature Influence Factors ,in Let be the actual temperature at time t. This is a reference temperature (e.g., the human body's comfortable temperature can be taken as 20~25℃). The temperature sensitivity coefficient is obtained based on historical electricity consumption data. Historical load and temperature data are collected, and a linear regression equation is fitted using the least squares method. The slope of the regression equation is the temperature sensitivity coefficient. Positive values ​​represent cooling load, and negative values ​​represent heating load.

[0021] Factors affecting electricity prices ,in Let t be the change in electricity price at time t (positive for price increase, negative for price decrease). The benchmark electricity price, This is the price elasticity coefficient (usually a negative value, indicating that electricity consumption decreases as electricity prices rise, determined through historical electricity price experiments or user behavior analysis).

[0022] Number of people influencing factors ,in Let t be the change in the number of people at time t (an increase is positive, a decrease is negative). Based on the number of permanent residents, The factor representing the influence of the number of people (usually set to 1, indicating that electricity consumption is approximately proportional to the number of people, but can be fine-tuned according to the specific household electricity consumption structure); if a certain factor is absent (e.g., no electricity price adjustment), the corresponding factor is set to 1, resulting in the corrected theoretical electricity consumption forecast. .

[0023] In one embodiment, the present invention provides an online self-detection method for electricity meters based on edge computing. The method involves a secondary comparison between the corrected theoretical electricity consumption prediction and real-time electricity consumption data. If the difference falls back to within a first threshold range, the electricity meter is determined to be normal, and a command to restore the normal state is sent to the edge computing node. If the difference still exceeds the first threshold, the electricity meter is marked as being in a final abnormal state, an alarm message is generated, and maintenance personnel are notified. The specific steps include:

[0024] The corrected theoretical electricity consumption forecast is compared with the real-time electricity consumption data a second time. If the corrected deviation falls back to the preset first threshold range (e.g., from 20% to 5%), it is determined that the initial abnormal state is caused by normal electricity consumption fluctuations and the electricity meter is actually operating normally. An instruction to restore the normal state is sent to the edge computing node (after receiving the instruction, the edge computing node updates its local feature library, such as including the current electricity consumption data as a normal sample in the historical library and clearing the current abnormality mark).

[0025] If the corrected deviation still exceeds the first threshold, the electricity meter is finally determined to be faulty or abnormal, the electricity meter is marked as the final abnormal state, and an alarm message containing the abnormality type (such as metering deviation, communication failure), abnormality level, and suggested handling measures is generated and pushed to the maintenance personnel's terminal via SMS or APP.

[0026] All data related to this anomaly (including data uploaded by edge computing nodes, external factors, correction process, and final conclusions) will be stored in the anomaly database for subsequent baseline prediction model optimization and fault analysis.

[0027] In one embodiment, the present invention provides an online self-testing method for electricity meters based on edge computing, further comprising:

[0028] The cloud platform counts in real time the number of preliminary anomaly information reported by multiple edge computing nodes in the same geographical area at the same time. If the number exceeds the preset second threshold, a regional power grid event is determined to have occurred, and a pause upload command is issued to all edge computing nodes in the area. After receiving the pause upload command, the edge computing nodes temporarily store the electricity consumption data and anomaly information obtained by the subsequent edge computing nodes in the local cache, and continue to perform real-time monitoring and local judgment.

[0029] Within a preset third threshold time period, the cloud platform monitors for confirmation information of regional power grid events from the power grid dispatch system or external data sources. If confirmation information is received before the waiting time reaches the third threshold, all related anomalies within that time period are marked as caused by regional power grid events in the cloud platform, and no secondary verification is performed. An instruction is issued to the edge computing node to clear the data cached locally when the regional power grid event occurred. If no confirmation information is received by the end of the third threshold, a command to resume uploading is issued to the edge computing node through the cloud platform. After the cloud platform receives the re-uploaded data (abnormal data and related data stored locally by the edge computing node), secondary verification and final judgment are performed in sequence.

[0030] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, comprising:

[0031] The preliminary anomaly judgment module is used to build an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establish a baseline prediction model through (lightweight) time series analysis, and generate theoretical electricity consumption prediction values; it acquires real-time electricity consumption data collected by the electricity meter, compares it with the theoretical electricity consumption prediction values, calculates the difference, and if the difference does not exceed the first threshold, it determines that the electricity meter is operating normally; if it exceeds the first threshold, it marks the electricity meter as a preliminary anomaly state and uploads the preliminary anomaly information and related data to the cloud platform.

[0032] The dynamic correction module is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call external data interfaces to obtain environmental factors affecting electricity consumption, analyze the historical behavior characteristics of users in the same period, identify whether there are personnel changes in the current time period, and dynamically correct the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate the corrected theoretical electricity consumption prediction value.

[0033] The secondary comparison and judgment module is used to compare the corrected theoretical electricity consumption prediction value with the real-time electricity consumption data. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

[0034] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, wherein the preliminary anomaly judgment module includes:

[0035] The data processing unit is used at the edge computing node to receive raw electricity consumption data (current, voltage, power, etc.) uploaded in real time by the electricity meter through the communication interface, perform integrity verification and format conversion on the raw electricity consumption data, extract target parameters (active power, reactive power, etc.), and store them in the local cache as historical electricity consumption data.

[0036] The theoretical value acquisition unit is used to retrieve historical electricity consumption data and calculate the mean, variance, and trend of electricity consumption for each time period using a sliding window statistical method to construct an electricity consumption behavior feature library. The features in the electricity consumption behavior feature library include daily electricity consumption patterns, holiday effects, and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature library, a (lightweight) time series prediction algorithm (such as exponential smoothing or ARIMA model) is used to generate the theoretical electricity consumption prediction value for the current time period, and a dynamic first threshold (such as ±15% of the prediction value) is set.

[0037] Select the upload unit to obtain the real-time electricity consumption data collected by the electricity meter, compare it with the theoretical electricity consumption prediction value, and calculate the deviation percentage. If the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues. If it exceeds the first threshold, the electricity meter is marked as having a preliminary abnormal state, and the preliminary abnormal information and related data (including electricity meter ID, timestamp, real-time data, prediction value, and deviation amount) are packaged and uploaded to the cloud platform.

[0038] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, wherein the dynamic correction module includes:

[0039] The environmental factor judgment unit is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call the API interface to obtain third-party data sources (such as weather data released by the meteorological bureau), and determine whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors.

[0040] The personnel change judgment unit is used to analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption pattern (such as weekday / rest day pattern) through clustering algorithm, compare the similarity between the electricity consumption curve of abnormal period and historical pattern, and combine external data to make a comprehensive judgment on whether there is a personnel change (such as family trip or temporary addition of population).

[0041] The prediction correction unit is used to dynamically correct the baseline prediction model based on the type of change (such as a decrease in electricity consumption due to people leaving home or an increase in electricity consumption due to people moving in) if environmental factors or personnel changes affecting electricity consumption are identified. The corrected theoretical electricity consumption prediction value is then compared with the real-time collected electricity consumption data to calculate the deviation after correction. At the same time, the trend of the deviation before and after correction is compared as a basis for judgment.

[0042] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, wherein the corrected theoretical electricity consumption prediction value is calculated as follows:

[0043] Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time;

[0044] Temperature Influence Factors ,in Let be the actual temperature at time t. This is a reference temperature (e.g., the human body's comfortable temperature can be taken as 20~25℃). The temperature sensitivity coefficient is obtained based on historical electricity consumption data. Historical load and temperature data are collected, and a linear regression equation is fitted using the least squares method. The slope of the regression equation is the temperature sensitivity coefficient. Positive values ​​represent cooling load, and negative values ​​represent heating load.

[0045] Factors affecting electricity prices ,in Let t be the change in electricity price at time t (positive for price increase, negative for price decrease). The benchmark electricity price, This is the price elasticity coefficient (usually a negative value, indicating that electricity consumption decreases as electricity prices rise, determined through historical electricity price experiments or user behavior analysis).

[0046] Number of people influencing factors ,in Let t be the change in the number of people at time t (an increase is positive, a decrease is negative). Based on the number of permanent residents, The factor representing the influence of the number of people (usually set to 1, indicating that electricity consumption is approximately proportional to the number of people, but can be fine-tuned according to the specific household electricity consumption structure); if a certain factor is absent (e.g., no electricity price adjustment), the corresponding factor is set to 1, resulting in the corrected theoretical electricity consumption forecast. .

[0047] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, wherein the secondary comparison and judgment module includes:

[0048] The normal recovery unit is used to compare the corrected theoretical electricity consumption forecast with the real-time electricity consumption data a second time. If the corrected deviation falls back to the preset first threshold range (e.g., from 20% to 5%), it is determined that the initial abnormal state is caused by normal electricity consumption fluctuations and the electricity meter is actually operating normally. The unit then sends a command to the edge computing node to restore the normal state (after receiving the command, the edge computing node updates its local feature library, such as including the current electricity consumption data as a normal sample in the historical library and clearing the current abnormality mark).

[0049] The abnormal alarm unit is used to determine that the electricity meter is faulty or abnormal if the corrected deviation still exceeds the first threshold, mark the electricity meter as the final abnormal state, generate alarm information including the abnormal type (such as metering deviation, communication failure), abnormal level, and suggested handling measures, and push it to the operation and maintenance personnel's terminal via SMS or APP.

[0050] The abnormal data storage unit is used to store all data of this abnormal event (including data uploaded by edge computing nodes, external factors, correction process, and final conclusions) into the abnormal database for subsequent baseline prediction model optimization and fault analysis.

[0051] In one embodiment, the present invention provides an online self-detection system for electricity meters based on edge computing, further comprising:

[0052] The regional anomaly detection module is used to count in real time the number of preliminary anomaly information reported by multiple edge computing nodes in the same geographical area during the same period through the cloud platform. If the number exceeds the preset second threshold, it is determined that a regional power grid event has occurred, and a pause upload command is issued to all edge computing nodes in the area. After receiving the pause upload command, the edge computing nodes temporarily store the power consumption data and anomaly information obtained by the subsequent edge computing nodes in the local cache, and continue to perform real-time monitoring and local judgment.

[0053] The regional anomaly determination module is used to monitor whether there is regional power grid event confirmation information from the power grid dispatch system or external data source within a preset third threshold time period through the cloud platform. If confirmation information is received before the waiting time reaches the third threshold, all related anomalies within that time period are marked as caused by regional power grid events in the cloud platform, and no secondary verification is performed. An instruction is issued to the edge computing node to clear the data cached locally when the regional power grid event occurred. If no confirmation information is received before the third threshold ends, a resumption upload instruction is issued to the edge computing node through the cloud platform. After the cloud platform receives the re-uploaded data (abnormal data and related data stored locally by the edge computing node), secondary verification and final determination are performed in sequence.

[0054] Compared with existing technologies, the beneficial effects of this invention are as follows: By deploying a lightweight baseline prediction model on edge computing nodes for preliminary screening, this invention only uploads suspected abnormal data to the cloud platform, effectively reducing the amount of data processing and network transmission pressure on the cloud, and achieving rapid response and filtering of abnormal data; by introducing external factors such as environmental factors and population changes into the cloud platform, the preliminary anomalies are further verified, which can accurately distinguish between real faults and normal fluctuations caused by changes in electricity consumption behavior, significantly reducing the false alarm rate and improving the accuracy of anomaly detection; through the collaborative work of the edge and the cloud, the advantages of low latency of edge computing are leveraged, while the powerful computing capabilities of the cloud are utilized, achieving efficient and accurate online self-detection of the status of electricity meters. Attached Figure Description

[0055] Figure 1 This is a schematic diagram of the first part of an online self-testing method for electricity meters based on edge computing, provided in an embodiment of the present invention.

[0056] Figure 2 This is a flowchart illustrating the first analysis of whether an energy meter has any abnormalities, provided as an embodiment of the present invention.

[0057] Figure 3 This is a schematic diagram illustrating the process of correcting theoretical electricity consumption predictions according to an embodiment of the present invention.

[0058] Figure 4 This is a schematic diagram of the second analysis process to determine whether an energy meter has any abnormalities, provided in an embodiment of the present invention.

[0059] Figure 5 This is a schematic diagram of the second part of an online self-testing method for electricity meters based on edge computing, provided in an embodiment of the present invention.

[0060] Figure 6 This is a schematic diagram of the first part of an online self-detection system for electricity meters based on edge computing, provided as an embodiment of the present invention.

[0061] Figure 7 This is a schematic diagram of the preliminary anomaly detection module provided in an embodiment of the present invention.

[0062] Figure 8 This is a schematic diagram of the dynamic correction module provided in an embodiment of the present invention.

[0063] Figure 9 This is a schematic diagram of the secondary comparison and judgment module provided in an embodiment of the present invention.

[0064] Figure 10 This is a schematic diagram of the second part of an online self-detection system for electricity meters based on edge computing, provided as an embodiment of the present invention. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0066] It is understood that the terms "first," "second," etc., used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are used only to distinguish one element from another. For example, without departing from the scope of this application, a first script may be referred to as a second script, and similarly, a second script may be referred to as a first script.

[0067] In one embodiment, such as Figure 1 As shown, an online self-testing method for electricity meters based on edge computing includes the following steps:

[0068] Step S1: Construct an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establish a baseline prediction model through (lightweight) time series analysis, and generate theoretical electricity consumption prediction values; acquire real-time electricity consumption data collected by the electricity meter, compare it with the theoretical electricity consumption prediction values ​​to calculate the difference, if the difference does not exceed the first threshold, the electricity meter is determined to be operating normally, if it exceeds the first threshold, the electricity meter is marked as a preliminary abnormal state, and the preliminary abnormal information and related data are uploaded to the cloud platform;

[0069] Step S2: Receive preliminary anomaly information and related data uploaded by edge computing nodes through the cloud platform, call external data interfaces to obtain environmental factors affecting electricity consumption, analyze the historical behavior characteristics of users in the same period, identify whether there are personnel changes in the current time period, dynamically correct the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information, and generate the corrected theoretical electricity consumption prediction value.

[0070] Step S3: The corrected theoretical electricity consumption prediction value is compared with the real-time electricity consumption data for the second time. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

[0071] A two-tier detection architecture, combining edge computing nodes and a cloud platform, is adopted. First, a lightweight baseline prediction model is used at the edge computing nodes for real-time preliminary screening, uploading only suspected anomaly data to the cloud. This aims to reduce network bandwidth pressure and cloud computing burden caused by massive data uploads, while enabling rapid response. Then, external information such as environmental factors and changes in user behavior are introduced into the cloud to dynamically correct the baseline prediction model, followed by a second comparison. This design aims to eliminate false alarms caused by normal life fluctuations (such as weather changes and population shifts), improving the accuracy and reliability of anomaly detection, ultimately achieving precise alerts and improved operational efficiency.

[0072] In one embodiment, such as Figure 2 As shown, an online self-detection method for electricity meters based on edge computing is described. Step S1 involves constructing an electricity consumption behavior feature library at the edge computing node based on historical electricity consumption data, establishing a baseline prediction model through time series analysis, and generating theoretical electricity consumption prediction values. The method also includes acquiring real-time electricity consumption data from the electricity meter, comparing it with the theoretical electricity consumption prediction values, calculating the difference, and determining that the electricity meter is operating normally if the difference does not exceed a first threshold. If the difference exceeds the first threshold, the electricity meter is marked as being in a preliminary abnormal state, and the preliminary abnormal information and related data are uploaded to the cloud platform. Specifically, this step includes:

[0073] Step S11: At the edge computing node, the raw electricity consumption data (current, voltage, power, etc.) uploaded in real time by the electricity meter is received through the communication interface. After the raw electricity consumption data is verified for integrity and converted into a format, the target parameters (active power, reactive power, etc.) are extracted and stored in the local cache as historical electricity consumption data.

[0074] Step S12: Retrieve historical electricity consumption data, and use the sliding window statistical method to calculate the mean, variance, and trend of electricity consumption in each time period to construct an electricity consumption behavior feature library. The features in the electricity consumption behavior feature library include daily electricity consumption patterns, holiday effects, and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature library, use a (lightweight) time series prediction algorithm (such as exponential smoothing or ARIMA model) to generate the theoretical electricity consumption prediction value for the current time period, and set a dynamic first threshold (such as ±15% of the prediction value).

[0075] Step S13: Obtain the real-time electricity consumption data collected by the electricity meter, compare it with the theoretical electricity consumption prediction value, and calculate the deviation percentage; if the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues; if it exceeds the first threshold, the electricity meter is marked as a preliminary abnormal state, and the preliminary abnormal information and related data (including electricity meter ID, timestamp, real-time data, prediction value, and deviation amount) are packaged and uploaded to the cloud platform.

[0076] Steps S11-S13 are performed at the edge computing node. By building an electricity consumption behavior feature library based on historical electricity consumption data at the edge node, and using sliding window statistics and time series prediction to generate a dynamic first threshold, the design aims to enable the baseline prediction model to adapt to the electricity consumption habits of different users and achieve personalized anomaly judgment. At the same time, only the preliminary anomaly data exceeding the first threshold is uploaded, thereby filtering redundant information at the source, reducing communication costs, and ensuring real-time monitoring and rapid response to the status of the electricity meter.

[0077] In one embodiment, such as Figure 3 As shown, an online self-detection method for electricity meters based on edge computing is described. Step S2 involves receiving preliminary anomaly information and related data uploaded by edge computing nodes through a cloud platform, calling external data interfaces to obtain environmental factors affecting electricity consumption, analyzing users' historical behavior characteristics for the same period, identifying whether there are personnel changes in the current time period, and dynamically correcting the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate a corrected theoretical electricity consumption prediction value. Specifically, this step includes:

[0078] Step S21: Receive preliminary anomaly information and related data uploaded by edge computing nodes through the cloud platform, call the API interface to obtain third-party data sources (such as weather data released by the meteorological bureau), and determine whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors.

[0079] Step S22: Analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption pattern (such as weekday / rest day pattern) through clustering algorithm, compare the similarity between the electricity consumption curve during abnormal periods and the historical pattern, and combine external data to make a comprehensive judgment on whether there are personnel changes (such as family trips or temporary addition of population).

[0080] Step S23: If environmental factors or personnel changes affecting electricity consumption are identified, the baseline prediction model is dynamically corrected according to the type of change (such as a decrease in electricity consumption due to going out or an increase in electricity consumption due to moving in), and a corrected theoretical electricity consumption prediction value is generated; the corrected theoretical electricity consumption prediction value is compared with the real-time collected electricity consumption data for the second time, and the deviation after correction is calculated; at the same time, the trend of deviation before and after correction is compared as a basis for judgment.

[0081] Steps S21-S23 are performed on the cloud platform, calling external data interfaces to obtain environmental factors such as temperature and electricity price, and combining them with the analysis of users' historical behavior and personnel changes to correct the baseline prediction model. The core purpose is to make up for the limitation of edge computing nodes relying solely on historical data and being unable to perceive external changes. By integrating multi-dimensional information, the true cause of electricity consumption fluctuations can be accurately identified, thereby effectively distinguishing between electricity meter failures and normal life fluctuations, and significantly reducing the false alarm rate.

[0082] In one embodiment, an online self-detection method for electricity meters based on edge computing calculates the corrected theoretical electricity consumption prediction value as follows:

[0083] Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time;

[0084] Temperature Influence Factors ,in Let be the actual temperature at time t. This is a reference temperature (e.g., the human body's comfortable temperature can be taken as 20~25℃). The temperature sensitivity coefficient is obtained based on historical electricity consumption data. Historical load and temperature data are collected, and a linear regression equation is fitted using the least squares method. The slope of the regression equation is the temperature sensitivity coefficient. Positive values ​​represent cooling load, and negative values ​​represent heating load.

[0085] Factors affecting electricity prices ,in Let t be the change in electricity price at time t (positive for price increase, negative for price decrease). The benchmark electricity price, This is the price elasticity coefficient (usually a negative value, indicating that electricity consumption decreases as electricity prices rise, determined through historical electricity price experiments or user behavior analysis).

[0086] Number of people influencing factors ,in Let t be the change in the number of people at time t (an increase is positive, a decrease is negative). Based on the number of permanent residents, The factor representing the influence of the number of people (usually set to 1, indicating that electricity consumption is approximately proportional to the number of people, but can be fine-tuned according to the specific household electricity consumption structure); if a certain factor is absent (e.g., no electricity price adjustment), the corresponding factor is set to 1, resulting in the corrected theoretical electricity consumption forecast. .

[0087] By introducing influencing factors such as temperature, electricity price, and number of people, the original theoretical electricity consumption forecast is corrected. The design aims to characterize the nonlinear impact of external factors on electricity consumption, making the corrected forecast more closely reflect the actual electricity consumption scenario. The coefficients of each factor (such as temperature sensitivity coefficient and price elasticity coefficient) can be obtained by fitting historical data, thereby achieving personalized adaptive correction for different users and different regions, significantly improving the accuracy of secondary verification.

[0088] In one embodiment, such as Figure 4As shown, an online self-detection method for electricity meters based on edge computing is described. Step S3 involves a secondary comparison between the corrected theoretical electricity consumption prediction and real-time electricity consumption data. If the difference falls back to within a first threshold range, the electricity meter is determined to be normal, and a command to restore normal operation is sent to the edge computing node. If the difference still exceeds the first threshold, the electricity meter is marked as being in a final abnormal state, an alarm message is generated, and maintenance personnel are notified. The steps specifically include:

[0089] Step S31: The corrected theoretical electricity consumption prediction value is compared with the real-time electricity consumption data for the second time. If the corrected deviation falls back to the preset first threshold range (e.g., from 20% to 5%), it is determined that the initial abnormal state is caused by normal electricity consumption fluctuations and the electricity meter is actually operating normally. An instruction to restore the normal state is sent to the edge computing node (after receiving the instruction, the edge computing node updates its local feature library, such as including the current electricity consumption data as a normal sample in the historical library and clearing the current abnormal mark).

[0090] Step S32: If the corrected deviation still exceeds the first threshold, the electricity meter is finally determined to be faulty or abnormal, the electricity meter is marked as the final abnormal state, and an alarm message containing the abnormality type (such as metering deviation, communication failure), abnormality level, and suggested handling measures is generated and pushed to the maintenance personnel's terminal via SMS or APP.

[0091] Step S33: Store all data of this abnormal event (including data uploaded by edge computing nodes, external factors, correction process, and final conclusion) into the abnormal database for subsequent baseline prediction model optimization and fault analysis.

[0092] By comparing the corrected theoretical electricity consumption prediction with real-time data a second time, if the deviation falls back to within the first threshold, it is determined to be a normal fluctuation and the system is restored to its normal state. If it still exceeds the limit, a final alarm is triggered. The purpose of this design is to form a closed-loop verification mechanism to avoid maintenance interference caused by a single misjudgment. At the same time, abnormal event data is stored in the database to provide data support for subsequent model optimization and fault analysis, thereby enabling the system to continuously learn and improve itself.

[0093] In one embodiment, such as Figure 5 As shown, an online self-testing method for electricity meters based on edge computing also includes:

[0094] Step S4: The cloud platform counts in real time the number of preliminary abnormal information reported by multiple edge computing nodes in the same geographical area during the same period. If the number exceeds the preset second threshold, it is determined that a regional power grid event has occurred, and a pause upload command is sent to all edge computing nodes in the area. After the edge computing node receives the pause upload command, it temporarily stores the electricity consumption data and abnormal information obtained by the subsequent edge computing nodes in the local cache, and continues to perform real-time monitoring and local judgment.

[0095] Step S5: Within the preset third threshold time period, the cloud platform monitors for confirmation information of regional power grid events from the power grid dispatch system or external data sources. If confirmation information is received before the waiting time reaches the third threshold, all related anomalies within that time period are marked as caused by regional power grid events in the cloud platform, and no secondary verification is performed. An instruction is sent to the edge computing node to clear the data cached locally when the regional power grid event occurs. If no confirmation information is received by the end of the third threshold, a resumption upload instruction is sent to the edge computing node through the cloud platform. After the cloud platform receives the re-uploaded data (abnormal data and related data stored locally by the edge computing node), the secondary verification and final judgment are performed in sequence.

[0096] The cloud platform counts the number of initial anomalies reported simultaneously by multiple edge computing nodes within the region. If the number exceeds a second threshold, a regional power grid event response is triggered, suspending data uploads and enabling local caching. This aims to address batch anomalies caused by regional events such as large-scale power outages and power grid maintenance, preventing instantaneous cloud overload and network congestion. By linking with the power grid dispatch system to confirm the nature of the event, adaptive control is achieved to ensure the stability of the system and data integrity under abnormal scenarios.

[0097] In one embodiment, such as Figure 6 As shown, an online self-detection system for electricity meters based on edge computing includes:

[0098] The preliminary anomaly judgment module 1 is used to build an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establish a baseline prediction model through (lightweight) time series analysis, and generate theoretical electricity consumption prediction values; acquire the electricity consumption data collected in real time by the electricity meter, compare it with the theoretical electricity consumption prediction values ​​to calculate the difference, if the difference does not exceed the first threshold, the electricity meter is determined to be operating normally, if it exceeds the first threshold, the electricity meter is marked as a preliminary anomaly state, and the preliminary anomaly information and related data are uploaded to the cloud platform;

[0099] The dynamic correction module 2 is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call external data interfaces to obtain environmental factors affecting electricity consumption, analyze the historical behavior characteristics of users in the same period, identify whether there are personnel changes in the current time period, and dynamically correct the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate the corrected theoretical electricity consumption prediction value.

[0100] The secondary comparison and judgment module 3 is used to compare the corrected theoretical electricity consumption prediction value with the real-time electricity consumption data. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

[0101] This can be further expanded to support adaptive detection in new energy scenarios. For example, in areas with a large number of users connected to distributed photovoltaic (PV) systems, the system needs to identify whether a user is a PV user, as PV power generation causes fluctuations in net electricity consumption. Relying solely on historical electricity consumption data might lead to a misjudgment of abnormally low electricity consumption at midday on a sunny day. By integrating solar irradiance data and PV installed capacity, and combining this with a distributed PV power generation model to dynamically correct theoretical electricity consumption predictions, misjudgments caused by PV power generation can be avoided. By incorporating PV power generation factors into the calculation, false alarms due to power generation can be avoided, and the system can also be used to determine whether the PV system is functioning properly.

[0102] In one embodiment, such as Figure 7 As shown, an online self-detection system for electricity meters based on edge computing includes a preliminary anomaly detection module 1 comprising:

[0103] Data processing unit 11 is used to receive raw electricity consumption data (current, voltage, power, etc.) uploaded in real time by the electricity meter at the edge computing node through the communication interface, perform integrity verification and format conversion on the raw electricity consumption data, extract target parameters (active power, reactive power, etc.), and store them in the local cache as historical electricity consumption data.

[0104] The theoretical value acquisition unit 12 is used to retrieve historical electricity consumption data, calculate the mean, variance, and trend of electricity consumption for each time period using a sliding window statistical method, and construct an electricity consumption behavior feature library. The features in the electricity consumption behavior feature library include daily electricity consumption patterns, holiday effects, and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature library, a (lightweight) time series prediction algorithm (such as exponential smoothing or ARIMA model) is used to generate the theoretical electricity consumption prediction value for the current time period, and a dynamic first threshold (such as ±15% of the prediction value) is set.

[0105] Select upload unit 13 to obtain real-time electricity consumption data collected by the electricity meter, compare it with the theoretical electricity consumption prediction value, and calculate the deviation percentage. If the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues. If it exceeds the first threshold, the electricity meter is marked as having a preliminary abnormal state, and the preliminary abnormal information and related data (including electricity meter ID, timestamp, real-time data, prediction value, and deviation amount) are packaged and uploaded to the cloud platform.

[0106] This can be further expanded into a system capable of user identification and behavioral pattern classification. For example, in shared living spaces such as rental apartments and shared housing, where there is high occupancy, the first threshold is prone to false alarms. By accessing sensing data such as smart door locks and the number of WiFi-connected devices, changes in the number of residents can be detected in real time. This information is then uploaded to a cloud platform and used directly as a basis to adjust theoretical electricity consumption forecasts.

[0107] In one embodiment, such as Figure 8 As shown, an online self-detection system for electricity meters based on edge computing includes a dynamic correction module 2 comprising:

[0108] The environmental factor judgment unit 21 is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call the API interface to obtain third-party data sources (such as weather data released by the meteorological bureau), and judge whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors.

[0109] The personnel change judgment unit 22 is used to analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption pattern (such as weekday / rest day pattern) through clustering algorithm, compare the similarity between the electricity consumption curve of abnormal period and historical pattern, and combine external data to make a comprehensive judgment on whether there is a personnel change (such as family trip or temporary addition of population).

[0110] The prediction correction unit 23 is used to dynamically correct the baseline prediction model according to the type of change (such as a decrease in electricity consumption due to going out or an increase in electricity consumption due to moving in) if environmental factors or personnel changes affecting electricity consumption are identified, and to generate a corrected theoretical electricity consumption prediction value; the corrected theoretical electricity consumption prediction value is compared with the real-time collected electricity consumption data to calculate the deviation after correction; at the same time, the trend of deviation before and after correction is compared as a basis for judgment.

[0111] By integrating meteorological rainfall data and soil moisture sensor data, an agricultural irrigation electricity consumption model can be constructed to automatically correct theoretical electricity consumption forecasts, distinguish seasonal fluctuations in agricultural electricity consumption, and further enable the identification of complex scenarios. For example, in agricultural irrigation areas, electricity consumption fluctuations are often related to soil moisture and rainfall. By integrating rainfall forecast data from meteorological departments and soil moisture sensor data, if it is identified that there has been sufficient rainfall recently and farmers have reduced pumping for irrigation, the theoretical electricity consumption forecast can be automatically corrected to take into account the seasonal characteristics of agricultural electricity consumption. At the same time, for greenhouse growers, temperature and humidity data inside the greenhouse can be introduced to distinguish between electricity consumption for crop growth and electricity consumption for environmental control, avoiding misjudging agricultural electricity consumption fluctuations as abnormal electricity meters.

[0112] In one embodiment, in an online self-detection system for electricity meters based on edge computing, the corrected theoretical electricity consumption prediction is calculated as follows:

[0113] Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time;

[0114] Temperature Influence Factors ,in Let be the actual temperature at time t. This is a reference temperature (e.g., the human body's comfortable temperature can be taken as 20~25℃). The temperature sensitivity coefficient is obtained based on historical electricity consumption data. Historical load and temperature data are collected, and a linear regression equation is fitted using the least squares method. The slope of the regression equation is the temperature sensitivity coefficient. Positive values ​​represent cooling load, and negative values ​​represent heating load.

[0115] Factors affecting electricity prices ,in Let t be the change in electricity price at time t (positive for price increase, negative for price decrease). The benchmark electricity price, This is the price elasticity coefficient (usually a negative value, indicating that electricity consumption decreases as electricity prices rise, determined through historical electricity price experiments or user behavior analysis).

[0116] Number of people influencing factors ,in Let t be the change in the number of people at time t (an increase is positive, a decrease is negative). Based on the number of permanent residents, The factor representing the influence of the number of people (usually set to 1, indicating that electricity consumption is approximately proportional to the number of people, but can be fine-tuned according to the specific household electricity consumption structure); if a certain factor is absent (e.g., no electricity price adjustment), the corresponding factor is set to 1, resulting in the corrected theoretical electricity consumption forecast. .

[0117] For electric vehicle users, their electricity consumption behavior is closely related to commuting habits and the frequency of charging station usage. By accessing electric vehicle charging records and energy storage charging and discharging data, and introducing charging behavior factors and energy storage factors, the corrected theoretical electricity consumption prediction is also multiplied by these factors. If it is identified that a user's nighttime electricity consumption decreases due to not charging on a business trip, a charging behavior correction factor can be automatically introduced to avoid misjudgment. Simultaneously, for users using energy storage devices, the system can combine energy storage charging and discharging data to correct the theoretical electricity consumption prediction, accurately distinguishing between electricity consumption decreases caused by energy storage discharging and electricity meter malfunctions.

[0118] In one embodiment, such as Figure 9 As shown, an online self-detection system for electricity meters based on edge computing includes a secondary comparison and judgment module 3 comprising:

[0119] The normal recovery unit 31 is used to compare the corrected theoretical electricity consumption prediction value with the real-time electricity consumption data for the second time. If the corrected deviation falls back to the preset first threshold range (for example, from 20% to 5%), it is determined that the initial abnormal state is caused by normal electricity consumption fluctuations and the electricity meter is actually operating normally. The unit then sends a command to the edge computing node to restore the normal state (after receiving the command, the edge computing node updates its local feature library, such as including the current electricity consumption data as a normal sample in the historical library and clearing the current abnormality mark).

[0120] The abnormal alarm unit 32 is used to determine that the electricity meter is faulty or abnormal if the corrected deviation still exceeds the first threshold, mark the electricity meter as the final abnormal state, generate alarm information including the abnormal type (such as metering deviation, communication failure), abnormal level, and suggested handling measures, and push it to the operation and maintenance personnel terminal via SMS or APP.

[0121] The abnormal data storage unit 33 is used to store all data of this abnormal event (including the data uploaded by the edge computing node, external factors, correction process, and final conclusion) into the abnormal database for subsequent baseline prediction model optimization and fault analysis.

[0122] In commercial complex scenarios, if multiple shops' electricity meters report abnormalities simultaneously, the system can make a comprehensive judgment by combining information such as shop operating hours and holiday promotional activities. If a restaurant is detected to have a sudden drop in electricity consumption during the lunch peak, the system can analyze the operating characteristics of the shop's exhaust fans and refrigeration equipment to preliminarily determine whether the decrease in electricity consumption is caused by equipment failure rather than an abnormality in the electricity meter itself. The system can generate different levels of alarms based on the type of fault; for example, it can remind merchants to check their equipment for failures and dispatch maintenance orders for abnormal electricity meters.

[0123] In one embodiment, such as Figure 10 As shown, an online self-detection system for electricity meters based on edge computing also includes:

[0124] The regional anomaly detection module 4 is used to count in real time the number of preliminary anomaly information reported by multiple edge computing nodes in the same geographical area during the same period through the cloud platform. If the number exceeds the preset second threshold, it is determined that a regional power grid event has occurred, and a pause upload command is issued to all edge computing nodes in the area. After the edge computing node receives the pause upload command, it temporarily stores the power consumption data and anomaly information obtained by the subsequent edge computing nodes in the local cache, and continues to perform real-time monitoring and local judgment.

[0125] The regional anomaly determination module 5 is used to monitor whether there is regional power grid event confirmation information from the power grid dispatch system or external data source within a preset third threshold time period through the cloud platform. If confirmation information is received before the waiting time reaches the third threshold, all related anomalies within that time period are marked as caused by regional power grid events in the cloud platform, and no secondary verification is performed. An instruction is issued to the edge computing node to clear the data cached locally when the regional power grid event occurs. If no confirmation information is received when the third threshold ends, a resumption upload instruction is issued to the edge computing node through the cloud platform. After the cloud platform receives the re-uploaded data (abnormal data and related data stored locally by the edge computing node), secondary verification and final judgment are performed in sequence.

[0126] The second threshold is based on a combination of historical statistics and dynamic baselines. First, the historical distribution of the number of edge nodes simultaneously reporting preliminary anomalies in different time periods under normal operating conditions in the region is statistically analyzed, and their mean μ and standard deviation σ are calculated. The second threshold is initially set as μ + 3σ (i.e., statistical anomalies exceeding the normal fluctuation range). Second, it is adjusted based on the regional power grid topology. If the region contains critical power supply nodes (such as substations), the threshold can be appropriately lowered to improve sensitivity. The second threshold needs to be automatically updated periodically to adapt to regional user growth or changes in electricity consumption structure.

[0127] The third threshold is determined based on the regional power grid event response time and business requirements. First, it is used as a benchmark (e.g., 30 minutes) by referring to the average response time of the power grid dispatching system from the occurrence of an event to the issuance of an acknowledgment message. Second, it is adjusted in conjunction with the local cache capacity of the edge nodes to ensure that the local cache does not overflow during the waiting period, generally set to 80% of the local sustainable cache duration. The third threshold can be automatically adjusted according to the dynamic changes in historical event acknowledgment time, achieving adaptive optimization.

[0128] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0129] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0130] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0131] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0132] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. An online self-testing method for electricity meters based on edge computing, characterized in that, The online self-testing method for electricity meters based on edge computing includes the following steps: At the edge computing node, an electricity consumption behavior feature library is built based on historical electricity consumption data. A baseline prediction model is established through time series analysis to generate theoretical electricity consumption prediction values. The electricity consumption data collected in real time by the electricity meter is obtained and compared with the theoretical electricity consumption prediction values ​​to calculate the difference. If the difference does not exceed the first threshold, the electricity meter is determined to be operating normally. If it exceeds the first threshold, the electricity meter is marked as a preliminary abnormal state, and the preliminary abnormal information and related data are uploaded to the cloud platform. The cloud platform receives preliminary anomaly information and related data uploaded by edge computing nodes, calls external data interfaces to obtain environmental factors affecting electricity consumption, analyzes the historical behavior characteristics of users in the same period, identifies whether there are personnel changes in the current time period, and dynamically corrects the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate the corrected theoretical electricity consumption prediction value. The corrected theoretical electricity consumption forecast is compared with the real-time electricity consumption data a second time. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

2. The online self-testing method for energy meters based on edge computing according to claim 1, characterized in that, The process involves building an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establishing a baseline prediction model through time series analysis, and generating theoretical electricity consumption prediction values. The process of acquiring real-time electricity consumption data from the electricity meter, comparing it with theoretical electricity consumption predictions, calculating the difference, and determining that the electricity meter is operating normally if the difference does not exceed a first threshold, and marking the electricity meter as having a preliminary abnormal state if it exceeds the first threshold, and uploading the preliminary abnormality information and related data to the cloud platform, specifically includes: At the edge computing node, the raw electricity consumption data uploaded in real time by the electricity meter is received through the communication interface. After the raw electricity consumption data is verified for integrity and converted in format, the target parameters are extracted and stored in the local cache as historical electricity consumption data. Historical electricity consumption data is retrieved, and the mean, variance, and trend of electricity consumption in each time period are calculated using the sliding window statistical method to construct an electricity consumption behavior feature database. The features in the electricity consumption behavior feature database include daily electricity consumption patterns, holiday effects, and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature database, a time series prediction algorithm is used to generate the theoretical electricity consumption prediction value for the current time period, and a dynamic first threshold is set. The system acquires real-time electricity consumption data from the electricity meter, compares it with the theoretical electricity consumption prediction value, and calculates the percentage deviation. If the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues. If the deviation exceeds the first threshold, the electricity meter is marked as being in a preliminary abnormal state, and the preliminary abnormal information and related data are packaged and uploaded to the cloud platform.

3. The online self-testing method for energy meters based on edge computing according to claim 1, characterized in that, The steps of receiving preliminary anomaly information and related data uploaded by edge computing nodes through the cloud platform, calling external data interfaces to obtain environmental factors affecting electricity consumption, analyzing users' historical behavior characteristics for the same period, identifying whether there are personnel changes in the current time period, and dynamically correcting the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate a corrected theoretical electricity consumption prediction value specifically include: The cloud platform receives preliminary anomaly information and related data uploaded by edge computing nodes, calls API interfaces to obtain third-party data sources, and determines whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors. Analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption patterns through clustering algorithms, compare the similarity between the electricity consumption curves during abnormal periods and historical patterns, and combine external data to comprehensively determine whether there are personnel changes. If environmental factors or personnel changes affecting electricity consumption are identified, the baseline prediction model is dynamically adjusted according to the type of change to generate a revised theoretical electricity consumption prediction value. The revised theoretical electricity consumption prediction value is then compared with the real-time collected electricity consumption data to calculate the revised deviation. At the same time, the trend of deviation changes before and after the revision is compared as a basis for judgment.

4. The online self-testing method for energy meters based on edge computing according to claim 3, characterized in that, The revised theoretical electricity consumption prediction is calculated as follows: Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time; Temperature Influence Factors ,in Let be the actual temperature at time t. For reference temperature, This refers to the temperature sensitivity coefficient. Factors affecting electricity prices ,in Let be the change in electricity price at time t. The benchmark electricity price, This is the price elasticity coefficient; Number of people influencing factors ,in Let be the change in the number of people at time t. Based on the number of permanent residents, The number of people is the influence coefficient; if a certain factor does not exist, the corresponding factor is set to 1, and the corrected theoretical electricity consumption forecast value is... .

5. The online self-testing method for energy meters based on edge computing according to claim 1, characterized in that, The corrected theoretical electricity consumption prediction value is compared with the real-time electricity consumption data a second time. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If the first threshold is still exceeded, the electricity meter is marked as being in a final abnormal state, an alarm message is generated, and maintenance personnel are notified. The specific steps include: The corrected theoretical electricity consumption forecast is compared with the real-time electricity consumption data a second time. If the corrected deviation falls back to the preset first threshold range, it is determined that the initial abnormal state is caused by normal electricity consumption fluctuations and the electricity meter is actually operating normally. An instruction to restore the normal state is then sent to the edge computing node. If the corrected deviation still exceeds the first threshold, the electricity meter is finally determined to be faulty or abnormal, the electricity meter is marked as the final abnormal state, and an alarm message containing the abnormality type, abnormality level and suggested handling measures is generated and pushed to the operation and maintenance personnel's terminal via SMS or APP. All data from this anomaly event will be stored in the anomaly database for subsequent baseline prediction model optimization and fault analysis.

6. The online self-testing method for energy meters based on edge computing according to any one of claims 1 to 5, characterized in that, The online self-testing method for electricity meters based on edge computing also includes: The cloud platform counts in real time the number of preliminary anomaly information reported by multiple edge computing nodes in the same geographical area at the same time. If the number exceeds the preset second threshold, a regional power grid event is determined to have occurred, and a pause upload command is issued to all edge computing nodes in the area. After receiving the pause upload command, the edge computing nodes temporarily store the electricity consumption data and anomaly information obtained by the subsequent edge computing nodes in the local cache, and continue to perform real-time monitoring and local judgment. Within a preset third threshold time period, the cloud platform monitors for confirmation information of regional power grid events from the power grid dispatch system or external data sources. If confirmation information is received before the waiting time reaches the third threshold, all related anomalies within that time period are marked as caused by regional power grid events in the cloud platform, and no secondary verification is performed. An instruction is then sent to the edge computing node to clear the data cached locally when the regional power grid event occurred. If no confirmation information is received by the end of the third threshold, a command to resume uploading is sent to the edge computing node through the cloud platform. After the cloud platform receives the re-uploaded data, secondary verification and final judgment are performed sequentially.

7. An online self-testing system for electricity meters based on edge computing, characterized in that, The edge computing-based online self-testing system for electricity meters includes: The preliminary anomaly judgment module is used to build an electricity consumption behavior feature library based on historical electricity consumption data at the edge computing node, establish a baseline prediction model through time series analysis, and generate theoretical electricity consumption prediction values; acquire the electricity consumption data collected in real time by the electricity meter, compare it with the theoretical electricity consumption prediction value to calculate the difference. If the difference does not exceed the first threshold, the electricity meter is determined to be operating normally. If it exceeds the first threshold, the electricity meter is marked as a preliminary anomaly state, and the preliminary anomaly information and related data are uploaded to the cloud platform. The dynamic correction module is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call external data interfaces to obtain environmental factors affecting electricity consumption, analyze the historical behavior characteristics of users in the same period, identify whether there are personnel changes in the current time period, and dynamically correct the baseline prediction model based on the identified environmental factors affecting electricity consumption and personnel change information to generate the corrected theoretical electricity consumption prediction value. The secondary comparison and judgment module is used to compare the corrected theoretical electricity consumption prediction value with the real-time electricity consumption data. If the difference falls back to the first threshold range, the electricity meter is determined to be normal, and an instruction to restore the normal state is sent to the edge computing node. If it still exceeds the first threshold, the electricity meter is marked as the final abnormal state, an alarm message is generated, and the operation and maintenance personnel are notified.

8. The online self-testing system for electricity meters based on edge computing according to claim 7, characterized in that, The preliminary anomaly detection module includes: The data processing unit is used at the edge computing node to receive the raw electricity consumption data uploaded in real time by the electricity meter through the communication interface, perform integrity verification and format conversion on the raw electricity consumption data, extract the target parameters, and store them in the local cache as historical electricity consumption data. The theoretical value acquisition unit is used to retrieve historical electricity consumption data, calculate the mean, variance and trend of electricity consumption in each time period using the sliding window statistical method, and construct an electricity consumption behavior feature library. The features in the electricity consumption behavior feature library include daily electricity consumption patterns, holiday effects and seasonal fluctuations. Based on the historical patterns in the electricity consumption behavior feature library, the theoretical electricity consumption prediction value for the current time period is generated using a time series prediction algorithm, and a dynamic first threshold is set. Select the upload unit to obtain the real-time electricity consumption data collected by the electricity meter, compare it with the theoretical electricity consumption prediction value, and calculate the percentage deviation. If the deviation is within the first threshold, the electricity meter is determined to be operating normally and monitoring continues. If it exceeds the first threshold, the electricity meter is marked as having a preliminary abnormal state, and the preliminary abnormal information and related data are packaged and uploaded to the cloud platform.

9. The online self-testing system for electricity meters based on edge computing according to claim 7, characterized in that, The dynamic correction module includes: The environmental factor judgment unit is used to receive preliminary abnormal information and related data uploaded by edge computing nodes through the cloud platform, call the API interface to obtain third-party data sources, and determine whether there are environmental factors affecting electricity consumption during the abnormal period. Environmental factors affecting electricity consumption include temperature factors and electricity price factors. The personnel change judgment unit is used to analyze the user's historical electricity consumption behavior during the same period, identify the user's typical electricity consumption pattern through clustering algorithm, compare the similarity between the electricity consumption curve during abnormal periods and the historical pattern, and combine external data to make a comprehensive judgment on whether there is a personnel change. The prediction correction unit is used to dynamically correct the baseline prediction model based on the type of change if environmental factors or personnel changes affecting electricity consumption are identified, and generate a corrected theoretical electricity consumption prediction value. The corrected theoretical electricity consumption prediction value is then compared with the real-time collected electricity consumption data to calculate the deviation after correction. At the same time, the trend of deviation changes before and after correction is compared as a basis for judgment.

10. The online self-testing system for electricity meters based on edge computing according to claim 9, characterized in that, The revised theoretical electricity consumption prediction is calculated as follows: Define the original theoretical electricity consumption forecast value as The revised theoretical electricity consumption forecast is t refers to time; Temperature Influence Factors ,in Let be the actual temperature at time t. For reference temperature, This refers to the temperature sensitivity coefficient. Factors affecting electricity prices ,in Let be the change in electricity price at time t. The benchmark electricity price, This is the price elasticity coefficient; Number of people influencing factors ,in Let be the change in the number of people at time t. Based on the number of permanent residents, The number of people is the influence coefficient; if a certain factor does not exist, the corresponding factor is set to 1, and the corrected theoretical electricity consumption forecast value is... .